NetServerComputerNameDel function (lmserver.h)

The NetServerComputerNameDel function causes the specified server to cease supporting the emulated server name set by a previous call to the NetServerComputerNameAdd function. The function does this by unbinding network transports from the emulated name.

Syntax

NET_API_STATUS NET_API_FUNCTION NetServerComputerNameDel(
  [in] LMSTR ServerName,
  [in] LMSTR EmulatedServerName
);

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] EmulatedServerName

Pointer to a null-terminated character string that contains the emulated name the server should stop supporting. The server continues to support all other server names it was supporting.

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_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 NetServerComputerNameDel 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

NetServerComputerNameAdd

NetServerTransportAdd

NetServerTransportAddEx

NetServerTransportEnum

Network Management Functions

Network Management Overview

Server Functions