KsDiscardEvent function (ks.h)

The KsDiscardEvent function discards the memory used by an event entry after the objects have been dereferenced. The function can be called when manually disabling events that have not been disabled by the event owner (by calling the KsFreeEventList function to disable events). For example, the function can be called when asynchronously enabling an event fails and the event entry needs to be discarded.

Syntax

KSDDKAPI VOID KsDiscardEvent(
  [in] PKSEVENT_ENTRY EventEntry
);

Parameters

[in] EventEntry

Specifies the pointer to the entry to discard. This pointer is no longer valid after a successful call to this function.

Return value

None

Remarks

Typically, the KsDiscardEvent function is automatically called by the KsDisableEvent function when a request to disable an event occurs, or by the KsFreeEventList function when a request to free a list of events occurs. This function can only be called at PASSIVE_LEVEL.

Requirements

Requirement Value
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib

See also

KsDisableEvent

KsFreeEventList