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.
Applies to
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για