Marshal.GetMethodInfoForComSlot(Type, Int32, ComMemberType) メソッド

定義

指定した仮想関数テーブル (V テーブルまたは VTBL) のスロットの MemberInfo オブジェクトを取得します。

public:
 static System::Reflection::MemberInfo ^ GetMethodInfoForComSlot(Type ^ t, int slot, System::Runtime::InteropServices::ComMemberType % memberType);
public static System.Reflection.MemberInfo GetMethodInfoForComSlot (Type t, int slot, ref System.Runtime.InteropServices.ComMemberType memberType);
[System.Security.SecurityCritical]
public static System.Reflection.MemberInfo GetMethodInfoForComSlot (Type t, int slot, ref System.Runtime.InteropServices.ComMemberType memberType);
static member GetMethodInfoForComSlot : Type * int * ComMemberType -> System.Reflection.MemberInfo
[<System.Security.SecurityCritical>]
static member GetMethodInfoForComSlot : Type * int * ComMemberType -> System.Reflection.MemberInfo
Public Shared Function GetMethodInfoForComSlot (t As Type, slot As Integer, ByRef memberType As ComMemberType) As MemberInfo

パラメーター

t
Type

MemberInfo の取得対象となる型。

slot
Int32

VTBL スロット。

memberType
ComMemberType

正常に返された場合は、メンバーの型を指定する列挙値の 1 つ。

戻り値

指定した VTBL スロットのメンバーを表すオブジェクト。

属性

例外

t は COM から参照できません。

注釈

戻り値には、または PropertyInfo オブジェクトをFieldInfoMethodInfo指定できます。 戻り値は、指定された COM スロットに存在するマネージド メンバーの型 (したがって、3 つすべてが派生する一般化された戻り値の型 MemberInfo ) によって異なります。

このメソッドによって返される 0 から始まるスロット番号は、3 つの IUnknown メソッドと場合によっては 4 つの IDispatch メソッドを考慮し、最初に使用可能なスロットの値を 3 または 7 にします。 GetMethodInfoForComSlot は の反対の機能を Marshal.GetComSlotForMethodInfo提供します。 と Marshal.GetStartComSlot を組み合わせてGetMethodInfoForComSlot使用Marshal.GetEndComSlotして、指定した範囲内のスロットを渡すことができます。

パラメーターは memberType 、戻り値でのみ重要です。 返される MemberInfo オブジェクトに対応する COM メンバー (通常のメソッドまたはプロパティ アクセサー) の型が含まれます。

適用対象

こちらもご覧ください