UCOMITypeInfo.Invoke(Object, Int32, Int16, DISPPARAMS, Object, EXCEPINFO, Int32) Método

Definição

Invoca um método ou acessa uma propriedade de um objeto que implementa a interface descrita pela descrição do tipo.Invokes a method, or accesses a property of an object, that implements the interface described by the type description.

public:
 void Invoke(System::Object ^ pvInstance, int memid, short wFlags, System::Runtime::InteropServices::DISPPARAMS % pDispParams, [Runtime::InteropServices::Out] System::Object ^ % pVarResult, [Runtime::InteropServices::Out] System::Runtime::InteropServices::EXCEPINFO % pExcepInfo, [Runtime::InteropServices::Out] int % puArgErr);
public void Invoke (object pvInstance, int memid, short wFlags, ref System.Runtime.InteropServices.DISPPARAMS pDispParams, out object pVarResult, out System.Runtime.InteropServices.EXCEPINFO pExcepInfo, out int puArgErr);
abstract member Invoke : obj * int * int16 * DISPPARAMS * obj * EXCEPINFO * int -> unit
Public Sub Invoke (pvInstance As Object, memid As Integer, wFlags As Short, ByRef pDispParams As DISPPARAMS, ByRef pVarResult As Object, ByRef pExcepInfo As EXCEPINFO, ByRef puArgErr As Integer)

Parâmetros

pvInstance
Object

Referência à interface descrita por essa descrição de tipo.Reference to the interface described by this type description.

memid
Int32

Identifica o membro de interface.Identifies the interface member.

wFlags
Int16

Sinalizadores que descrevem o contexto da chamada invoke.Flags describing the context of the invoke call.

pDispParams
DISPPARAMS

Referência a uma estrutura que contém uma matriz de argumentos, uma matriz de DISPIDs para argumentos nomeados e a contagens do número de elementos em cada matriz.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
Object

Referência ao local em que o resultado será armazenado.Reference to the location at which the result is to be stored. Se wFlags especificar DISPATCH_PROPERTYPUT ou DISPATCH_PROPERTYPUTREF, pVarResult será ignorado.If wFlags specifies DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF, pVarResult is ignored. Definido como null se nenhum resultado for desejado.Set to null if no result is desired.

pExcepInfo
EXCEPINFO

Aponta para uma estrutura de informações de exceção, que será preenchida somente se DISP_E_EXCEPTION for retornado.Points to an exception information structure, which is filled in only if DISP_E_EXCEPTION is returned.

puArgErr
Int32

Se Invoke retornar DISP_E_TYPEMISMATCH, puArgErr indicará o índice em rgvarg do argumento com tipo incorreto.If Invoke returns DISP_E_TYPEMISMATCH, puArgErr indicates the index within rgvarg of the argument with incorrect type. Se mais de um argumento retornar um erro, puArgErr indicará somente o primeiro argumento com um erro.If more than one argument returns an error, puArgErr indicates only the first argument with an error.

Comentários

Os valores de pDispParams podem ser acessados por meio de PtrToStructure .The values of pDispParams can be accessed through PtrToStructure.

Os valores válidos para wFlags são:Valid values for wFlags are:

ValorValue DescriçãoDescription
DISPATCH_METHODDISPATCH_METHOD O membro é acessado como um método.The member is accessed as a method. Se houver ambiguidade, tanto isso quanto o DISPATCH_PROPERTYGET sinalizador podem ser definidos.If there is ambiguity, both this and the DISPATCH_PROPERTYGET flag can be set.
DISPATCH_PROPERTYGETDISPATCH_PROPERTYGET O membro é recuperado como uma propriedade ou um membro de dados.The member is retrieved as a property or data member.
DISPATCH_PROPERTYPUTDISPATCH_PROPERTYPUT O membro é alterado como um membro de dados ou propriedade.The member is changed as a property or data member.
DISPATCH_PROPERTYPUTREFDISPATCH_PROPERTYPUTREF O membro é alterado usando uma atribuição de referência, em vez de uma atribuição de valor.The member is changed by using a reference assignment, rather than a value assignment. Este valor é válido somente quando a propriedade aceita uma referência a um objeto.This value is only valid when the property accepts a reference to an object.

Para obter informações adicionais sobre ITypeInfo::Invoke o, consulte a biblioteca MSDN.For additional information about ITypeInfo::Invoke, see the MSDN Library.

Aplica-se a