|
RtOpenProcess returns a handle to an existing process object.
Syntax
HANDLE RtOpenProcess( DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId );
Parameters
dwDesiredAccess
Ignored. Specifies the access to the process object.
bInheritHandle
Ignored. Specifies whether the returned handle can be inherited by a new process created by the current process. If TRUE, the handle is inheritable.
dwProcessId
The process identifier of the process to open.
Return Values
An open handle to the specified process if the function succeeds, NULL if the function fails
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 CloseHandle.
Requirements
Header | Rtapi.h |
Library | rtapi_w32.lib (Windows), Rtx_Rtss.lib (RTSS) |
See Also: