ICorProfilerInfo::GetModuleMetaData Method

Gets a metadata interface instance that maps to the specified module.


HRESULT GetModuleMetaData(  
    [in]  ModuleID moduleId,  
    [in]  DWORD    dwOpenFlags,  
    [in]  REFIID   riid,  
    [out] IUnknown **ppOut);  


[in] The ID of the module to which the interface instance will be mapped.

[in] A value of the CorOpenFlags enumeration that specifies the mode for opening manifest files. Only the ofRead, ofWrite and ofNoTransform bits are valid.

[in] The reference ID (GUID) of the metadata interface whose instance will be retrieved. See Metadata Interfaces for a list of the interfaces.

[out] A pointer to the address of the metadata interface instance.


You may ask for the metadata to be opened in read/write mode, but this will result in slower metadata execution of the program, because changes made to the metadata cannot be optimized as they were from the compiler.

Some modules (such as resource modules) have no metadata. In those cases, GetModuleMetaData will return an HRESULT value of S_FALSE, and a null in *ppOut.


Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 2.0

See also