Platform SDK: Fax Services

FaxAbort

A fax client application calls the FaxAbort function to terminate a fax job that is in progress.

BOOL WINAPI FaxAbort(
  HANDLE FaxHandle,  // handle to the fax server
  DWORD JobId        // identifier of fax job to terminate
);

Parameters

FaxHandle
[in] Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.
JobId
[in] Specifies a unique number that identifies the fax job to terminate.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError can return one of the following errors.

Error code Description
ERROR_ACCESS_DENIED Access is denied. You must own the job, or have FAX_JOB_MANAGE access.
ERROR_INVALID_HANDLE The FaxHandle parameter is invalid.
ERROR_INVALID_PARAMETER The JobId parameter is invalid.

Remarks

An application typically calls the FaxAbort function to terminate a fax transmission that is in progress. To manage a queued fax job, an application typically calls the FaxSetJob function. FaxSetJob can cancel an active job; the function can also pause, resume, cancel, or restart a queued fax job.

Call the FaxEnumJobs function to retrieve a valid value to use in the JobId parameter.

For more information, see Modifying a Fax Job and Terminating a Fax Job.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable with BackOffice Small Business Server.
  Header: Declared in Winfax.h.
  Library: Included as a resource in Winfax.dll.
  Unicode: Implemented as Unicode and ANSI versions on all platforms.

See Also

Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxConnectFaxServer, FaxSendDocument, FaxStartPrintJob, FaxEnumJobs, FaxSetJob