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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top