3.1.4.46 NetrServerAliasDel (Opnum 56)
The NetrServerAliasDel method deletes an alias name from a server alias list based on specified alias name.
-
NET_API_STATUS NetrServerAliasDel( [in, string, unique] SRVSVC_HANDLE ServerName, [in] DWORD Level, [in, switch_is(Level)] LPSERVER_ALIAS_INFO InfoStruct );
ServerName: An SRVSVC_HANDLE (section 2.2.1.1) pointer that identifies the server. The client MUST map this structure to an RPC binding handle ([C706] sections 4.3.5 and 5.1.5.2). If this parameter is NULL, the local computer is used.
Level: Specifies the information level of the data. It MUST be one of the following values.
-
Value
Meaning
0
The buffer is of type SERVER_ALIAS_INFO_0_CONTAINER.
InfoStruct: A pointer to the SERVER_ALIAS_INFO union that contains information about the alias. The value of the Level parameter determines the type of the contents of the InfoStruct parameter, as the preceding table shows.
Return Values: The method returns 0x00000000 (NERR_Success) to indicate success; otherwise, it returns a nonzero error code. The method can take any specific error code value, as specified in [MS-ERREF] section 2.2. The most common error codes are listed in the following table.
-
Return value/code
Description
0x00000000
NERR_Success
The client request succeeded.
0x00000005
ERROR_ACCESS_DENIED
Access is denied.
0x00000057
ERROR_INVALID_PARAMETER
The client request failed because the specified parameter is invalid.
0x00000008
ERROR_NOT_ENOUGH_MEMORY
Not enough storage is available to process this command.
0x00000906
NERR_NetNameNotFound
The alias does not exist.
0x0000007C
ERROR_INVALID_LEVEL
The system call level is not correct.
In response to a NetrServerAliasDel message, the server MUST delete the alias name from the AliasList based on specified alias name, or MUST return an error code.
The srvai*_alias parameter specifies the name of the alias to be deleted. This MUST be a nonempty null-terminated UTF-16 string if srvai*_default is 0 or empty string if srvai*_default is nonzero; otherwise, the server MUST fail the call with an ERROR_INVALID_PARAMETER error code.
If no alias matching srvai*_alias exists, the server fails the call with a NERR_NetNameNotFound error code.
srvai*_target MUST be ignored by the server.
The server SHOULD<175> enforce security measures to verify that the caller has the required permissions to execute this routine. If the caller does not have the required credentials, the server SHOULD<176> fail the call.
The server MUST delete configuration data for this alias from the persistent configuration store.