//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0021
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.idl";
import "Windows.Foundation.idl";
import "Windows.Storage.idl";
import "Windows.System.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        namespace Collections
        {
            interface IPropertySet;
        }
    }
}
namespace Windows
{
    namespace Foundation
    {
        typedef struct DateTime DateTime;

        interface IClosable;

        interface IMemoryBuffer;

        runtimeclass MemoryBuffer;

        typedef struct TimeSpan TimeSpan;

        apicontract UniversalApiContract;

        runtimeclass Uri;
    }
}
namespace Windows
{
    namespace Storage
    {
        typedef enum FileAccessMode FileAccessMode;

        interface IStorageFile;

        typedef enum StorageOpenOptions StorageOpenOptions;

        runtimeclass StorageStreamTransaction;
    }
}
namespace Windows
{
    namespace System
    {
        runtimeclass User;
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            typedef enum ByteOrder ByteOrder;

            typedef enum FileOpenDisposition FileOpenDisposition;

            typedef enum InputStreamOptions InputStreamOptions;

            typedef enum UnicodeEncoding UnicodeEncoding;

            interface IBuffer;

            interface IBufferFactory;

            interface IBufferStatics;

            interface IContentTypeProvider;

            interface IDataReader;

            interface IDataReaderFactory;

            interface IDataReaderStatics;

            interface IDataWriter;

            interface IDataWriterFactory;

            interface IFileRandomAccessStreamStatics;

            interface IInputStream;

            interface IInputStreamReference;

            interface IOutputStream;

            interface IPropertySetSerializer;

            interface IRandomAccessStream;

            interface IRandomAccessStreamReference;

            interface IRandomAccessStreamReferenceStatics;

            interface IRandomAccessStreamStatics;

            interface IRandomAccessStreamWithContentType;

            runtimeclass Buffer;

            runtimeclass DataReader;

            runtimeclass DataReaderLoadOperation;

            runtimeclass DataWriter;

            runtimeclass DataWriterStoreOperation;

            runtimeclass FileInputStream;

            runtimeclass FileOutputStream;

            runtimeclass FileRandomAccessStream;

            runtimeclass InMemoryRandomAccessStream;

            runtimeclass InputStreamOverStream;

            runtimeclass OutputStreamOverStream;

            runtimeclass RandomAccessStream;

            runtimeclass RandomAccessStreamOverStream;

            runtimeclass RandomAccessStreamReference;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.Streams.IBuffer*>*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference*>*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<UINT32, Windows.Storage.Streams.IBuffer*>*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Storage.Streams.IRandomAccessStream*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.Streams.IBuffer*>*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference*>*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<UINT32, Windows.Storage.Streams.IBuffer*>*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Storage.Streams.IRandomAccessStream*>;

                interface Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference*>;

                interface Windows.Foundation.Collections.IKeyValuePair<UINT32, Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference*>;

                interface Windows.Foundation.Collections.IMapView<UINT32, Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IMap<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference*>;

                interface Windows.Foundation.Collections.IMap<UINT32, Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Storage.Streams.IRandomAccessStream*>;

                interface Windows.Foundation.Collections.IVector<Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.Collections.IVector<Windows.Storage.Streams.IRandomAccessStream*>;

                interface Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer*, UINT32>;

                interface Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer*, UINT64>;

                interface Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IInputStream*, UINT64>;

                interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IMapView<HSTRING, Windows.Storage.Streams.RandomAccessStreamReference*>*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IMapView<UINT32, Windows.Storage.Streams.IBuffer*>*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IInputStream*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IOutputStream*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStreamReference*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStreamWithContentType*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.RandomAccessStreamReference*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum ByteOrder
            {
                LittleEndian = 0,
                BigEndian    = 1
            };

