Platform SDK: Network Management

NetWkstaTransportDel

The NetWkstaTransportDel function unbinds the transport protocol from the redirector. (The redirector is the software on the client computer that generates file requests to the server computer.)

Security Requirements

Only members of the Administrators local group can successfully execute the NetWkstaTransportDel function.

NET_API_STATUS NetWkstaTransportDel(
  LPWSTR servername,     
  LPWSTR transportname,  
  DWORD ucond            
);

Parameters

servername
[in] Pointer to a Unicode string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
transportname
[in] Pointer to a Unicode string specifying the name of the transport protocol to disconnect from the redirector.
ucond
[in] Specifies the level of force to use when disconnecting the transport protocol from the redirector. This parameter can be one of the following values.
Value Meaning
USE_NOFORCE Fail the disconnection if open files exist on the connection.
USE_FORCE Fail the disconnection if open files exist on the connection.
USE_LOTS_OF_FORCE Close any open files and delete the connection.

Return Values

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value can be one of the following error codes.

Value Meaning
ERROR_ACCESS_DENIED The user does not have access to the requested information.
ERROR_INVALID_PARAMETER One of the function parameters is invalid.
NERR_UseNotFound The network connection does not exist.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Lmwksta.h; include Lm.h.
  Library: Use Netapi32.lib.

See Also

Network Management Overview, Network Management Functions, Server and Workstation Transport Functions, NetWkstaTransportAdd