Free

IVI Library

Ivi_Free

Usage

ViStatus Ivi_Free(ViSession vi, ViAddr Memory_Block_Pointer);

Purpose

This function deallocates a memory block you allocate with Ivi_Alloc. If you specify a non-NULL IVI session handle, the function also removes the memory block from the list of memory blocks that the IVI engine maintains for the session.

For the vi parameter, you must specify the same IVI session handle that you pass to Ivi_Alloc when you allocate the memory block.

Parameters

Name Type Description
vi ViSession

Specify the same IVI session handle that you pass to Ivi_Alloc when you allocate the memory block.

If you pass VI_NULL for the vi parameter to Ivi_Alloc, pass VI_NULL for the vi parameter to this function.

memoryBlockPointer ViAddr

This function deallocates a memory block you allocate with Ivi_Alloc. If you specify a non-NULL IVI session handle, the function also removes the memory block from the list of memory blocks that the IVI engine maintains for the session.

For the vi parameter, you must specify the same IVI session handle that you pass to Ivi_Alloc when you allocate the memory block.

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