LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

FPGenCreateParamCtrl

FPGenCreateParamCtrl

LabWindows/CVI ActiveX Server Interface

CVI_AppFPGenCreateParamCtrl (CAObjHandle objectHandle, ERRORINFO *errorInfo, const char *paramType, const char *paramName, const char *defaultVal, long width, enum CVIEnum_CVIFPGenParamControlType ctrlType, const char *helpStr, long *paramId, long *returnValue);


Note  This function signature is shown as it appears when you create a client using the LabWindows/CVI ActiveX Controller Wizard. If you create a client for the LabWindows/CVI ActiveX server interface using a different development environment, this function might be exposed differently. Some of the parameters documented here, such as objectHandle or errorInfo, are not applicable if you write a client using a different development environment.

Purpose

Creates a parameter control that you can associate with one or more functions.

Note  You can discard the parameter control and all associated variables after inserting the function panel that contains the control into a function tree. Call FPGenDiscardParamCtrl to discard the parameter control.

Parameters

Input
Name Type Description
objectHandle CAObjHandle Specifier for a particular ActiveX object that is currently in memory. Obtain this handle from CVI_NewApp, CVI_OpenApp, CVI_ActiveApp, or an ActiveX method or property.

All of the methods that you can apply to a particular object are grouped under a single class in the function tree. The name of the class corresponds to the type of the object to which this handle refers.
paramType const char * The data type of the parameter control to create.
paramName const char * The name of the parameter control to create.
defaultVal const char * The default value of the control to create.
width long The width of the control to create.
ctrlType enum CVIEnum_CVIFPGenParamControlType The type of the control to create. You can specify one of the following constants:

CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_INPUT = 0
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_OUTPUT = 1
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_RING = 2
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_BINARY = 3
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_SLIDE = 4
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_RETURNVALUE = 5
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_MESSAGE = 7
CVIConst_CVI_FPGEN_PARAM_CTRL_TYPE_NUMERIC = 8
helpStr const char * The help string associated with the control to create.
Output
Name Type Description
errorInfo ERRORINFO * When an ActiveX server function fails with the error code DISP_E_EXCEPTION, descriptive information about the error code is stored in this parameter. The information can include the error code, source, and description. It also can include a help file and help file context ID.

When an ActiveX server function fails with the error codes DISP_E_PARAMNOTFOUND, DISP_E_TYPEMISMATCH, or E_INVALIDARG, the parameter position of the invalid argument may be stored in the errorParamPos member of this parameter.

You can pass NULL for this parameter.
paramId long * The ID used to specify the parameter control in subsequent function calls.
returnValue long * The value that the LabWindows/CVI ActiveX server function returns. A negative value indicates that the LabWindows/CVI ActiveX server function returned an error.

You can use GetCVIAutomationServerErrorString to get the description of a LabWindows/CVI ActiveX server error code.

Return Value

Name Type Description
status HRESULT A value indicating whether an error occurred. A negative error code indicates function failure.

Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h.

You can use CA_GetAutomationErrorString to get the description of an ActiveX Library error code.
Was this information helpful?