Debugging Tools for Windows

GetProcessIdByHandle

The GetProcessIdByHandle method returns the engine process ID for the specified process. The process is specified by its system handle.

HRESULT
  IDebugSystemObjects::GetProcessIdByHandle(
    IN ULONG64  Handle,
    OUT PULONG  Id
    );

Parameters

Handle
Specifies the handle of the process whose process ID is requested. This handle must be a process handle previously retrieved from the debugger engine.
Id
Receives the engine process ID.

Return Value

S_OK
The method was successful.

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

Interface Version

GetProcessIdByHandle is available in all versions of IDebugSystemObjects.

Comments

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