Marshal.GetMethodInfoForComSlot(Type, Int32, ComMemberType) 메서드

정의

지정된 가상 함수 테이블(v-table 또는 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

성공적으로 반환되는 경우 멤버의 형식을 지정하는 열거형 값 중 하나입니다.

반환

지정된 VTBL 슬롯에서 멤버를 나타내는 개체입니다.

특성

예외

t가 COM에 표시되지 않는 경우

설명

반환 값은 , MethodInfo또는 PropertyInfo 개체일 FieldInfo수 있습니다. 반환 값은 지정된 COM 슬롯에 있는 관리되는 멤버의 형식에 따라 달라집니다(따라서 세 가지가 모두 파생되는 일반화된 반환 형식 MemberInfo ).

이 메서드에서 반환되는 0부터 시작하는 슬롯 번호는 3개의 IUnknown 및 4개의 IDispatch 메서드를 차지하므로 사용 가능한 첫 번째 슬롯의 값은 3 또는 7입니다. GetMethodInfoForComSlot 는 의 반대 기능을 Marshal.GetComSlotForMethodInfo제공합니다. 및 를 Marshal.GetStartComSlot 와 함께 GetMethodInfoForComSlot 사용하여 Marshal.GetEndComSlot 지정된 범위 내의 슬롯을 전달할 수 있습니다.

매개 변수는 memberType 반환에만 중요합니다. 반환 MemberInfo 된 개체에 해당하는 COM 멤버(일반 메서드 또는 속성 접근자)의 형식을 포함합니다.

적용 대상

추가 정보