<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Jeremy, could you perhaps post the final solution? I've noticed in
the past when I search through the archives of the list that
occassionaly the exact problem is mentioned that I'm struggling with,
and then the final working solution is left out apart from a "working
now" post. Who knows when I might have the same problem?<br>
<br>
Cheers,<br>
Phil.<br>
<br>
Jeremy Coulter wrote:
<blockquote cite="midWorldClient-F200506271037.AA37440003@vss.co.nz"
type="cite">
<pre wrap="">It turned out a bit more complex that this unfortunitly....thanks to Kyley
Harris who helped out yesterday, not its all go :-)
Jeremy
-----Original Message-----
From: "Allan, Samuel" <a class="moz-txt-link-rfc2396E" href="mailto:S.A.Allan@massey.ac.nz"><S.A.Allan@massey.ac.nz></a>
To: "NZ Borland Developers Group - Delphi List" <a class="moz-txt-link-rfc2396E" href="mailto:delphi@ns3.123.co.nz"><delphi@ns3.123.co.nz></a>
Date: Mon, 27 Jun 2005 09:21:05 +1200
Subject: RE: [DUG] Callback events from DLLs
</pre>
<blockquote type="cite">
<pre wrap="">I don't know how being in a DLL effects things, but if I understand you
right, you are trying to do something like:
Type
TREvent = procedure(sUsername : PChar; ievent:integer);
function StartFunction(lpPath : PChar; oTREvent : TREvent): boolean;
begin
...
if oTREvent <> nil then
oTREvent('username', 12);
...
end;
And then put a bunch of DLL stuff around it. But when you call
StartFunction, and pass in a procedure it will cause the procedure to
be
run also.
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@ns3.123.co.nz">delphi-bounces@ns3.123.co.nz</a>
[<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]
On Behalf Of Jeremy Coulter
Sent: Friday, June 24 2005 4:06 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] Callback events from DLLs
Hi All.....I will TRY and clarify what I am trying to do.
I have a DLL that has a callback event in it.
I then created a type :-
Type
TREvent = procedure(sUsername : PChar; ievent:integer) ;
stdcall;
Then I declare the function I am calling in the DLL (I am using
LoadLibrary)
TRStart = Function (lpPath : PChar; oTREvent : TREvent) :
boolean;
stdcall;
Now what I am not sure how to do is, have a procedure fire when the
event is
triggered.
Is this possible? Or do I have to pool the event object?
The event will trigger at any time.
Hope this clears up what I am trying to do.
Jeremy
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@ns3.123.co.nz">delphi-bounces@ns3.123.co.nz</a>
[<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]
On
Behalf Of Jeremy Coulter
Sent: 24 June 2005 15:32
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] Callback events from DLLs
Actually....I have remembered a bit.
I am just trying to remember how to assign the event to a procedure.
jeremy
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@ns3.123.co.nz">delphi-bounces@ns3.123.co.nz</a>
[<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]
On
Behalf Of Jeremy Coulter
Sent: 24 June 2005 15:02
To: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Subject: [DUG] Callback events from DLLs
Hi All.
Some time ago I did some stuff with Callback events from a DLL.
I have to do it again (different DLL) and I cant find the code, and my
memory is not that good :-)
How would I handle the following in Delphi?
BOOL RStart(char* lpPath, onREvent event)
This function has just been altered and I used to declare it
Function RStart(lPath:PChar) : boolean; stdCall; external the.dll
How would I handle it now that it uses an event?
Jeremy
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
</body>
</html>