#ifndef _WINSTA_H
NTSYSAPI
BOOLEAN
NTAPI
WinStationGetProcessSid(
_In_opt_ HANDLE ServerHandle,
_In_ ULONG ProcessId,
_In_ FILETIME ProcessStartTime,
_Out_ PVOID pProcessUserSid,
_Inout_ PULONG dwSidSize
);
View code on GitHub
This function is a wrapper over an RPC method documented in the [MS-TSTS] specification.