Good day.
I have a MDI application that dynically loads a DLL.
The dll has a procedure that create MDI Child form.
But when i run the application i got a message "NO MDI FORM CREATED ERROR".
My plan is to create a MDI child on the library and attach it on my main
form. it there a way that i could do this?
Heres my code
----- Main Application ---
procedure TForm1.LoadReportLibrary;
var RepModule : TReportModule;
begin
FReportLib := LoadLibrary('ClientDLL.dll');
If FReportLib <> 0 Then
Begin
RepModule := GetProcAddress(FReportLib, 'ShowReportForm');
If @RepModule <> Nil Then
RepModule;
End
Else RaiseLastOSError;
end;
---- DLL ----
Procedure ShowReportForm;
Begin
TForm2.Create(Nil);
End;
Cheers!
Jojo