Debugging Tools for Windows

GetCurrentProcessHandle

The GetCurrentProcessHandle method returns the system handle for the current process.

HRESULT
  IDebugSystemObjects::GetCurrentProcessHandle(
    OUT PULONG64  Handle
    );

Parameters

Handle
Receives the system handle of the current process.

Return Value

S_OK
The method was successful.

This method may also return error values. See Return Values for more details.

Interface Version

GetCurrentProcessHandle is available in all versions of IDebugSystemObjects

Comments

In kernel-mode debugging, the only process in the target is the virtual process created for the kernel. In this case, an artificial handle is created. The artificial handle can only be used with the debugger engine API.

For more information about processes, see Threads and Processes. For details on system handles, see Handles.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

Build machine: CAPEBUILD