Вопрос

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