Access denied to view completed events

We are currently using RightFax v9.3.2.89 with rfcomlib API. Currently, we just installed RightFax on all computers, since the application that creates these faxes is on the desktop. As we move on to the web solution, we will only be installing RightFax on the server. The problem is that users won't be able to see if faxes have been successfully sent. Looking at the API, I see that I can do something like this:

faxServer.Events.WatchCompleteEvents = BoolType.True;
faxServer.OnCompleteEvent += faxServer_OnCompleteEvent;

      

The problem is when I subscribe to view completed events, I get

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

      

Web browsing I see this error might spring from a million sources. This is weird because I have administrator rights on my computer.

Any ideas?

Unfortunately, the RightFax site is useless and there are few resources available.

+3


source to share


2 answers


I noticed that when using the above method from Ben, the status description is never updated. The example below sleep forever shows the status "Pending conversion", although in FaxUtil the fax was explicitly sent and has the status "OK".

fax.Send();

while (fax.StatusDescription != "OK")
{
    Console.WriteLine("Polling fax handle " + fax.Handle.ToString() 
                   + " for status. Found: " + fax.StatusDescription);
    Thread.Sleep(5000);
}

      



My point is that RightFax API has no documentation and is difficult to work with. Hope this helps the original poster.

+3


source


Poll for fax. StatusDescription will put the program in an endless loop. You need to poll the given facsimile object many times. The following example grabs all facsimile objects in a specific folder, identifies one facsimile object that you need, and requests a StatusDescription object.



string status = "";
string description = "";
int handle = fax.Handle; // this identifies the fax object you're polling for
while (status != "fsDoneOK") // keep polling fax object until status is "OK"
{    
    foreach (Fax obj_fax in obj_user.Folders["Main"].Faxes) // look in the "Main" folder for fax objects
    {
        if (handle == obj_fax.Handle) // check to see if this object is yours
        {
            status = obj_fax.FaxStatus.ToString();
            description = obj_fax.StatusDescription;
            System.Diagnostics.Debug.WriteLine("Fax Status: " + obj_fax.StatusDescription);
        }
        if (status == "fsDoneError" || status == "fsError") // check for fax error
            break;
    }
    if (status == "fsDoneError" || status == "fsError") // check for fax error
        break;  
    Thread.Sleep(3000); // sleep for 3 seconds and then poll again
}

      

0


source







All Articles