I am trying to send faxes through the RightFax API API library:
RFCOMAPILib.FaxServer server = new RFCOMAPILib.FaxServer(); server.ServerName = "xxx"; server.Protocol = CommunicationProtocolType.cpTCPIP; server.UseNTAuthentication = BoolType.True; // Error happens here server.OpenServer(); RFCOMAPILib.Fax fax = (RFCOMAPILib.Fax)server.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax); fax.ToName = "Batman"; fax.ToFaxNumber = "23434484"; fax.FromFaxNumber = "78678676"; fax.FromName = "Robin"; fax.Send();
I registered the dll file rfcomapi.dll :
C:\Program Files\RightFAX> RegSvr32 rfcomapi.dll
Unfortunately, when I run this code, I get the following error:
Unhandled exception: system.AccessViolationException: Attempted to read or write protected memory. This often indicates that another memory is corrupted.
I am using version 9.4.0.0 of RightFax.
How to fix this problem?
source share