Responding to Queries and Sets of Miniport Driver Information (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.
To query a connectionless miniport driver's capabilities or statistics information, NDIS calls the miniport driver's MiniportQueryInformationfunction. NDIS can call this function on its own behalf or on the behalf of upper layers. To query a connection-oriented miniport driver, NDIS calls the miniport driver's MiniportCoRequestfunction. The MiniportQueryInformationor MiniportCoRequestfunction obtains the information and returns it to NDIS.
To set information maintained by a connectionless miniport driver, NDIS calls the miniport driver's MiniportSetInformationfunction, which sets the specified object identifier and returns the status of the operation to NDIS. To set object identifiers (OIDs) maintained by a connection-oriented miniport driver, NDIS calls the miniport driver's MiniportCoRequestfunction.
Miniport driver query and set functions are potentially asynchronous. If they complete synchronously, they return immediately with a status code other than NDIS_STATUS_PENDING. If they complete asynchronously, the function returns NDIS_STATUS_PENDING. To complete a query or set asynchronously, a connectionless miniport driver respectively calls NdisMQueryInformationCompleteor NdisMSetInformationComplete. A connection-oriented miniport driver calls NdisMCoRequestCompleteto complete a query or set asynchronously.
The NDIS Library guarantees that the miniport driver will never have more than one outstanding query or set request, so there is no need for the miniport driver to queue requests.
NDIS does not, however, guarantee the validity of OID-specific values passed to a miniport driver in a set request. The driver itself must therefore validate such values. If the driver determines that a value to be set is out of bounds, it should fail the set request.
For more information about querying and setting connectionless miniport drivers, see Obtaining and Setting Miniport Driver Information and NDIS Support for WMI. For information about specific OIDs, see General Objects.