Attribute._Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) 方法

定義

提供物件所公開的屬性和方法的存取權。Provides access to properties and methods exposed by an object.

 virtual void System.Runtime.InteropServices._Attribute.Invoke(System::UInt32 dispIdMember, Guid % riid, System::UInt32 lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) = System::Runtime::InteropServices::_Attribute::Invoke;
void _Attribute.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 _Attribute.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 介面進行晚期繫結的存取。Late-bound access using the COM IDispatch interface is not supported.

備註

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。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.

適用於