VNC를 사용하여 연결할 때 WinStationConnectW (문서화되지 않음)를 사용하여 콘솔 세션에 연결하려고하면 RDP 세션 연결이 끊어집니다. TightVNC에서
Here is a snippet :
void setConsoleSession(DWORD sessionId) {
#ifdef RFB_HAVE_WINSTATION_CONNECT
if (!_WinStationConnect.isValid())
throw rdr::Exception("WinSta APIs missing");
if (sessionId == -1)
sessionId = mySessionId.id;
// Try to reconnect our session to the console
ConsoleSessionId console;
vlog.info("Console session is %d", console.id);
if (!(*_WinStationConnect)(0, sessionId, console.id, L"", 0))
throw rdr::SystemException("Unable to connect session to Console", GetLastError());
// Lock the newly connected session, for security
if (_LockWorkStation.isValid())
(*_LockWorkStation)();
#else
throw rdr::Exception("setConsoleSession not implemented");
#endif
}