#ifndef _WINSTA_H
NTSYSAPI
BOOLEAN
NTAPI
WinStationConnectW(
_In_opt_ HANDLE ServerHandle,
_In_ ULONG SessionId,
_In_ ULONG TargetSessionId,
_In_opt_ PCWSTR Password,
_In_ BOOLEAN bWait
);
View code on GitHubThis function is a wrapper over an RPC method documented in the [MS-TSTS] specification.