Windows app
摺疊目錄
展開目錄
EN
本內容沒有您的語言版本,但有英文版本。

UsbBulkOutPipe.OutputStream | outputStream property

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 (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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

 

 

顯示:
© 2016 Microsoft