RtOpenProcess
RtOpenProcess returns a handle to an existing process object.
Syntax
HANDLE RtOpenProcess(
[ignored] DWORD dwAccess,
[ignored] BOOL bInherit,
[in] DWORD dwProcessId
);
Parameters
[ignored] dwAccess
Ignored.
[ignored] bInherit
Ignored.
[in] 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. Call GetLastError to obtain an error code.
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.
RtOpenProcess will fail if passed the process ID (PID) of a Windows process.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtApi.h |
RtApi.lib (Windows), Startup.lib (RTSS) |
See Also: