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 方法。

适用于