FAXCOMEXLib - Failure to Retrieve Status Events (C#) - Problem and Solution

Problem

Registering one FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM event at a time works, however creating a fax service does not raise FaxJobStatus events correctly – has trouble retrieving the fax status.

Solution

1. FAXCOMEXLib and Windows Fax Server Version

Issues with FAXCOMEXLib might actually relate to the Windows fax server version you are working with. For more details, see our page on FAXCOMEXLib fax server version support.

2. Check Return Value of FaxServer.ListenToServerEvents

There might be a problem with hooking handlers or something similar. If the return value of FaxServer.ListenToServerEvents is successful, this means registration is OK and there is a different problem.

3. Make Sure Individual Events are Registered with | and Not +

Make sure that the individual events are registered with | (or) and not a + (add).

Correct code example:

objFaxServer.ListenToServerEvents fsetFXSSVC_ENDED | fsetOUT_QUEUE

Incorrect code example:

objFaxServer.ListenToServerEvents fsetFXSSVC_ENDED + fsetOUT_QUEUE

4. Make Sure your Code Waits

Make sure your code includes a ‘wait’ construct like the .NET ManualResetEvent.

For the full discussion regarding this issue on the PCreview forum, click here.

Content is Supplied Courtesy of InterFAX, the Leading Fax API

This content was collected for you courtesy of InterFAX, an online fax service providing a powerful fax API. InterFAX allows you to send faxes programmatically with just a few lines of code and no installations. We support faxing from all popular languages and platforms, including Java, C#, ASP, PHP, SMTP, VB, and Perl.

Get Started
Sign up now for our free developer program

Contact us today

Talk to a member of our team about the benefits InterFAX can bring to your organization's communications processes.

Contact us today