Marshal.GetTypeForITypeInfo(IntPtr) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.