FaxGetJobA function (winfax.h)

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.

Syntax

WINFAXAPI BOOL FaxGetJobA(
  [in]  HANDLE          FaxHandle,
  [in]  DWORD           JobId,
  [out] PFAX_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 unique number that identifies a queued or active fax job. The job can be an inbound or an outbound transmission.

[out] JobEntry

Type: PFAX_JOB_ENTRY*

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 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
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.

Note

The winfax.h header defines FaxGetJob as an alias which 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 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_JOB_ENTRY

Fax Service Client API Functions

Fax Service Client API for Windows 2000

FaxConnectFaxServer

FaxEnumJobs

FaxFreeBuffer

FaxSetJob