OK, there is definitely something that I'm missing. From SysUtils:
function PackageInfoTable(Module: HMODULE): PPackageInfoHeader;
var
ResInfo: HRSRC;
Data: THandle;
begin
Result := nil;
ResInfo := FindResource(Module, 'PACKAGEINFO', RT_RCDATA);
if ResInfo <> 0 then
begin
Data := LoadResource(Module, ResInfo);
if Data <> 0 then
try
Result := LockResource(Data);
UnlockResource(Data);
finally
FreeResource(Data);
end;
end;
end;
So, if you are getting this last error, your package does not have the necessary PACKAGEINFO resource attached to it. This is probably also the cause of your first error (created with a different version of Delphi).
Appologies for asking this, but did you create the package by selecting File->New->Package-Delphi? I'm asking, because this have all the hallmarks of a library that simply has the bpl extention.
If you are certain that the package was created in the right way, may I suggest that you search your entire hard drive for a DLL file of the same name. And all the bpl packages that you do find, you should execute the following for:
C:\Program Files\CodeGear\RAD Studio\5.0\bin\tdump.exe mypackage.bpl>mypackage.txt
In your mypackage.txt file there should then be a resource called PACKAGEINFO.
Alternatively, you can download filemon.exe from live.sysinternals.com, set a bds filter and spy on what the IDE is actually trying to load. It could very well be another package that is being loaded by your package and that this second package does not have PACKAGEINFO attached.