VirtualBox

Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (4 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/Frontends/VBoxManage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r84692 r85121  
    188188 * unnecessary here.
    189189 */
    190 static void showProgressSignalHandler(int iSignal)
     190static void showProgressSignalHandler(int iSignal) RT_NOTHROW_DEF
    191191{
    192192    NOREF(iSignal);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r84570 r85121  
    377377
    378378#ifdef RT_OS_WINDOWS
    379 static BOOL WINAPI gctlSignalHandler(DWORD dwCtrlType)
     379static BOOL WINAPI gctlSignalHandler(DWORD dwCtrlType) RT_NOTHROW_DEF
    380380{
    381381    bool fEventHandled = FALSE;
     
    405405 * unnecessary here.
    406406 */
    407 static void gctlSignalHandler(int iSignal)
     407static void gctlSignalHandler(int iSignal) RT_NOTHROW_DEF
    408408{
    409409    NOREF(iSignal);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp

    r82968 r85121  
    365365 * @remarks This is called on a new thread.
    366366 */
    367 static BOOL WINAPI ctrlHandler(DWORD dwCtrlType)
     367static BOOL WINAPI ctrlHandler(DWORD dwCtrlType) RT_NOTHROW_DEF
    368368{
    369369    switch (dwCtrlType)
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