remove useless is_rdp_service_open

This commit is contained in:
rustdesk
2024-02-25 20:10:36 +08:00
parent b511a52e09
commit f1373234dd
2 changed files with 0 additions and 27 deletions

View File

@@ -490,28 +490,6 @@ extern "C"
wcsncpy_s(buf, bufSize, tmpStr.c_str(), tmpStr.size());
}
}
BOOL has_rdp_service()
{
PWTS_SESSION_INFOA pInfos;
DWORD count;
auto rdp = "rdp";
auto nrdp = strlen(rdp);
auto rdp_or_console = WTSGetActiveConsoleSessionId();
if (WTSEnumerateSessionsA(WTS_CURRENT_SERVER_HANDLE, NULL, 1, &pInfos, &count))
{
for (DWORD i = 0; i < count; i++)
{
auto info = pInfos[i];
if (!strnicmp(info.pWinStationName, rdp, nrdp))
{
return TRUE;
}
}
WTSFreeMemory(pInfos);
}
return FALSE;
}
} // end of extern "C"
// below copied from https://github.com/TigerVNC/tigervnc/blob/master/vncviewer/win32.c