title: FaxComLib FaxJob Queue Status is Always "Pending"
body: <p>I'm able to send a fax through the COM library FaxComLib (Add Reference -> COM tab -> faxcom 1.0 Type Library) and the fax goes through successfully.</p>
  
  <p>My problem is that while I can send a fax, I can't seem to get an accurate status back from the fax queue. The QueueStatus property of the FaxJob object always returns "Pending."</p>
  
  <p>The environment: Windows 2003 R2 Enterprise w/SP2 -- have also tried on Windows 2008 R2 with same results</p>
  
  <p>Here's my prototype code:</p>
  
  <pre><code>    public void GetFaxStatus(int queueNum)
      {
          FaxServer faxServer = new FaxServer();
          faxServer.Connect("myfaxservername");
          bool isInQueue = false;
  
          FaxJobs faxJobs = (FaxJobs)faxServer.GetJobs();
  
          for (int i = 1; i &lt;= faxJobs.Count; i++)
          {
              FaxJob j = (FaxJob)faxJobs.Item[i];
              MessageBox.Show(faxJobs.Item[i].GetType().ToString() + "\r\n" + CreateStatus(j));
  
              if (j.JobId == queueNum)
              {
                  MessageBox.Show("Found Job:\r\n" + CreateStatus(j));
                  isInQueue = true;
              }
  
          }
  
          if (isInQueue == false)
          {
              MessageBox.Show("Fax is no longer in queue.(...or does not exist)");
          }
  
          faxServer.Disconnect();
      }
  
      static string CreateStatus(FaxJob job)
      {
          StringBuilder sb = new StringBuilder();
  
          sb.AppendLine(string.Format("Billing Code: {0}", job.BillingCode));
          sb.AppendLine(string.Format("Device Status: {0}\r\n", job.DeviceStatus));
          sb.AppendLine(string.Format("Queue Status: {0}", job.QueueStatus));
          sb.AppendLine(string.Format("Display Name: {0}", job.DisplayName));
          sb.AppendLine(string.Format("Fax Number: {0}", job.FaxNumber));
          sb.AppendLine(string.Format("Job Id: {0}", job.JobId));
          sb.AppendLine(string.Format("Tsid: {0}", job.Tsid));
          sb.AppendLine(string.Format("Type: {0}", job.Type));
          sb.AppendLine(string.Format("Page Count: {0}", job.PageCount));
  
          return sb.ToString();
      }
  </code></pre>
  
  <p>When I run it for a job that has failed (retry limit was exceeded), I get this:</p>
  
  <p><img src="https://i.stack.imgur.com/s3rcZ.gif" alt="This result is always returned, no matter what the true status of the job is."></p>
  
  <p>That is the only status I ever get for any fax job; in any status. Am I doing something wrong? Have I configured the fax server wrong? Can you shed any light on my problem for me?</p>
  
  <p>Thanks.
  -Jason</p>