NdisIMNotifyPnPEvent

Windows CE .NET

This function propagates notification of a Plug and Play or power management event to an overlying driver.

NDIS_STATUS NdisIMNotifyPnPEvent(
  NDIS_HANDLE MiniportHandle,
  PNET_PNP_EVENT NetPnPEvent
);

Parameters

MiniportHandle
[in] The handle input to MiniportInitialize. This handle represents the miniport affected by the Plug and Play or power management event passed to the caller's ProtocolPnPEvent function.
NetPnPEvent
[in] Points to a NET_PNP_EVENT structure, which describes the Plug and Play event or power management event being indicated to the protocol driver.

Return Values

The following table shows the return values for this function.

Value Description
NDIS_STATUS_SUCCESS The overlying driver succeeded propagated Plug and Play event was succeeded.
NDIS_STATUS_FAILURE The overlying driver failed the propagated Plug and Play event.
The return value is significant only when the propagated event is NetEventQueryPower or NetEventQueryRemove. For all other propagated events, the return value is always NDIS_STATUS_SUCCESS.

Remarks

An NDIS intermediate driver calls NdisIMNotifyPnPEvent in the context of the driver's ProtocolPnPEvent function to propagate notification of a Plug and Play or power management event to the overlying driver.

If the propagated event is a NetEventQueryPower or a NetEventQueryRemove, the intermediate driver must check the NDIS_STATUS value returned by NdisIMNotifyPnPEvent. If the returned status is NDIS_STATUS_SUCCESS, the intermediate driver should handle the event internally as usual and then return NDIS_STATUS_SUCCESS from its ProtocolPnPEvent function. If the returned status is NDIS_STATUS_FAILURE, the intermediate driver should return NDIS_STATUS_FAILURE from its ProtocolPnPEvent without further processing.

For all other propagated events, NdisIMNotifyPnPEvent always returns NDIS_STATUS_SUCCESS. The intermediate driver's ProtocolPnPEvent function in such cases should propagate the NDIS_STATUS returned by NdisIMNotifyPnPEvent.

How the intermediate driver processes a NetEventSetPower received by its ProtocolPnPEvent function depends on the specified device power state. If the specified device power state is NdisDeviceStateD0, the intermediate driver should handle the event internally as usual and then call NdisIMNotifyPnPEvent. For any other specified device power state, the intermediate driver should first call NdisIMNotifyPnPEvent and then handle the event internally as usual.

An intermediate driver should call NdisIMNotifyPnPEvent to propagate a NetEventReconfigure only if the NetEventReconfigure is indicated on a non-NULL ProtocolBindingContext. If a NetEventReconfigure is indicated on a NULL ProtocolBindingContext, the intermediate driver should not call NdisIMNotifyPnPEvent to propagate the event.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

MiniportInitialize | ProtocolPnPEvent | NDIS_STATUS


 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.

Show: