Platform SDK: Quality of Service

TcModifyFlow

The TcModifyFlow function modifies an existing flow. When calling TcModifyFlow, new flowspec parameters and any traffic control objects should be filled.

Traffic control clients that have registered a ModifyFlowComplete handler (a mechanism for allowing traffic control to call the ClModifyFlowComplete callback function in order to alert clients of completed flow modifications) can expect a return value of ERROR_SIGNAL_PENDING.

DWORD TcModifyFlow(
  HANDLE FlowHandle,
  PTC_GEN_FLOW pGenericFlow
);

Parameters

FlowHandle
[in] Handle for the flow, as received from a previous call to the TcAddFlow function.
pGenericFlow
[in] Pointer to a description of the flow modifications.

Return Values

Error codes Description
NO_ERROR The function executed without errors.
ERROR_SIGNAL_PENDING The function is being executed asynchronously; the client will be called back through the client-exposed ClModifyFlowComplete function when the flow has been added, or when the process has been completed.
ERROR_INVALID_HANDLE The interface handle is invalid.
ERROR_NOT_ENOUGH_MEMORY The system is out of memory.
ERROR_INVALID_PARAMETER A parameter is invalid.
ERROR_INVALID_SERVICE_TYPE An unspecified or bad intserv service type has been provided.
ERROR_INVALID_TOKEN_RATE An unspecified or bad TokenRate value has been provided.
ERROR_INVALID_PEAK_RATE The PeakBandwidth value is invalid.
ERROR_INVALID_SD_MODE The ShapeDiscardMode is invalid.
ERROR_INVALID_QOS_PRIORITY The priority value is invalid.
ERROR_INVALID_TRAFFIC_CLASS The traffic class value is invalid.
ERROR_NO_SYSTEM_RESOURCES There are not enough resources to accommodate the requested flow.
ERROR_TC_OBJECT_LENGTH_INVALID Bad length specified for the TC objects.
ERROR_INVALID_DIFFSERV_FLOW Applies to Diffserv flows. Indicates that the QOS_DIFFSERV object was passed with an invalid parameter.
ERROR_DS_MAPPING_EXISTS Applies to Diffserv flows. Indicates that the QOS_DIFFSERV_RULE specified in TC_GEN_FLOW already applies to an existing flow on the interface.
ERROR_INVALID_SHAPE_RATE The QOS_OBJECT_SHAPING_RATE was passed with an invalid ShapeRate.
ERROR_INVALID_DS_CLASS QOS_OBJECT_DS_CLASS is invalid.
ERROR_NETWORK_UNREACHABLE The network cable is not plugged into the adapter.

Remarks

If the TcModifyFlow function returns ERROR_SIGNAL_PENDING, the ClModifyFlowComplete function will be called on a different thread than the thread that called the TcModifyFlow function.

Note  Use of the TcModifyFlow function requires administrative privilege.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Traffic.h.
  Library: Use Traffic.lib.

See Also

TcEnumerateFlows, TcAddFlow, ClModifyFlowComplete