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