3 #include <winpr/error.h>
4 #include <winpr/wtsapi.h>
5 #include <winpr/input.h>
6 #include <winpr/environment.h>
8 int TestWtsApiExtraStartRemoteSessionEx(
int argc,
char* argv[])
14 char logonIdStr[10] = { 0 };
16 DWORD bSuccess = GetEnvironmentVariableA(
"TEST_SESSION_LOGON_ID", logonIdStr, 10);
19 sscanf(logonIdStr,
"%u\n", &logonId);
22 bSuccess = WTSStartRemoteControlSessionEx(
23 NULL, logonId, VK_F10, REMOTECONTROL_KBDSHIFT_HOTKEY | REMOTECONTROL_KBDCTRL_HOTKEY,
24 REMOTECONTROL_FLAG_DISABLE_INPUT);
28 printf(
"WTSStartRemoteControlSessionEx failed: %" PRIu32
"\n", GetLastError());