SmsMessageReceivedEventHandler Delegato

Definizione

Questo gestore eventi viene chiamato quando viene ricevuto un nuovo messaggio binario. I chiamanti devono implementare questa operazione quando vogliono gestire nuovi messaggi binari da un determinato dispositivo SMS.

Nota

Questa funzionalità è disponibile solo per le app degli operatori mobili e le app UWP fornite con privilegi da operatori di rete mobile, adattatore a banda larga mobile IHV o OEM. Per altre informazioni, vedere Banda larga mobile.

Nota

Questa classe e i relativi metodi sono supportati per la manutenzione delle app desktop legacy usate nelle versioni precedenti di Windows. Se si usa questa classe, è necessario specificare Windows.Devices.Sms.LegacySmsApiContract nel manifesto dell'app. Non usare questa classe se si sta sviluppando una nuova app per Windows. Usare invece le API in questo spazio dei nomi che non richiedono Windows.Devices.Sms.LegacySmsApiContract.

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)

Parametri

sender
SmsDevice

Riferimento all'oggetto dispositivo SMS che ha inviato il messaggio.

e
SmsMessageReceivedEventArgs

Oggetto che contiene le rappresentazioni binarie e di testo del messaggio.

Attributi

Requisiti Windows

Famiglia di dispositivi
Windows Desktop Extension SDK (è stato introdotto in 10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (è stato introdotto in v1.0)
Funzionalità dell'app
cellularMessaging sms

Si applica a