FaxSetJobA function (winfax.h)
A fax client application calls the FaxSetJob function to pause, resume, cancel, or restart a specified fax job.
Syntax
WINFAXAPI BOOL FaxSetJobA(
[in] HANDLE FaxHandle,
[in] DWORD JobId,
[in] DWORD Command,
[in] const FAX_JOB_ENTRYA *JobEntry
);
Parameters
[in] FaxHandle
Type: HANDLE
Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.
[in] JobId
Type: DWORD
Specifies a DWORD variable that is a unique number to identify the fax job to modify. Call the FaxEnumJobs function to retrieve a valid fax job identifier to use in the JobId parameter.
[in] Command
Type: DWORD
Specifies a DWORD variable that indicates the job command to perform. This parameter can be one of the following values.
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.
[in] JobEntry
Type: const FAX_JOB_ENTRY*
Not used, must be NULL.
Return value
Type: BOOL
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.
Return code | Description |
---|---|
|
Access is denied. FAX_JOB_MANAGE access is required. |
|
The FaxHandle parameter is NULL, or one or all of the Command, JobEntry, or JobId parameters are invalid. |
Remarks
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.
Note
The winfax.h header defines FaxSetJob as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winfax.h |
Library | WinFax.lib |
See also
Fax Service Client API Functions