GetProcessId function kernel32

Win32Result<int> GetProcessId(
  1. HANDLE process
)

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) {
  final result_ = GetProcessId_Wrapper(process);
  return Win32Result(value: result_.value.u32, error: result_.error);
}