我正在尝试通过RightFax COM API库发送传真:
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();
我已经注册了DLL文件rfcomapi.dll:
C:\Program Files\RightFAX> RegSvr32 rfcomapi.dll
不幸的是,在运行此代码时,我收到以下错误;
Unhandled Exception: system.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
我正在使用版本9.4.0.0的RightFax.
我该如何解决这个问题?
最佳答案 你的代码本身就很完美.我可以使用我的9.4 RightFax运行它没有任何问题.您可能需要检查您的授权,以确保您的帐户已在服务器中获得完全授权.