虾米@ 2019-10-11 13:28 采纳率: 11.1%
浏览 115
已结题

asp.net使用短信猫发送短信失败

[STAThread]
[DllImport("sms.dll", EntryPoint = "Sms_Connection")]
public static extern uint Sms_Connection(string CopyRight, uint Com_Port, uint Com_BaudRate, out string Mobile_Type, out string CopyRightToCOM);
[DllImport("sms.dll", EntryPoint = "Sms_Disconnection")]
public static extern uint Sms_Disconnection();
[DllImport("sms.dll", EntryPoint = "Sms_Send")]
public static extern uint Sms_Send(string Sms_TelNum, string Sms_Text);
[DllImport("sms.dll", EntryPoint = "Sms_Receive")]
public static extern uint Sms_Receive(string Sms_Type, out string Sms_Text);
[DllImport("sms.dll", EntryPoint = "Sms_Delete")]
public static extern uint Sms_Delete(string Sms_Index);
[DllImport("sms.dll", EntryPoint = "Sms_AutoFlag")]
public static extern uint Sms_AutoFlag();
[DllImport("sms.dll", EntryPoint = "Sms_NewFlag")]
public static extern uint Sms_NewFlag();

运行后提示:无法加载 DLL“sms.dll”: 找不到指定的模块。
然后将sms.dll文件放在了bin目录下和release和debug中,以及system32目录中,程序干脆启动不起来,请问这该怎么解决,就想实现在asp.net页面中点击发送按钮,短信内容和手机号写死,写死的指定手机号就能收到短信,实现起来就遇到了这个问题,请大神指点。
  • 写回答

1条回答 默认 最新

  • threenewbee 2019-10-13 10:04
    关注

    64位系统,将dll放在syswow64而不是system32下,程序编译的时候点项目属性,目标选择x86,强制编译为32bit
    检查你的串口本身连接是否良好

    评论

报告相同问题?

悬赏问题

  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?