3.1.4.2.9 FaxObs_EnumJobs (Opnum 7)

The FaxObs_EnumJobs (Opnum 7) method is called by the client to enumerate the fax jobs on the server.

In response, the server MUST validate whether the client's fax user account has access to enumerate the jobs. On success, the server MUST allocate memory and return information about all the queued and active jobs in the Buffer parameter. The server MUST also return the total size of the buffer in which the information is returned and the number of enumerated jobs.

The client SHOULD free the returned buffer.

 error_status_t FaxObs_EnumJobs(
   [in] handle_t hBinding,
   [in, out, unique, size_is(,*BufferSize)] 
     LPBYTE* Buffer,
   [in, out] LPDWORD BufferSize,
   [out] LPDWORD JobsReturned
 );

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.

Buffer: A pointer to the address of the returned buffer containing an array of _FAX_JOB_ENTRY (section 2.2.6) structures.

BufferSize: A variable to return the size, in bytes, of the job information buffer.

JobsReturned: A pointer to a DWORD ([MS-DTYP] section 2.2.9) variable to receive the number of _FAX_JOB_ENTRY structures that the method returns in Buffer.

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_PARAMETER

0x00000057

The parameter is incorrect. This error code is returned when any of the following conditions are met:

§ The Buffer parameter is set to a NULL pointer value.

§ The BufferSize parameter is set to a NULL pointer value. <194>

§ The JobsReturned parameter is set to a NULL pointer value. <195>

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