3.1.4.1.8 FAX_CheckValidFaxFolder (Opnum 86)

The FAX_CheckValidFaxFolder (Opnum 86) method is called by the client to check whether the specified path is accessible to the fax server.

In response, the server MUST validate the folder path. The server MUST validate that the client’s fax user account has correct access rights (ALL_FAX_USER_ACCESS_RIGHTS) and that the folder is not the same as any of the folders used for persistence of the incoming and outgoing fax queues. On success, the server MUST confirm that the specified path is accessible for use by the Fax Service.

Protocol version FAX_API_VERSION_0 (0x00000000) and FAX_API_VERSION_1 (0x00010000) 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) or FAX_API_VERSION_1 (0x00010000). For more information, see FAX_ConnectFaxServer (section 3.1.4.1.10).

 error_status_t FAX_CheckValidFaxFolder(
   [in] handle_t hBinding,
   [in, string, ref] LPCWSTR lpcwstrPath
 );

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.

lpcwstrPath: A pointer to a null-terminated character string that contains the path to validate, specified as a complete file path. The path can be a UNC path or a path that begins with a drive letter. The path MUST contain a file name. The length of the path, including the terminating null character, MUST be under 180 characters.

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_FILE_NOT_FOUND

0x00000002

The path specified by the lpcwstrPath argument has a valid structure (the folder path is valid), but the file does not exist.

ERROR_PATH_NOT_FOUND

0x00000003

The path specified by the lpcwstrPath argument has a valid structure, but the folder path does not exist.

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The client's fax user account does not have sufficient rights for this operation (ALL_FAX_USER_ACCESS_RIGHTS).

ERROR_INVALID_PARAMETER

0x00000057

The lpcwstrPath argument is NULL, or the path specified by the lpcwstrPath argument is incomplete.

ERROR_BUFFER_OVERFLOW

0x0000006F

The length of the path (including length of the terminating null character) specified by the lpcwstrPath argument exceeds 180 characters.

FAX_ERR_DIRECTORY_IN_USE

0x00001B5F

The path specified by the lpcwstrPath argument points to a folder currently in use by the fax server, such as the server queue directory or the Fax Archive Folder (section 3.1.1).

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