Partilhar via


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);

Parameters

Parameter Description

moduleId

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

dwOpenFlags

[in] A value of the CorOpenFlags Enumeration enumeration that specifies the mode for opening manifest files. Only the ofRead and ofWrite values 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: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Reference

ICorProfilerInfo Interface