Click or drag to resize

ValidateSession Macro

Tests the specified session to ensure it represents a valid handle to an existing driver session created via the driver's init or InitWithOptions function.

#define ValidateSession(Vi)
Parameters
Vi

[in] ViSession variable to test.

Remarks

The macro returns from the current function with a ViStatus value of IVIC_ERROR_INVALID_SESSION_HANDLE if the supplied ViSession parameter is not valid.

Example

The following example demonstrates use of the ValidateSession macro.

C++
ViStatus _VI_FUNC acme4321_ConfigureSweep(ViSession Vi, ViReal64 StartFrequency, ViReal64 StopFrequency)
{
    ValidateSession(Vi);

    // ...
}

Download a complete CHM version of this documentation here.