<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
If you want only one global callback for all dlls and all instances of
your component then you could do the following.<br>
<br>
1/ When your component is created and destroyed, add and remove it from
an internal TList or similar.<br>
2/ Each time you open a dll, bind it to the same single callback which
can do the following (psuedo code)<br>
<br>
proc GlobalOpen(bla1,bla2,bla3:integer)<br>
var<br>
i:integer;<br>
DLLName:string;<br>
begin<br>
DLLNAme := WalkCurrentProcessStackForDllName;<br>
{Doesn't have to go far because this is always called from a dll}<br>
for i := 0 to _List.Count -1 do<br>
if _List[i].InterestedInDLL(DllName) then<br>
_List[i].Open(bla1,bla2,bla3)<br>
end;<br>
<br>
regards<br>
Kyley<br>
Ross Levis wrote:
<blockquote cite="mid001c01c585ee$58c085d0$5100a8c0@levis4" type="cite">
<pre wrap="">Kyley Harris wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I find it interesting that your 1..2..3 option would actually work.
</pre>
</blockquote>
<pre wrap=""><!---->Generally, when there is a single procedure callback, it is not a nested
type system, so the minute the second form is opened and you attach
Open2, the link
to Open1 no longer exists, because it can only hold one method at a
time....
unless there is something missing in what you are showing us.
I was disappointed to find this was the case when using the same DLL.
I'm dealing with Winamp input plugins here so there are several DLL's to
handle different types of files, all with the same structure, so they
are interchangeable. I tried it with 2 different DLL's and it worked
fine, but the same DLL obviously doesn't. I guess there is no way to
force a second instance of the same DLL to load into 2 memory locations
without perhaps making a 2nd copy of the file and changing it's name?
Regards,
Ross.
_______________________________________________
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>