共用方式為


SmsMessageReceivedEventHandler 代理人

定義

收到新的二進位訊息時,會呼叫這個事件處理常式。 當呼叫端想要處理來自指定 SMS 裝置的新二進位訊息時,應該實作此動作。

注意

這項功能僅適用于行動電信業者、行動寬頻介面卡 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 裝置物件的參考。

e
SmsMessageReceivedEventArgs

物件,保存訊息的二進位和文字表示。

屬性

Windows 需求

裝置系列
Windows Desktop Extension SDK (已於 10.0.10240.0 引進)
API contract
Windows.Devices.Sms.LegacySmsApiContract (已於 v1.0 引進)
應用程式功能
cellularMessaging sms

適用於