RemoteTextConnection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示遠端桌面用戶端應用程式與本機電腦文字輸入系統之間的連線。 此連線可用來啟用文字輸入虛擬化。
public ref class RemoteTextConnection sealed : IClosable
/// [Windows.Foundation.Metadata.Activatable(Windows.System.RemoteDesktop.Input.IRemoteTextConnectionFactory, 851968, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 851968)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RemoteTextConnection final : IClosable
/// [Windows.Foundation.Metadata.Activatable(Windows.System.RemoteDesktop.Input.IRemoteTextConnectionFactory, 851968, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 851968)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.System.RemoteDesktop.Input.IRemoteTextConnectionFactory2, 1048576, "Windows.Foundation.UniversalApiContract")]
class RemoteTextConnection final : IClosable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.System.RemoteDesktop.Input.IRemoteTextConnectionFactory), 851968, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 851968)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RemoteTextConnection : System.IDisposable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.System.RemoteDesktop.Input.IRemoteTextConnectionFactory), 851968, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 851968)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.System.RemoteDesktop.Input.IRemoteTextConnectionFactory2), 1048576, "Windows.Foundation.UniversalApiContract")]
public sealed class RemoteTextConnection : System.IDisposable
function RemoteTextConnection(connectionId, pduForwarder)
function RemoteTextConnection(connectionId, pduForwarder, options)
Public NotInheritable Class RemoteTextConnection
Implements IDisposable
- 繼承
- 屬性
- 實作
Windows 需求
裝置系列 |
Windows 11 (已於 10.0.22000.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v14.0 引進)
|
備註
RemoteTextConnection 的設計目的是要啟用與本機桌面整合之遠端應用程式的文字輸入虛擬化。 此案例稱為 遠端程式 或 本機整合的遠端應用程式 (RAIL) 。 目前不建議使用 RemoteTextConnection 搭配完整的桌面遠端處理,而且可能會導致不想要的行為。 啟用文字輸入虛擬化時,Windows (所提供的內建輸入方法,包括 IME) 可用於在遠端應用程式中輸入文字。
若要啟用文字輸入虛擬化,遠端桌面用戶端應用程式會為其連線的每個遠端會話建立一個 RemoteTextConnection 物件。 資料封包會透過這個物件傳遞至本機電腦的文字輸入系統,並以下列方式傳送:
文字輸入系統會透過 RemoteTextConnectionDataHandler 委派將資料封包傳送至遠端桌面用戶端應用程式。 遠端桌面用戶端應用程式負責建立此委派,並將它傳遞至 RemoteTextConnection 建構函式。 來自文字輸入系統的資料封包會符合 RDP 文字輸入虛擬化通訊協定。 在此委派上收到的訊息將會抵達背景執行緒。 當用戶端應用程式從委派接收資料封包時,它應該透過單向、用戶端對伺服器 動態虛擬通道 (DVC) ,將封包轉送至遠端 RAIL 伺服器以進行虛擬化文字輸入。 此 DVC 的名稱為
TextInput_ClientToServerDVC
。遠端桌面用戶端應用程式也需要透過ReportDataReceived方法,從伺服器對用戶端文字輸入 DVC 上的遠端電腦接聽資料封包, (名為
TextInput_ServerToClientDVC
) ,然後將這些資料封包轉送至本機電腦的文字輸入系統。 如需遠端桌面用戶端應用程式如何支援 DVC 的詳細資訊,請參閱 動態虛擬通道 () 和 tsvirtualchannels.h 標頭檔。
RemoteTextConnection會與遠端應用程式整合的唯一本機輸入方法,是 Windows 提供的內建輸入方法,其使用下一版的文字服務架構 (,包括 IME) 。 這些輸入方法是由文字輸入系統裝載于集中式程式中,讓整合可行。 舊版文字服務架構第 1 版或 IMM IME 不會裝載于集中式程式中,而且文字輸入虛擬化不支援。 這些較舊的輸入方法必須直接安裝在遠端系統上,才能與從該系統遠端的應用程式搭配使用。 這與未使用文字輸入虛擬化時,使用文字服務架構第 1 版和 IMM 輸入方法的方式相同。
建構函式
RemoteTextConnection(Guid, RemoteTextConnectionDataHandler) |
建立一個遠端會話專屬 的 RemoteTextConnection 類別的新實例。 |
RemoteTextConnection(Guid, RemoteTextConnectionDataHandler, RemoteTextConnectionOptions) |
表示遠端桌面用戶端應用程式與本機電腦文字輸入系統之間的連線。 此連線可用來啟用文字輸入虛擬化。 |
屬性
IsEnabled |
指定是否為此 RemoteTextConnection 實例所服務的遠端桌面連線啟用文字輸入虛擬化。 |
方法
Close() |
關閉 RemoteTextConnection 物件。 |
Dispose() |
執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。 |
RegisterThread(UInt32) |
註冊遠端桌面用戶端應用程式將呈現遠端 UI 的執行緒。 |
ReportDataReceived(Byte[]) |
將透過 |
ReportPredictedKeyEvent(UInt16, RemoteKeyEventAttributes) |
表示遠端桌面用戶端應用程式與本機電腦文字輸入系統之間的連線。 此連線可用來啟用文字輸入虛擬化。 |
UnregisterThread(UInt32) |
清除時,或該執行緒不再裝載遠端 UI 時,取消註冊透過 RegisterThread 註冊的執行緒。 |
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應