UCOMITypeInfo.Invoke Method
Invokes a method, or accesses a property of an object, that implements the interface described by the type description.
Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
void Invoke( Object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, out Object pVarResult, out EXCEPINFO pExcepInfo, out int puArgErr )
Parameters
- pvInstance
- Type: System.Object
Reference to the interface described by this type description.
- memid
- Type: System.Int32
Identifies the interface member.
- wFlags
- Type: System.Int16
Flags describing the context of the invoke call.
- pDispParams
- Type: System.Runtime.InteropServices.DISPPARAMS
Reference to a structure that contains an array of arguments, an array of DISPIDs for named arguments, and counts of the number of elements in each array.
- pVarResult
- Type: System.Object
Reference to the location at which the result is to be stored. If wFlags specifies DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF, pVarResult is ignored. Set to null if no result is desired.
- pExcepInfo
- Type: System.Runtime.InteropServices.EXCEPINFO
Points to an exception information structure, which is filled in only if DISP_E_EXCEPTION is returned.
- puArgErr
- Type: System.Int32
If Invoke returns DISP_E_TYPEMISMATCH, puArgErr indicates the index within rgvarg of the argument with incorrect type. If more than one argument returns an error, puArgErr indicates only the first argument with an error.
The values of pDispParams can be accessed through PtrToStructure.
Valid values for wFlags are:
Value | Description |
|---|---|
DISPATCH_METHOD | The member is accessed as a method. If there is ambiguity, both this and the DISPATCH_PROPERTYGET flag can be set. |
DISPATCH_PROPERTYGET | The member is retrieved as a property or data member. |
DISPATCH_PROPERTYPUT | The member is changed as a property or data member. |
DISPATCH_PROPERTYPUTREF | The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object. |
For additional information about ITypeInfo::Invoke, see the MSDN Library.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.