Bewerken

Delen via


PCEVENT_REQUEST structure (portcls.h)

The PCEVENT_REQUEST structure specifies an event request.

Syntax

typedef struct _PCEVENT_REQUEST {
  PUNKNOWN           MajorTarget;
  PUNKNOWN           MinorTarget;
  ULONG              Node;
  const PCEVENT_ITEM *EventItem;
  PKSEVENT_ENTRY     EventEntry;
  ULONG              Verb;
  PIRP               Irp;
} PCEVENT_REQUEST, *PPCEVENT_REQUEST;

Members

MajorTarget

IUnknown pointer to the main miniport object. This member contains the UnknownMiniport pointer that the adapter driver previously passed to the IPort::Init method.

MinorTarget

IUnknown pointer to a stream object that is associated with the MajorTarget miniport object. This member contains the stream-object pointer that the port driver previously retrieved from the IMiniportXxx::NewStream method (for example, the IMiniportWaveCyclic::NewStream method's Stream parameter).

Node

Specifies a node ID. This member identifies the target node for the request. If the target is not a node, this member is set to ULONG(-1).

EventItem

Pointer to the PCEVENT_ITEM structure for this request

EventEntry

Pointer to the KSEVENT_ENTRY structure for this request

Verb

Specifies the type of event request. This member should be set to one of the values in the following table.

Value Meaning
PCEVENT_VERB_ADD Indicates that a client wants to enable the specified event. After validating the event and target information, the EventHandler routine adds the event by calling the IPortEvents::AddEventToEventList method.
PCEVENT_VERB_REMOVE Notifies the EventHandler that an event is being disabled and removed from the list.
PCEVENT_VERB_SUPPORT This request is a query for support. If the miniport driver supports the event for the target identified in the request, it should succeed this query. Otherwise, it should fail the query.
PCEVENT_VERB_NONE No action is needed.

Irp

Pointer to the IRP containing the event request

Remarks

This is the structure that the port driver passes to the miniport driver's EventHandler routine. The PCEVENT_ITEM structure contains a function pointer to an event handler that takes a PCEVENT_REQUEST pointer as its only call parameter. The port driver allocates a PCEVENT_REQUEST structure, extracts the relevant information from the original event request (which the Irp member points to), and loads the information into this structure before calling the handler.

In WDM audio, the target of an event request can be a pin instance but not a filter instance. The target can also include a node ID.

The MajorTarget and MinorTarget members are IUnknown pointers to the main miniport object and an associated stream object, respectively. The event handler can query these objects for their miniport and stream interfaces.

For example, if the target for the event request is a pin instance on a WaveCyclic filter:

Requirements

Requirement Value
Header portcls.h (include Portcls.h)

See also

EventHandler

IPortEvents::AddEventToEventList

KSEVENT_ENTRY

PCEVENT_ITEM

PCFILTER_NODE