Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top