GetCurrentProcess

  HANDLE GetCurrentProcess(VOID)    

The GetCurrentProcess function returns a pseudo handle for the current process.

Return Value

The return value is the pseudo handle of the current process.

Comments

A pseudo handle is a special constant that is interpreted as a handle to the current process. This handle may be used to specify the current process whenever a process handle is required. On MS-DOS/Win32, this handle has PROCESS_ALL_ACCESS to the current process. On NT/Win32, this handle has the maximum access allowed by any security descriptor placed on the current process.

This handle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect.

See Also

GetCurrentProcessId, GetCurrentThread