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(类型库导入程序)工具使用自定义封送器将参数转换为ITypeInfo参数System.Type。 但是,如果通过除 Tlbimp.exe以外的某种方式获取 ITypeInfo 接口,则可以用于 GetTypeForITypeInfo 手动执行相同的翻译。

适用于

另请参阅