NetServerTransportDel function (lmserver.h)

The NetServerTransportDel function unbinds (or disconnects) the transport protocol from the server. Effectively, the server can no longer communicate with clients using the specified transport protocol (such as TCP or XNS).

Syntax

NET_API_STATUS NET_API_FUNCTION NetServerTransportDel(
  [in] LMSTR  servername,
  [in] DWORD  level,
  [in] LPBYTE bufptr
);

Parameters

[in] servername

Pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.

[in] level

Specifies the information level of the data. This parameter can be one of the following values.

Value Meaning
0
Specifies information about the transport protocol, including name, address, and location on the network. The bufptr parameter points to a SERVER_TRANSPORT_INFO_0 structure.
1
Specifies information about the transport protocol, including name, address, network location, and domain. The bufptr parameter points to a SERVER_TRANSPORT_INFO_1 structure.

[in] bufptr

Pointer to the buffer that specifies the data. The format of this data depends on the value of the level parameter. For more information, see Network Management Function Buffers.

Return value

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.

Return code Description
ERROR_ACCESS_DENIED
The user does not have access to the requested information.
ERROR_INVALID_LEVEL
The value specified for the level parameter is invalid.
ERROR_INVALID_PARAMETER
The specified parameter is invalid.
ERROR_NOT_ENOUGH_MEMORY
Insufficient memory is available.
NERR_NetNameNotFound
The share name does not exist.

Remarks

Only members of the Administrators or Server Operators local group can successfully execute the NetServerTransportDel function.

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 lmserver.h (include Lm.h)
Library Netapi32.lib
DLL Netapi32.dll

See also

NetServerTransportAdd

Network Management Functions

Network Management Overview

SERVER_TRANSPORT_INFO_0

SERVER_TRANSPORT_INFO_1

Server and Workstation Transport Functions