Changeset 24306 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Nov 4, 2009 9:52:10 AM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuestLib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp
r24023 r24306 85 85 Assert(ppszHostVersion); 86 86 Assert(ppszGuestVersion); 87 88 *ppszHostVersion = NULL; 89 *ppszGuestVersion = NULL; 87 90 88 91 /* We assume we have an update initially. … … 171 174 if (RT_FAILURE(rc)) 172 175 { 173 VbglR3GuestPropReadValueFree(*ppszHostVersion); 174 VbglR3GuestPropReadValueFree(*ppszGuestVersion); 176 if (*ppszHostVersion) 177 VbglR3GuestPropReadValueFree(*ppszHostVersion); 178 if (*ppszGuestVersion) 179 VbglR3GuestPropReadValueFree(*ppszGuestVersion); 175 180 } 176 181 return rc; -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp
r23893 r24306 223 223 224 224 /* Still no luck? Then try the old xVM paths ... */ 225 if ( FAILED(r))225 if (r != ERROR_SUCCESS) 226 226 { 227 227 r = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Sun\\xVM VirtualBox Guest Additions", 0, KEY_READ, &hKey); … … 236 236 237 237 /* Did we get something worth looking at? */ 238 if ( SUCCEEDED(r))238 if (r == ERROR_SUCCESS) 239 239 { 240 240 /* Version. */ … … 262 262 } 263 263 } 264 rc = RTErrConvertFromWin32(r); 264 else 265 { 266 /* No registry entries found, return the compile-time version string atm. */ 267 /* Version. */ 268 if (ppszVer) 269 rc = RTStrAPrintf(ppszVer, "%s", VBOX_VERSION_STRING); 270 /* Revision. */ 271 if (ppszRev) 272 rc = RTStrAPrintf(ppszRev, "%s", VBOX_SVN_REV); 273 } 265 274 if (NULL != hKey) 266 275 RegCloseKey(hKey); 267 # else /* !RT_OS_WINDOWS */276 # else /* !RT_OS_WINDOWS */ 268 277 /* On non-Windows platforms just return the compile-time version string atm. */ 269 278 /* Version. */ … … 273 282 if (ppszRev) 274 283 rc = RTStrAPrintf(ppszRev, "%s", VBOX_SVN_REV); 275 # endif /* !RT_OS_WINDOWS */276 return rc; 277 } 284 # endif /* !RT_OS_WINDOWS */ 285 return rc; 286 }
Note:
See TracChangeset
for help on using the changeset viewer.