My application is built using runtime packages and loads them by using the LoadPackage
function.
Then it uses the GetClass
function to obtain class types.
var
MyClass : TPersistentClass;
begin
if(LoadPackage('.\PackageA.bpl') = 0) then
raise Exception.Create('Error loading PackageA.bpl');
if(LoadPackage('.\PackageB.bpl') = 0) then
raise Exception.Create('Error loading PackageB.bpl');
MyClass := GetClass('TMyClass');
end;
Is there any way to get the name of the package from which MyClass
comes from?