IDebugControl3::GetNumberEvents method (dbgeng.h)

The GetNumberEvents method returns the number of events for the current target, if the number of events is fixed.

Syntax

HRESULT GetNumberEvents(
  [out] PULONG Events
);

Parameters

[out] Events

Receives the number of events stored in the target. If the target offers multiple events, Events will be set to the number of events available. Otherwise, Events will be set to one.

Return value

This method may also return error values. See Return Values for more details.

Return code Description
S_OK
The method was successful, and Events contains the total number of events possible for the target.
S_FALSE
The method was successful, but Events contains only the total number of events possible at the current time. Targets that support variable execution might have different sets of events available at different points during the target's execution.

Remarks

Crash dump files contain a static list of events; each event represents a snapshot of the target at a particular point in time. If the current target is a crash dump file, this method sets Events to the number of stored events and returns S_OK.

Live targets generate events dynamically and do not necessarily have a known set of events. If the current target is a live target with unconstrained number of events, this method sets Events to the number of events currently available and returns S_FALSE.

For more information, see the topic Event Information.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

GetCurrentEventIndex

IDebugControl3

SetNextEventIndex