            [contract(Windows.Foundation.UniversalApiContract, 5.0)]
            enum FileOpenDisposition
            {
                OpenExisting     = 0,
                OpenAlways       = 1,
                CreateNew        = 2,
                CreateAlways     = 3,
                TruncateExisting = 4
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [flags]
            enum InputStreamOptions
            {
                None      = 0x0,
                Partial   = 0x1,
                ReadAhead = 0x2
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum UnicodeEncoding
            {
                Utf8    = 0,
                Utf16LE = 1,
                Utf16BE = 2
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(905A0FE0-BC53-11DF-8C49-001E4FC686DA)]
            interface IBuffer : IInspectable
            {
                [propget] HRESULT Capacity([out] [retval] UINT32* value);
                [propget] HRESULT Length([out] [retval] UINT32* value);
                [propput] HRESULT Length([in] UINT32 value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.Buffer)]
            [uuid(71AF914D-C10F-484B-BC50-14BC623B3A27)]
            interface IBufferFactory : IInspectable
            {
                HRESULT Create([in] [range(0x00000000, 0x7FFFFFFF)] UINT32 capacity, [out] [retval] Windows.Storage.Streams.Buffer** value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.Buffer)]
            [uuid(E901E65B-D716-475A-A90A-AF7229B1E741)]
            interface IBufferStatics : IInspectable
            {
                HRESULT CreateCopyFromMemoryBuffer([in] Windows.Foundation.IMemoryBuffer* input, [out] [retval] Windows.Storage.Streams.Buffer** value);
                HRESULT CreateMemoryBufferOverIBuffer([in] Windows.Storage.Streams.IBuffer* input, [out] [retval] Windows.Foundation.MemoryBuffer** value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(97D098A5-3B99-4DE9-88A5-E11D2F50C795)]
            interface IContentTypeProvider : IInspectable
            {
                [propget] HRESULT ContentType([out] [retval] HSTRING* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(E2B50029-B4C1-4314-A4B8-FB813A2F275E)]
            interface IDataReader : IInspectable
            {
                [propget] HRESULT UnconsumedBufferLength([out] [retval] UINT32* value);
                [propget] HRESULT UnicodeEncoding([out] [retval] Windows.Storage.Streams.UnicodeEncoding* value);
                [propput] HRESULT UnicodeEncoding([in] Windows.Storage.Streams.UnicodeEncoding value);
                [propget] HRESULT ByteOrder([out] [retval] Windows.Storage.Streams.ByteOrder* value);
                [propput] HRESULT ByteOrder([in] Windows.Storage.Streams.ByteOrder value);
                [propget] HRESULT InputStreamOptions([out] [retval] Windows.Storage.Streams.InputStreamOptions* value);
                [propput] HRESULT InputStreamOptions([in] Windows.Storage.Streams.InputStreamOptions value);
                HRESULT ReadByte([out] [retval] BYTE* value);
                HRESULT ReadBytes([in] UINT32 __valueSize, [out] [size_is(__valueSize)] BYTE* value);
                HRESULT ReadBuffer([in] UINT32 length, [out] [retval] Windows.Storage.Streams.IBuffer** buffer);
                HRESULT ReadBoolean([out] [retval] boolean* value);
                HRESULT ReadGuid([out] [retval] GUID* value);
                HRESULT ReadInt16([out] [retval] INT16* value);
                HRESULT ReadInt32([out] [retval] INT32* value);
                HRESULT ReadInt64([out] [retval] INT64* value);
                HRESULT ReadUInt16([out] [retval] UINT16* value);
                HRESULT ReadUInt32([out] [retval] UINT32* value);
                HRESULT ReadUInt64([out] [retval] UINT64* value);
                HRESULT ReadSingle([out] [retval] FLOAT* value);
                HRESULT ReadDouble([out] [retval] DOUBLE* value);
                HRESULT ReadString([in] UINT32 codeUnitCount, [out] [retval] HSTRING* value);
                HRESULT ReadDateTime([out] [retval] Windows.Foundation.DateTime* value);
                HRESULT ReadTimeSpan([out] [retval] Windows.Foundation.TimeSpan* value);
                HRESULT LoadAsync([in] UINT32 count, [out] [retval] Windows.Storage.Streams.DataReaderLoadOperation** operation);
                HRESULT DetachBuffer([out] [retval] Windows.Storage.Streams.IBuffer** buffer);
                HRESULT DetachStream([out] [retval] Windows.Storage.Streams.IInputStream** stream);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.DataReader)]
            [uuid(D7527847-57DA-4E15-914C-06806699A098)]
            interface IDataReaderFactory : IInspectable
            {
                HRESULT CreateDataReader([in] Windows.Storage.Streams.IInputStream* inputStream, [out] [retval] Windows.Storage.Streams.DataReader** dataReader);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.DataReader)]
            [uuid(11FCBFC8-F93A-471B-B121-F379E349313C)]
            interface IDataReaderStatics : IInspectable
            {
                HRESULT FromBuffer([in] Windows.Storage.Streams.IBuffer* buffer, [out] [retval] Windows.Storage.Streams.DataReader** dataReader);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(64B89265-D341-4922-B38A-DD4AF8808C4E)]
            interface IDataWriter : IInspectable
            {
                [propget] HRESULT UnstoredBufferLength([out] [retval] UINT32* value);
                [propget] HRESULT UnicodeEncoding([out] [retval] Windows.Storage.Streams.UnicodeEncoding* value);
                [propput] HRESULT UnicodeEncoding([in] Windows.Storage.Streams.UnicodeEncoding value);
                [propget] HRESULT ByteOrder([out] [retval] Windows.Storage.Streams.ByteOrder* value);
                [propput] HRESULT ByteOrder([in] Windows.Storage.Streams.ByteOrder value);
                HRESULT WriteByte([in] BYTE value);
                HRESULT WriteBytes([in] UINT32 __valueSize, [in] [size_is(__valueSize)] BYTE* value);
                [overload("WriteBuffer")] HRESULT WriteBuffer([in] Windows.Storage.Streams.IBuffer* buffer);
                [overload("WriteBuffer")] HRESULT WriteBufferRange([in] Windows.Storage.Streams.IBuffer* buffer, [in] UINT32 start, [in] UINT32 count);
                HRESULT WriteBoolean([in] boolean value);
                HRESULT WriteGuid([in] GUID value);
                HRESULT WriteInt16([in] INT16 value);
                HRESULT WriteInt32([in] INT32 value);
                HRESULT WriteInt64([in] INT64 value);
                HRESULT WriteUInt16([in] UINT16 value);
                HRESULT WriteUInt32([in] UINT32 value);
                HRESULT WriteUInt64([in] UINT64 value);
                HRESULT WriteSingle([in] FLOAT value);
                HRESULT WriteDouble([in] DOUBLE value);
                HRESULT WriteDateTime([in] Windows.Foundation.DateTime value);
                HRESULT WriteTimeSpan([in] Windows.Foundation.TimeSpan value);
                HRESULT WriteString([in] HSTRING value, [out] [retval] UINT32* codeUnitCount);
                HRESULT MeasureString([in] HSTRING value, [out] [retval] UINT32* codeUnitCount);
                HRESULT StoreAsync([out] [retval] Windows.Storage.Streams.DataWriterStoreOperation** operation);
                HRESULT FlushAsync([out] [retval] Windows.Foundation.IAsyncOperation<boolean>** operation);
                HRESULT DetachBuffer([out] [retval] Windows.Storage.Streams.IBuffer** buffer);
                HRESULT DetachStream([out] [retval] Windows.Storage.Streams.IOutputStream** outputStream);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.DataWriter)]
            [uuid(338C67C2-8B84-4C2B-9C50-7B8767847A1F)]
            interface IDataWriterFactory : IInspectable
            {
                HRESULT CreateDataWriter([in] Windows.Storage.Streams.IOutputStream* outputStream, [out] [retval] Windows.Storage.Streams.DataWriter** dataWriter);
            }

