ProcessIdToSessionId function kernel32
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);
}