Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.58 KB

irandomaccessstreamreference.md

File metadata and controls

26 lines (18 loc) · 1.58 KB
-api-id -api-type
T:Windows.Storage.Streams.IRandomAccessStreamReference
winrt interface

Windows.Storage.Streams.IRandomAccessStreamReference

-description

Enables a Windows Runtime component to provide access to an encapsulated stream.

-remarks

Implement the IRandomAccessStreamReference interface when your Windows Runtime component exposes a random access stream to callers. For a sequential read-only stream, implement the IInputStreamReference interface.

For example, a StorageFile provides an IRandomAccessStream for the contents of a file, so it implements the IRandomAccessStreamReference interface. Usually, providing a stream requires accessing the hard disk, so stream operations are asynchronous. Components that consume file content receive an IRandomAccessStreamReference instead of a StorageFile reference, because this interface is the more minimal requirement for the input parameter.

Important

Not all sources can provide random access streams efficiently. If a component requires only sequential read access, consider implementing the IInputStreamReference interface instead of the IRandomAccessStreamReference interface.

-examples

-see-also

IInputStreamReference