Platform SDK: Fax Services

FaxGetJob

A fax client application calls the FaxGetJob function to retrieve detailed information for the specified queued or active fax job. The function returns the information in a FAX_JOB_ENTRY structure.

BOOL WINAPI FaxGetJob(
  HANDLE FaxHandle,         // handle to the fax server
  DWORD JobId,              // fax job identifier
  PFAX_JOB_ENTRY *JobEntry  // pointer to job data structure
);

Parameters

FaxHandle
[in] Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.
JobId
[in] Specifies a unique number that identifies a queued or active fax job. The job can be an inbound or an outbound transmission.
JobEntry
[out] Pointer to the address of a buffer to receive a FAX_JOB_ENTRY structure. The data includes the job type and status, recipient and sender identification, scheduling and delivery settings, and the page count. For information about memory allocation, see the following Remarks section.

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. FAX_JOB_QUERY access is required.
ERROR_INVALID_PARAMETER The JobId parameter is invalid, or one or both of the JobEntry or FaxHandle parameters are NULL.
ERROR_NOT_ENOUGH_MEMORY An error occurred during memory allocation.

Remarks

The FaxGetJob function retrieves information about an individual fax job. To retrieve information about all queued and active jobs on the fax server of interest, call the FaxEnumJobs function.

The FaxGetJob function allocates the memory required for the buffer pointed to by the JobEntry parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter.

For more information, see Managing Fax Jobs and Freeing Fax Resources.

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, FaxFreeBuffer, FaxEnumJobs, FaxSetJob, FaxConnectFaxServer, FAX_JOB_ENTRY