I am new with application handlers and have the following problem:
I am using using a dll for some more often used procedures. These functions include a form. Problem is that the form closes after completing the first procedure executed. Problem is that i dont want that, it has to be closed AFTER completing the procedure and AFTER i click a close button
programma code
[code ]
type
TLibSIKBprotocolExportPakketten = procedure; stdcall;
..
procedure TForm1.Button1Click(Sender: TObject);
var
LibHandle:THandle;
CallExportAanvraagPakketten:TLibSIKBprotocolExportPakketten;
begin
LibHandle:=LoadLibrary('PDlltest.dll');
if LibHandle = 0 then
ShowMessage('Kan PDlltest.dll niet laden');
try
CallExportAanvraagPakketten:=GetProcAddress(LibHandle,'ExportAanvraagPakketten');
CallExportAanvraagPakketten;
finally
FreeLibrary(LibHandle);
end;
end;
[/code]
dll code
[code ]
procedure ExportAanvraagPakketten; stdcall;
begin
try
FormAanvraagAnalysePakketten:=TFormAanvraagAnalysePakketten.Create(nil);
try
FormAanvraagAnalysePakketten.StartExportAnalysePakketten;
FormAanvraagAnalysePakketten.close;
finally
FormAanvraagAnalysePakketten.Free;
end;
except on E: Exception do
MessageDLg('De volgende fout is opgetreden:'+#10+
E.Message +#10+
'Foutcode: '+IntToStr(E.HelpContext),mtWarning,[mbOK],0);
end;
end;
[/code]
I already heard that is has something to do with sending the application handler, but how to do this? Any help is appreciated.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
irenicus:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
kacor
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
to accept pderuiter's answer
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones
kacor
EE Cleanup Volunteer
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.