我正在尝试使用 Rightfax API RFCOMAPI.DLL 自动化传真。我已详细按照说明进行操作,但似乎无法正常工作。
RightFax 10.6 安装在机器上。我已按照说明复制了 rfcomapi.dll、rfwin32.dll、rfi32rpc.ndr、rfi32rpc.dll 和 rfstat.dll,并注册了 rfcomapi.dll。
我还确保机器上安装了 Microsoft VC++ 2008、2010 和 2012 可再发行组件。
使用我在此处(以及在多个其他站点上)找到的示例代码,我收到了一个错误。
哦,我登录的用户有一个 RightFax 帐户。
这是代码块,用我们的rightfax服务器替换服务器名称等。我也从 cpNamedPipes 更改为 TCIP,但没有成功。就好像它甚至没有看到图书馆,即使它显然在那里并且注册成功。
RFCOMAPILib.FaxServerClass faxserver = new RFCOMAPILib.FaxServerClass();
faxserver.ServerName = "ServerName";
faxserver.Protocol = RFCOMAPILib.CommunicationProtocolType.cpNamedPipes;
faxserver.UseNTAuthentication = RFCOMAPILib.BoolType.True;
faxserver.OpenServer();
RFCOMAPILib.Fax fax = (RFCOMAPILib.Fax) faxserver.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax);
// set up your 'fax' object the way you want it, below is just some sample options
fax.ToName = "John Doe";
fax.ToFaxNumber = "4255551111";
fax.ToVoiceNumber = "4255550000";
fax.ToCompany = "ACME";
fax.FromName = "My Company";
fax.FromVoiceNumber = "4255552222";
fax.Send();
这是我的错误:
在 '(' 之后需要一个表达式。在 line:1 char:71 + rfcomapilib.faxserverclass 传真服务器 = new rfcomapilib.faxserverclass( <<<< )
任何帮助或建议将不胜感激!!
谢谢