ICorProfilerInfo::GetModuleMetaData Method

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

Syntax

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

Parameters

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

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

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

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

Remarks

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.

Requirements

Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 2.0

See also