get_current_process


handle get_current_process()

This function obtains a handle of the current process.

Return

handle

A pseudohandle for the process.

Notes

A pseudohandle for the process is a constant that is interpreted as the current process. It is not the actual handle for the current process. The actual handle may be obtained from a pseudohandle by using the function duplicate_handle. The function open_process may also be used to obtain a handle of the current process.

The pseudohandle has the maximum access supported by the process. For systems that do not support descriptors, process_create::Debug is the ascribed access. For systems that support descriptors, this is the maximum access allowed by the descriptor of the calling process.

Pseudohandles do not need to be closed via the function close_handle.

Pseudohandles are not inherited by child processes.