共用方式為


NetworkOperatorTetheringManager.StartTetheringAsync 方法

定義

多載

StartTetheringAsync()

建立連線網路。

建議您先呼叫 StopTetheringAsync ,以確保連線熱點已關閉。

StartTetheringAsync(NetworkOperatorTetheringSessionAccessPointConfiguration)

使用指定的每個會話組態來啟動行動熱點。

此多載可讓您啟動聯機會話,而不需要透過 ConfigureAccessPointAsync 預先設定。 當做參數傳遞的組態僅適用於目前的會話,而且一旦會話結束,就會遺失。

透過這個 StartTetheringAsync 多載啟動新的工作階段,也可讓您設定無法透過 ConfigureAccessPointAsync 持續設定的每個會話唯一參數。 保存的參數包括網路 SSID、網路密碼、網路無線頻率頻和網路驗證演算法。

建議您先呼叫 StopTetheringAsync ,以確保連線熱點已關閉。

StartTetheringAsync()

建立連線網路。

建議您先呼叫 StopTetheringAsync ,以確保連線熱點已關閉。

public:
 virtual IAsyncOperation<NetworkOperatorTetheringOperationResult ^> ^ StartTetheringAsync() = StartTetheringAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync();
function startTetheringAsync()
Public Function StartTetheringAsync () As IAsyncOperation(Of NetworkOperatorTetheringOperationResult)

傳回

線上網路作業的結果。

屬性

Windows 需求

應用程式功能
wiFiControl

適用於

StartTetheringAsync(NetworkOperatorTetheringSessionAccessPointConfiguration)

使用指定的每個會話組態來啟動行動熱點。

此多載可讓您啟動聯機會話,而不需要透過 ConfigureAccessPointAsync 預先設定。 當做參數傳遞的組態僅適用於目前的會話,而且一旦會話結束,就會遺失。

透過這個 StartTetheringAsync 多載啟動新的工作階段,也可讓您設定無法透過 ConfigureAccessPointAsync 持續設定的每個會話唯一參數。 保存的參數包括網路 SSID、網路密碼、網路無線頻率頻和網路驗證演算法。

建議您先呼叫 StopTetheringAsync ,以確保連線熱點已關閉。

public:
 virtual IAsyncOperation<NetworkOperatorTetheringOperationResult ^> ^ StartTetheringAsync(NetworkOperatorTetheringSessionAccessPointConfiguration ^ configuration) = StartTetheringAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync(NetworkOperatorTetheringSessionAccessPointConfiguration const& configuration);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<NetworkOperatorTetheringOperationResult> StartTetheringAsync(NetworkOperatorTetheringSessionAccessPointConfiguration configuration);
function startTetheringAsync(configuration)
Public Function StartTetheringAsync (configuration As NetworkOperatorTetheringSessionAccessPointConfiguration) As IAsyncOperation(Of NetworkOperatorTetheringOperationResult)

參數

configuration
NetworkOperatorTetheringSessionAccessPointConfiguration

NetworkOperatorTetheringSessionAccessPointConfiguration 物件,其中包含設定行動熱點所需的所有每個會話字段。 此設定不會在會話之間保存。

傳回

物件,其中包含 TetheringOperationStatus 狀態代碼,指出啟動作業是否成功或失敗的原因,以及詳細的 HSTRING ,其中包含適用的其他錯誤訊息。

屬性

Windows 需求

裝置系列
Windows 11 Insider Preview (已於 10.0.26100.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v19.0 引進)
應用程式功能
wiFiControl

適用於