- Timestamp:
- Nov 23, 2009 12:49:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
r23655 r24866 76 76 77 77 #ifdef RT_OS_WINDOWS 78 /** @todo return an iprt status code instead of BOOL */ 78 79 BOOL VBoxServiceGetFileString(const char* pszFileName, 79 80 char* pszBlock, … … 100 101 if (!dwLen) 101 102 { 102 VBoxServiceError("No file information found! File = %s, Error: %ld\n", pszFileName, GetLastError()); 103 /* Don't print this to release log -- this confuses people if a file 104 * isn't present because it's optional / was not installed intentionally. */ 105 VBoxServiceVerbose(3, "No file information found! File = %s, Error: %Rrc\n", 106 pszFileName, RTErrConvertFromWin32(GetLastError())); 103 107 return FALSE; 104 108 } … … 107 111 if (!lpData) 108 112 { 109 VBoxServiceError("Could not allocate temp buffer !\n");113 VBoxServiceError("Could not allocate temp buffer for file string lookup!\n"); 110 114 return FALSE; 111 115 } … … 123 127 memcpy(pszString, lpValue, uiSize); 124 128 } 125 else VBoxService Error("Could not query value!\n");126 } 127 else VBoxService Error("Could not get file version info!\n");129 else VBoxServiceVerbose(3, "No file string value for \"%s\" in file \"%s\" available!\n", pszBlock, pszFileName); 130 } 131 else VBoxServiceVerbose(3, "No file version table for file \"%s\" available!\n", pszFileName); 128 132 129 133 RTMemFree(lpData); … … 132 136 133 137 138 /** @todo return an iprt status code instead of BOOL */ 134 139 BOOL VBoxServiceGetFileVersion(const char* pszFileName, 135 140 DWORD* pdwMajor, … … 171 176 if (!lpData) 172 177 { 173 VBoxServiceError("Could not allocate temp buffer !\n");178 VBoxServiceError("Could not allocate temp buffer for file version string!\n"); 174 179 return FALSE; 175 180 } … … 183 188 *pdwBuildNumber = HIWORD(pFileInfo->dwFileVersionLS); 184 189 *pdwRevisionNumber = LOWORD(pFileInfo->dwFileVersionLS); 190 bRet = TRUE; 185 191 } 186 else VBoxService Error("Could not query file information value!\n");192 else VBoxServiceVerbose(3, "No file version value for file \"%s\" available!\n", pszFileName); 187 193 } 188 else VBoxService Error("Could not get file version info!\n");194 else VBoxServiceVerbose(3, "No file version struct for file \"%s\" available!\n", pszFileName); 189 195 190 196 RTMemFree(lpData);
Note:
See TracChangeset
for help on using the changeset viewer.