GetProcessId function kernel32
Retrieves the process identifier of the specified process.
To learn more, see learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocessid.
Implementation
Win32Result<int> GetProcessId(HANDLE process) {
resolveGetLastError();
final result_ = _GetProcessId(process);
return .new(value: result_, error: GetLastError());
}