[DUG] call a method function from outside object

Ross Levis ross at stationplaylist.com
Sun Jul 3 17:48:22 NZST 2005


In trying to solve this I thought of using method functions inside an 
object rather than standard functions, and then assigning the method 
pointer to the DLL, but I can't seem to do this either.  eg. In a class 
procedure I do this...

  DLLOpen := TMethod(Open).Code;  <<< Invalid typecast

Open is a function defined in the same class
DLLOpen is the function pointer defined in the DLL which I need to 
assign to the method pointer.

I'm not sure why this doesn't work.  My only other option is to use 
global variables!

Regards,
Ross.

----- Original Message ----- 
From: "Ross Levis" <ross at stationplaylist.com>
To: "NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
Sent: Sunday, July 03, 2005 4:56 PM
Subject: [DUG] call a method function from outside object


In a component I'm writing, a DLL needs access to a standard function so
this is declared outside the main object.  Within this function I want
to access variables and methods inside the main object, but I can't find
a way to do it.  Is this possible?

Thanks,
Ross.

_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi



More information about the Delphi mailing list