<!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">
Yes, your interpretation of what I said is correct. The Call Stack of
the current executing thread would identify your callback routine, then
the proc in the dll calling it, and then the dll that is calling it...<br>
<br>
Probably don't need what rob did, but it certainly sounds curious how
he has tampered to get it work. Send the snip for R&amp;D value if you
don't mind.<br>
<br>
Ross Levis wrote:
<blockquote cite="mid006a01c585fd$fb8a1d80$5100a8c0@levis4" type="cite">
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <meta content="MSHTML 6.00.2900.2668" name="GENERATOR">
  <style></style>
  <div><font face="Arial" size="2">Thanks for that.&nbsp; I think&nbsp;I follow.&nbsp;
Are you saying that the current DLL calling my procedure will be&nbsp;in the
process stack, but the other DLL in the 2nd component not currently
calling the&nbsp;procedure will not be in the stack?&nbsp; That should work.&nbsp; But
I won't need to do this now.</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">Rob Kennedy from an international
mailing list has just sent me&nbsp;a unit he&nbsp;wrote today&nbsp;which does exactly
what I need.&nbsp; It uses&nbsp;ASM code to fiddle things so that a call made to
a standard (cdecl) procedure address is converted to a method call.&nbsp; I
just implemented it and it works great!</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">I doubt anyone else would need such
as thing but I can pass it on if anyone is interested.</font></div>
  <div>&nbsp;</div>
  <div><font face="Arial" size="2">Regards,</font></div>
  <div><font face="Arial" size="2">Ross.</font></div>
  <blockquote
 style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">-----
Original Message ----- </div>
    <div
 style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
    <a title="KyleyHarris@gmail.com" href="mailto:KyleyHarris@gmail.com">Kyley
Harris</a> </div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b>
    <a title="delphi@ns3.123.co.nz" href="mailto:delphi@ns3.123.co.nz">NZ
Borland Developers Group - Delphi List</a> </div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b>
Monday, July 11, 2005 8:46 PM</div>
    <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b>
[Spam] Re: [DUG] call a method function from outside object</div>
    <div><br>
    </div>
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>
&nbsp; i:integer;<br>
&nbsp;DLLName:string;<br>
begin<br>
&nbsp; DLLNAme := WalkCurrentProcessStackForDllName;<br>
&nbsp;{Doesn't have to go far because this is always called from a dll}<br>
for i := 0 to _List.Count -1 do<br>
&nbsp; if _List[i].InterestedInDLL(DllName) then<br>
&nbsp; _List[i].Open(bla1,bla2,bla3)<br>
end;<br>
    <br>
regards<br>
&nbsp; 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>
    <p> </p>
    <hr> _______________________________________________<br>
Delphi mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><br>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><br>
  </blockquote>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>