PCPFNEVENT_HANDLER callback function

An EventHandler routine processes event requests.

Syntax


PCPFNEVENT_HANDLER EventHandler;

NTSTATUS EventHandler(
  _In_ PPCEVENT_REQUEST EventRequest
)
{ ... }

Parameters

EventRequest [in]

Pointer to an initialized PCEVENT_REQUEST structure

Return value

The event handler returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code.

Remarks

Each event that a miniport driver exposes is associated with an event handler. The purpose of the event handler is to process event requests from the port driver and its clients. EventRequest is an input parameter to the handler that contains the following information about the event:

  • The event set GUID and event ID.

  • How the event is to be triggered.

  • Pointers to the target miniport object and (for a pin) stream object.

This is similar to the type of information that is provided with property requests.

The miniport driver exposes its event handlers through its IMiniport::GetDescription method. This method outputs a descriptor structure (see PCFILTER_DESCRIPTOR) that defines the filter that the miniport driver and its associated port driver implement together. This structure contains a pointer to the miniport driver's automation table (see PCAUTOMATION_TABLE), which in turn contains a pointer to an array of the miniport driver's events. Each array element is a PCEVENT_ITEM structure and contains a PCPFNEVENT_HANDLER function pointer to the handler for the event.

The EventHandler routine must reside in nonpaged memory.

Requirements

Target platform

Desktop

Header

Portcls.h (include Portcls.h)

See also

IPortEvents::AddEventToEventList
IPortEvents::GenerateEventList
PCEVENT_REQUEST
IMiniport::GetDescription
PCFILTER_DESCRIPTOR
PCAUTOMATION_TABLE
PCEVENT_ITEM

 

 

Send comments about this topic to Microsoft

Show: