[in] ViSession handle for the driver session.
CheckForNull Macro
Returns from the current function with an error ViStatus if any of the supplied pointer arguments are null.
Syntax
Section titled “Syntax”#define CheckForNull(Vi, ...)Parameters
Section titled “Parameters”Vi
... (variable argument list)
[in] Comma-separated list of pointer variables to test against null.
Remarks
Section titled “Remarks”This macro is used to validate pointer arguments. If any of the arguments are null, then this macro will return from the current function with a ViStatus value of IVIC_ERROR_NULL_POINTER. Before returning, this function stores the error code and appropriately formatted error message in the driver session so that client code may retrieve both via the GetError function.
Example
Section titled “Example”The following example demonstrates use of the CheckForNull macro.
ViStatus _VI_FUNC acme4321_ReadData(ViSession Vi, ViReal64* Frequency, ViReal64* Amplitude){ ValidateSession(Vi); ObtainLock(Vi); CheckForNull(Vi, Frequency, Amplitude);
// ...}