<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks for that. I think I follow.
Are you saying that the current DLL calling my procedure will be in the
process stack, but the other DLL in the 2nd component not currently calling
the procedure will not be in the stack? That should work. But I
won't need to do this now.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rob Kennedy from an international mailing list has
just sent me a unit he wrote today which does exactly what I
need. It uses ASM code to fiddle things so that a call made to a
standard (cdecl) procedure address is converted to a method call. I just
implemented it and it works great!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Ross.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=KyleyHarris@gmail.com href="mailto:KyleyHarris@gmail.com">Kyley
Harris</A> </DIV>
<DIV style="FONT: 10pt arial"><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: 10pt arial"><B>Sent:</B> Monday, July 11, 2005 8:46 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Spam] Re: [DUG] call a method
function from outside object</DIV>
<DIV><FONT face=Arial size=2></FONT><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>
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>
<P>
<HR>
<P></P>_______________________________________________<BR>Delphi mailing
list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></BLOCKQUOTE></BODY></HTML>