PHW_EVENT_ROUTINE callback function (strmini.h)

The class driver calls the stream minidriver's StrMiniEvent routine to signal to a minidriver an event should be enabled or disabled.

Syntax

PHW_EVENT_ROUTINE PhwEventRoutine;

NTSTATUS PhwEventRoutine(
  [in] IN PHW_EVENT_DESCRIPTOR EventDescriptor
)
{...}

Parameters

[in] EventDescriptor

Describes the event, and whether it should be enabled or disabled.

Return value

For event enable events, StrMiniEvent returns STATUS_SUCCESS if the event is successfully enabled, or an error code on failure. The class driver ignores the return value on disable requests.

Remarks

The class driver queues the KSEVENT_ENTRY structure it passes in EventDescriptor->EventEntry. Every other member of EventDescriptor is deallocated once StrMiniEvent exits, so any event-specific data contained in the EventData member of EventDescriptor that the minidriver needs to keep should be stored by the minidriver.

For that purpose, the minidriver can allocate space directly after the KSEVENT_ENTRY structure by providing a nonzero value in the ExtraEntryData member of the KSEVENT_ITEM structure it used to declare the event.

Requirements

Requirement Value
Target Platform Desktop
Header strmini.h (include Strmini.h)