3.1.4.1.13 FAX_DeleteAccount (Opnum 94)

The FAX_DeleteAccount (Opnum 94) method is called by the client to delete a fax user account previously created with FAX_CreateAccount (section 3.1.4.1.12).

Protocol version FAX_API_VERSION_0 (0x00000000), FAX_API_VERSION_1 (0x00010000), and FAX_API_VERSION_2 (0x00020000) fax servers SHOULD NOT implement this call. The fax client MUST NOT call this method if the protocol version reported by the server is FAX_API_VERSION_0 (0x00000000), FAX_API_VERSION_1 (0x00010000), or FAX_API_VERSION_2 (0x00020000). For more information, see FAX_ConnectFaxServer (section 3.1.4.1.10).

On success, the server MUST delete the specified fax account. The server MUST validate that the client's fax user account has access to delete fax user accounts on the fax server. The client can delete any fax user accounts or the current fax user account. Any subsequent operations on the deleted fax user accounts MUST be failed by the server with the error code ERROR_ACCESS_DENIED. The fax server SHOULD allow deleting a fax user account even if the underlying operating system's user account has been deleted after this fax user account was created.

 error_status_t FAX_DeleteAccount(
   [in] handle_t hBinding,
   [in, string, unique] LPCWSTR lpcwstrAccountName
 );

hBinding: The RPC binding handle for this call. The client SHOULD reuse the RPC binding handle used as an input hBinding argument for the FAX_ConnectFaxServer or FAX_ConnectionRefCount (section 3.1.4.1.11) method call used to connect to the fax server.

lpcwstrAccountName: A pointer to a constant, null-terminated character string that contains the name of the account to delete. The value for this parameter can be obtained using the FAX_EnumAccounts (section 3.1.4.1.18) method.

Return Values: This method MUST return 0 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the following error codes, a fax-specific error defined in section 2.2.52, or one of the standard errors that are defined in [MS-ERREF] section 2.2.

Return error value/code

Description

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The client's fax user account does not have the FAX_ACCESS_MANAGE_CONFIG access right.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. The account name pointed to by the lpcwstrAccountName parameter is NULL or improperly formatted.

The account name that lpcwstrAccountName indicates MUST be in one of the following formats. Any other format is invalid.

Format

Description

<machine_name>\<user_name>

For a local user with machine_name as the local machine's name.

<domain_name>\<user_name>

For a remote (not local) user.

Exceptions Thrown: No exceptions are thrown except those that are thrown by the underlying RPC protocol, [MS-RPCE].