            [contract(Windows.Foundation.UniversalApiContract, 5.0)]
            [exclusiveto(Windows.Storage.Streams.FileRandomAccessStream)]
            [uuid(73550107-3B57-4B5D-8345-554D2FC621F0)]
            interface IFileRandomAccessStreamStatics : IInspectable
            {
                [overload("OpenAsync")] HRESULT OpenAsync([in] HSTRING filePath, [in] Windows.Storage.FileAccessMode accessMode, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream*>** operation);
                [overload("OpenAsync")] HRESULT OpenWithOptionsAsync([in] HSTRING filePath, [in] Windows.Storage.FileAccessMode accessMode, [in] Windows.Storage.StorageOpenOptions sharingOptions, [in] Windows.Storage.Streams.FileOpenDisposition openDisposition, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream*>** operation);
                [overload("OpenTransactedWriteAsync")] HRESULT OpenTransactedWriteAsync([in] HSTRING filePath, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageStreamTransaction*>** operation);
                [overload("OpenTransactedWriteAsync")] HRESULT OpenTransactedWriteWithOptionsAsync([in] HSTRING filePath, [in] Windows.Storage.StorageOpenOptions openOptions, [in] Windows.Storage.Streams.FileOpenDisposition openDisposition, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageStreamTransaction*>** operation);
                [overload("OpenForUserAsync")] HRESULT OpenForUserAsync([in] Windows.System.User* user, [in] HSTRING filePath, [in] Windows.Storage.FileAccessMode accessMode, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream*>** operation);
                [overload("OpenForUserAsync")] HRESULT OpenForUserWithOptionsAsync([in] Windows.System.User* user, [in] HSTRING filePath, [in] Windows.Storage.FileAccessMode accessMode, [in] Windows.Storage.StorageOpenOptions sharingOptions, [in] Windows.Storage.Streams.FileOpenDisposition openDisposition, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream*>** operation);
                [overload("OpenTransactedWriteForUserAsync")] HRESULT OpenTransactedWriteForUserAsync([in] Windows.System.User* user, [in] HSTRING filePath, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageStreamTransaction*>** operation);
                [overload("OpenTransactedWriteForUserAsync")] HRESULT OpenTransactedWriteForUserWithOptionsAsync([in] Windows.System.User* user, [in] HSTRING filePath, [in] Windows.Storage.StorageOpenOptions openOptions, [in] Windows.Storage.Streams.FileOpenDisposition openDisposition, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.StorageStreamTransaction*>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(905A0FE2-BC53-11DF-8C49-001E4FC686DA)]
            interface IInputStream : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                HRESULT ReadAsync([in] Windows.Storage.Streams.IBuffer* buffer, [in] UINT32 count, [in] Windows.Storage.Streams.InputStreamOptions options, [out] [retval] Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer*, UINT32>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(43929D18-5EC9-4B5A-919C-4205B0C804B6)]
            interface IInputStreamReference : IInspectable
            {
                HRESULT OpenSequentialReadAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IInputStream*>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(905A0FE6-BC53-11DF-8C49-001E4FC686DA)]
            interface IOutputStream : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                HRESULT WriteAsync([in] Windows.Storage.Streams.IBuffer* buffer, [out] [retval] Windows.Foundation.IAsyncOperationWithProgress<UINT32, UINT32>** operation);
                HRESULT FlushAsync([out] [retval] Windows.Foundation.IAsyncOperation<boolean>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 13.0)]
            [uuid(6E8EBF1C-EF3D-4376-B20E-5BE638AEAC77)]
            interface IPropertySetSerializer : IInspectable
            {
                HRESULT Serialize([in] Windows.Foundation.Collections.IPropertySet* propertySet, [out] [retval] Windows.Storage.Streams.IBuffer** result);
                HRESULT Deserialize([in] Windows.Foundation.Collections.IPropertySet* propertySet, [in] Windows.Storage.Streams.IBuffer* buffer);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(905A0FE1-BC53-11DF-8C49-001E4FC686DA)]
            interface IRandomAccessStream : IInspectable
                requires
                    Windows.Foundation.IClosable,
                    Windows.Storage.Streams.IInputStream,
                    Windows.Storage.Streams.IOutputStream
            {
                [propget] HRESULT Size([out] [retval] UINT64* value);
                [propput] HRESULT Size([in] UINT64 value);
                HRESULT GetInputStreamAt([in] UINT64 position, [out] [retval] Windows.Storage.Streams.IInputStream** stream);
                HRESULT GetOutputStreamAt([in] UINT64 position, [out] [retval] Windows.Storage.Streams.IOutputStream** stream);
                [propget] HRESULT Position([out] [retval] UINT64* value);
                HRESULT Seek([in] UINT64 position);
                HRESULT CloneStream([out] [retval] Windows.Storage.Streams.IRandomAccessStream** stream);
                [propget] HRESULT CanRead([out] [retval] boolean* value);
                [propget] HRESULT CanWrite([out] [retval] boolean* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(33EE3134-1DD6-4E3A-8067-D1C162E8642B)]
            interface IRandomAccessStreamReference : IInspectable
            {
                HRESULT OpenReadAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStreamWithContentType*>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.RandomAccessStreamReference)]
            [uuid(857309DC-3FBF-4E7D-986F-EF3B1A07A964)]
            interface IRandomAccessStreamReferenceStatics : IInspectable
            {
                HRESULT CreateFromFile([in] Windows.Storage.IStorageFile* file, [out] [retval] Windows.Storage.Streams.RandomAccessStreamReference** streamReference);
                HRESULT CreateFromUri([in] Windows.Foundation.Uri* uri, [out] [retval] Windows.Storage.Streams.RandomAccessStreamReference** streamReference);
                HRESULT CreateFromStream([in] Windows.Storage.Streams.IRandomAccessStream* stream, [out] [retval] Windows.Storage.Streams.RandomAccessStreamReference** streamReference);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Storage.Streams.RandomAccessStream)]
            [uuid(524CEDCF-6E29-4CE5-9573-6B753DB66C3A)]
            interface IRandomAccessStreamStatics : IInspectable
            {
                [overload("CopyAsync")] HRESULT CopyAsync([in] Windows.Storage.Streams.IInputStream* source, [in] Windows.Storage.Streams.IOutputStream* destination, [out] [retval] Windows.Foundation.IAsyncOperationWithProgress<UINT64, UINT64>** operation);
                [overload("CopyAsync")] HRESULT CopySizeAsync([in] Windows.Storage.Streams.IInputStream* source, [in] Windows.Storage.Streams.IOutputStream* destination, [in] UINT64 bytesToCopy, [out] [retval] Windows.Foundation.IAsyncOperationWithProgress<UINT64, UINT64>** operation);
                HRESULT CopyAndCloseAsync([in] Windows.Storage.Streams.IInputStream* source, [in] Windows.Storage.Streams.IOutputStream* destination, [out] [retval] Windows.Foundation.IAsyncOperationWithProgress<UINT64, UINT64>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(CC254827-4B3D-438F-9232-10C76BC7E038)]
            interface IRandomAccessStreamWithContentType : IInspectable
                requires
                    Windows.Storage.Streams.IRandomAccessStream,
                    Windows.Foundation.IClosable,
                    Windows.Storage.Streams.IInputStream,
                    Windows.Storage.Streams.IOutputStream,
                    Windows.Storage.Streams.IContentTypeProvider
            {
            }

