Changeset 22728 in vbox
- Timestamp:
- Sep 3, 2009 7:59:53 AM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r22551 r22728 35 35 VBoxService_TEMPLATE = VBOXGUESTR3EXE 36 36 VBoxService_DEFS = VBOXSERVICE_TIMESYNC 37 VBoxService_DEFS.win += _WIN32_WINNT=0x0501 _UNICODE UNICODE37 VBoxService_DEFS.win += _WIN32_WINNT=0x0501 38 38 VBoxService_DEFS.os2 = VBOX_WITH_HGCM VBOXSERVICE_CLIPBOARD 39 39 ifdef VBOX_WITH_GUEST_PROPS … … 81 81 VBoxServiceNT_TEMPLATE = VBOXGUESTR3EXE 82 82 VBoxServiceNT_EXTENDS = VBoxService 83 VBoxServiceNT_DEFS.win = _WIN32_WINNT=0x0400 _UNICODE UNICODETARGET_NT483 VBoxServiceNT_DEFS.win = _WIN32_WINNT=0x0400 TARGET_NT4 84 84 85 85 #VBoxServiceVMInfo.cpp uses VBOX_SVN_REV. -
trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
r21247 r22728 195 195 { 196 196 HKEY hKey = NULL; 197 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\EventLog\\System"), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {197 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\System", 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) { 198 198 RegDeleteKey(hKey, VBOXSERVICE_NAME); 199 199 RegCloseKey(hKey); -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp
r22586 r22728 38 38 #include "VBoxServiceInternal.h" 39 39 #include "VBoxServiceUtils.h" 40 #ifdef VBOX_WITH_GUEST_PROPS 41 # include <VBox/HostServices/GuestPropertySvc.h> 42 #endif 40 43 41 44 … … 49 52 /** The guest property service client ID. */ 50 53 static uint32_t g_VMExecGuestPropSvcClientID = 0; 51 54 /** The maximum of arguments a command can have. */ 55 #define EXEC_MAX_ARGS 32 52 56 53 57 /** @copydoc VBOXSERVICE::pfnPreInit */ … … 99 103 100 104 105 /** 106 * Validates flags for executable guest properties. 107 * 108 * @returns boolean. 109 * @retval true on success. 110 * @retval false if not valid. 111 * 112 * @param pszFlags Pointer to flags to be checked. 113 */ 114 bool VBoxServiceExecValidateFlags(char* pszFlags) 115 { 116 if (pszFlags == NULL) 117 return false; 118 119 if ( (NULL != RTStrStr(pszFlags, "TRANSIENT")) 120 && (NULL != RTStrStr(pszFlags, "RDONLYGUEST"))) 121 { 122 return true; 123 } 124 return false; 125 } 126 127 101 128 /** @copydoc VBOXSERVICE::pfnWorker */ 102 129 DECLCALLBACK(int) VBoxServiceExecWorker(bool volatile *pfShutdown) 103 130 { 131 using namespace guestProp; 104 132 int rc = VINF_SUCCESS; 105 133 … … 109 137 */ 110 138 RTThreadUserSignal(RTThreadSelf()); 139 Assert(g_VMExecGuestPropSvcClientID > 0); 111 140 112 141 /* … … 119 148 for (;;) 120 149 { 121 #ifndef TARGET_NT4 /** @todo r=bird: Add comment explaining why please. */122 150 /* 123 151 * The thread at the moment does nothing but checking for one specific guest property … … 129 157 if (!fSysprepDone) 130 158 { 159 uint32_t cbBuf = MAX_VALUE_LEN + MAX_FLAGS_LEN + 1024; 160 131 161 /* Get arguments. */ 132 162 /** @todo r=bird: How exactly does this work wrt. enabled/disabled? In … … 136 166 * additions this will be executed everytime the system starts now - if 137 167 * I understand the code correctly. Is this intentional? */ 138 char *pszArgs; 139 rc = VbglR3GuestPropReadValueAlloc(g_VMExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepArgs", &pszArgs); 140 if (RT_FAILURE(rc)) 141 VBoxServiceVerbose(2, "Sysprep guest property not found or broken communication. Error: %Rrc\n", pszArgs, rc); 142 143 /** @todo r=bird: You must check that the flags, you should require it to the 144 * TRANSIENT and RDONLYGUEST. Otherwise, we'll have a potential priviledge 145 * escalation issue inside the guest if the variable is removed. */ 146 147 static char *s_pszSysprepImage = "c:\\sysprep\\sysprep.exe"; 148 if ( RT_SUCCESS(rc) 149 && !RTFileExists(s_pszSysprepImage)) 150 { 151 VBoxServiceError("Sysprep executable not found! Search path=%s\n", s_pszSysprepImage); 168 void* pvSysprepCmd = RTMemAllocZ(cbBuf); 169 char* pszSysprepCmdValue = NULL; 170 uint64_t u64SysprepCmdTimestamp = 0; 171 char* pszSysprepCmdFlags = NULL; 172 #ifdef SYSPREP_WITH_CMD 173 /* Get sysprep properties. */ 174 if (RT_SUCCESS(rc)) 175 { 176 rc = VbglR3GuestPropRead(g_VMExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepCmd", 177 pvSysprepCmd, cbBuf, 178 &pszSysprepCmdValue, &u64SysprepCmdTimestamp, &pszSysprepCmdFlags, NULL); 179 if (RT_FAILURE(rc)) 180 { 181 if (rc == VERR_NOT_FOUND) 182 VBoxServiceVerbose(2, "Sysprep cmd guest property not found\n"); 183 else 184 VBoxServiceError("Sysprep cmd guest property: Error = %Rrc\n", rc); 185 } 186 else 187 { 188 !VBoxServiceExecValidateFlags(pszSysprepCmdFlags) ? rc = rc : rc = VERR_ACCESS_DENIED; 189 if (RT_SUCCESS(rc)) 190 { 191 if (RTStrNLen(pszSysprepCmdValue, _MAX_PATH) <= 0) 192 rc = VERR_NOT_FOUND; 193 } 194 VBoxServiceVerbose(2, "Sysprep cmd guest property: %Rrc\n", rc); 195 } 196 } 197 #else 198 /* Choose sysprep image based on OS version. */ 199 char szSysprepCmd[_MAX_PATH] = "c:\\sysprep\\sysprep.exe"; 200 OSVERSIONINFOEX OSInfoEx; 201 memset(&OSInfoEx, '\0', sizeof(OSInfoEx)); 202 OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); 203 if (GetVersionEx((LPOSVERSIONINFO) &OSInfoEx)) 204 { 205 if (OSInfoEx.dwMajorVersion >= 6) /* Use built-in sysprep on Vista or later. */ 206 RTStrPrintf(szSysprepCmd, sizeof(szSysprepCmd), "%s\\system32\\sysprep\\sysprep.exe", RTEnvGet("windir")); 207 } 208 pszSysprepCmdValue = szSysprepCmd; 209 #endif 210 void* pvSysprepArgs = RTMemAllocZ(cbBuf); 211 char* pszSysprepArgsValue = NULL; 212 uint64_t u64SysprepArgsTimestamp = 0; 213 char* pszSysprepArgsFlags = NULL; 214 215 if (RT_SUCCESS(rc)) 216 { 217 pvSysprepArgs = RTMemAllocZ(cbBuf); 218 char szVal[] = "/VirtualBox/HostGuest/SysprepArgs"; 219 char *pTmp = NULL; 220 rc = RTStrCurrentCPToUtf8(&pTmp, szVal); 221 rc = VbglR3GuestPropRead(g_VMExecGuestPropSvcClientID, pTmp, 222 pvSysprepArgs, cbBuf, 223 &pszSysprepArgsValue, &u64SysprepArgsTimestamp, &pszSysprepArgsFlags, NULL); 224 RTStrFree(pTmp); 225 if (RT_FAILURE(rc)) 226 { 227 if (rc == VERR_NOT_FOUND) 228 VBoxServiceVerbose(2, "Sysprep argument guest property not found\n"); 229 else 230 VBoxServiceError("Sysprep argument guest property: Error = %Rrc\n", rc); 231 } 232 else 233 { 234 !VBoxServiceExecValidateFlags(pszSysprepArgsFlags) ? rc = rc : rc = VERR_ACCESS_DENIED; 235 if (RT_SUCCESS(rc)) 236 { 237 if (RTStrNLen(pszSysprepArgsValue, EXEC_MAX_ARGS) <= 0) 238 rc = VERR_NOT_FOUND; 239 } 240 VBoxServiceVerbose(2, "Sysprep argument guest property: %Rrc\n", rc); 241 } 242 } 243 244 if ( RT_SUCCESS(rc) 245 && !RTFileExists(pszSysprepCmdValue)) 246 { 247 VBoxServiceError("Sysprep executable not found! Search path=%s\n", pszSysprepCmdValue); 152 248 rc = VERR_FILE_NOT_FOUND; 153 249 } … … 155 251 if (RT_SUCCESS(rc)) 156 252 { 157 RTPROCESS pid; 158 const char *papszArgs[6] = { s_pszSysprepImage, "-quiet", "-reseal", "-mini", "-activated", NULL}; 159 160 /** @todo append the arguments in SysprepArgs/pszArgs. */ 253 RTPROCESS pid; 254 255 /* Construct arguments list. */ 256 /** @todo would be handy to have such a function in IPRT. */ 257 int16_t index = 0; 258 char* pszArg = pszSysprepArgsValue; 259 260 const char* pArgs[EXEC_MAX_ARGS]; /* Do we have a #define in IPRT for max args? */ 261 262 VBoxServiceVerbose(3, "Sysprep argument value: %s\n", pszSysprepArgsValue); 263 pArgs[index++] = pszSysprepCmdValue; /* Store image name as first argument. */ 264 while ( (pszArg != NULL) 265 && (*pszArg != NULL)) 266 { 267 char* pCurArg = (char*)RTMemAllocZ(_MAX_PATH); 268 int arg = 0; 269 while ( (*pszArg != ' ') 270 && (*pszArg != NULL)) 271 { 272 pCurArg[arg++] = *pszArg; 273 pszArg++; 274 } 275 pszArg++; /* Skip leading space. */ 276 VBoxServiceVerbose(3, "Sysprep argument %d = %s\n", index, pCurArg); 277 pArgs[index++] = pCurArg; 278 } 279 pArgs[index] = NULL; 280 281 /* Execute ... */ 161 282 VBoxServiceVerbose(3, "Executing sysprep ...\n"); 162 rc = RTProcCreate(p apszArgs[0], papszArgs, RTENV_DEFAULT, 0, &pid);283 rc = RTProcCreate(pszSysprepCmdValue, pArgs, RTENV_DEFAULT, 0, &pid); 163 284 if (RT_SUCCESS(rc)) 164 285 { … … 172 293 && Status.enmReason == RTPROCEXITREASON_NORMAL) 173 294 { 174 rc = VINF_SUCCESS; 175 fSysprepDone = true; /** r=bird: So, if sysprep fails, the idea is to continue executing the code every 10 seconds? */ 295 fSysprepDone = true; /* We're done, no need to repeat the sysprep exec. */ 176 296 } 177 297 } 178 298 179 299 /* Set return value so the host knows what happend. */ 180 rc = Vb glR3GuestPropWriteValueF(g_VMExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepRet", "%d", Status.iStatus);300 rc = VboxServiceWritePropInt(g_VMExecGuestPropSvcClientID, "HostGuest/SysprepRet", Status.iStatus); 181 301 if (RT_FAILURE(rc)) 182 302 VBoxServiceError("Failed to write SysprepRet: rc=%Rrc\n", rc); 183 303 } 184 } 185 186 VbglR3GuestPropReadValueFree(pszArgs); 304 305 /* Destroy argument list (all but the first and last arg, it's just a pointer). */ 306 for (int i=1; i<index-1; i++) 307 RTMemFree((void*)pArgs[i]); 308 } 187 309 } 188 #endif /* !TARGET_NT4 */189 310 190 311 #ifdef FULL_FEATURED_EXEC … … 244 365 { 245 366 /* Nothing here yet. */ 246 /** @todo r=bird: Shouldn't you do the following here: 247 * VbglR3GuestPropDisconnect(g_VMExecGuestPropSvcClientID); 248 * g_VMExecGuestPropSvcClientID = 0; 249 * And quite possibly: 250 * RTSemEventMultiDestroy(g_hVMExecEvent); 251 * g_hVMExecEvent = NIL_RTSEMEVENTMULTI; 252 */ 367 VbglR3GuestPropDisconnect(g_VMExecGuestPropSvcClientID); 368 g_VMExecGuestPropSvcClientID = 0; 369 370 RTSemEventMultiDestroy(g_VMExecEvent); 371 g_VMExecEvent = NIL_RTSEMEVENTMULTI; 253 372 } 254 373 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h
r22503 r22728 26 26 #ifdef RT_OS_WINDOWS 27 27 # include <Windows.h> 28 # include <tchar.h> /**@todo just drop this, this will be compiled as UTF-8/ANSI. */ 29 # include <process.h> /**@todo what's this here for? */ 28 # include <process.h> /* Needed for file version information. */ 30 29 #endif 31 30 … … 96 95 #ifdef RT_OS_WINDOWS 97 96 /** The service name (needed for mutex creation on Windows). */ 98 #define VBOXSERVICE_NAME L"VBoxService"97 #define VBOXSERVICE_NAME "VBoxService" 99 98 /** The friendly service name. */ 100 #define VBOXSERVICE_FRIENDLY_NAME L"VBoxService"99 #define VBOXSERVICE_FRIENDLY_NAME "VBoxService" 101 100 /** The following constant may be defined by including NtStatus.h. */ 102 101 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) … … 104 103 typedef struct 105 104 { 106 TCHAR szUser [_MAX_PATH];107 TCHAR szAuthenticationPackage [_MAX_PATH];108 TCHAR szLogonDomain [_MAX_PATH];105 WCHAR szUser [_MAX_PATH]; 106 WCHAR szAuthenticationPackage [_MAX_PATH]; 107 WCHAR szLogonDomain [_MAX_PATH]; 109 108 } VBOXSERVICEVMINFOUSER, *PVBOXSERVICEVMINFOUSER; 110 109 /** Structure for the file information lookup. */ 111 110 typedef struct 112 111 { 113 TCHAR* pszFilePath;114 TCHAR* pszFileName;112 char* pszFilePath; 113 char* pszFileName; 115 114 } VBOXSERVICEVMINFOFILE, *PVBOXSERVICEVMINFOFILE; 116 115 /** Function prototypes for dynamic loading. */ -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
r21218 r22728 90 90 91 91 #ifdef RT_OS_WINDOWS 92 /** @todo Use TCHAR here instead of LPC*STR crap. */ 93 BOOL VboxServiceGetFileString(LPCWSTR pszFileName, 94 LPWSTR pszBlock, 95 LPWSTR pszString, 92 BOOL VboxServiceGetFileString(const char* pszFileName, 93 char* pszBlock, 94 char* pszString, 96 95 PUINT puiSize) 97 96 { 98 97 DWORD dwHandle, dwLen = 0; 99 98 UINT uiDataLen = 0; 100 LPTSTRlpData = NULL;99 char* lpData = NULL; 101 100 UINT uiValueLen = 0; 102 101 LPTSTR lpValue = NULL; … … 115 114 if (!dwLen) 116 115 { 117 VBoxServiceError("No file information found! File = % ls, Error: %ld\n", pszFileName, GetLastError());116 VBoxServiceError("No file information found! File = %s, Error: %ld\n", pszFileName, GetLastError()); 118 117 return FALSE; 119 118 } … … 130 129 if((bRet = VerQueryValue(lpData, pszBlock, (LPVOID*)&lpValue, (PUINT)&uiValueLen))) 131 130 { 132 UINT uiSize = uiValueLen * sizeof( TCHAR);131 UINT uiSize = uiValueLen * sizeof(char); 133 132 134 133 if(uiSize > *puiSize) … … 147 146 148 147 149 BOOL VboxServiceGetFileVersion( LPCWSTRpszFileName,148 BOOL VboxServiceGetFileVersion(const char* pszFileName, 150 149 DWORD* pdwMajor, 151 150 DWORD* pdwMinor, … … 170 169 171 170 /* Try own fields defined in block "\\StringFileInfo\\040904b0\\FileVersion". */ 172 TCHAR szValueUTF16[_MAX_PATH] = {0}; 173 char szValueUTF8[_MAX_PATH] = {0}; 174 char *pszValueUTF8 = szValueUTF8; 171 char szValue[_MAX_PATH] = {0}; 172 char *pszValue = szValue; 175 173 UINT uiSize = _MAX_PATH; 176 174 int r = 0; 177 175 178 bRet = VboxServiceGetFileString(pszFileName, TEXT("\\StringFileInfo\\040904b0\\FileVersion"), szValueUTF16, &uiSize);176 bRet = VboxServiceGetFileString(pszFileName, "\\StringFileInfo\\040904b0\\FileVersion", szValue, &uiSize); 179 177 if (bRet) 180 178 { 181 r = RTUtf16ToUtf8Ex(szValueUTF16, uiSize, &pszValueUTF8, _MAX_PATH, NULL); 182 sscanf(szValueUTF8, "%ld.%ld.%ld.%ld", pdwMajor, pdwMinor, pdwBuildNumber, pdwRevisionNumber); 179 sscanf(pszValue, "%ld.%ld.%ld.%ld", pdwMajor, pdwMinor, pdwBuildNumber, pdwRevisionNumber); 183 180 } 184 181 else if (dwLen > 0) … … 194 191 if (GetFileVersionInfo(pszFileName, dwHandle, dwLen, lpData)) 195 192 { 196 if((bRet = VerQueryValue(lpData, TEXT("\\"), (LPVOID*)&pFileInfo, (PUINT)&BufLen)))193 if((bRet = VerQueryValue(lpData, "\\", (LPVOID*)&pFileInfo, (PUINT)&BufLen))) 197 194 { 198 195 *pdwMajor = HIWORD(pFileInfo->dwFileVersionMS); … … 211 208 212 209 213 BOOL VboxServiceGetFileVersionString( LPCWSTR pszPath, LPCWSTRpszFileName, char* pszVersion, UINT uiSize)210 BOOL VboxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize) 214 211 { 215 212 BOOL bRet = FALSE; 216 TCHAR szFullPath[_MAX_PATH] = {0}; 217 TCHAR szValueUTF16[_MAX_PATH] = {0}; 218 char szValueUTF8[_MAX_PATH] = {0}; 213 char szFullPath[_MAX_PATH] = {0}; 214 char szValue[_MAX_PATH] = {0}; 219 215 int r = 0; 220 216 221 swprintf(szFullPath, 4096, TEXT("%s\\%s"), pszPath, pszFileName); /** @todo here as well. */217 RTStrPrintf(szFullPath, 4096, "%s\\%s", pszPath, pszFileName); 222 218 223 219 DWORD dwMajor, dwMinor, dwBuild, dwRev; -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h
r19644 r22728 31 31 #ifdef RT_OS_WINDOWS 32 32 /** Gets a pre-formatted version string from the VS_FIXEDFILEINFO table. */ 33 BOOL VboxServiceGetFileVersionString( LPCWSTR pszPath, LPCWSTRpszFileName, char* pszVersion, UINT uiSize);33 BOOL VboxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize); 34 34 #endif 35 35 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp
r21323 r22728 272 272 if (SidTypeUser == ownerType) 273 273 { 274 LPWSTRpBuffer = NULL;274 char* pBuffer = NULL; 275 275 DWORD dwBytesRet = 0; 276 276 int iState = 0; … … 411 411 char szVer[_MAX_PATH] = {0}; 412 412 char szPropPath[_MAX_PATH] = {0}; 413 TCHARszSysDir[_MAX_PATH] = {0};414 TCHARszWinDir[_MAX_PATH] = {0};415 TCHARszDriversDir[_MAX_PATH + 32] = {0};413 char szSysDir[_MAX_PATH] = {0}; 414 char szWinDir[_MAX_PATH] = {0}; 415 char szDriversDir[_MAX_PATH + 32] = {0}; 416 416 417 417 GetSystemDirectory(szSysDir, _MAX_PATH); 418 418 GetWindowsDirectory(szWinDir, _MAX_PATH); 419 swprintf(szDriversDir, (_MAX_PATH + 32), TEXT("%s\\drivers"), szSysDir);419 RTStrPrintf(szDriversDir, (_MAX_PATH + 32), "%s\\drivers", szSysDir); 420 420 #ifdef RT_ARCH_AMD64 421 TCHARszSysWowDir[_MAX_PATH + 32] = {0};422 swprintf(szSysWowDir, (_MAX_PATH + 32), TEXT("%s\\SysWow64"), szWinDir);421 char szSysWowDir[_MAX_PATH + 32] = {0}; 422 RTStrPrintf(szSysWowDir, (_MAX_PATH + 32), "%s\\SysWow64", szWinDir); 423 423 #endif 424 424 … … 427 427 VBOXSERVICEVMINFOFILE vboxFileInfoTable[] = 428 428 { 429 { szSysDir, TEXT("VBoxControl.exe"), },430 { szSysDir, TEXT("VBoxHook.dll"), },431 { szSysDir, TEXT("VBoxDisp.dll"), },432 { szSysDir, TEXT("VBoxMRXNP.dll"), },433 { szSysDir, TEXT("VBoxService.exe"), },434 { szSysDir, TEXT("VBoxTray.exe"), },435 { szSysDir, TEXT("VBoxGINA.dll"), },429 { szSysDir, "VBoxControl.exe", }, 430 { szSysDir, "VBoxHook.dll", }, 431 { szSysDir, "VBoxDisp.dll", }, 432 { szSysDir, "VBoxMRXNP.dll", }, 433 { szSysDir, "VBoxService.exe", }, 434 { szSysDir, "VBoxTray.exe", }, 435 { szSysDir, "VBoxGINA.dll", }, 436 436 437 437 /* On 64-bit we don't yet have the OpenGL DLLs in native format. 438 438 So just enumerate the 32-bit files in the SYSWOW directory. */ 439 439 #ifdef RT_ARCH_AMD64 440 { szSysWowDir, TEXT("VBoxOGLarrayspu.dll"), },441 { szSysWowDir, TEXT("VBoxOGLcrutil.dll"), },442 { szSysWowDir, TEXT("VBoxOGLerrorspu.dll"), },443 { szSysWowDir, TEXT("VBoxOGLpackspu.dll"), },444 { szSysWowDir, TEXT("VBoxOGLpassthroughspu.dll"), },445 { szSysWowDir, TEXT("VBoxOGLfeedbackspu.dll"), },446 { szSysWowDir, TEXT("VBoxOGL.dll"), },440 { szSysWowDir, "VBoxOGLarrayspu.dll", }, 441 { szSysWowDir, "VBoxOGLcrutil.dll", }, 442 { szSysWowDir, "VBoxOGLerrorspu.dll", }, 443 { szSysWowDir, "VBoxOGLpackspu.dll", }, 444 { szSysWowDir, "VBoxOGLpassthroughspu.dll", }, 445 { szSysWowDir, "VBoxOGLfeedbackspu.dll", }, 446 { szSysWowDir, "VBoxOGL.dll", }, 447 447 #else 448 { szSysDir, TEXT("VBoxOGLarrayspu.dll"), },449 { szSysDir, TEXT("VBoxOGLcrutil.dll"), },450 { szSysDir, TEXT("VBoxOGLerrorspu.dll"), },451 { szSysDir, TEXT("VBoxOGLpackspu.dll"), },452 { szSysDir, TEXT("VBoxOGLpassthroughspu.dll"), },453 { szSysDir, TEXT("VBoxOGLfeedbackspu.dll"), },454 { szSysDir, TEXT("VBoxOGL.dll"), },448 { szSysDir, "VBoxOGLarrayspu.dll", }, 449 { szSysDir, "VBoxOGLcrutil.dll", }, 450 { szSysDir, "VBoxOGLerrorspu.dll", }, 451 { szSysDir, "VBoxOGLpackspu.dll", }, 452 { szSysDir, "VBoxOGLpassthroughspu.dll", }, 453 { szSysDir, "VBoxOGLfeedbackspu.dll", }, 454 { szSysDir, "VBoxOGL.dll", }, 455 455 #endif 456 456 457 { szDriversDir, TEXT("VBoxGuest.sys"), },458 { szDriversDir, TEXT("VBoxMouse.sys"), },459 { szDriversDir, TEXT("VBoxSF.sys"), },460 { szDriversDir, TEXT("VBoxVideo.sys"), },457 { szDriversDir, "VBoxGuest.sys", }, 458 { szDriversDir, "VBoxMouse.sys", }, 459 { szDriversDir, "VBoxSF.sys", }, 460 { szDriversDir, "VBoxVideo.sys", }, 461 461 462 462 { … … 467 467 VBOXSERVICEVMINFOFILE vboxFileInfoTable[] = 468 468 { 469 { szSysDir, TEXT("VBoxControl.exe"), },470 { szSysDir, TEXT("VBoxHook.dll"), },471 { szSysDir, TEXT("VBoxDisp.dll"), },472 { szSysDir, TEXT("VBoxService.exe"), },473 { szSysDir, TEXT("VBoxTray.exe"), },474 475 { szDriversDir, TEXT("VBoxGuestNT.sys"), },476 { szDriversDir, TEXT("VBoxMouseNT.sys"), },477 { szDriversDir, TEXT("VBoxVideo.sys"), },469 { szSysDir, "VBoxControl.exe", }, 470 { szSysDir, "VBoxHook.dll", }, 471 { szSysDir, "VBoxDisp.dll", }, 472 { szSysDir, "VBoxService.exe", }, 473 { szSysDir, "VBoxTray.exe", }, 474 475 { szDriversDir, "VBoxGuestNT.sys", }, 476 { szDriversDir, "VBoxMouseNT.sys", }, 477 { szDriversDir, "VBoxVideo.sys", }, 478 478 479 479 { … … 488 488 { 489 489 rc = VboxServiceGetFileVersionString(pTable->pszFilePath, pTable->pszFileName, szVer, sizeof(szVer)); 490 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestAdd/Components/% ls", pTable->pszFileName);490 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestAdd/Components/%s", pTable->pszFileName); 491 491 VboxServiceWriteProp(uiClientID, szPropPath, szVer); 492 492 pTable++; -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r22575 r22728 115 115 #ifdef RT_OS_WINDOWS 116 116 /* Get function pointers. */ 117 HMODULE hKernel32 = LoadLibrary( _T("kernel32"));117 HMODULE hKernel32 = LoadLibrary("kernel32"); 118 118 if (NULL != hKernel32) 119 119 {
Note:
See TracChangeset
for help on using the changeset viewer.