DebugSetProcessKillOnExit function

Sets the action to be performed when the calling thread exits.

Syntax

BOOL DebugSetProcessKillOnExit(
  BOOL KillOnExit
);

Parameters

KillOnExit

If this parameter is TRUE, the thread terminates all attached processes on exit (note that this is the default). Otherwise, the thread detaches from all processes being debugged on exit.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The calling thread must have established at least one debugging connection using the CreateProcess or DebugActiveProcess function before calling this function. DebugSetProcessKillOnExit affects all current and future debuggees connected to the calling thread. A thread can call this function multiple times to change the action as needed.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See Also

DebugActiveProcessStop

Debugging Functions