如何将detour dll注入当前运行的进程? [英] How do I inject detour dll into a current running process?
问题描述
我创建了一个单独的进程test.cpp,它使用了
DetourCreateProcessWithDll(NULL,C:\\Users \\Documents \\Visual Studio 2010 \\ Projects \\test1\\Debug \\ test1.exe,NULL,NULL,FALSE,CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED,NULL,NULL,
&si,&pi,C:\\ \\\ Users \\Documents \\Visual Studio 2010 \\Projects \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ b
test1.exe具有调用sleep(2500)函数的代码。和sleep.dll有代码来绕过test1.exe中调用的睡眠函数。请告诉我哪里出错了。
I have created a separate process test.cpp that uses
DetourCreateProcessWithDll(NULL, "C:\\Users\\Documents\\Visual Studio 2010\\Projects\\test1\\Debug\\test1.exe", NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE|CREATE_SUSPENDED, NULL, NULL,
&si, &pi,"C:\\Users\\Documents\\Visual Studio 2010\\Projects\\sleep\\Debug\\sleep.dll",NULL);
test1.exe has code for calling sleep(2500) function. and sleep.dll has code for detouring the sleep function called in test1.exe .Please tell me where am i going wrong.
推荐答案
看看 API与MS Detours挂钩 [ ^ ]。
这篇关于如何将detour dll注入当前运行的进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!