This topic describes the C++/WinRT configuration macros. Unless otherwise noted, these rules apply to all of the C++/WinRT configuration macros:
.exe
or .dll
) must have identical macro settings. That includes static libraries.If defined, disables these rarely-used features (in order to reduce compile times):
You're allowed to combine files with different settings for WINRT_LEAN_AND_MEAN.
Files that don't define WINRT_LEAN_AND_MEAN gain access to the rarely-used features.
WINRT_NO_MODULE_LOCKIf defined, disables object counts for the current module. The module never unloads from the process. Defining this macro is customary for executables (which can never unload), or for .dll
s that you intend to leave pinned. May not be combined with WINRT_CUSTOM_MODULE_LOCK.
If defined, allows you to provide your own implementation of winrt::get_module_lock. May not be combined with WINRT_NO_MODULE_LOCK.
Your custom implementation of winrt::get_module_lock must support the following operations:
++winrt::get_module_lock()
: Increment the reference count on the module lock.--winrt::get_module_lock()
: Decrement the reference count on the module lock.if (winrt::get_module_lock())
: Check whether the reference count is nonzero. (Needed if you're building a DLL.)These macros allow you to customize assertion handling. WINRT_ASSERT doesn't require the argument to be evaluated. WINRT_VERIFY requires that the argument be evaluated, even in non-debug builds.
If you don't customize these macros, and _DEBUG is defined, then C++/WinRT makes them equivalent to _ASSERTE.
If you don't customize these macros, and _DEBUG is not defined, then C++/WinRT defines WINRT_ASSERT to discard the expression unevaluated, and defines WINRT_VERIFY to discard the expression after evaluating it.
WINRT_NO_MAKE_DETECTIONIf defined, disables the default C++/WinRT diagnostic that detects that you mistakenly constructed an implementation class without using winrt::make.
We strongly recommended that you don't define this symbol, because doing so masks a common source of programming errors.
WINRT_NO_SOURCE_LOCATIONIf defined, disables the inclusion of source file and line number information (and in debug builds, function information), when originating errors.
This additional information is not used by C++/WinRT, but it is made available to other libraries which wish to interoperate with C++/WinRT exceptions, such as the Windows Implementation Library.
By default, the information is included when compiled in C++20 mode or higher. You may wish to suppress this information to reduce binary size.
WINRT_DIAGNOSTICSIf defined, enables internal statistics to track various operations:
If defined, includes helper functions to assist in native debug visualizations in Visual Studio. The code isn't used at runtime; it exists only for debugging.
If you don't customize this macro, then visualization support functions are enabled if _DEBUG is defined. For more details, see Visual Studio native debug visualization (natvis) for C++/WinRT.
You're allowed to combine files with different settings for WINRT_NATVIS.
If any file is compiled with WINRT_NATVIS support, then the resulting module will have native debug visualizations enabled.
WINRT_EXPORT, WINRT_FAST_ABI_SIZEDon't use these macros.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4