MiniportCoActivateVc (NDIS 5.1) function
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.
The MiniportCoActivateVc function is required for connection-oriented miniports. MiniportCoActivateVc is called by NDIS to indicate to the miniport driver that a virtual connection is being activated.
Syntax
NDIS_STATUS MiniportCoActivateVc(
_In_ NDIS_HANDLE MiniportVcContext,
_Inout_ PCO_CALL_PARAMETERS CallParameters
);
Parameters
MiniportVcContext [in]
Specifies the handle to a miniport driver-allocated context area in which the miniport driver maintains its per-VC state. The miniport driver supplied this handle to NDIS from its MiniportCoCreateVc function.CallParameters [in, out]
Specifies the call parameters, as specified by the call manager, to be established for this VC. On output, the miniport driver returns altered call parameters if certain flags are set in the CO_CALL_PARAMETERS structure.
Return value
Return code | Description |
---|---|
NDIS_STATUS_SUCCESS | Indicates that the VC was activated successfully. |
NDIS_STATUS_PENDING | Indicates that the miniport driver will complete the request to activate a VC asynchronously. When the miniport driver has finished with its operations, it must call NdisMCoActivateVcComplete. |
NDIS_STATUS_INVALID_DATA | Indicates that the call parameters specified at CallParameters are invalid or illegal for the media type that this miniport driver supports. |
NDIS_STATUS_RESOURCES | Indicates that the miniport driver could not activate the VC because it could not allocate all of the required resources that the miniport driver needs to maintain state information about the active VC. |
Remarks
The miniport driver must validate the call parameters for this VC, as specified in CallParameters, to verify that the adapter can support the requested call. If the requested call parameters cannot be satisfied, the miniport driver should fail the request with NDIS_STATUS_INVALID_DATA.
MiniportCoActivateVc can be called many times for a single VC in order to change the call parameters for an already active call. At every call, the miniport driver should validate the parameters and perform any processing as required by its adapter in order to satisfy the request. However, if it cannot set the given call parameters, MiniportCoActivateVc must leave the VC in a usable state, because the connection-oriented client or a call manager can continue to send or receive data using the older call parameters.
If the ROUND_UP_FLOW or ROUND_DOWN_FLOW flags are set in the call parameters structure at CallParameters -> MediaParameters-> Flags, the miniport driver has been requested to return the actual flow rate of the VC after the flow rate has been rounded according to the appropriate flag that has been set. If the miniport driver does change any of the call parameters because these flags have been set, it must return the actual call parameters in use for the VC at CallParameters.
If the call parameters are acceptable, MiniportCoActivateVc communicates with its adapter as necessary to prepare the adapter to receive or transmit data across the virtual connection (in other words, programming receive buffers).
Requirements
Target platform |
Desktop |
Version |
See MiniportCoActivateVc. |
Header |
Ndis.h (include Ndis.h) |
IRQL |
<= DISPATCH_LEVEL |
See also