hi, i am using DebugActiveProcess() and WaitForDebugEvent() to debug a running process. after i read the context and other things, i dont need anymore control over this process. how i do to release control? currently, i have all the code from DebugActiveProcess() till the point i dont need control anymore in a separated thread, and i terminate it in hope the control over the debugee is terminated together with the thread that attached for debug to the process. anyone know if this is making something? i read icz tutes about the debug api, but found no mention to how release control over the debugee... :confused: This message was edited by vecna, on 6/29/2001 1:44:07 AM
Posted on 2001-06-29 01:40:00 by vecna
venca, I believe you are looking for ContinueDebugEvent - which resumes the thread of execution. It takes 3 Parameters :- DWORD dwProcessId - the ID of the process your debugging. DWORD dwThreadId - the Thread ID which is to continue. DWORD dwStatus - a status, either DBG_CONTINUE or DBG_EXCEPTION_NOT_HANDLED It returns zero if it failed. good luck! umbongo
Posted on 2001-06-29 06:09:00 by umbongo
There is no way to release control: once you attach to the debuggee, you're responsible for its actions until the debuggee exits
Posted on 2001-06-29 06:53:00 by Iczelion
icz, i was coding a DLL for w9x to mimic the work of VirtualAllocEx() and CreateRemoteThread(), that only exists in nt, using the debug api. but, each process that call the new VirtualAllocEx() will be the debugger forever of the the hProcess process passed, as you said. this will generate a big loss of performace? if a process use this new api over several other processes, the delay will be noticeable?
Posted on 2001-06-29 13:18:00 by vecna