日期:2014-05-17 浏览次数:21248 次
[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();
/// <summary>
/// 开始短信服务,连接
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
//Thread thread = new Thread(new ThreadStart(Start));
//thread.Name = "GPRS";
//thread.IsBackground = true;
//thread.Start();
string TypeStr = "wavecom";
string CopyRightToCOM = "";
string CopyRightStr = "modem.COM8";
for (uint j = 1; j < 10; j++)
{