SmsMessageReceivedEventHandler 委托
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
收到新的二进制消息时,将调用此事件处理程序。 当调用方想要处理来自给定短信设备的新二进制消息时,应实现此要求。
注意
此功能仅适用于由移动网络运营商、移动宽带适配器 IHV 或 OEM 授予特权访问权限的移动运营商应用和 UWP 应用。 有关详细信息,请参阅 移动宽带。
注意
支持此类及其方法维护在早期版本的 Windows 中使用它的旧桌面应用。 如果确实使用此类,则必须在应用的清单中指定 Windows.Devices.Sms.LegacySmsApiContract 。 如果要开发适用于 Windows 的新应用,请不要使用此类。 请改用此命名空间中不需要 Windows.Devices.Sms.LegacySmsApiContract 的 API。
public delegate void SmsMessageReceivedEventHandler(SmsDevice ^ sender, SmsMessageReceivedEventArgs ^ e);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
class SmsMessageReceivedEventHandler : MulticastDelegate
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
/// [Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
class SmsMessageReceivedEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
public delegate void SmsMessageReceivedEventHandler(SmsDevice sender, SmsMessageReceivedEventArgs e);
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205)]
[Windows.Foundation.Metadata.Deprecated("SmsMessageReceivedEventHandler may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public delegate void SmsMessageReceivedEventHandler(SmsDevice sender, SmsMessageReceivedEventArgs e);
var smsMessageReceivedEventHandlerHandler = function(sender, e){
/* Your code */
}
Public Delegate Sub SmsMessageReceivedEventHandler(sender As SmsDevice, e As SmsMessageReceivedEventArgs)
参数
- sender
- SmsDevice
对发送消息的 SMS 设备对象的引用。
一个对象,该对象保存消息的二进制和文本表示形式。
- 属性
Windows 要求
设备系列 |
Windows Desktop Extension SDK (在 10.0.10240.0 中引入)
|
API contract |
Windows.Devices.Sms.LegacySmsApiContract (在 v1.0 中引入)
|
应用功能 |
cellularMessaging
sms
|