DkmClrModuleInstance.GetMetaDataImport Method

Definition

Obtains the CLR metadata from a given module. See IMetaDataImport documentation in MSDN for more information on metadata.

NOTE: Callers must take great care when consuming this API from managed code. The IMetaDataImport implementation may hold a file handle to a debuggee file, and the file handle will only be closed when the COM reference count hits zero. So it must be manually released (Marshal.IsComObject + Marshal.ReleaseComObject) rather than waiting for the GC to detect that the object can be released. When testing, be sure that the debuggee file has at least 64KB of metadata, as the metadata reader will not keep the file locked for reading when dealing with small files.

public:
 System::Object ^ GetMetaDataImport();
public:
 Platform::Object ^ GetMetaDataImport();
winrt::Windows::Foundation::IInspectable GetMetaDataImport();
public object GetMetaDataImport ();
member this.GetMetaDataImport : unit -> obj
Public Function GetMetaDataImport () As Object

Returns

[Out] The IMetaDataImport interface for this managed module instance. When consuming this API from managed code, the RCW which wraps the native implementation will have its reference count increased by 1 by this API. The caller should use Marshal.IsComObject + Marshal.ReleaseComObject to release this reference.

Applies to