Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
MiniportQueryInformationis a required function that returns information about the capabilities and status of the driver and/or its network adapter.
NDIS_STATUS MiniportQueryInformation( IN NDIS_HANDLE MiniportAdapterContext , IN NDIS_OID Oid , IN PVOID InformationBuffer , IN ULONG InformationBufferLength , OUT PULONG BytesWritten , OUT PULONG BytesNeeded )
Parameters
Return Values
MiniportQueryInformationcan return one of the following:
Comments
NDIS calls the MiniportQueryInformationfunction either on its own behalf, such as to determine which options the driver supports or to manage binding-specific information for the miniport, or when a bound protocol driver calls NdisRequest.
NDIS makes one or more calls to MiniportQueryInformationjust after a driver's MiniportInitializefunction returns NDIS_STATUS_SUCCESS. NDIS supplies the following OIDs in its initialization-time calls to the driver's MiniportQueryInformationfunction:
Even if a driver supports multipacket receives and, therefore, will indicate an array of pointers to fully set up packets, MiniportQueryInformationmust supply this information. Such a driver should return the maximum packet size it can indicate.
For example, a network adapter driver always sets the NDIS_MAC_OPTION_NO_LOOPBACK flag if its network adapter has no internal hardware support for loopback. This tells NDIS to manage loopback for the driver, which cannot provide software loopback code as efficient as the NDIS library's because NDIS manages all binding-specific information for miniports. Any miniport that tries to provide software loopback must check the destination address of every send packet against the currently set filter addresses to determine whether to loop back each packet. WAN network adapter drivers must set this flag.
Windows CE does not support full duplex. The following information is provided if driver portability is a concern.
Depending on the NdisMedium XXXthat MiniportInitializeselected, NDIS submits additional intialization-time requests to MiniportQueryInformation, such as the following:
If possible, MiniportQueryInformationshould not return NDIS_STATUS_PENDING for initialization-time requests. Until NDIS has sufficient information to set up bindings to the miniport, such requests should be handled synchronously.
Subsequently, the NDIS library intercepts all protocol-initiated queries on certain OIDs, such as the following:
OID_GEN_CURRENT_PACKET_FILTER
OID_GEN_PROTOCOL_OPTIONS
OID_802_5_CURRENT_FUNCTIONAL
OID_802_3_MULTICAST_LIST
OID_FDDI_LONG_MULTICAST_LIST (not supported for Windows CE)
OID_FDDI_SHORT_MULTICAST_LIST (not supported for Windows CE)
If MiniportQueryInformationdoes not complete a request synchronously and returns NDIS_STATUS_PENDING, the driver must complete the request later with a call to NdisMQueryInformationComplete. Until it completes any such request, the miniport can safely access the memory at InformationBuffer, BytesWritten, and BytesNeeded. After the miniport completes any query, ownership of these variables and the buffer reverts to NDIS or the caller of NdisRequest, whichever allocated the memory.
After a call to MiniportQueryInformation, NDIS submits no other requests to the driver until it has completed the current request, either synchronously or asynchronously. Instead, NDIS holds requests queued until the current query is completed.
MiniportQueryInformationcan be pre-empted by an interrupt.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ndis.h | Ndislib.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
MiniportInitialize, NdisMQueryInformationComplete, NdisRequest