Editare

Partajați prin


Marshal.GetTypeForITypeInfo(IntPtr) Method

Definition

Converts an unmanaged ITypeInfo object into a managed Type object.

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

Parameters

piTypeInfo
IntPtr

nativeint

The ITypeInfo interface to marshal.

Returns

A managed type that represents the unmanaged ITypeInfo object.

Attributes

Remarks

GetTypeForITypeInfo returns a System.Type instance that is based on the original type. You can apply the System.Runtime.InteropServices.MarshalAsAttribute to replace standard interop marshaling behavior with this custom marshaler. The Tlbimp.exe (Type Library Importer) tool uses the custom marshaler to translate ITypeInfo parameters to System.Type parameters. However, if you obtain an ITypeInfo interface by some means other than Tlbimp.exe, you can use GetTypeForITypeInfo to manually perform the same translation.

Applies to

See also