From 11:00 PM CST Friday, Apr 11th - 1:30 PM CST Saturday, Apr 12th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

CA_PropertySetByRefV

CA_PropertySetByRefV

HRESULT CA_PropertySetByRefV (CAObjHandle objectHandle, ERRORINFO *errorInfo, int propertyID, unsigned int propertyType, va_list ptrToPropertyValue_va_list);

Purpose

Note   This function has been superseded by CA_PropertySetByRefVEx. The new function takes an additional parameter for interface id. Calling this function is equivalent to passing 0 for the interfaceId parameter.

Sets the value of the property of an ActiveX server object. Unlike CA_PropertySetByRef, you pass the pointer to the value as the only element in a variable argument list (va_list).

Note    Instrument drivers you generate with the ActiveX Controller Wizard use CA_PropertySetByRefV. You do not need to call it directly.

Parameters

Input
Name Type Description
objectHandle CAObjHandle An ActiveX object handle returned in an output parameter of an ActiveX server's function or a function in the Creating ActiveX Objects class in this library.
propertyID int ID of the ActiveX server property; located in the server type library.
propertyType unsigned int Data type of the property.

propertyType can be any of the fundamental data types for variants, safe arrays, and properties except CAVT_NULL or CAVT_EMPTY.
ptrToPropertyValue_va_list va_list A variable argument list initialized by the va_start macro. This list must contain a single value whose type is a pointer to 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. Function failure is indicated by a negative error code.

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 error code or CA_DisplayErrorInfo to display the description of the error code. If the error code is DISP_E_EXCEPTION (0x80020009 or -2147352567), then the errorInfo parameter contains additional error information. You can use CA_DisplayErrorInfo to display the error information.

Additional Information

Library: ActiveX Library

Include file: cviauto.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Was this information helpful?

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit