Partager via


IMetaDataImport::GetEventProps Method

Gets metadata information for the event represented by the specified event token, including the declaring type, the add and remove methods for delegates, and any flags and other associated data.

HRESULT GetEventProps (
    mdEvent       ev,
    mdTypeDef     *pClass, 
    LPCWSTR       szEvent, 
    ULONG         cchEvent, 
    ULONG         *pchEvent, 
    DWORD         *pdwEventFlags,
    mdToken       *ptkEventType,
    mdMethodDef   *pmdAddOn, 
    mdMethodDef   *pmdRemoveOn, 
    mdMethodDef   *pmdFire, 
    mdMethodDef   rmdOtherMethod[], 
    ULONG         cMax,
    ULONG         *pcOtherMethod
);

Parameters

Parameter Description

ev

[in] The event metadata token representing the event to get metadata for.

pClass

[out] A pointer to the TypeDef token representing the class that declares the event.

szEvent

[out] The name of the event referenced by ev.

pchEvent

[in] The requested length in wide characters of szEvent.

pdwEventFlags

[out] The returned length in wide characters of szEvent.

ptkEventType

[out] A pointer to a TypeRef or TypeDef metadata token representing the Delegate type of the event.

pmdAddOn

[out] A pointer to the metadata token representing the method that adds handlers for the event.

pmdRemoveOn

[out] A pointer to the metadata token representing the method that removes handlers for the event.

pmdFire

[out] A pointer to the metadata token representing the method that raises the event.

rmdOtherMethod

[out] An array of token pointers to other methods associated with the event.

cMax

[in] The maximum size of the rmdOtherMethod array.

pcOtherMethod

[out] The number of tokens returned in rmdOtherMethod.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Included as a resource in Mscoree.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface
IMetaDataImport2 Interface