Returns a handle to an existing process object.
HANDLE OpenProcess( DWORD dwDesiredAccess, BOOLEAN bInheritHandle, DWORD dwProcessId ); HANDLE RtOpenProcess( DWORD dwDesiredAccess, BOOLEAN bInheritHandle, DWORD dwProcessId );
dwDesiredAccess
bInheritHandle
dwProcessId
The handle returned by OpenProcess can be used in any function that requires a handle to a process, such as wait functions.
When you finish with the handle, close it using CloseHandle.
RtOpenProcess can also be used from a Windows application to obtain the handle of an iWin32 process.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/iwin32.h intime/rt/include/winbase.h |
iwin32.h windows.h |
iwin32.lib |
Notes
CloseHandle, RtCreateProcess, GetCurrentProcessId, iwin32 API, iwin32 Overview