SmsBinaryMessage 類別

定義

表示原始 PDU 格式的 SMS 訊息。 資料格式會根據格式屬性的值 () 為 GSM 或 CDMA 來表示的訊息格式而有所不同。

注意

這項功能僅適用于行動電信業者應用程式和 UWP 應用程式,由行動網路操作員、行動寬頻介面卡 IHV 或 OEM 提供特殊許可權存取。 如需詳細資訊,請參閱 行動寬頻

注意

此類別及其方法支援維護舊版 Windows 中使用的舊版傳統型應用程式。 如果您使用這個類別,則必須在應用程式的資訊清單中指定 Windows.Devices.Sms.LegacySmsApiContract 。 如果您要開發適用于 Windows 的新應用程式,請勿使用此類別。 請改用此命名空間中不需要 Windows.Devices.Sms.LegacySmsApiContract的 API。

public ref class SmsBinaryMessage sealed : ISmsBinaryMessage
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class SmsBinaryMessage final : ISmsBinaryMessage
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Devices.Sms.LegacySmsApiContract")]
/// [Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
class SmsBinaryMessage final : ISmsBinaryMessage
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class SmsBinaryMessage : ISmsBinaryMessage
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Devices.Sms.LegacySmsApiContract")]
[Windows.Foundation.Metadata.Deprecated("SmsBinaryMessage may be altered or unavailable for releases after Windows 10. Instead, use SmsAppMessage.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public sealed class SmsBinaryMessage : ISmsBinaryMessage
function SmsBinaryMessage()
Public NotInheritable Class SmsBinaryMessage
Implements ISmsBinaryMessage
繼承
Object Platform::Object IInspectable SmsBinaryMessage
屬性
實作

Windows 需求

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

建構函式

SmsBinaryMessage()

建立 SmsBinaryMessage 類別的實例。

屬性

Format

擷取偵測到的通訊協定描述單位 (PDU) 格式。

Id

指出非同步訊息作業的識別碼。

MessageClass

傳回訊息類別,由操作員的訊息網路決定。 兩個最常見的類別是 None (一般訊息) 或 Class0 (特殊運算子訊息,例如必須立即向使用者顯示) 的漫遊警告。 使用者訊息的一般用戶端會忽略 Class0 訊息。

方法

GetData()

傳回二進位通訊協定描述單位中訊息的原始緩衝區, (PDU) 格式做為位元組陣列。

SetData(Byte[])

指定 SMS 訊息的原始二進位承載。 應該根據通訊協定描述單位 (PDU) 標準來格式化。

適用於