USE_NATIVE_EH
Use the USE_NATIVE_EH macro to enable C++ compiler switches for exception handling.
This macro is only used with unmanaged code. For more information about unmanaged code, see An Overview of Managed/Unmanaged Code Interoperability in the MSDN library.
Syntax
USE_NATIVE_EH=value
Parameters
value
This parameter directs the Build utility to turn on compiler switches, as shown in the following table.Value C++ compiler flag Description 1
/EHsc
Specifies the synchronous exception handling mode. This model supports C++ exception handling without structured exception handling exceptions.
Note The C++ compiler assumes that external C functions never throw an exception.
ASYNC
/EHa
Specifies the asynchronous exception handling model. This model supports C++ exception handling with structured exception handling exceptions.
CTHROW
/EHsc
Specifies the synchronous exception handling model. This model supports C++ exception handling without structured exception handling exceptions.
Note The C++ compiler assumes that external C functions can throw an exception.
Comments
Use the US_NATIVE_EH macro if you are using standard C++ exception handling statements, for example, try, catch, and throw. For more information about these statements, see The try, catch, and throw Statements in the MSDN library.
Example
If you specify the following in your Sources file:
USE_NATIVE_EH=1
The Build utility enables the /EHsc compiler switch when it builds your C++ source files.
See Also
Send comments about this topic to Microsoft
Build date: 5/3/2011