NET_DEVICE_PNP_EVENT structure (ndis.h)

The NET_DEVICE_PNP_EVENT structure defines device plug and play (PnP) events for miniport adapters.

Syntax

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

The network interface card (NIC) has been unexpectedly removed from the computer. For more information, see Handling the Surprise Removal of a NIC.

NdisDevicePnPEventPowerProfileChanged

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

The host system is running on battery power.

NdisPowerProfileAcOnline

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[2 * sizeof(PVOID)]

Reserved for NDIS.

Remarks

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

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Header ndis.h (include Ndis.h)

See also

FilterDevicePnPEventNotify

MiniportDevicePnPEventNotify

NDIS_OBJECT_HEADER