LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

CA_PropertySetVEx

CA_PropertySetVEx

HRESULT CA_PropertySetVEx (CAObjHandle objectHandle, ERRORINFO *errorInfo, const IID *interfaceId, int propertyID, unsigned int propertyType, va_list propertyValue_va_list);

Purpose

Note   This function is used by the functions generated by the ActiveX Controller Instrument Driver Wizard. It is not intended to be used directly.

Set the value of a Property. Unlike CA_PropertySetEx, you pass the value as a the only element in a variable argument list (va_list).

Parameters

Input
Name Type Description
objectHandle CAObjHandle An ActiveX object handle returned in an output parameter of an ActiveX server function or a function in the Creating ActiveX Objects class in this library.
interfaceId const IID * The interface id specifying the type of interface pointer to be used for the property access.

You must pass the UUID of an interface implemented by the object passed in the objectHandle parameter or zero to indicate the current interface id that is stored in that object handle.
propertyID int The Id of the Property.

This Id can be obtained from the object's type library.
propertyType unsigned int The type of the property specified in the propertyId parameter.

If property type is VARIANT, you can pass any type including VARIANT. The type passed in this parameter must match the type of the value passed in the propertyValue parameter. The property types can be any of the data types for variants and safe arrays except CAVT_NULL.
propertyValue_va_list va_list A variable argument list initialized by the va_start macro.

This list must contain as its only element the value to which you want to set the property. The value must be of the type specified in the propertyType parameter.
Output
Name Type Description
errorInfo ERRORINFO When the ActiveX server method invoked by this function fails with the error code DISP_E_EXCEPTION, descriptive information about the error code is stored in this parameter. The descriptive information includes the error code, source, and description. The information also can include a help file and help file context.

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

This parameter can be NULL.

Return Value

Name Type Description
status HRESULT A value indicating whether an error occurred. Negative error codes indicate function failure.

Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. The LabWindows/CVI ActiveX Library explicitly returns error codes. Other error codes in winerror.h are generated by ActiveX servers and passed on to you by the LabWindows/CVI ActiveX Library.

You can use CA_GetAutomationErrorString to get the description of an error code or CA_DisplayErrorInfo to display the description of the error code.

Additional Information

Library: ActiveX Library

Include file: cviauto.h

LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later

Was this information helpful?