viMemFree

Agilent VISA.NET

viMemFree

Syntax

viMemFree(ViSession vi, ViBusAddress offset);

Description

Note: viMemFree is implemented for PXI MEMACC resources only. It is not implemented for VXI and VXI-GPIB MEMACC resources.

This function frees the memory previously allocated using viMemAlloc. 

Both the high-level memory access functions (viInXX, viOutXX, viMoveXX) and the low-level memory access functions (viMapAddress, viPeekXX, viPokeXX, viUnmapAddress) can be used on MEMACC sessions to access the allocated memory.

Parameters

Name

Dir

Type

Description

vi

IN

ViSession

Unique logical identifier to a session.

offset

IN

ViBusAddress

Specifies the memory previously allocated with viMemAlloc.

Return Values

Type ViStatus

This is the function return status. It returns either a completion code or an error code as follows.

Completion Code

Description

VI_SUCCESS

Operation completed successfully.

Error Codes

Description

VI_ERROR_INV_OFFSET

Invalid offset specified.

VI_ERROR_INV_SESSION
VI_ERROR_INV_OBJECT

The given session or object reference is invalid (both are the same value).

VI_ERROR_NSUP_OPER

The given vi does not support this operation.

VI_ERROR_WINDOW_MAPPED

The specified offset is currently in use by viMapAddress.

See Also

viMemAlloc