Share this page

# lrc_DispPropertyPutRef

IDispatch Interface Calls

Sets a property by reference using the IDispatch interface.

    void lrc_DispPropertyPutRef( IDispatch * pDispatch, char *idName, unsigned long locale, ...);

*pDispatch | A pointer to the IDispatch interface.
*idName | A pointer to the name of the property.
locale | The language locale.

Additional Arguments

Args | A pointer or pointers to the value or values (in the case of an array) to set.
OPTIONAL_ARGS | An optional flag signaling that the next arguments will be a series of pairs of specific array indices and pointers to values to set (the named arguments of the DispParams structure in the original Microsoft definition).
LAST_ARG | A flag signaling that the preceding argument was the last argument.
__CheckResult | This flag is generated by VuGen to indicate if the call was successful when the script was generated and HRESULT should be checked. Values: CHECK_HRES or DONT_CHECK_HRES.

lrc_DispPropertyPutRef sets a property by reference using the IDispatch interface and sets the DISPATCH_PROPERTYPUTREF flag.

IDispatch is a "meta-interface" that exposes all of the other interfaces and methods of a COM object. Calls to IDispatch:Invoke from VuGen scripts are implemented using lrc_Disp functions. These calls are constructed somewhat differently from calls to other interfaces. Calls to GetIDsOfNames are hidden inside the lrc_Disp calls. Each lrc_Disp call sets a different wflags parameter value when it calls IDispatch:Invoke. The lrc_DispPropertyPutRef call sets the DISPATCH_PROPERTYPUTREF flag.

## Return Values

lrc Return Values

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

This example shows how VuGen saves a property by reference:

    VARIANT P1 = lrc_variant_DispObject((IDispatch*)NULL);
    lrc_DispPropertyPutRef((IDispatch*)_CoCl1_0, "Aobj", /*locale*/1024, &P1, LAST_ARG, CHECK_HRES);

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: