GetCurrentProcess

GetCurrentProcess returns a pseudo handle for the current process.

Syntax

HANDLE GetCurrentProcess(VOID);

Parameters

This function has no parameters.

Return Value

A pseudohandle for the current process.

Remarks

A pseudo handle is a special constant that is interpreted as the current process handle. For compatibility with future operating systems, it is best to call GetCurrentProcess instead of hard-coding this constant value. The calling process can use a pseudo handle to specify its own process whenever a process handle is required. Pseudo handles are not inherited by child processes.

This handle has the maximum possible access to the process object.

The pseudo handle need not be closed when it is no longer needed. Calling the CloseHandle function with a pseudo handle has no effect.

Requirements

Minimum Supported Version RTX64 2013
Header windows.h
Library Rtx_Rtss.lib

See Also:

CloseHandle

GetCurrentProcessId

GetCurrentThread