Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

SetValIDispatch Method

NI TestStand™ 4.1 Help
May 2008

NI Part Number:
370052G-01

»View NI TestStand Product Info

Syntax

PropertyObject.SetValIDispatch ( lookupString, options, newValue)

Purpose

Sets the value of the ActiveX Automation Reference property specified by the lookupString parameter. You must specify the value as an IDispatch pointer.

Remarks

The reference property keeps its own reference to the object you specify. If the property already contains a reference, it releases that reference before storing the new one. If you specify a NULL reference, the property releases any existing reference it holds.

Note  This method and the PropertyObject.SetValInterface method apply to the PropValType_Reference value type. The PropertyObject.GetValInterface and PropertyObject.SetValInterface methods are meant for advanced users who want to store arbitrary interfaces in TestStand reference properties.

Parameters

lookupString As String

[In] Pass an empty string to denote the PropertyObject to which the method applies, or pass the name of a subproperty within the PropertyObject. Refer to Lookup Strings for more information about the strings you can use.

options As Long

[In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options.

newValue As Object

[In] New value for the property.

Example

LabWindows/CVI:
    CAObjHandle objHandle = 0;

    objHandle = NewActiveXAutomationObject();
    TS_PropertySetValIDispatch(propObj, &errorInfo,
                               "Locals.ActiveXAutoObj", 0, objHandle);
    CA_DiscardObjHandle(objHandle);

Visual Basic (function call):
    propObj.SetValIDispatch("Locals.ActiveXAutoObj", 0, someObj)

Visual Basic (inline):
    propObj.Locals.ActiveXAutoObj = someObj

Visual C++:
    propObj->SetValIDispatch("Locals.ActiveXAutoObj", 0, someObj);


See Also

GetValIDispatch

Lookup Strings

PropertyOptions

PropertyValueTypes

SetValIDispatchByOffset

SetValInterface


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit