Admin Production ni-theme
Current Publication

Ivi_GetFunctionPtr

IVI Compliance Package

Ivi_GetFunctionPtr

Usage

ViInt32 Ivi_GetFunctionPtr (ViSession vi, ViInt32 functionID, ViAddr functionPointer);

Purpose

This function finds and returns a function pointer in the loaded specific driver module from the given function ID.

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.
functionID ViInt32 The function ID of the function for which you want to obtain a function pointer.

The value of this parameter must be one of the function IDs that you pass in the Function List parameter of the Ivi_ClassDriverNew function.
Output
Name Type Description
functionPointer ViAddr Returns the function pointer of the function corresponding to the function ID.

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