PsGetCurrentProcess

PEPROCESS
    PsGetCurrentProcess(

    );

PsGetCurrentProcess returns a pointer to the process of the current thread.

Comments

Highest-level drivers, file systems in particular, can call this routine. Lower-level drivers should call IoGetCurrentProcess instead.

PsGetCurrentProcess is the most efficient way to get a pointer to the current process, no matter what environment is being used.

Callers of PsGetCurrentProcess must be running at IRQL PASSIVE_LEVEL.

See Also

IoGetCurrentProcess, PsGetCurrentThread