RtOpenProcess

RtOpenProcess returns a handle to an existing process object.

Syntax

Copy
HANDLE RtOpenProcess(
    DWORD dwAccess,
    BOOL bInherit,
    DWORD dwProcessId
);

Parameters

dwAccess

Ignored.

bInherit

Ignored.

dwProcessId

The process identifier of the process to open.

Return Value

If the function succeeds, it returns an open handle to the specified process. If the function fails, it returns NULL.

To get extended error information, call GetLastError.

Remarks

The handle returned by RtOpenProcess can be used in any function that requires a handle to a process, such as the wait functions, provided the appropriate access rights were requested.

When you are finished with the handle, be sure to close it using RtCloseHandle.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Rtapi.h rtkrnl.lib

See Also: