Ivi_AttachToConfigStoreHandle

IVI Library

Ivi_AttachToConfigStoreHandle

Usage

ViStatus Ivi_AttachToConfigStoreHandle (IviConfigStoreHandle handle, ViBoolean discardExistingHandle);

Purpose

Normally, the IVI engine creates and owns an internal instance of the IVI Configuration Server. Use this function to specify that the IVI engine should use an IVI Configuration Server instance that you create and own. To use this function, you must first acquire a handle from the IVI Configuration Server C API.

During the period of time in which the IVI engine uses the handle that you specify in this function, changes to the IVI Configuration Store file on disk are not recognized by the IVI engine.

Use this function in the following situations:

  • You want to dynamically create and/or destroy IVI configuration items in memory and have them used by the IVI engine, without first reading the contents of the IVI Configuration Store file.
  • You want ensure that the IVI engine does not automatically refresh the configuration items in memory when the Master Configuration Store file is modified on disk.

Parameters

Name Type Description
handle IviConfigStorehandle The handle to the IVI Configuration Server instance that you want the IVI engine to use.

Create this handle using the IVI Configuration Server C API.
discardExistingHandle ViBoolean Specifies whether to discard the IVI Configuration Server instance that the IVI engine uses internally.

Pass VI_TRUE to discard the handle.

Pass VI_FALSE to prevent the IVI engine from discarding the handle. This is useful if you are using an IVI Configuration Server instance that you obtained from a previous call to Ivi_GetConfigStoreHandle. If you pass VI_FALSE for this parameter, you must discard the handle yourself.

Default Value: VI_TRUE

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