Error retrieving Fax object from RightFax

0

I'm having trouble retrieving my fax object with the .fax method. Below is my code. Any help with why the "Faxes" method works, but the "Fax" method does not? I do get a legit handle value. The HResult I get from the "Fax" method is 0x80040006. BTW this is sample code that I created for this post.

using (RightFAXServer server = new RightFAXServer()){
    server.Connect();

    //This works

    RFCOMAPILib.Faxes faxes = server.FaxServer.Faxes["USERNAME"];

    int count = faxes.Count;
    RFCOMAPILib.Fax fax = faxes[1];
    string description = fax.StatusDescription;
    RFCOMAPILib.FaxStatusType status = fax.FaxStatus;

    int handle = fax.Handle;

    // This does not work

    try {
        RFCOMAPILib.Fax myFax = server.FaxServer.Fax[handle];
    } catch (Exception ex) {
        int hresult = ex.HResult;
    }   
    return 0;
}
rightfax
asked on Stack Overflow Nov 27, 2017 by Art Bragg • edited May 2, 2018 by Bentaye

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0