Click here to Skip to main content
15,895,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been able to hook into specific processes using EasyHook, but I can't seem to find a way to run code when I first hook.

When I hook, I need to find a file handle connected to a specific file (No idea how to find a file handle like this...), and then run ReOpenFile in a way that will change the old file handle. Meaning that all calls to the old handle will go through to the new file.

Any ideas?
Posted

1 solution

This Link[^] might help you.
 
Share this answer
 
Comments
KairuByte 9-Nov-11 15:26pm    
I have tried running code in Run(), and it throws and exception that the only thing that can be run is a hook maker.
RaviRanjanKr 10-Nov-11 1:01am    
what exception you are getting. please mentioned in your question and if possibly try to show your effort also. :)
KairuByte 13-Nov-11 15:33pm    
It was an error relating to running a method.... But I got around it by just moving the code directly into the Run()... Which I realize is a bad thing. But it's just for testing at the moment.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900