ProcessIdToSessionId function kernel32

Win32Result<bool> ProcessIdToSessionId(
  1. int dwProcessId,
  2. Pointer<Uint32> pSessionId
)

Retrieves the Remote Desktop Services session associated with a specified process.

To learn more, see learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-processidtosessionid.

Implementation

Win32Result<bool> ProcessIdToSessionId(
  int dwProcessId,
  Pointer<Uint32> pSessionId,
) {
  final result_ = ProcessIdToSessionId_Wrapper(dwProcessId, pSessionId);
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}