3.1.4.1.48 FAX_GetPageData (Opnum 7)

The FAX_GetPageData (Opnum 7) method is called by the client to retrieve data in the first page of an outgoing fax job. The information that is returned in the buffer is an in-memory copy of the first page of the TIFF file. The value for the JobId parameter can be obtained using one of the following methods: FAX_EnumJobs (section 3.1.4.1.21), FAX_EnumJobsEx (section 3.1.4.1.22), or FAX_EnumJobsEx2 (section 3.1.4.1.23).

In response, the server MUST validate that the JobId is for a valid job. The server MUST validate that the client's fax user account has read access to the job. On success, the server MUST return the first page of data for the queued or active job in the TIFF 6.0 Class F format in Buffer, along with the image width and height.

The client SHOULD free the returned buffer.

For information about TIFF, see [RFC3302].

 error_status_t FAX_GetPageData(
   [in] handle_t hBinding,
   [in] DWORD JobId,
   [out, size_is(,*BufferSize)] LPBYTE* Buffer,
   [out, ref] LPDWORD BufferSize,
   [in, out] LPDWORD ImageWidth,
   [in, out] LPDWORD ImageHeight
 );

hBinding: The RPC binding handle for this call. The client SHOULD reuse the RPC binding handle used as an input hBinding argument for the FAX_ConnectFaxServer (section 3.1.4.1.10) or FAX_ConnectionRefCount (section 3.1.4.1.11) method call used to connect to the fax server.

JobId: A unique number that identifies the fax job that is associated with the page of data.

Buffer: A pointer to the address of a buffer to receive the first page of data in the fax document.

BufferSize: A pointer to a DWORD ([MS-DTYP] section 2.2.9) variable to receive the size of the buffer, in bytes, pointed to by the Buffer parameter.

ImageWidth: A pointer to a DWORD variable to receive the width, in pixels, of the fax image.

ImageHeight: A pointer to a DWORD variable to receive the height, in pixels, of the fax image.

Return Values: This method MUST return 0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the following error codes, one of the fax-specific errors that are defined in section 2.2.52, or one of the other standard errors defined in [MS-ERREF] section 2.2.

Return value/code

Description

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The caller does not have the access rights required for this operation: ALL_FAX_USER_ACCESS_RIGHTS (section 2.2.83).

ERROR_NOT_ENOUGH_MEMORY

0x00000008

Not enough storage is available to process this command.

ERROR_INVALID_DATA

0x0000000D

The job identified by the JobId parameter is not an outgoing fax job or is not a valid fax job for which the fax server can extract the first page of the TIFF file.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. This error code is returned under any of the following conditions:

§ One or more of the following parameters are null pointers: Buffer, ImageWidth, ImageHeight.<120>

§ The fax server cannot find the fax job indicated by JobId.

Exceptions Thrown: No exceptions are thrown except those that are thrown by the underlying RPC protocol, [MS-RPCE].