Platform SDK: Fax Services |
A fax client application calls the FaxSetJob function to pause, resume, cancel, or restart a specified fax job.
BOOL WINAPI FaxSetJob( HANDLE FaxHandle, // handle to the fax server DWORD JobId, // fax job identifier DWORD Command, // job command value CONST FAX_JOB_ENTRY *JobEntry // pointer to job information structure );
Value | Meaning |
---|---|
JC_DELETE | Cancel the specified fax job. The job can be active or queued. |
JC_PAUSE | Pause the specified queued fax job. If the fax job is active, the fax service pauses the job when it returns to the queued state. |
JC_RESUME | Resume the paused fax job. |
JC_RESTART | Restart the specified fax job. |
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_PARAMETER | The FaxHandle parameter is NULL, or one or all of the Command, JobEntry, or JobID parameters are invalid. |
An application typically calls the FaxSetJob function to manage a queued fax job. To terminate a fax transmission that is in progress, an application can call the FaxAbort function.
For more information, see Modifying a Fax Job and Terminating a Fax Job.
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.
Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxSendDocument, FaxStartPrintJob, FaxConnectFaxServer, FaxAbort, FaxEnumJobs, FaxGetJob, FAX_JOB_ENTRY