Share via


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

適用対象