TcCloseInterface function (traffic.h)

The TcCloseInterface function closes an interface previously opened with a call to TcOpenInterface. All flows and filters on a particular interface should be closed before closing the interface with a call to TcCloseInterface.

Syntax

ULONG TcCloseInterface(
  [in] HANDLE IfcHandle
);

Parameters

[in] IfcHandle

Handle associated with the interface to be closed. This handle is obtained by a previous call to the TcOpenInterface function.

Return value

Return code Description
NO_ERROR
The function executed without errors.
ERROR_INVALID_HANDLE
The interface handle is invalid.
ERROR_TC_SUPPORTED_OBJECTS_EXIST
Not all flows have been deleted for this interface.

Remarks

Regardless of whether TcCloseInterface is called, an interface will be closed following a TC_NOTIFY_IFC_CLOSE notification event. If the TcCloseInterface function is called with the handle of an interface that has already been closed, the handle will be invalidated and TcCloseInterface will return ERROR_INVALID_HANDLE.

Note  Use of TcCloseInterface requires administrative privilege.
 

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header traffic.h
Library Traffic.lib
DLL Traffic.dll

See also

TcOpenInterface