NdisWaitEvent function (ndis.h)

The NdisWaitEvent function puts the caller into a wait state until the given event is set to the Signaled state or the wait times out.

Syntax

BOOLEAN NdisWaitEvent(
  [in] PNDIS_EVENT Event,
  [in] UINT        MsToWait
);

Parameters

[in] Event

A pointer to an initialized event object for which the caller provides the storage.

[in] MsToWait

The number of milliseconds the caller will wait if the event is not set to the signaled state within that interval. A value of zero specifies that the caller will wait for the event indefinitely.

Return value

NdisWaitEvent returns TRUE if the event is in the signaled state when the wait is satisfied.

Remarks

NdisWaitEvent returns control to its caller when the given event is signaled or the specified MsToWait interval expires, whichever is sooner. If the event is currently in the signaled state when this call occurs, NdisWaitEvent returns control immediately.

A miniport driver typically calls NdisWaitEvent from its MiniportInitializeEx and MiniportHaltEx functions. A protocol driver typically calls NdisWaitEvent from its ProtocolBindAdapterEx and ProtocolUnbindAdapterEx functions.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisWaitEvent (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisWaitEvent (NDIS 5.1)) in Windows XP.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
DDI compliance rules Irql_Miscellaneous_Function(ndis)

See also

DriverEntry of NDIS Protocol Drivers

MiniportHaltEx

MiniportInitializeEx

NdisInitializeEvent

NdisResetEvent

NdisSetEvent

ProtocolBindAdapterEx

ProtocolUnbindAdapterEx