Changeset 57921 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Sep 28, 2015 2:26:35 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
r57372 r57921 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0 50222 #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 23 23 # undef _WIN32_WINNT 24 # define _WIN32_WINNT 0x0 502 /* CachedRemoteInteractivein recent SDKs. */24 # define _WIN32_WINNT 0x0600 /* QueryFullProcessImageNameW in recent SDKs. */ 25 25 #endif 26 26 #include <Windows.h> … … 33 33 #include <iprt/localipc.h> 34 34 #include <iprt/mem.h> 35 #include <iprt/ thread.h>35 #include <iprt/once.h> 36 36 #include <iprt/string.h> 37 37 #include <iprt/semaphore.h> 38 38 #include <iprt/system.h> 39 39 #include <iprt/time.h> 40 #include <iprt/thread.h> 41 40 42 #include <VBox/VBoxGuestLib.h> 41 43 #include "VBoxServiceInternal.h" … … 90 92 91 93 92 /******************************************************************************* 93 * Prototypes 94 *******************************************************************************/ 95 uint32_t VBoxServiceVMInfoWinSessionHasProcesses(PLUID pSession, PVBOXSERVICEVMINFOPROC const paProcs, DWORD cProcs); 96 bool VBoxServiceVMInfoWinIsLoggedIn(PVBOXSERVICEVMINFOUSER a_pUserInfo, PLUID a_pSession); 97 int VBoxServiceVMInfoWinProcessesEnumerate(PVBOXSERVICEVMINFOPROC *ppProc, DWORD *pdwCount); 98 void VBoxServiceVMInfoWinProcessesFree(DWORD cProcs, PVBOXSERVICEVMINFOPROC paProcs); 99 int vboxServiceVMInfoWinWriteLastInput(PVBOXSERVICEVEPROPCACHE pCache, const char *pszUser, const char *pszDomain); 100 101 typedef BOOL WINAPI FNQUERYFULLPROCESSIMAGENAME(HANDLE, DWORD, LPWSTR, PDWORD); 102 typedef FNQUERYFULLPROCESSIMAGENAME *PFNQUERYFULLPROCESSIMAGENAME; 103 104 105 #ifndef TARGET_NT4 94 /********************************************************************************************************************************* 95 * Internal Functions * 96 *********************************************************************************************************************************/ 97 static uint32_t VBoxServiceVMInfoWinSessionHasProcesses(PLUID pSession, PVBOXSERVICEVMINFOPROC const paProcs, DWORD cProcs); 98 static bool VBoxServiceVMInfoWinIsLoggedIn(PVBOXSERVICEVMINFOUSER a_pUserInfo, PLUID a_pSession); 99 static int VBoxServiceVMInfoWinProcessesEnumerate(PVBOXSERVICEVMINFOPROC *ppProc, DWORD *pdwCount); 100 static void VBoxServiceVMInfoWinProcessesFree(DWORD cProcs, PVBOXSERVICEVMINFOPROC paProcs); 101 static int vboxServiceVMInfoWinWriteLastInput(PVBOXSERVICEVEPROPCACHE pCache, const char *pszUser, const char *pszDomain); 102 103 104 /********************************************************************************************************************************* 105 * Global Variables * 106 *********************************************************************************************************************************/ 107 static RTONCE g_vgsvcWinVmInitOnce = RTONCE_INITIALIZER; 108 109 /** @name Secur32.dll imports are dynamically resolved because of NT4. 110 * @{ */ 111 static decltype(LsaGetLogonSessionData) *g_pfnLsaGetLogonSessionData = NULL; 112 static decltype(LsaEnumerateLogonSessions) *g_pfnLsaEnumerateLogonSessions = NULL; 113 static decltype(LsaFreeReturnBuffer) *g_pfnLsaFreeReturnBuffer = NULL; 114 /** @} */ 115 116 /** @name WtsApi32.dll imports are dynamically resolved because of NT4. 117 * @{ */ 118 static decltype(WTSFreeMemory) *g_pfnWTSFreeMemory = NULL; 119 static decltype(WTSQuerySessionInformationA) *g_pfnWTSQuerySessionInformationA = NULL; 120 /** @} */ 121 122 /** @name PsApi.dll imports are dynamically resolved because of NT4. 123 * @{ */ 124 static decltype(EnumProcesses) *g_pfnEnumProcesses = NULL; 125 static decltype(GetModuleFileNameExW) *g_pfnGetModuleFileNameExW = NULL; 126 /** @} */ 127 128 /** @name New Kernel32.dll APIs we may use when present. 129 * @{ */ 130 static decltype(QueryFullProcessImageNameW) *g_pfnQueryFullProcessImageNameW = NULL; 131 132 /** @} */ 133 134 /** Windows version. */ 135 static OSVERSIONINFOEXA g_WinVersion; 136 137 138 /** 139 * An RTOnce callback function. 140 */ 141 static DECLCALLBACK(int) vgsvcWinVmInfoInitOnce(void *pvIgnored) 142 { 143 /* SECUR32 */ 144 RTLDRMOD hLdrMod; 145 int rc = RTLdrLoadSystem("secur32.dll", true, &hLdrMod); 146 if (RT_SUCCESS(rc)) 147 { 148 rc = RTLdrGetSymbol(hLdrMod, "LsaGetLogonSessionData", (void **)&g_pfnLsaGetLogonSessionData); 149 if (RT_SUCCESS(rc)) 150 rc = RTLdrGetSymbol(hLdrMod, "LsaEnumerateLogonSessions", (void **)&g_pfnLsaEnumerateLogonSessions); 151 if (RT_SUCCESS(rc)) 152 rc = RTLdrGetSymbol(hLdrMod, "LsaFreeReturnBuffer", (void **)&g_pfnLsaFreeReturnBuffer); 153 AssertRC(rc); 154 RTLdrClose(hLdrMod); 155 } 156 if (RT_FAILURE(rc)) 157 { 158 VBoxServiceVerbose(1, "Secur32.dll APIs are not availble (%Rrc)\n", rc); 159 g_pfnLsaGetLogonSessionData = NULL; 160 g_pfnLsaEnumerateLogonSessions = NULL; 161 g_pfnLsaFreeReturnBuffer = NULL; 162 Assert(g_WinVersion.dwMajorVersion < 5); 163 } 164 165 /* WTSAPI32 */ 166 rc = RTLdrLoadSystem("wtsapi32.dll", true, &hLdrMod); 167 if (RT_SUCCESS(rc)) 168 { 169 rc = RTLdrGetSymbol(hLdrMod, "WTSFreeMemory", (void **)&g_pfnWTSFreeMemory); 170 if (RT_SUCCESS(rc)) 171 rc = RTLdrGetSymbol(hLdrMod, "WTSQuerySessionInformationA", (void **)&g_pfnWTSQuerySessionInformationA); 172 AssertRC(rc); 173 RTLdrClose(hLdrMod); 174 } 175 if (RT_FAILURE(rc)) 176 { 177 VBoxServiceVerbose(1, "WtsApi32.dll APIs are not availble (%Rrc)\n", rc); 178 g_pfnWTSFreeMemory = NULL; 179 g_pfnWTSQuerySessionInformationA = NULL; 180 Assert(g_WinVersion.dwMajorVersion < 5); 181 } 182 183 /* PSAPI */ 184 rc = RTLdrLoadSystem("psapi.dll", true, &hLdrMod); 185 if (RT_SUCCESS(rc)) 186 { 187 rc = RTLdrGetSymbol(hLdrMod, "EnumProcesses", (void **)&g_pfnEnumProcesses); 188 if (RT_SUCCESS(rc)) 189 rc = RTLdrGetSymbol(hLdrMod, "GetModuleFileNameExW", (void **)&g_pfnGetModuleFileNameExW); 190 AssertRC(rc); 191 RTLdrClose(hLdrMod); 192 } 193 if (RT_FAILURE(rc)) 194 { 195 VBoxServiceVerbose(1, "psapi.dll APIs are not availble (%Rrc)\n", rc); 196 g_pfnEnumProcesses = NULL; 197 g_pfnGetModuleFileNameExW = NULL; 198 Assert(g_WinVersion.dwMajorVersion < 5); 199 } 200 201 /* Kernel32: */ 202 rc = RTLdrLoadSystem("kerne32.dll", true, &hLdrMod); 203 AssertRCReturn(rc, rc); 204 rc = RTLdrGetSymbol(hLdrMod, "QueryFullProcessImageNameW", (void **)&g_pfnQueryFullProcessImageNameW); 205 if (RT_FAILURE(rc)) 206 { 207 Assert(g_WinVersion.dwMajorVersion < 6); 208 g_pfnQueryFullProcessImageNameW = NULL; 209 } 210 RTLdrClose(hLdrMod); 211 212 /* 213 * Get the extended windows version once and for all. 214 */ 215 g_WinVersion.dwOSVersionInfoSize = sizeof(g_WinVersion); 216 if (!GetVersionExA((OSVERSIONINFO *)&g_WinVersion)) 217 { 218 AssertFailed(); 219 RT_ZERO(g_WinVersion); 220 g_WinVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); 221 if (!GetVersionExA((OSVERSIONINFO *)&g_WinVersion)) 222 RT_ZERO(g_WinVersion); 223 } 224 225 return VINF_SUCCESS; 226 } 227 106 228 107 229 static bool vboxServiceVMInfoSession0Separation(void) 108 230 { 109 /** @todo Only do this once. Later. */ 110 OSVERSIONINFOEX OSInfoEx; 111 RT_ZERO(OSInfoEx); 112 OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); 113 if ( !GetVersionEx((LPOSVERSIONINFO) &OSInfoEx) 114 || OSInfoEx.dwPlatformId != VER_PLATFORM_WIN32_NT) 115 { 116 /* Platform other than NT (e.g. Win9x) not supported. */ 117 return false; 118 } 119 120 if ( OSInfoEx.dwMajorVersion >= 6 121 && OSInfoEx.dwMinorVersion >= 0) 122 { 123 return true; 124 } 125 126 return false; 231 return g_WinVersion.dwPlatformId == VER_PLATFORM_WIN32_NT 232 && g_WinVersion.dwMajorVersion >= 6; /* Vista = 6.0 */ 127 233 } 234 128 235 129 236 /** … … 139 246 140 247 /** @todo Only do this once. Later. */ 141 OSVERSIONINFOEX OSInfoEx; 142 RT_ZERO(OSInfoEx); 143 OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); 144 if ( !GetVersionEx((LPOSVERSIONINFO) &OSInfoEx) 145 || OSInfoEx.dwPlatformId != VER_PLATFORM_WIN32_NT) 146 { 147 /* Platform other than NT (e.g. Win9x) not supported. */ 248 /* Platform other than NT (e.g. Win9x) not supported. */ 249 if (g_WinVersion.dwPlatformId != VER_PLATFORM_WIN32_NT) 148 250 return VERR_NOT_SUPPORTED; 149 }150 251 151 252 int rc = VINF_SUCCESS; 152 253 153 254 DWORD dwFlags = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ; 154 if ( OSInfoEx.dwMajorVersion >= 6 /* Vista or later */)155 dwFlags = 0x1000; /* = PROCESS_QUERY_LIMITED_INFORMATION; less privileges needed.*/255 if (g_WinVersion.dwMajorVersion >= 6 /* Vista or later */) 256 dwFlags = PROCESS_QUERY_LIMITED_INFORMATION; /* possible to do on more processes */ 156 257 157 258 HANDLE h = OpenProcess(dwFlags, FALSE, pProc->id); … … 169 270 apps and vice verse) we have to use a different code path for Vista and up. */ 170 271 WCHAR wszName[_1K]; 171 DWORD dwLen = sizeof(wszName); 172 173 /* Note: For 2000 + NT4 we might just use GetModuleFileNameW() instead. */ 174 if (OSInfoEx.dwMajorVersion >= 6 /* Vista or later */) 175 { 176 /* Loading the module and getting the symbol for each and every process is expensive 177 * -- since this function (at the moment) only is used for debugging purposes it's okay. */ 178 PFNQUERYFULLPROCESSIMAGENAME pfnQueryFullProcessImageName; 179 pfnQueryFullProcessImageName = (PFNQUERYFULLPROCESSIMAGENAME) 180 RTLdrGetSystemSymbol("kernel32.dll", "QueryFullProcessImageNameW"); 181 if (pfnQueryFullProcessImageName) 182 { 183 if (!pfnQueryFullProcessImageName(h, 0 /*PROCESS_NAME_NATIVE*/, wszName, &dwLen)) 184 rc = VERR_ACCESS_DENIED; 185 } 186 } 187 else 188 { 189 if (!GetModuleFileNameExW(h, NULL /* Get main executable */, wszName, dwLen)) 272 DWORD dwLen = sizeof(wszName); /** @todo r=bird: wrong? */ 273 274 /* Use QueryFullProcessImageNameW if available (Vista+). */ 275 if (g_pfnQueryFullProcessImageNameW) 276 { 277 if (!g_pfnQueryFullProcessImageNameW(h, 0 /*PROCESS_NAME_NATIVE*/, wszName, &dwLen)) 190 278 rc = VERR_ACCESS_DENIED; 191 279 } 280 else if (!g_pfnGetModuleFileNameExW(h, NULL /* Get main executable */, wszName, dwLen)) 281 rc = VERR_ACCESS_DENIED; 192 282 193 283 if ( RT_FAILURE(rc) … … 436 526 * @param pcProcs Where to store the returned process count. 437 527 */ 438 int VBoxServiceVMInfoWinProcessesEnumerate(PVBOXSERVICEVMINFOPROC *ppaProcs, PDWORD pcProcs)528 static int VBoxServiceVMInfoWinProcessesEnumerate(PVBOXSERVICEVMINFOPROC *ppaProcs, PDWORD pcProcs) 439 529 { 440 530 AssertPtr(ppaProcs); 441 531 AssertPtr(pcProcs); 532 533 if (!g_pfnEnumProcesses) 534 return VERR_NOT_SUPPORTED; 442 535 443 536 /* … … 462 555 /* Query the processes. Not the cbRet == buffer size means there could be more work to be done. */ 463 556 DWORD cbRet; 464 if (! EnumProcesses(paPID, cProcesses * sizeof(DWORD), &cbRet))557 if (!g_pfnEnumProcesses(paPID, cProcesses * sizeof(DWORD), &cbRet)) 465 558 { 466 559 rc = RTErrConvertFromWin32(GetLastError()); … … 528 621 * @param paProcs What 529 622 */ 530 void VBoxServiceVMInfoWinProcessesFree(DWORD cProcs, PVBOXSERVICEVMINFOPROC paProcs)623 static void VBoxServiceVMInfoWinProcessesFree(DWORD cProcs, PVBOXSERVICEVMINFOPROC paProcs) 531 624 { 532 625 for (DWORD i = 0; i < cProcs; i++) … … 551 644 * @param puSession Looked up session number. Optional. 552 645 */ 553 uint32_t VBoxServiceVMInfoWinSessionHasProcesses(PLUID pSession,554 PVBOXSERVICEVMINFOPROC const paProcs, DWORD cProcs,555 PULONG puTerminalSession)646 static uint32_t VBoxServiceVMInfoWinSessionHasProcesses(PLUID pSession, 647 PVBOXSERVICEVMINFOPROC const paProcs, DWORD cProcs, 648 PULONG puTerminalSession) 556 649 { 557 650 if (!pSession) … … 560 653 return 0; 561 654 } 655 if (!g_pfnLsaGetLogonSessionData) 656 return VERR_NOT_SUPPORTED; 562 657 563 658 PSECURITY_LOGON_SESSION_DATA pSessionData = NULL; 564 NTSTATUS rcNt = LsaGetLogonSessionData(pSession, &pSessionData);659 NTSTATUS rcNt = g_pfnLsaGetLogonSessionData(pSession, &pSessionData); 565 660 if (rcNt != STATUS_SUCCESS) 566 661 { … … 573 668 VBoxServiceError("User SID=%p is not valid\n", pSessionData->Sid); 574 669 if (pSessionData) 575 LsaFreeReturnBuffer(pSessionData);670 g_pfnLsaFreeReturnBuffer(pSessionData); 576 671 return 0; 577 672 } 578 673 579 int rc = VINF_SUCCESS;580 674 581 675 /* … … 584 678 * session <-> process LUIDs. 585 679 */ 586 uint32_t cNumProcs = 0;587 680 int rc = VINF_SUCCESS; 681 uint32_t cProcessesFound = 0; 588 682 for (DWORD i = 0; i < cProcs; i++) 589 683 { … … 608 702 if (paProcs[i].fInteractive) 609 703 { 610 c NumProcs++;704 cProcessesFound++; 611 705 if (!g_cVerbosity) /* We want a bit more info on higher verbosity. */ 612 706 break; … … 619 713 *puTerminalSession = pSessionData->Session; 620 714 621 LsaFreeReturnBuffer(pSessionData);622 623 return c NumProcs;715 g_pfnLsaFreeReturnBuffer(pSessionData); 716 717 return cProcessesFound; 624 718 } 625 719 … … 657 751 * @param pSession The session to check. 658 752 */ 659 bool VBoxServiceVMInfoWinIsLoggedIn(PVBOXSERVICEVMINFOUSER pUserInfo, PLUID pSession)753 static bool VBoxServiceVMInfoWinIsLoggedIn(PVBOXSERVICEVMINFOUSER pUserInfo, PLUID pSession) 660 754 { 661 755 AssertPtrReturn(pUserInfo, false); 662 756 if (!pSession) 663 757 return false; 758 if (!g_pfnLsaGetLogonSessionData) 759 return false; 664 760 665 761 PSECURITY_LOGON_SESSION_DATA pSessionData = NULL; 666 NTSTATUS rcNt = LsaGetLogonSessionData(pSession, &pSessionData);762 NTSTATUS rcNt = g_pfnLsaGetLogonSessionData(pSession, &pSessionData); 667 763 if (rcNt != STATUS_SUCCESS) 668 764 { … … 686 782 } 687 783 if (pSessionData) 688 LsaFreeReturnBuffer(pSessionData);784 g_pfnLsaFreeReturnBuffer(pSessionData); 689 785 return false; 690 786 } … … 709 805 || pSessionData->LogonTime.QuadPart == 0) 710 806 { 711 LsaFreeReturnBuffer(pSessionData);807 g_pfnLsaFreeReturnBuffer(pSessionData); 712 808 return false; 713 809 } … … 781 877 if (!s_fSkipRDPDetection) 782 878 { 783 /** @todo Only do this once. Later. */784 OSVERSIONINFOEX OSInfoEx;785 RT_ZERO(OSInfoEx);786 OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);787 788 879 /* Skip RDP detection on non-NT systems. */ 789 if ( !GetVersionEx((LPOSVERSIONINFO) &OSInfoEx) 790 || OSInfoEx.dwPlatformId != VER_PLATFORM_WIN32_NT) 791 { 880 if (g_WinVersion.dwPlatformId != VER_PLATFORM_WIN32_NT) 792 881 s_fSkipRDPDetection = true; 793 } 882 794 883 /* Skip RDP detection on Windows 2000. 795 884 * For Windows 2000 however we don't have any hotfixes, so just skip the 796 885 * RDP detection in any case. */ 797 if ( OSInfoEx.dwMajorVersion == 5 798 && OSInfoEx.dwMinorVersion == 0) 799 { 886 if ( g_WinVersion.dwMajorVersion == 5 887 && g_WinVersion.dwMinorVersion == 0) 800 888 s_fSkipRDPDetection = true; 801 } 889 890 /* Skip if we don't have the WTS API. */ 891 if (!g_pfnWTSQuerySessionInformationA) 892 s_fSkipRDPDetection = true; 802 893 803 894 if (s_fSkipRDPDetection) … … 807 898 if (!s_fSkipRDPDetection) 808 899 { 900 Assert(g_pfnWTSQuerySessionInformationA); 901 Assert(g_pfnWTSFreeMemory); 902 809 903 /* Detect RDP sessions as well. */ 810 904 LPTSTR pBuffer = NULL; 811 905 DWORD cbRet = 0; 812 906 int iState = -1; 813 if ( WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE,814 pSessionData->Session,815 WTSConnectState,816 &pBuffer,817 &cbRet))907 if (g_pfnWTSQuerySessionInformationA(WTS_CURRENT_SERVER_HANDLE, 908 pSessionData->Session, 909 WTSConnectState, 910 &pBuffer, 911 &cbRet)) 818 912 { 819 913 if (cbRet) … … 832 926 } 833 927 if (pBuffer) 834 WTSFreeMemory(pBuffer);928 g_pfnWTSFreeMemory(pBuffer); 835 929 } 836 930 else … … 871 965 pUserInfo->ulLastSession = pSessionData->Session; 872 966 873 LsaFreeReturnBuffer(pSessionData);967 g_pfnLsaFreeReturnBuffer(pSessionData); 874 968 return fFoundUser; 875 969 } … … 1015 1109 AssertPtrReturn(pcUsersInList, VERR_INVALID_POINTER); 1016 1110 1017 int rc2 = VbglR3GuestPropConnect(&s_uDebugGuestPropClientID); 1018 AssertRC(rc2); 1111 int rc = RTOnce(&g_vgsvcWinVmInitOnce, vgsvcWinVmInfoInitOnce, NULL); 1112 if (RT_FAILURE(rc)) 1113 return rc; 1114 if (!g_pfnLsaEnumerateLogonSessions || !g_pfnEnumProcesses) 1115 return VERR_NOT_SUPPORTED; 1116 1117 rc = VbglR3GuestPropConnect(&s_uDebugGuestPropClientID); 1118 AssertRC(rc); 1019 1119 1020 1120 char *pszUserList = NULL; … … 1025 1125 PLUID paSessions = NULL; 1026 1126 ULONG cSessions = 0; 1027 NTSTATUS rcNt = LsaEnumerateLogonSessions(&cSessions, &paSessions);1127 NTSTATUS rcNt = g_pfnLsaEnumerateLogonSessions(&cSessions, &paSessions); 1028 1128 if (rcNt != STATUS_SUCCESS) 1029 1129 { … … 1048 1148 1049 1149 if (paSessions) 1050 LsaFreeReturnBuffer(paSessions);1150 g_pfnLsaFreeReturnBuffer(paSessions); 1051 1151 1052 1152 return RTErrConvertFromWin32(ulError); … … 1056 1156 PVBOXSERVICEVMINFOPROC paProcs; 1057 1157 DWORD cProcs; 1058 intrc = VBoxServiceVMInfoWinProcessesEnumerate(&paProcs, &cProcs);1158 rc = VBoxServiceVMInfoWinProcessesEnumerate(&paProcs, &cProcs); 1059 1159 if (RT_FAILURE(rc)) 1060 1160 { … … 1074 1174 ULONG cUniqueUsers = 0; 1075 1175 1076 /* *1176 /* 1077 1177 * Note: The cSessions loop variable does *not* correlate with 1078 1178 * the Windows session ID! … … 1098 1198 if (g_cVerbosity > 3) 1099 1199 { 1100 char szDebugSessionPath[255]; RTStrPrintf(szDebugSessionPath, sizeof(szDebugSessionPath), "/VirtualBox/GuestInfo/Debug/LSA/Session/%RU32", 1101 userSession.ulLastSession); 1200 char szDebugSessionPath[255]; 1201 RTStrPrintf(szDebugSessionPath, sizeof(szDebugSessionPath), 1202 "/VirtualBox/GuestInfo/Debug/LSA/Session/%RU32", userSession.ulLastSession); 1102 1203 VBoxServiceWritePropF(s_uDebugGuestPropClientID, szDebugSessionPath, 1103 1204 "#%RU32: cSessionProcs=%RU32 (of %RU32 procs total)", s_uDebugIter, cCurSessionProcs, cProcs); … … 1225 1326 } 1226 1327 if (paSessions) 1227 LsaFreeReturnBuffer(paSessions);1328 g_pfnLsaFreeReturnBuffer(paSessions); 1228 1329 1229 1330 if (RT_SUCCESS(rc)) … … 1239 1340 } 1240 1341 1241 #endif /* TARGET_NT4 */1242 1342 1243 1343 int VBoxServiceWinGetComponentVersions(uint32_t uClientID) … … 1258 1358 1259 1359 /* The file information table. */ 1260 #ifndef TARGET_NT41261 1360 const VBOXSERVICEVMINFOFILE aVBoxFiles[] = 1262 1361 { … … 1264 1363 { szSysDir, "VBoxHook.dll" }, 1265 1364 { szSysDir, "VBoxDisp.dll" }, 1365 { szSysDir, "VBoxTray.exe" }, 1366 #ifdef TARGET_NT4 1367 { szSysDir, "VBoxServiceNT.exe" }, 1368 #else 1369 { szSysDir, "VBoxService.exe" }, 1266 1370 { szSysDir, "VBoxMRXNP.dll" }, 1267 { szSysDir, "VBoxService.exe" },1268 { szSysDir, "VBoxTray.exe" },1269 1371 { szSysDir, "VBoxGINA.dll" }, 1270 1372 { szSysDir, "VBoxCredProv.dll" }, 1373 #endif 1271 1374 1272 1375 /* On 64-bit we don't yet have the OpenGL DLLs in native format. 1273 1376 So just enumerate the 32-bit files in the SYSWOW directory. */ 1274 # 1377 #ifdef RT_ARCH_AMD64 1275 1378 { szSysWowDir, "VBoxOGLarrayspu.dll" }, 1276 1379 { szSysWowDir, "VBoxOGLcrutil.dll" }, … … 1280 1383 { szSysWowDir, "VBoxOGLfeedbackspu.dll" }, 1281 1384 { szSysWowDir, "VBoxOGL.dll" }, 1282 # else /* !RT_ARCH_AMD64 */ 1385 #else /* !RT_ARCH_AMD64 */ 1386 # ifdef TARGET_NT4 1283 1387 { szSysDir, "VBoxOGLarrayspu.dll" }, 1284 1388 { szSysDir, "VBoxOGLcrutil.dll" }, … … 1288 1392 { szSysDir, "VBoxOGLfeedbackspu.dll" }, 1289 1393 { szSysDir, "VBoxOGL.dll" }, 1290 # endif /* !RT_ARCH_AMD64 */ 1291 1394 # endif 1395 #endif /* !RT_ARCH_AMD64 */ 1396 1397 #ifdef TARGET_NT4 1398 { szDriversDir, "VBoxGuestNT.sys" }, 1399 { szDriversDir, "VBoxMouseNT.sys" }, 1400 #else 1292 1401 { szDriversDir, "VBoxGuest.sys" }, 1293 1402 { szDriversDir, "VBoxMouse.sys" }, 1294 1403 { szDriversDir, "VBoxSF.sys" }, 1404 #endif 1295 1405 { szDriversDir, "VBoxVideo.sys" }, 1296 1406 }; 1297 1298 #else /* TARGET_NT4 */1299 const VBOXSERVICEVMINFOFILE aVBoxFiles[] =1300 {1301 { szSysDir, "VBoxControl.exe" },1302 { szSysDir, "VBoxHook.dll" },1303 { szSysDir, "VBoxDisp.dll" },1304 { szSysDir, "VBoxServiceNT.exe" },1305 { szSysDir, "VBoxTray.exe" },1306 1307 { szDriversDir, "VBoxGuestNT.sys" },1308 { szDriversDir, "VBoxMouseNT.sys" },1309 { szDriversDir, "VBoxVideo.sys" },1310 };1311 #endif /* TARGET_NT4 */1312 1407 1313 1408 for (unsigned i = 0; i < RT_ELEMENTS(aVBoxFiles); i++)
Note:
See TracChangeset
for help on using the changeset viewer.