3.1.4.2.12 FaxObs_GetPageData (Opnum 10)

The FaxObs_GetPageData (Opnum 10) method is called by the client to retrieve the data from 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 for the job. The value for the JobId parameter can be obtained by calling the FaxObs_EnumJobs (section 3.1.4.2.9) method.

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 FaxObs_GetPageData(
   [in] handle_t hBinding,
   [in] DWORD JobId,
   [in, out, unique, size_is(,*BufferSize)] 
     LPBYTE* Buffer,
   [in, out] 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 FaxObs_ConnectionRefCount (section 3.1.4.2.2) method call used to connect to the fax server.

JobId: A DWORD ([MS-DTYP] section 2.2.9) containing the unique number identifying the fax job that is associated with the page of data.

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

BufferSize: A pointer to a DWORD variable to receive the size, in bytes, of the buffer 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 client's fax user account does not have the FAX_JOB_QUERY access rights.

ERROR_NOT_ENOUGH_MEMORY

0x00000008

The fax server cannot allocate memory for the data to be returned to the client.

ERROR_INVALID_DATA

0x0000000D

The job identified by the JobId parameter is not an outgoing fax job.

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 set to NULL pointer values: Buffer, BufferSize, ImageWidth, and ImageHeight.<197>

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

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