Hi all, probably a dumb question again :-)

I am using a dll to load a form but it keeps disappearing because I have
a FreeLibrary in my finally clause.  It loads fine, the form flashes on
the screen and then goes away.  Do I need some kind of callback function
to stop it disappearing?

// Prototypes defined

try

    hDllHandle := LoadLibrary(DllName);

        if hdllHandle > 22 then begin

            @ExecuteProgram := GetProcAddress(hDllHandle,
'ExecuteProgram');

        end;

        if @ExecuteProgram <> nil then begin
              try
                    ExecuteProgram;
              except

              end;
       end;

finally

    FreeLibrary(hdllHandle);

end;
--


Tony Sinclair
Christchurch
New Zealand

"I like deadlines.  I especially like the
sound they make as they go wizzing by."


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to