MemberInfo._MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) 方法

定义

提供对某一对象公开的属性和方法的访问。Provides access to properties and methods exposed by an object.

 virtual void System.Runtime.InteropServices._MemberInfo.Invoke(System::UInt32 dispIdMember, Guid % riid, System::UInt32 lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) = System::Runtime::InteropServices::_MemberInfo::Invoke;
void _MemberInfo.Invoke (uint dispIdMember, ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
Sub Invoke (dispIdMember As UInteger, ByRef riid As Guid, lcid As UInteger, wFlags As Short, pDispParams As IntPtr, pVarResult As IntPtr, pExcepInfo As IntPtr, puArgErr As IntPtr) Implements _MemberInfo.Invoke

参数

dispIdMember
UInt32

标识成员。Identifies the member.

riid
Guid

留待将来使用。Reserved for future use. 必须为 IID_NULL。Must be IID_NULL.

lcid
UInt32

要在其中解释自变量的区域设置上下文。The locale context in which to interpret arguments.

wFlags
Int16

描述调用的上下文的标志。Flags describing the context of the call.

pDispParams
IntPtr

指向一个结构的指针,该结构包含一个参数数组、一个命名参数的 DISPID 参数数组和数组中元素数的计数。Pointer to a structure containing an array of arguments, an array of argument DISPIDs for named arguments, and counts for the number of elements in the arrays.

pVarResult
IntPtr

指向要存储结果的位置的指针。Pointer to the location where the result is to be stored.

pExcepInfo
IntPtr

指向一个包含异常信息的结构的指针。Pointer to a structure that contains exception information.

puArgErr
IntPtr

第一个出错参数的索引。The index of the first argument that has an error.

实现

异常

此方法称为使用 COM IDispatch 接口的后期绑定。The method is called late-bound using the COM IDispatch interface.

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。This method is for access to managed classes from unmanaged code, and should not be called from managed code. 有关IDispatch::Invoke的详细信息,请参阅 MSDN library。For more information about IDispatch::Invoke, see the MSDN Library.

适用于