Changeset 107057 in vbox for trunk/src/VBox/GuestHost/installation/VBoxWinDrvCommon.cpp
- Timestamp:
- Nov 20, 2024 11:37:10 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/installation/VBoxWinDrvCommon.cpp
r107051 r107057 661 661 * @returns VBox status code. 662 662 * @retval VERR_UNRESOLVED_ERROR if no translation was possible. 663 * @retval VERR_INSTALLATION_FAILED if a Setup API or a specific Windows error code occurred not handled 664 * within IPRT's error resolving function. 663 665 * @param uNativeCode Native Windows error code to translate. 664 666 */ 665 667 int VBoxWinDrvInstErrorFromWin32(unsigned uNativeCode) 666 668 { 667 #ifdef DEBUG_andy668 bool const fAssertMayPanic = RTAssertMayPanic();669 RTAssertSetMayPanic(false);670 #endif671 672 669 const char *pszErr = VBoxWinDrvSetupApiErrToStr(uNativeCode); 673 670 if (!pszErr) 674 VBoxWinDrvWinErrToStr(uNativeCode); 675 676 int const rc = RTErrConvertFromWin32(uNativeCode); 677 if (rc == VERR_UNRESOLVED_ERROR) 678 AssertMsgFailed(("Unhandled error %u (%#x): %s\n", uNativeCode, uNativeCode, pszErr ? pszErr : "<Unknown>")); 679 680 #ifdef DEBUG_andy 681 RTAssertSetMayPanic(fAssertMayPanic); 682 #endif 671 pszErr = VBoxWinDrvWinErrToStr(uNativeCode); 672 673 /* All we can do here is to return VERR_INSTALLATION_FAILED if the above calls returned something, 674 * as we don't have IPRT equivalents for all those (Windows- / SetupAPI-)specific error codes. 675 * 676 * For anything else not (yet) handled we want to get a debug assertion, however. */ 677 int rc = VERR_INSTALLATION_FAILED; 678 if (!pszErr) 679 { 680 rc = RTErrConvertFromWin32(uNativeCode); 681 if (rc == VERR_UNRESOLVED_ERROR) 682 AssertMsgFailed(("Unhandled error %u (%#x): %s\n", uNativeCode, uNativeCode, pszErr ? pszErr : "<Unknown>")); 683 } 684 683 685 return rc; 684 686 }
Note:
See TracChangeset
for help on using the changeset viewer.