ProtocolRequestComplete

VOID
    ProtocolRequestComplete(

        IN NDIS_HANDLE  ProtocolBindingContext,
        IN PNDIS_REQUEST  NdisRequest,
        IN NDIS_STATUS  Status
        );

ProtocolRequestComplete is a required driver function that completes the processing of a protocol-initiated query or set for which NdisRequest returned NDIS_STATUS_PENDING.

Parameters

ProtocolBindingContext
Specifies the handle to a protocol-allocated context area in which the protocol driver maintains per-binding runtime state. The driver supplied this handle when it called NdisOpenAdapter.
NdisRequest
Points to the protocol-supplied structure previously passed to NdisRequest.
Status
Specifies the final status of the request set by the underlying driver or by NDIS. This argument determines what ProtocolRequestComplete does with the information at NdisRequest.

Comments

ProtocolRequestComplete uses the input Status as follows:

For global queries and sets, the underlying miniport’s call to NdisMQueryInformationComplete or NdisMSetInformationComplete causes NDIS to call the ProtocolRequestComplete function. NDIS forwards the miniport-determined Status passed to NdisM..InformationComplete as the input Status to ProtocolRequestComplete.

For binding-specific queries, NDIS calls the ProtocolRequestComplete function itself. Because the NDIS library maintains bindings for all miniports, NDIS can return binding-specific information only about underlying drivers that report their medium-type as one for which the system provides a filter library. NDIS returns NDIS_STATUS_NOT_SUPPORTED for protocol-initiated binding-specific queries to other miniports.

For more information about system-defined OIDs, see Chapter 5.

ProtocolRequestComplete can be called before the protocol has had time to inspect the status code that NdisRequest returns at Status.

The ProtocolRequestComplete function of an NDIS intermediate driver cannot simply forward completion indications to still higher-level protocols. Such an attempt can cause a deadlock. Instead, such a driver must call NdisIMSwitchToMiniport to forward the indication from the appropriate context. If NdisIMSwitchToMiniport returns FALSE, the driver must call NdisIMQueueMiniportCallback and forward the indication from a protocol-supplied MiniportCallback function.

By default, ProtocolRequestComplete runs at IRQL DISPATCH_LEVEL in an arbitrary thread context.

See Also

MiniportQueryInformation, MiniportSetInformation, NdisIMQueueMiniportCallback, NdisIMSwitchToMiniport, NdisMQueryInformationComplete, NdisMSetInformationComplete, NDIS_REQUEST, NdisRequest, NdisReset