Marshal.GetTypeForITypeInfo(IntPtr) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public:
static Type ^ GetTypeForITypeInfo(IntPtr piTypeInfo);
public static Type GetTypeForITypeInfo(IntPtr piTypeInfo);
[System.Security.SecurityCritical]
public static Type GetTypeForITypeInfo(IntPtr piTypeInfo);
static member GetTypeForITypeInfo : nativeint -> Type
[<System.Security.SecurityCritical>]
static member GetTypeForITypeInfo : nativeint -> Type
Public Shared Function GetTypeForITypeInfo (piTypeInfo As IntPtr) As Type
參數
- piTypeInfo
-
IntPtr
nativeint
與元帥的介面。ITypeInfo
傳回
一個代表未受管理 ITypeInfo 物件的受管理型態。
- 屬性
備註
GetTypeForITypeInfo 回傳 System.Type 一個基於原始型別的實例。 你可以用這個自訂的管理器來 System.Runtime.InteropServices.MarshalAsAttribute 取代標準的互操作編組行為。
Tlbimp.exe(類型庫匯入器)工具使用自訂的 marshaler 將參數轉換ITypeInfo成System.Type參數。 然而,如果你透過非 Tlbimp.exe的方式取得 ITypeInfo 介面,你可以用 GetTypeForITypeInfo 來手動執行相同的翻譯。