Hooking to class method

c++ / delphi package - dll injection and api hooking
Post Reply
SpiderVenom
Posts: 8
Joined: Tue Jun 01, 2004 4:46 am
Location: New Zealand
Contact:

Hooking to class method

Post 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?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post 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).
SpiderVenom
Posts: 8
Joined: Tue Jun 01, 2004 4:46 am
Location: New Zealand
Contact:

Post by SpiderVenom »

Um, at the risk of sounding lame... where is MethodToProcedure? I can't find it anywhere.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post 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.
SpiderVenom
Posts: 8
Joined: Tue Jun 01, 2004 4:46 am
Location: New Zealand
Contact:

Post 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
Post Reply