[Supported in the .NET Framework 4.5.2 and later versions]

Sets a value that specifies the types of events for which the profiler wants to receive event notifications from the common language runtime (CLR). It provides more functionality than the ICorProfilerInfo::SetEventMask method.

## Syntax

HRESULT SetEventMask2(        [in] DWORD dwEventsLow,        [in] DWORD dwEventsHigh
);


## Parameters

dwEventsLow
[in] A 4-byte value that specifies the categories of events. Each bit controls a different capability, behavior, or type of event. The bits are described in the COR_PRF_MONITOR enumeration.

dwEventsHigh
[in] A 4-byte value that specifies the categories of events. Each bit controls a different capability, behavior, or type of event. The bits are described in the COR_PRF_HIGH_MONITOR enumeration.

## Remarks

The SetEventMask2 method is used to set the callbacks to which the profiler subscribes. Typically, you call the GetEventMask2 method to determine which bits are set, perform a logical OR of its pdwEventsLow and pdwEventsHigh values and any new bits you want to set, and then call the SetEventMask2 method.

This method is the recommended alternative to the SetEventMask method.

## Requirements

Platforms: See System Requirements.