3.1.4.1.70 FAX_RemoveMessage (Opnum 67)

The fax client application calls the FAX_RemoveMessage (Opnum 67) method to remove a message from a specific Fax Archive Folder. The dwlMessageId parameter specifies a particular message and can be obtained using the FAX_EnumMessages (section 3.1.4.1.24) method or the FAX_EnumMessagesEx (section 3.1.4.1.25) method.

In response, the server MUST validate whether the client's fax user account has access to remove a message from the server. The server MUST also validate whether the dwlMessageId argument refers to a valid message in the folder that is specified by the Folder parameter and whether the client's fax user account has access to this message.

On success, the server MUST remove the specified fax message from the specified archive folder.

 error_status_t FAX_RemoveMessage(
   [in] handle_t hFaxHandle,
   [in] DWORDLONG dwlMessageId,
   [in] FAX_ENUM_MESSAGE_FOLDER Folder
 );

hFaxHandle: 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 (section 3.1.4.1.10) or FAX_ConnectionRefCount (section 3.1.4.1.11) method call used to connect to the fax server.

dwlMessageId: A DWORDLONG ([MS-DTYP] section 2.2.13) value identifying the fax message to remove from the archive.

Folder: The type of the archive where the message resides. FAX_MESSAGE_FOLDER_QUEUE is an invalid value for this parameter.

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

Return value/code

Description

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The caller does not have the required access rights (ALL_FAX_USER_ACCESS_RIGHTS (section 2.2.83)) for this operation.

ERROR_INVALID_PARAMETER

0x00000057

This error code is returned under any of the following conditions:

§ The value of the dwlMessageId parameter is 0.

§ The value of the Folder parameter is not FAX_MESSAGE_FOLDER_INBOX or FAX_MESSAGE_FOLDER_SENT_ITEMS.

FAX_ERR_FILE_ACCESS_DENIED

0x00001B60

The fax server failed to remove the fax message. When trying to delete the fax archived file (the file that represents the fax message to be removed), the fax server internally encountered an access denied or sharing violation error.

FAX_ERR_MESSAGE_NOT_FOUND

0x00001B61

The fax server cannot find the message to be deleted (indicated by dwlMessageId). When trying to delete the fax archived file (the file that represents the fax message to be removed), the fax server internally encountered a file not found error.

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