KsPinGenerateEvents - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ks.h

void KsPinGenerateEvents(
  [in]           PKSPIN                     Pin,
  [in, optional] const GUID                 *EventSet,
  [in]           ULONG                      EventId,
  [in]           ULONG                      DataSize,
  [in, optional] PVOID                      Data,
  [in, optional] PFNKSGENERATEEVENTCALLBACK CallBack,
  [in, optional] PVOID                      CallBackContext
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ks-kspingenerateevents)

KsPinGenerateEvents function

Description

The KsPinGenerateEvents function generates events of an indicated type that are present in Pin's event list.

Parameters

Pin [in]

A pointer to the KSPIN structure on which to generate events.

EventSet [in, optional]

A pointer to the event set GUID to match to determine which events to generate. If this parameter is NULL, set GUID is not taken into account for determining matching events.

EventId [in]

The event ID to match to determine which events to generate.

DataSize [in]

The size in bytes of the data with which to generate the data event.

Data [in, optional]

A pointer to a data buffer. Specify if generating a data event.

CallBack [in, optional]

A pointer to a caller-specified function that is called to determine whether a given event should be generated. If NULL, no callback verification is performed to determine whether an event should be generated (only EventSet *and *EventId are used). Prototype as follows:

BOOLEAN CallBack
(IN PVOID Context,
    IN PKSEVENT_ENTRY EventEntry);

KsPinGenerateEvents passes the CallBackContext parameter unchanged as the Context parameter for the callback. The callback function returns TRUE if EventEntry should be generated. Otherwise, it returns FALSE.

CallBackContext [in, optional]

A pointer to a caller-specified context that is passed to the callback function CallBack.

Remarks

When calling this function, a minidriver must place Data and CallBackContext in a locked, nonpageable data segment. The CallBack is made at DISPATCH_LEVEL. The callback function must be in a locked segment and must be prepared to run at IRQL = DISPATCH_LEVEL. Note that there is an additional issue in DX8 only: EventSet must be in a locked data segment.

This is an inline function call to KsGenerateEvents, which performs the necessary typecasting. Minidrivers should usually call this version instead of directly calling KsGenerateEvents.

An event is generated if the following three conditions hold:

For more information, see Event Handling in AVStream and KS Events.

See also

KSEVENT_ENTRY

KsAddEvent

KsFilterGenerateEvents

KsGenerateEvents