Ivi_GetFunctionPtrByName
Usage
ViInt32 Ivi_GetFunctionPtrByName (ViSession vi, ViChar functionName[], ViAddr functionPointer, ViBoolean addPrefix);
Purpose
This function finds and returns a function pointer in the loaded specific driver module from the given function name.
Call this function only after you have successfully called the Ivi_ClassDriverNew function.
If the IVI session is not a class driver session, this function returns the IVI_ERROR_NOT_INITIALIZED error.
If a function with the given ID does not exist, the function returns the IVI_ERROR_FUNCTION_NOT_SUPPORTED error.
Parameters
Input | ||
Name | Type | Description |
---|---|---|
vi | ViSession | The ViSession handle that you obtain from Ivi_SpecificDriverNew. The handle identifies a particular IVI session. |
functionName | ViChar[] | The name of the function for which you want to obtain a function pointer. The value of this parameter must be one of the function names that you pass in the Function List parameter of the Ivi_ClassDriverNew function. The actual function name that is used to look for the function pointer depends on the value of the Add Prefix parameter. Refer to the Add Prefix parameter help for more information. |
addPrefix | ViBoolean | Determines if the specific driver prefix is added to the beginning of the function name when searching for the function pointer. For example, if the value of the function name parameter is 'Read', and the instrument driver prefix is "fl45", the actual function name that is used to search for the function pointer is based on the value of this parameter as follows: VI_FALSE—"Read" VI_TRUE—"fl45_Read" |
Output | ||
Name | Type | Description |
functionPointer | ViAddr | Returns the function pointer of the function corresponding to the function name. |
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.