An EventHandler routine processes event requests.
typedef
NTSTATUS
(*PCPFNEVENT_HANDLER)
IN PPCEVENT_REQUEST EventRequest
);
The event handler returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code.
Declared in portcls.h. Include portcls.h.
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. The EventRequest structure passed as an input parameter to the handler contains information indicating the filter, pin, and node information necessary to determine the target of the event request. This is the same 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.
IPortEvents::AddEventToEventList, IPortEvents::GenerateEventList, PCEVENT_REQUEST, IMiniport::GetDescription, PCFILTER_DESCRIPTOR, PCAUTOMATION_TABLE, PCEVENT_ITEM