PFAXGETPAGEDATA callback function (winfax.h)
The FaxGetPageData function returns to a fax client application the first page of data for a fax job. The fax job must be an outbound job, but it can be queued or active. The function returns data in the Tagged Image File Format Class F (TIFF Class F) format.
Syntax
PFAXGETPAGEDATA Pfaxgetpagedata;
BOOL Pfaxgetpagedata(
[in] HANDLE FaxHandle,
[in] DWORD JobId,
[out] LPBYTE *Buffer,
[out] LPDWORD BufferSize,
[out] LPDWORD ImageWidth,
[out] LPDWORD ImageHeight
)
{...}
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 the fax job associated with the page of data.
[out] Buffer
Type: LPBYTE*
Pointer to the address of a buffer to receive the first page of data in the fax document. For information about memory allocation, see the following Remarks section.
[out] BufferSize
Type: LPDWORD
Pointer to a DWORD variable to receive the size of the buffer, in bytes, pointed to by the Buffer parameter.
[out] ImageWidth
Type: LPDWORD
Pointer to a DWORD variable to receive the width, in pixels, of the fax image.
[out] ImageHeight
Type: LPDWORD
Pointer to a DWORD variable to receive the height, in pixels, of the fax image.
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_QUERY access is required. |
|
One or all of the Buffer, BufferSize, ImageWidth, ImageHeight, or FaxHandle parameters are NULL. |
|
An error occurred during memory allocation. |
|
An invalid-data error occurred. For example, the fax job identified by the JobId parameter is not an outgoing fax transmission; the job must be specified with the JT_SEND job type. |
Remarks
A fax client application can call the FaxGetPageData function for administrative purposes, to display a thumbnail sketch of the fax documents in the fax queue.
The fax service creates fax documents as TIFF Class F files based on the Tagged Image File Format (TIFF) 6.0 specification. The FaxGetPageData function returns a TIFF data stream that has a Modified Modified READ (MMR) two-dimensional encoding data compression format. The calling application must decode the data stream. For more information, see Fax Image Format.
The FaxGetPageData function allocates the memory required for the Buffer parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter.
For more information, see Displaying Documents in the Fax Job Queue and Freeing Fax Resources.
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 |
See also
Fax Service Client API Functions