取得實作指定方法之 的元數據標記 Type 指標,以及宣告該方法的介面。
Syntax
HRESULT GetInterfaceImplProps (
[in] mdInterfaceImpl iiImpl,
[out] mdTypeDef *pClass,
[out] mdToken *ptkIface
);
Parameters
iiImpl [in]表示傳回 類別和介面令牌之 方法的元數據令牌。
pClass [out]表示實作 方法之類別的元數據令牌。
ptkIface [out]表示定義實作方法之介面的元數據令牌。
Remarks
您可以呼叫 EnumInterfaceImpls 方法來取得 的值iImpl。
例如,假設類別具有標記值 0x02000007,而且它會實作類型具有令牌的三個 mdTypeDef 介面:
- 0x02000003 (TypeDef)
- 0x0100000A (TypeRef)
- 0x0200001C (TypeDef)
在概念上,這項資訊會儲存在介面實作數據表中,如下所示:
| Row number | Class token | Interface token |
|---|---|---|
| 4 | ||
| 5 | 02000007 | 02000003 |
| 6 | 02000007 | 0100000A |
| 7 | ||
| 8 | 02000007 | 0200001C |
回想一下,令牌是 4 位元組的值:
- 較低的 3 個字節會保存數據列編號或 RID。
- 上方位元組會儲存權杖類型 – 0x09 。
mdtInterfaceImpl
GetInterfaceImplProps 會傳回您在 自變數中 iImpl 提供之令牌的數據列中保留的資訊。
Requirements
平臺: 請參閱 .NET 支援的作系統。
Header: Cor.h
Library: CorGuids.lib