Page 1 of 1

Hooking to class method

Posted: Mon Jun 21, 2004 9:01 pm
by SpiderVenom
When I'm creating a function in madCodeHook to receive IPC messages from the DLL, is it possible for it to be a class method?

Posted: Tue Jun 22, 2004 6:31 pm
by madshi
Not directly, but you can trick by using MethodToProcedure.

Please note, that the IPC handler must be thread safe (I'm just saying that just in case).

Posted: Tue Jun 22, 2004 8:09 pm
by SpiderVenom
Um, at the risk of sounding lame... where is MethodToProcedure? I can't find it anywhere.

Posted: Tue Jun 22, 2004 8:30 pm
by madshi
It's available for Delphi only. Are you using Delphi? Then just type "MethodToProcedure" into the Delphi editor and press F1. This works only with D6+D7, though. In D4+D5 you have to manually open the madBasic documentation. "MethodToProcedure" is implemented in the unit madTools.

Posted: Wed Jun 23, 2004 7:09 am
by SpiderVenom
Lol, stupid me, I didn't realise it was a madTools proc (madTool wasn't in my uses dec).

Well it work great, anyway :)

Thanks