Share this page

# lrc_DispMethod1

IDispatch Interface Calls

Invokes a method and gets a property of the same name using the IDispatch interface.

    VARIANT lrc_DispMethod1( IDispatch * pDispatch, char *idName, unsigned long locale, ...);

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

Additional Arguments

Args | A list of the required arguments of the method (the unnamed arguments of the DispParams structure in the original Microsoft definition).
OPTIONAL_ARGS | An optional flag signaling that the next arguments will be a series of pairs of optional arguments, with each pair giving the name and the value of the argument (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.

The lrc_DispMethod1 invokes a method and gets a property of the same name using the IDispatch interface. The lrc_DispMethod1 call sets wflags to DISPATCH_METHOD and DISPATCH_PROPERTYGET. It can be used if a method and a property have the same name.

The lrc_DispMethod1 returns the return value of the invoked function.

IDispatch is a "meta-interface" that exposes all of the other interfaces and methods of a COM object.

Calls to GetIDsOfNames are hidden inside the lrc_Disp calls.

## Return Values

lrc Return Values

## Parameterization

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

## Example

This example shows how to use lrc_Dispmethod1 to retrieve an array of strings.

    VARIANT retValue = lrc_variant_empty();
    retValue = lrc_DispMethod1((IDispatch*)IDispatch_0, "GetAgentsArray", /*locale*/1033, 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: