FAX_EnumJobs (Opnum 4)

The FAX_EnumJobs (Opnum 4) method is called by the client to enumerate all the fax jobs on the specified fax 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 return information about all the queued and active jobs in Buffer. It MUST also return the total size of the buffer in which the information is returned and the total number of enumerated jobs.

The client SHOULD free the returned buffer.

 error_status_t FAX_EnumJobs(
   [in] handle_t hBinding,
   [out, size_is(,*BufferSize)] LPBYTE* Buffer,
   [out, ref] LPDWORD BufferSize,
   [out, ref] 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 FAX_ConnectFaxServer (section or FAX_ConnectionRefCount (section method call used to connect to the fax server.

Buffer: A pointer to the address of a buffer to receive 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 that the method returns in the Buffer parameter.

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




Access is denied. The client's fax user account does not have the FAX_ACCESS_QUERY_JOBS access right.



The server cannot allocate sufficient memory to hold the array of FAX_JOB_ENTRY (section 2.2.5) structures to be returned to the client.



The parameter is incorrect. The Buffer parameter is set to a NULL pointer value.<87>



The server failed to custom marshal the array of FAX_JOB_ENTRY to be returned to the client.

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