共用方式為


CustomDevice.TrySendIOControlAsync(IIOControlCode, IBuffer, IBuffer) 方法

定義

傳送 IO 控制項程式碼。 傳回指示作業是否成功的值。

public:
 virtual IAsyncOperation<bool> ^ TrySendIOControlAsync(IIOControlCode ^ ioControlCode, IBuffer ^ inputBuffer, IBuffer ^ outputBuffer) = TrySendIOControlAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySendIOControlAsync(IIOControlCode const& ioControlCode, IBuffer const& inputBuffer, IBuffer const& outputBuffer);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySendIOControlAsync(IIOControlCode ioControlCode, IBuffer inputBuffer, IBuffer outputBuffer);
function trySendIOControlAsync(ioControlCode, inputBuffer, outputBuffer)
Public Function TrySendIOControlAsync (ioControlCode As IIOControlCode, inputBuffer As IBuffer, outputBuffer As IBuffer) As IAsyncOperation(Of Boolean)

參數

ioControlCode
IIOControlCode

IO 控制項程式碼。

inputBuffer
IBuffer

輸入緩衝區。

outputBuffer
IBuffer

輸出緩衝區。

傳回

如果作業成功,則為true;否則為false

屬性

備註

TrySendIOControlAsync 就像 SendIOControlAsync,但此方法不會在作業失敗時擲回例外狀況。 相反地,它會傳回 false。 如果您想要處理作業期間發生的任何例外狀況,請使用 SendIOControlAsync 方法。

適用於