語言

Marshal.GetTypeForITypeInfo(IntPtr) 方法

定義

將一個未受管理的 ITypeInfo 物件轉換成受管理 Type 物件。

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 來手動執行相同的翻譯。

適用於

另請參閱