Hi all. I've developed a VERY basic C# command-line program that subscribes to the OnNewFaxEvent of the COM API's FaxServer object. I have it set up as follows (pseudo-code):
var faxServer = new FaxServer(){ //properties set up here };
faxServer.OpenServer();
faxServer.Events.Interval = 5;
faxServer.OnNewFaxEvent += (delegate(Fax fax) { //write to c:\faxLog.txt file here. });
User rfUser = faxServer.get_User("TEST");
faxServer.Events.set_WatchNewFaxes(rfUser, BoolType.True);
while(true)
Thread.Sleep(5000);
This code works beautifully in the command line app. I can capture all of the new fax events for the "TEST" user. The problem is that when I directly port this code to a windows service the events stop firing. There is no error thrown, I can debug the service and I see it continuously pausing on the "Thread.Sleep" line, but NO events are received from RightFax.
I thought it might be the logon the service was using, but I tried the Local System account, my account, and a domain administrator account. No luck.
I am using RightFax 8.7, by the way. Any ideas?