62,025
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 应用程序的主入口点。
/// </summary>
///
[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();
if( Sms_Send(TelNum_Text.Text,SendSms_Text.Text) == 1)
{
MessageBox.Show ("发送成功!");
}
else
{
MessageBox.Show ("发送失败!");
}