Export (0) Print
Expand All

CheckRemoteDebuggerPresent function

Determines whether the specified process is being debugged.

Syntax


BOOL WINAPI CheckRemoteDebuggerPresent(
  _In_     HANDLE hProcess,
  _Inout_  PBOOL pbDebuggerPresent
);

Parameters

hProcess [in]

A handle to the process.

pbDebuggerPresent [in, out]

A pointer to a variable that the function sets to TRUE if the specified process is being debugged, or FALSE otherwise.

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 "remote" in CheckRemoteDebuggerPresent does not imply that the debugger necessarily resides on a different computer; instead, it indicates that the debugger resides in a separate and parallel process. Use the IsDebuggerPresent function to detect whether the calling process is running under the debugger.

To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0501 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP1 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Debugging Functions
IsDebuggerPresent

 

 

Community Additions

ADD
Show:
© 2014 Microsoft