// ndis.h
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;
View the official Windows Driver Kit DDI referenceNo description available.
The NET_DEVICE_PNP_EVENT structure defines device plug and play (PnP) events for miniport adapters.
HeaderThe 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.
PortNumberThe source port of the PnP event notification. If the status indication is not specific to a port, PortNumber is zero.
DevicePnPEventAn event code that describes the PnP event as one of the following:
The network interface card (NIC) has been unexpectedly removed from the computer. For more information, see Handling the Surprise Removal of a NIC.
The power profile of the host system has changed.
InformationBufferA 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:
The host system is running on battery power.
The host system is running on AC power.
If NDIS sets DevicePnPEvent to NdisDevicePnPEventSurpriseRemoved, InformationBuffer is NULL.
InformationBufferLengthThe length, in bytes, of the buffer in the InformationBuffer member.
NdisReservedReserved for NDIS.
To provide a device PnP event notification, NDIS passes a pointer to a NET_DEVICE_PNP_EVENT structure to the MiniportDevicePnPEventNotify or FilterDevicePnPEventNotify function.