win32调试API(50分)

  • 主题发起人 主题发起人 yexiaomin
  • 开始时间 开始时间
Y

yexiaomin

Unregistered / Unconfirmed
GUEST, unregistred user!
在使用WaitForDebugEvent前,一定要用CreateProcess创建一个进程或使用DebugActiveProcess绑定一个进程吗?<br><br>为什么WaitForDebugEvent没有要求传入线程的ID或Handle,WaitForDebugEvent难道能返回所有进程的情况吗?<br><br>当使用WaitForDebugEvent后,被调试进程进入sleep状态了吗?
 
不知道顶一下。
 
The WaitForDebugEvent function waits for a debugging event to occur in a process being debugged. <br>WaitForDebugEvent等待一个被调试进程的事件发生。<br>BOOL WaitForDebugEvent(<br>&nbsp; &nbsp; LPDEBUG_EVENT lpDebugEvent, // address of structure for event information &nbsp;<br>&nbsp; &nbsp; DWORD dwMilliseconds // number of milliseconds to wait for event <br>&nbsp; &nbsp;); <br>&nbsp;<br><br>Parameters<br><br>lpDebugEvent<br><br>Points to a DEBUG_EVENT structure that is filled with information about the debugging event. <br><br>dwMilliseconds<br><br>Specifies the number of milliseconds to wait for a debugging event. If this parameter is zero, the function tests for a debugging event and returns immediately. If the parameter is INFINITE, the function does not return until a debugging event has occurred. <br><br>Return Values<br>If the function succeeds, the return value is nonzero.<br>If the function fails, the return value is zero. To get extended error information, call GetLastError.<br><br>Remarks<br>Only the thread that created the process being debugged can call WaitForDebugEvent. <br>只有创建被调试的进程的那个线程才能调用WaitForDebugEvent。<br><br>&gt;&gt;当使用WaitForDebugEvent后,被调试进程进入sleep状态了吗?<br>进入sleep状态的是调用WaitForDebugEvent的那个线程。
 
后退
顶部