短信应用问题 [英] SMS application Problem

查看:90
本文介绍了短信应用问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Modem从事SMS项目的Windows应用程序(Winforms).该调制解调器可以在Windows-7 32位操作系统上正常工作.但这每次在我遇到异常时都无法在64位上工作(COM已被其他进程使用)
但是相同的应用程序可以在32位上正常工作.
有什么问题吗?

OP中的代码:

i worked on Windows application(Winforms) for SMS Project using Modem. that modem working fine on Windows-7 32 bit OS. But it''s not working on 64 bit every time i get exception(COM is already used by some other process)
but same application worked on 32 bit working fine.
what is the problem?

Code from OP:

GsmCommMain comm = new GsmCommMain(port, baudRate, timeout); 
try 
{ 
     if (comStatus) 
     { 
     comm.Open(); // here i got exception (Com 5 Already used by some other process) 
     comStatus = false;
     Thread.Sleep(20000); 
    
     if (!comm.IsConnected()) 
     { //AddToLog("Not Connected : Port - " + port);
         comm.Close(); 
         //return false;
     } 
     else 
     { 
          if (comMTN) 
          { 
          comm.Close();
          comMTN = false;
          comPortNonMTN = i; 
          i = strport.Length + 1; 
          count = 1; 
          AddToLog("Connected: Port - " + port); 
          return true; 
          } 
          else 
          { 
          AddToLog("Connected: Port - " + port); 
          comm.Close(); 
          return true; 
          } 
    } 
} 
} 
catch (Exception ex) 
{ //return}



在这里我使用了Beetel,I-ball和MTN调制解调器..



here i used Beetel and I-ball and MTN modems..

推荐答案

您需要在尝试访问它时检查保持连接处于关闭状态的女巫设备. .您可以找到答案,在这里看看:
http://support.microsoft.com/kb/817900 [ http://obbig.wordpress.com/a-short-hyperterminal-tutorial/ [ ^ ]

http://www.developershome.com/sms/howToUseHyperTerminal.asp [
You would need to check witch device that is holding the connection closed while you are trying to access it. You can find that out, take a look here:
http://support.microsoft.com/kb/817900[^]

This is for USB connected devices, but the same approch should give you information on what program that uses your com port also. OIther links that might be useful for you:
http://obbig.wordpress.com/a-short-hyperterminal-tutorial/[^]

http://www.developershome.com/sms/howToUseHyperTerminal.asp[^]


这篇关于短信应用问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