#![allow(unsafe_code)]
use windows_sys::Win32::System::RemoteDesktop::ProcessIdToSessionId;
pub(super) fn session_of(pid: u32) -> Option<u32> {
let mut session = 0u32;
let found = unsafe { ProcessIdToSessionId(pid, &mut session) };
(found != 0).then_some(session)
}