共用方式為


RfcommServiceProvider 類別

定義

表示本機 RFCOMM 服務的實例。

public ref class RfcommServiceProvider sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RfcommServiceProvider final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RfcommServiceProvider final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RfcommServiceProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RfcommServiceProvider
Public NotInheritable Class RfcommServiceProvider
繼承
Object Platform::Object IInspectable RfcommServiceProvider
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
應用程式功能
bluetooth

備註

版本歷程記錄

Windows 版本 SDK 版本 已新增值
1511 10586 StartAdvertising (StreamSocketListener,布林值)

屬性

SdpRawAttributes

取得廣告的 SDP 屬性集合。

ServiceId

取得這個本機 RFCOMM 服務實例的 RfcommServiceId。

方法

CreateAsync(RfcommServiceId)

RFCOMM 服務實例的 RfcommServiceId 取得 RfcommServiceProvider 物件。

StartAdvertising(StreamSocketListener, Boolean)

開始公告 SDP 屬性。

StartAdvertising(StreamSocketListener)

開始公告 SDP 屬性。

StopAdvertising()

停止公告 SDP 屬性。

適用於