导出 (0) 打印
全部展开
EN
此内容没有您的语言版本,但有英语版本。

UsbBulkOutPipe.OutputStream | outputStream property

Applies to Windows only

Gets an output stream to which the app can write data to send to the endpoint.

Syntax


var outputStream = usbBulkOutPipe.outputStream;

Property value

Type: IOutputStream

The output steam that contains the transfer data.

Remarks

To write data, first get the output stream from the pipe by using OutputStream property and then use the DataWriter object to write the actual buffer.

    Windows::Storage::Streams::Buffer^ buffer = ref new Windows::Storage::Streams::Buffer(TRANSFER_SIZE);  
  
    buffer->Length = TRANSFER_SIZE;  
  
    auto stream = DeviceList::Current->Fx2Device->Configuration->UsbInterfaces->GetAt(0)->BulkOutPipes->GetAt(0)->OutputStream;  
  
    Windows::Storage::Streams::DataWriter^ writer = ref new Windows::Storage::Streams::DataWriter(stream);  
  
    writer->WriteBuffer(buffer);  
  
 
    });  

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.Devices.Usb
Windows::Devices::Usb [C++]

Metadata

Windows.winmd

See also

UsbBulkOutPipe

 

 

显示:
© 2014 Microsoft