3.1.4.1.98 FAX_StartMessagesEnum (Opnum 63)

The FAX_StartMessagesEnum (Opnum 63) method is called by the client. On success, the server MUST start enumerating messages in one of the archives.

The server MUST validate that the client's fax user account has access to the server. On success, the server MUST create an enumeration handle and pass it back to the client so that the client can use the same enumeration handle for enumerating messages.

 error_status_t FAX_StartMessagesEnum(
   [in] handle_t hFaxHandle,
   [in] FAX_ENUM_MESSAGE_FOLDER Folder,
   [out, ref] PRPC_FAX_MSG_ENUM_HANDLE lpHandle
 );

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.

Folder: This MUST be a FAX_ENUM_MESSAGE_FOLDER (section 2.2.2) enumeration that indicates the type of the archive where the message resides. The FAX_MESSAGE_FOLDER_QUEUE value is invalid for this parameter.

lpHandle: A pointer to an enumeration handle return value.

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 ALL_FAX_USERS_ACCESS_RIGHTS access right to execute this call.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect.

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

§ The value specified for the level argument is not equal to 1.

§ The value specified for the Folder argument is not equal to FAX_MESSAGE_FOLDER_INBOX or FAX_MESSAGE_FOLDER_SENTITEMS.

§ The lpcwstrAccountName parameter is not NULL and passes validation checks but does not correspond to an existing account name.

§ The account name specified by the lpcwstrAccountName argument is a valid account name but it refers to a different user than the caller.

ERROR_NO_MORE_ITEMS

0x00000103

No data is available. There are no messages to be enumerated.

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