On Wed, 27 Apr 2011, Leonardo M. Ramé wrote:

Hi, I'm using a shared library that allows me to pass a pointer to a
function to act as a callback.

To execute my function I use something like this:

myDllFunction(param1, param2,..., paramn, @myCallback);

myCallback is a regular procedure.

What if I want to use a "procedure of object" (method) instead of a
regular procedure?. Is this possible at all?.

In theory: maybe.

In practice : no. The VMTs will be different, and this will lead to all
kinds of problems. AnsiString properties will also require special handling.

I would not recommend it.

Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to