如何在 Windows Mobile 中编写带有传递消息的 SMS 发送代码?请用 C# 或 C++ 代码指导我。我想在这段代码中使用SmsSendMessage API,因为这个API有更多的功能。

有帮助吗?

解决方案

你可以使用 短信发送消息 发送消息并使用 短信获取消息状态 获取已发送短信的状态报告。这都是 C++ 代码,但您也可以调用它。

其他提示

Microsoft.WindowsMo​​bile.PocketOutlook 命名空间

Microsoft.WindowsMo​​bile.PocketOutlook 命名空间提供的类允许您在移动设备上创建和访问 PIM 数据项(约会、任务和联系人)以及 MAPI 消息项(电子邮件和 SMS 消息)

短信类 在msdn中

此示例演示如何向移动电话发送 SMS 消息。

public void SmsMessageSend()
{
    SmsMessage smsMessage = new SmsMessage();

    //Set the message body and recipient.
    smsMessage.Body = "Would you like to meet for lunch?";
    smsMessage.To.Add(new Recipient("John Doe", "2065550199"));
    smsMessage.RequestDeliveryReport = true;

    //Send the SMS message.
    smsMessage.Send();

    return;
    }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top