Platform SDK: Quality of Service

TcSetFlow

The TcSetFlow function sets individual parameters for a given flow.

DWORD TcSetFlow(
  LPWSTR pFlowName,
  PGUID pGuidParam,
  ULONG BufferSize,
  PVOID Buffer 
);

Parameters

pFlowName
[in] Name of the flow being set. The value for this parameter is obtained by a previous call to the TcEnumerateFlows function or the TcGetFlowName function.
pGuidParam
[in] Pointer to the globally unique identifier (GUID) that corresponds to the parameter to be set. A list of available GUIDs can be found in GUID.
BufferSize
[in] Size of the client-provided buffer.
Buffer
[in] Pointer to a client-provided buffer. Buffer must contain the value to which the traffic control parameter provided in pGuidParam should be set.

Return Values

The TcSetFlow function has the following return values.

Error codes Description
NO_ERROR The function executed without errors.
ERROR_NOT_READY The flow is currently being modified.
ERROR_NOT_ENOUGH_MEMORY The buffer size was insufficient for the GUID.
ERROR_INVALID_PARAMETER Invalid parameter.
ERROR_NOT_SUPPORTED Setting the GUID for the provided flow is not supported.
ERROR_WMI_INSTANCE_NOT_FOUND The instance name was not found, likely due to the flow or the interface being in the process of being closed.
ERROR_WMI_GUID_NOT_FOUND The device did not register for this GUID.

Note  Use of the TcSetFlow function requires administrative privilege.

Requirements

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