3.1.4.1.2 FAX_Abort (Opnum 9)

The FAX_Abort (Opnum 9) method is called by the client to abort the specified fax job on the server. The value for the JobId parameter can be obtained using one of the following methods: FAX_EnumJobs (section 3.1.4.1.21), FAX_EnumJobsEx (section 3.1.4.1.22), or FAX_EnumJobsEx2 (section 3.1.4.1.23).

In response, the server MUST validate that the job identifier specified by the JobId argument is for a valid job. The server MUST validate that the client's fax user account has write access to the job. On success, the server MUST terminate the specified fax job that is queued or in progress.

 error_status_t FAX_Abort(
   [in] handle_t hBinding,
   [in] DWORD JobId
 );

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

JobId: A unique number that identifies the fax job to terminate.

Return Values: This method MUST return 0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return either 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. This error code is returned when any of the following conditions happen:

§ The client's fax user account does not have FAX_ACCESS_MANAGE_RECEIVE_FOLDER permission, and the specified JobId represents an incoming fax job.

§ The client's fax user account does not have FAX_ACCESS_MANAGE_OUT_JOBS permission, and the specified JobId represents an outgoing fax job of a different user.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. This error code is returned under any of the following conditions:

§ The fax job identified by the specified JobId is not found.

§ The specified job has already been canceled or is in the process of being canceled.

§ The type of the fax job specified by the JobId parameter is JT_BROADCAST (the description of the dwJobType member of the FAX_JOB_STATUS structure specified in section 2.2.36).

ERROR_INVALID_OPERATION

0x000010DD

The operation is invalid. This error code is returned under any of the following conditions:

§ The specified JobId represents an incoming fax job (the dwJobType member of the FAX_JOB_STATUS describing the job is set to 0x0002), which is being routed (the dwQueueStatus member of the FAX_JOB_STATUS describing the job is set to JS_ROUTING) and cannot be aborted at this stage.

§ The specified JobId represents a fax job in progress (the dwJobType member of the FAX_JOB_STATUS describing the job is set to 0x0003), which the fax server failed to route (the dwQueueStatus member of the FAX_JOB_STATUS describing the job is set to JS_IN_PROGRESS) and cannot be aborted at this stage.

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