Sorry if this question has been asked in the past, but i'm confused!
I have an app and a DLL, both in Delphi. The Dll has a form that i want to show(no modal) inside a Groupbox. In the main app i have enabled runtime packages. In the DLL if i disable them, then works ok with the code bellow.
in DLL :
procedure showInfo(app : Thandle; GB : TGroupBox); stdcall;
begin
// application.Handle := app; // are the same
FormSysInfo := TFormSysInfo.CreateParented(GB.handle);
FormSysInfo.show;
end;
procedure destroyInfo; stdcall;
begin
FormSysInfo.destroy;
end;
exports showInfo index 1,
destroyInfo index 2;
in main app :
procedure loadSysInfo;
var showInfo : procedure(app : Thandle; GB : TGroupBox); stdcall;
begin
sysInfo := LoadLibrary('SysInfo.dll');
if sysInfo <> 0 then begin
@showInfo := GetProcAddress(sysInfo, 'showInfo');
@destroyInfo := GetProcAddress(sysInfo, 'destroyInfo');
if @showInfo <> NIL then showInfo(application.handle,mainForm.GroupBox8);
end;
end;
but didn't show if i enable runtime packages for the DLL (I want to reduce the size). How can i manage this, please ? thanks in advance