OpenProcess function Null safety kernel32
Opens an existing local process object.
HANDLE OpenProcess(
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwProcessId
);
Implementation
int OpenProcess(int dwDesiredAccess, int bInheritHandle, int dwProcessId) {
final _OpenProcess = _kernel32.lookupFunction<
IntPtr Function(
Uint32 dwDesiredAccess, Int32 bInheritHandle, Uint32 dwProcessId),
int Function(int dwDesiredAccess, int bInheritHandle,
int dwProcessId)>('OpenProcess');
return _OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
}