Platform SDK: Network Management

NetServerComputerNameDel

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.

Security Requirements

Only members of the Administrators or Account Operators local group can successfully execute the NetServerComputerNameDel function.

NET_API_STATUS NetServerComputerNameDel(
  LPWSTR ServerName, 
  LPWSTR EmulatedServerName 
);

Parameters

ServerName
[in] Pointer to a null-terminated Unicode character string that specifies 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.
EmulatedServerName
[in] 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 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 The specified parameter is invalid.
ERROR_NOT_ENOUGH_MEMORY Insufficient memory is available.
NERR_NetNameNotFound The share name does not exist.

Requirements

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

See Also

Network Management Overview, Network Management Functions, Server Functions, NetServerComputerNameAdd, NetServerTransportEnum, NetServerTransportAdd, NetServerTransportAddEx