VirtualBox

Changeset 85121 in vbox for trunk/src/VBox/Main/cbinding


Ignore:
Timestamp:
Jul 8, 2020 7:33:26 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139061
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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/cbinding/capiidl.xsl

    r82970 r85121  
    9696
    9797#ifdef _WIN32
    98 # pragma warning(push)
    99 # pragma warning(disable:4668 4255) /* -Wall and windows.h */
    100 # if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
    101 #  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
     98# ifdef _MSC_VER
     99#  pragma warning(push)
     100#  pragma warning(disable:4668 4255) /* -Wall and windows.h */
     101#  if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
     102#   pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
     103#  endif
     104#  ifdef __cplusplus
     105#   if _MSC_VER >= 1900 /*RT_MSC_VER_VC140*/
     106#    pragma warning(disable:5039) /* winbase.h(13179): warning C5039: 'TpSetCallbackCleanupGroup': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception. */
     107#   endif
     108#  endif
    102109# endif
    103110# undef COBJMACROS
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