次の方法で共有


Initializing a Miniport Driver with a WDM Lower Edge (NDIS 5.1)

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.

After a miniport driver has been loaded by the operating system, NDIS calls the miniport driver's MiniportInitializefunction to initialize a miniport instance that the miniport driver manages. To communicate through a miniport instance that has a WDM lower edge, the miniport driver must retrieve specific information to set up its communications. During initialization of this miniport instance, the miniport driver must call the NdisMGetDevicePropertyfunction to retrieve device objects that are required to set up communication with the miniport instance through a WDM interface. In this call, the miniport driver passes the handle to the miniport instance in the MiniportAdapterHandleparameter and buffers that receive pointers to DEVICE_OBJECT structures. The miniport driver uses the retrieved pointer to the next-device object ( NextDeviceObjectparameter) to create and submit IRPs. For more information, see Handling IRPs.

A miniport driver with a WDM lower edge must be a deserialized miniport driver. A deserialized miniport driver manages its own queue of send and receive requests internally whenever it has insufficient resources to handle these requests immediately; if a miniport driver is not deserialized, NDIS manages this queue. An NDIS-WDM miniport driver must be deserialized because it sends and receives packets outside of the context of NDIS calls. During initialization of a miniport instance, an NDIS-WDM miniport driver must specify the deserialized feature. To specify this feature, the miniport driver must set the NDIS_ATTRIBUTE_DESERIALIZE flag when it calls the NdisMSetAttributesExfunction.

Note that an NDIS-WDM miniport driver cannot be an intermediate driver (a driver that exposes a miniport driver interface at the top and a protocol driver interface at the bottom) so it should not set the NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER flag when it calls NdisMSetAttributesEx.

 

 

Send comments about this topic to Microsoft