PFNKSADDEVENT callback function (ks.h)

An AVStream minidriver's AVStrMiniAddEvent routine is called when a client registers to be notified of an event. This routine is optional.

Syntax

PFNKSADDEVENT Pfnksaddevent;

NTSTATUS Pfnksaddevent(
  [in] PIRP Irp,
  [in] PKSEVENTDATA EventData,
  [in] _KSEVENT_ENTRY *EventEntry
)
{...}

Parameters

[in] Irp

Specifies the IRP describing the event add request.

[in] EventData

Pointer to a KSEVENTDATA structure describing the notification method for this event.

[in] EventEntry

Pointer to an AVStream-generated KSEVENT_ENTRY structure describing how the event is triggered.

Return value

AVStrMiniAddEvent should return STATUS_SUCCESS or an error specific to the event being enabled.

Remarks

If you do not provide an add event handler, AVStream adds the event to the object list. See Event Handling in AVStream.

Frequently this callback implements vendor-specific behavior and then calls KsFilterAddEvent or KsPinAddEvent. The minidriver passes the EventEntry pointer received here in calls to KsFilterAddEvent or KsPinAddEvent.

The minidriver specifies this routine's address in the AddHandler member of a KSEVENT_ITEM structure. Event Handling in AVStream describes how the minidriver provides this structure to the class driver.

If an AVStream minidriver specifies AddHandler as non-NULL, AVStream does not add the item to the object's event list. If minidriver specifies an AddHandler and does not add the event to the object's event list through KsDefaultAddEventHandler() or a Ks*AddEvent call, the minidriver is responsible for cleaning up the event.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Desktop
Header ks.h (include Ks.h)

See also

AVStrMiniRemoveEvent

KSAUTOMATION_TABLE

KSEVENTDATA

KSEVENT_ENTRY

KSEVENT_ITEM

KsFilterAddEvent

KsFilterGenerateEvents

KsPinAddEvent

KsPinGenerateEvents