GetNthLogicalName

IVI Library

Ivi_GetNthLogicalName

Usage

ViStatus Ivi_GetNthLogicalName(IviLogicalNameEntry* logicalNamesList, ViInt32 index, ViChar logicalNameBuffer[ ], ViInt32 bufferSize, ViBoolean* fromFile);

Purpose

This function extracts the data from an entry in a logical names list you obtain from Ivi_GetLogicalNamesList. You specify the entry with a 1-based index.

If the index you specify is greater than the number of logical names, the function places an ASCII NUL byte at the beginning of the Logical Name Buffer parameter and returns VI_SUCCESS.

Parameters

Name Type Description
logicalNamesList IviLogicalNameEntry*

Specify the pointer to the logical names list you obtain from Ivi_GetLogicalNamesList.

index ViInt32

Specify the 1-based index of the logical name list entry from which you want to extract data.

logicalNameBuffer ViChar[ ]

The buffer in which the function returns the logical name. The buffer must be a ViChar array that contains at least as many bytes as you specify in the Buffer Size parameter.

If the index you specify is greater than the number of logical names, the function places an ASCII NUL byte at the beginning of the buffer and returns VI_SUCCESS.

bufferSize ViInt32

Specify the number of bytes in the Logical Name Buffer parameter.

fromFile ViBoolean*

This parameter always returns a value of VI_TRUE (1). You can pass VI_NULL to this parameter.

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