126.96.36.199.21 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 188.8.131.52.10) or FAX_ConnectionRefCount (section 184.108.40.206.11) 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.
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.
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.