0

I have been using code which worked well on XP 32bit for years, now PC is upgraded to Windows10 Home 32bit and code no longer works.

ProcessId := GetCurrentProcessId;
ProcessIdToSessionId(ProcessId,SessionId);
WinStationConnectW(SERVERNAME_CURRENT, SessionId,WTSGetActiveConsoleSessionId, '', False);

Code is running in response to WTS_REMOTE_DISCONNECT message in Delphi7 with JwaWindows. Purpose of this code is to switch user session back to console after RDP session is closed, without this Windows displays logon screen and my kiosk application is not visible on the local screen. Error returned by WinStationConnectW is Error_Access_Denied.

Can anyone help?

amilewski
  • 125
  • 2
  • 6
  • 2
    There was no UAC in XP, introduced in Vista. Is your process running as an elevated administrator? – Ben Voigt Oct 07 '18 at 01:35
  • No, and user running the application is not even the administrator. But running it as elevated administrator does not change anything. – amilewski Oct 07 '18 at 18:50

0 Answers0