Marshal.GetTypeForITypeInfo(IntPtr) 方法

定義

將 Unmanaged ITypeInfo 物件轉換成 Managed 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 介面。

傳回

表示 Unmanaged ITypeInfo 物件的 Managed 類型。

屬性

備註

GetTypeForITypeInfoSystem.Type 回以原始類型為基礎的實例。 您可以套用 , System.Runtime.InteropServices.MarshalAsAttribute 以使用此自定義封送處理器取代標準 Interop 封送處理行為。 Tlbimp.exe (類型庫匯入工具) 工具會使用自定義封送處理器將參數轉譯ITypeInfoSystem.Type參數。 不過,如果您透過 Tlbimp.exe 以外的某些方式取得 ITypeInfo 介面,您可以使用 GetTypeForITypeInfo 手動執行相同的翻譯。

適用於

另請參閱