Bewerken

Delen via


StreamClassGetNextEvent function (strmini.h)

Minidrivers can use the StreamClassGetNextEvent routine to search the event queue of a device or of a particular stream.

Syntax

PKSEVENT_ENTRY StreamClassGetNextEvent(
  [in, optional] PVOID             HwInstanceExtension_OR_HwDeviceExtension,
  [in, optional] PHW_STREAM_OBJECT HwStreamObject,
  [in, optional] GUID              *EventGuid,
  [in]           ULONG             EventItem,
  [in, optional] PKSEVENT_ENTRY    CurrentEvent
);

Parameters

[in, optional] HwInstanceExtension_OR_HwDeviceExtension

Pointer to the minidriver's device extension. The minidriver specifies the size of this buffer in the HW_INITIALIZATION_DATA structure it passes when it registers itself via StreamClassRegisterMinidriver. The class driver then passes pointers to the buffer in the HwDeviceExtension member of the HW_STREAM_REQUEST_BLOCK, HW_STREAM_OBJECT, HW_TIME_CONTEXT, and PORT_CONFIGURATION_INFORMATION structures it passes to the minidriver.

This first parameter was PVOID HwDeviceExtension. It MUST be HwInstanceExtension for multi-instance and multi-filter types (version 20) drivers. Legacy single instance drivers can continue to specify HwDeviceExtension as the first parameter. It can also specify HwInstanceExtension.

[in, optional] HwStreamObject

Pointer to a HW_STREAM_OBJECT. Set to NULL to search the event queue of the device itself. To search the event queue of a particular stream, set to the stream's stream object.

[in, optional] EventGuid

Specifies the event set to match when walking the queue, or NULL to match any event set.

[in] EventItem

Specifies the event ID to match when walking the queue, or -1 to match any event.

[in, optional] CurrentEvent

Pointer to an event in the event queue, or NULL.

Return value

If CurrentEvent is not NULL, StreamClassGetNextEvent returns the next matching event after CurrentEvent in the queue (or NULL if there is no such next event). If CurrentEvent is NULL, StreamClassGetNextEvent returns the first matching event in the queue.

Remarks

The minidriver can call StreamClassGetNextEvent successively to loop through the event queue, examining one event at a time.

The caller may specify additional search criteria to match events on the event queue.

Requirements

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