Windows Driver Kit: Network Devices and Protocols
NET_DEVICE_PNP_EVENT
The NET_DEVICE_PNP_EVENT structure defines device plug and play (PnP) events for miniport adapters.
typedef struct _NET_DEVICE_PNP_EVENT {
NDIS_OBJECT_HEADER Header;
NDIS_PORT_NUMBER PortNumber;
NDIS_DEVICE_PNP_EVENT DevicePnPEvent;
PVOID InformationBuffer;
ULONG InformationBufferLength;
UCHAR NdisReserved[2 * sizeof(PVOID)];
} NET_DEVICE_PNP_EVENT, *PNET_DEVICE_PNP_EVENT;
Members
- Header
- The NDIS_OBJECT_HEADER structure for the NET_DEVICE_PNP_EVENT structure. NDIS sets the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_DEFAULT, the Revision member to NET_DEVICE_PNP_EVENT_REVISION_1, and the Size member to NDIS_SIZEOF_NET_DEVICE_PNP_EVENT_REVISION_1.
- PortNumber
- The source port of the PnP event notification. If the status indication is not specific to a port, PortNumber is zero.
- DevicePnPEvent
- An event code that describes the PnP event as one of the following:
- NdisDevicePnPEventSurpriseRemoved
- Specifies that the specified miniport adapter has been unexpectedly removed from the system.
- NdisDevicePnPEventPowerProfileChanged
- Specifies that the power profile of the host system has changed.
- InformationBuffer
- A pointer to a buffer. If NDIS sets the DevicePnPEvent member to NdisDevicePnPEventPowerProfileChanged, this buffer will contain a ULONG that NDIS sets to one of the following values:
- NdisPowerProfileBattery
- Specifies that the host system is running on battery power.
- NdisPowerProfileAcOnline
- Specifies that the host system is running on AC power.
If NDIS sets DevicePnPEvent to NdisDevicePnPEventSurpriseRemoved, InformationBuffer is NULL.
- InformationBufferLength
- The length, in bytes, of the buffer in the InformationBuffer member.
- NdisReserved
- Reserved for NDIS.
Comments
To provide a device PnP event notification, NDIS passes a pointer to a NET_DEVICE_PNP_EVENT structure to the MiniportDevicePnPEventNotify or FilterDevicePnPEventNotify function.
Requirements
Versions: Supported for NDIS 6.0 drivers in Windows Vista.
Headers: Declared in Ndis.h. Include Ndis.h.
See Also
FilterDevicePnPEventNotify, MiniportDevicePnPEventNotify, NDIS_OBJECT_HEADER