Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Feb : LoadLibrary & MDI Child

www.cryer.info
Managed Newsgroup Archive

LoadLibrary & MDI Child

Subject:LoadLibrary & MDI Child
Posted by:"Jojo" (jojo_casilao{de..@yahoo{del}.com)
Date:Thu, 9 Feb 2006 10:46:40 +0800

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

Glossary

File Types

Replies:

www.cryer.info
Managed Newsgroup Archive