            [activatable(Windows.Storage.Streams.IBufferFactory, Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Storage.Streams.IBufferStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass Buffer
            {
                [default] interface Windows.Storage.Streams.IBuffer;
            }

            [activatable(Windows.Storage.Streams.IDataReaderFactory, Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Storage.Streams.IDataReaderStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass DataReader
            {
                [default] interface Windows.Storage.Streams.IDataReader;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass DataReaderLoadOperation
            {
                [default] interface Windows.Foundation.IAsyncOperation<UINT32>;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [activatable(Windows.Storage.Streams.IDataWriterFactory, Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass DataWriter
            {
                [default] interface Windows.Storage.Streams.IDataWriter;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass DataWriterStoreOperation
            {
                [default] interface Windows.Foundation.IAsyncOperation<UINT32>;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass FileInputStream
            {
                [default] interface Windows.Storage.Streams.IInputStream;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass FileOutputStream
            {
                [default] interface Windows.Storage.Streams.IOutputStream;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Storage.Streams.IFileRandomAccessStreamStatics, Windows.Foundation.UniversalApiContract, 5.0)]
            runtimeclass FileRandomAccessStream
            {
                [default] interface Windows.Storage.Streams.IRandomAccessStream;
                interface Windows.Storage.Streams.IOutputStream;
                interface Windows.Foundation.IClosable;
                interface Windows.Storage.Streams.IInputStream;
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass InMemoryRandomAccessStream
            {
                [default] interface Windows.Storage.Streams.IRandomAccessStream;
                interface Windows.Storage.Streams.IOutputStream;
                interface Windows.Foundation.IClosable;
                interface Windows.Storage.Streams.IInputStream;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass InputStreamOverStream
            {
                [default] interface Windows.Storage.Streams.IInputStream;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass OutputStreamOverStream
            {
                [default] interface Windows.Storage.Streams.IOutputStream;
                interface Windows.Foundation.IClosable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Storage.Streams.IRandomAccessStreamStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            runtimeclass RandomAccessStream
            {
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            runtimeclass RandomAccessStreamOverStream
            {
                [default] interface Windows.Storage.Streams.IRandomAccessStream;
                interface Windows.Storage.Streams.IOutputStream;
                interface Windows.Foundation.IClosable;
                interface Windows.Storage.Streams.IInputStream;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Storage.Streams.IRandomAccessStreamReferenceStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            runtimeclass RandomAccessStreamReference
            {
                [default] interface Windows.Storage.Streams.IRandomAccessStreamReference;
            }
        }
    }
}
