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