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,
) {
resolveGetLastError();
final result_ = _ProcessIdToSessionId(dwProcessId, pSessionId);
return .new(value: result_ != FALSE, error: GetLastError());
}