![]() | NTL_DISABLE_IVIC_ATTRIBUTE_C4244 Macro |
Preprocessor definition to disable the C4244 compiler warning when performing certain parameter conversions in the IVI-C wrapper.
#define NTL_DISABLE_IVIC_ATTRIBUTE_C4244
Define NTL_DISABLE_IVIC_ATTRIBUTE_C4244 before the include of "stdafx.nimbus.h" in order to prevent the C4244 compiler warning when converting between IVI-COM and IVI-C parameters within the IVI-C wrapper implementation. In some situations, the conversion might cast from a larger IVI-C parameter type to a smaller IVI-COM parameter type. This could result in a loss of data or precision.
For example, if an IVI-C attribute is of type ViInt32 and the corresponding IVI-COM attribute is of type Int16 (short), then the cast from ViInt32 to short will generate C4244 by default, warning that you are casting from a larger type (ViInt32) to a smaller type (short).
![]() |
---|
Only when you are certain that the required cast will not cause problems in the completed driver should you apply the NTL_DISABLE_IVIC_ATTRIBUTE_C4244 preprocessor definition to your "stdafx.h" file. |
The following example demonstrates use of the NTL_DISABLE_IVIC_ATTRIBUTE_C4244 macro.
// stdafx.h // Prevent C4244 within the IVI-C wrapper implementation #define NTL_DISABLE_IVIC_ATTRIBUTE_C4244 #include "stdafx.nimbus.h"