Debugging Tools for Windows

GetCurrentProcessHandle

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

VOID
 GetCurrentProcessHandle(
    PHANDLE  hp
    );

Parameters

hp
Receives the system handle for the current process.

Return Value

None

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.

Requirements

Headers: Defined in wdbgexts.h. If you are writing a WdbgExts extension, include wdbgexts.h. If you are writing a DbgEng extension that calls this function, include wdbgexts.h before dbgeng.h (see Writing DbgEng Extension Code for details).

Build machine: CAPEBUILD