VirtualBox

Ignore:
Timestamp:
Apr 28, 2020 4:05:00 PM (5 years ago)
Author:
vboxsync
Message:

IPRT,++: Apply bldprog-strtab.h and friends to the IPRT status message database (errmsg.cpp) to reduce size. The interface (RTErrMsg*) has been reworked as we no longer have C-strings in the database, but 'compressed' string w/o zero terminators. bugref:9726

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Installer/InstallHelper/VBoxGuestInstallHelper.cpp

    r83843 r84054  
    144144    if (RT_FAILURE(rc))
    145145    {
    146 
    147 #ifdef UNICODE
    148         TCHAR *pszErrAsString;
    149         int rc2 = RTStrToUtf16(RTErrGetDefine(rc), &pszErrAsString);
     146        char szMsg[80];
     147        RTErrQueryDefine(rc, szMsg, sizeof(szMsg), false /*fFailIfUnknown*/);
     148        /** @todo r=bird: Just use RTUtf16Printf here as RTErrQueryDefine drags in
     149         *        the whole IPRT printf machinery anyway. */
     150#ifdef UNICODE
     151        int rc2 = RTStrToUtf16(szMsg, &pszErrAsString);
    150152        if (RT_SUCCESS(rc2))
    151153        {
    152 #else
    153             TCHAR *pszErrAsString = RTErrGetDefine(rc);
    154154#endif
    155155            StringCchPrintf(szErr, sizeof(szErr), _T("Error: %s"), pszErrAsString);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette