NdisWaitEvent (NDIS 5.1) function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisWaitEvent 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

  • Event [in]
    Pointer to an initialized event object for which the caller provides the storage.

  • MsToWait [in]
    Specifies 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 MiniportInitialize and MiniportHalt functions. A protocol driver typically calls NdisWaitEvent from its ProtocolBindAdapter and ProtocolUnbindAdapter functions.

Requirements

Target platform

Universal

Version

See NdisWaitEvent.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

DriverEntry of NDIS Protocol Drivers

MiniportHalt

MiniportInitialize

NdisInitializeEvent

NdisResetEvent

NdisSetEvent

ProtocolBindAdapter

ProtocolUnbindAdapter

 

 

Send comments about this topic to Microsoft