Hooking to class method

c++ / delphi package - dll injection and api hooking

Hooking to class method

Postby SpiderVenom » Mon Jun 21, 2004 9:01 pm

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

Postby madshi » Tue Jun 22, 2004 6:31 pm

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).
madshi
Site Admin
 
Posts: 9883
Joined: Sun Mar 21, 2004 5:25 pm

Postby SpiderVenom » Tue Jun 22, 2004 8:09 pm

Um, at the risk of sounding lame... where is MethodToProcedure? I can't find it anywhere.
SpiderVenom
 
Posts: 8
Joined: Tue Jun 01, 2004 4:46 am
Location: New Zealand

Postby madshi » Tue Jun 22, 2004 8:30 pm

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

Postby SpiderVenom » Wed Jun 23, 2004 7:09 am

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


Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 7 guests