RangeTableFree

IVI Library

Ivi_RangeTableFree

Usage

ViStatus Ivi_RangeTableFree(ViSession vi, IviRangeTablePtr rangeTable, ViBoolean freeCommandStrings);

Purpose

This function deallocates a range table you create dynamically with Ivi_RangeTableNew. It calls Ivi_Free to free the IviRangeTable structure and the array of IviRangeTableEntry structures. It optionally frees the cmdString field in each entry.

Parameters

Name Type Description
vi ViSession

The ViSession handle that you obtain from Ivi_SpecificDriverNew. The handle identifies a particular IVI session.

rangeTable IviRangeTablePtr

Specify the table pointer you obtain from Ivi_RangeTableNew.

freeCommandStrings ViBoolean

Specify whether you want the function to deallocate the command strings in the range table. If you pass VI_TRUE (1), the function calls Ivi_Free on the cmdString field of each entry. Do not pass VI_TRUE unless you allocated the command strings using Ivi_Alloc.

Pass VI_FALSE (0) if you do not want the function to deallocate the command strings.

Return Value

Contains the status code that the function call returns. IVI engine functions can return error and warning values from several sets of status codes. Some status codes are unique to the IVI engine. Other status codes are the same codes that VISA Library functions return. Still others are error or warning values that functions in specific instrument drivers return. Each set of status codes has its own numeric range.

Regardless of the source of the status code, 0 always indicates success, a positive value indicates a warning, and a negative value indicates an error.

Related Topic

IVI Status Codes