能力值:
( LV2,RANK:10 )
2 楼
After the system checks the process identifier and determines that a valid debugging attachment is being made, the function returns TRUE. Then the debugger is expected to wait for debugging events by using the WaitForDebugEvent function. The system suspends all threads in the process, and sends the debugger events that represents the current state of the process.
WaitForDebugEvent, ContinueDebugEvent
能力值:
( LV2,RANK:10 )
3 楼
yuchengton After the system checks the process identifier and determines that a valid debugging attachment is b ... 我把加密解密18.2.3里面的代码拿去跑,结果也是被调试进程始终被挂起....
能力值:
( LV2,RANK:10 )
4 楼
#include <Windows.h> #include <iostream> TCHAR szName[] = TEXT("f://primer.exe"); int main() { //加载被调试进程 HANDLE hProcess, hThread; DWORD threadID, processID; DEBUG_EVENT dEvent; STARTUPINFO si; memset(&si, 0, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOW; PROCESS_INFORMATION pi; CreateProcess(NULL, szName, NULL, NULL,NULL,DEBUG_PROCESS|DEBUG_ONLY_THIS_PROCESS, NULL, NULL, &si, &pi); hProcess = pi.hProcess; hThread = pi.hThread; processID = pi.dwProcessId; threadID = pi.dwThreadId; //接收调试事件 while (WaitForDebugEvent(&dEvent, INFINITE)) { switch (dEvent.dwDebugEventCode) { case EXCEPTION_DEBUG_EVENT: switch (dEvent.u.Exception.ExceptionRecord.ExceptionCode) { case EXCEPTION_BREAKPOINT: MessageBoxA(NULL, "INT 3", "EXCEPTION", 0); break; case EXCEPTION_SINGLE_STEP: MessageBoxA(NULL, "F7", "EXCEPTION", 0); break; } } ContinueDebugEvent(processID, threadID, DBG_CONTINUE); } return 0; } 这是我自己写的代码,运行之后被调试程序始终被挂起,而本程序也一直处于等待调试事件状态,求教
能力值:
( LV2,RANK:10 )
5 楼
困扰我一天了,一直没解决
能力值:
( LV2,RANK:10 )
6 楼
ContinueDebugEvent(dEvent.dwProcessId, dEvent.dwThreadId, DBG_CONTINUE); 这样试试 不然多线程会出问题
能力值:
( LV2,RANK:10 )
7 楼
yuchengton ContinueDebugEvent(dEvent.dwProcessId, dEvent.dwThreadId, DBG_CONTINUE); 这样试试 不然多线程会出问题 6666+,真心感谢你,太激动了,困扰这么久的问题解决了,哈哈哈,多谢了
能力值:
( LV2,RANK:10 )
8 楼
yuchengton ContinueDebugEvent(dEvent.dwProcessId, dEvent.dwThreadId, DBG_CONTINUE); 这样试试 不然多线程会出问题 感激万分!!!感激万分!!!感激万分!!!重要的事情说三遍哈哈