4.3 Message Exchanges During Enumerating Fax Jobs

Message exchanges when enumerating fax jobs

Figure 3: Message exchanges when enumerating fax jobs

A fax client can query the server to obtain a list of its queued and active fax jobs. To do so, the client follows these steps:

  1. The client calls FAX_ConnectFaxServer (section 3.1.4.1.10) to establish a connection to the fax server. The parameters supplied to this function are the server name and a fax connection handle object. The server tries to establish the connection and returns false if the call fails or sets the fax connection handle object if successful.

  2. The client calls FAX_EnumJobs (section 3.1.4.1.21) to query the list of fax jobs.

  3. The server does an access check to determine whether the client's fax user account has the permissions to enumerate server jobs. If the access check fails, the server returns ERROR_ACCESS_DENIED. If the client's fax user account has the permissions to query for server configuration and the call is successful, the server returns the _FAX_JOB_ENTRY (section 2.2.6) structure.

  4. To end the connection to the fax server, the client calls FAX_ConnectionRefCount (section 3.1.4.1.11) by using the faxHandle parameter that was obtained in step 1 and a value of 0 for the dwConnect argument.

When the client calls FAX_EnumJobs, it receives a list of jobs on the fax queue. The client can access all the details of the jobs as defined in _FAX_JOB_ENTRY. If the client already has the job ID of an inbound or an outbound job, the client alternatively can call the FAX_GetJob (section 3.1.4.1.41) function that returns the details of that particular job.