Question

Is there any way to determine that which process has called a Win32 Function. Actually I need to hook a few functions and in addition I also need to determine that which process has called this function. I am done with hooking functions like FindNextFile() and winsock functions send() and receive() using MS Detours but the problem is with later part i.e. determining the caller process. Kindly Help.

Était-ce utile?

La solution

Your hook will run in the context of the calling process, so it may simply call GetCurrentProcessId or a similar function that returns what you need to know about the process.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top