VirtualBox

Changeset 85121 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

Location:
trunk/src/VBox/Installer/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp

    r83807 r85121  
    525525}
    526526
    527 static VOID netCfgLoggerCallback(LPCSTR szString)
     527static DECLCALLBACK(void) netCfgLoggerCallback(const char *pszString)
    528528{
    529529    if (g_hCurrentModule)
    530         logString(g_hCurrentModule, szString);
     530        logString(g_hCurrentModule, pszString);
    531531}
    532532
     
    535535    if (g_hCurrentModule)
    536536    {
    537         VBoxNetCfgWinSetLogging((LOG_ROUTINE)NULL);
     537        VBoxNetCfgWinSetLogging(NULL);
    538538        g_hCurrentModule = NULL;
    539539    }
     
    549549    g_hCurrentModule = hModule;
    550550
    551     VBoxNetCfgWinSetLogging((LOG_ROUTINE)netCfgLoggerCallback);
     551    VBoxNetCfgWinSetLogging(netCfgLoggerCallback);
    552552    /* uncomment next line if you want to add logging information from VBoxDrvCfg.cpp */
    553553//    VBoxDrvCfgLoggerSet(vboxDrvLoggerCallback, NULL);
  • trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp

    r83808 r85121  
    2626
    2727#include <iprt/win/windows.h>
    28 #include <commctrl.h>
     28#include <iprt/win/commctrl.h>
    2929#include <fcntl.h>
    3030#include <io.h>
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