Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

BSEtunes

, 24 Apr 2010
BSEtunes is a MySQL based, full manageable, networkable single or multiuser jukebox application
BSE.Platten.zip
BSE.Platten
BSE.Platten.vssscc
mssccprj.scc
vssver2.scc
BSE.CoverFlow.WPFLib
BSE.CoverFlow.WPFLib.csproj.user
BSE.CoverFlow.WPFLib.csproj.vspscc
mssccprj.scc
vssver2.scc
Images
close.png
exit.png
next.png
next_disabled.png
Note.jpg
pause.png
PlayButton.png
previous.png
previous_disabled.png
stop.png
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
vssver2.scc
BSE.Platten.Admin
BSE.Platten.Admin.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
Album16.gif
BSEadmin.ico
cdimport.png
cdrip.png
cd_hoeren.png
clearsearch.png
DataContainer_MoveFirsHS.png
DataContainer_MoveLastHS.png
DataContainer_MoveNextHS.png
DataContainer_MovePreviousHS.png
DataContainer_NewRecordHS.png
diskinfo.png
DRIVEDSC.png
DRIVENET.png
Edit_UndoHS.png
exportimage.png
findfile.png
FindHS.png
freedb.png
Genre16.png
Image.png
InsertPictureHS.png
Interpret16.png
OptionsHS.png
PieChart3DHS.png
PieChartHS.png
ProtectFormHS.png
RefreshDocViewHS.png
saveHS.png
search.png
song.png
system.png
tagger.png
tools_16.png
vssver2.scc
BSE.Platten.Admin.WinApp
BSE.Platten.Admin.WinApp.csproj.user
BSE.Platten.Admin.WinApp.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
BSEadmin.ico
vssver2.scc
BSE.Platten.Audio
bse.ico
BSE.Platten.Audio.csproj.vspscc
mssccprj.scc
vssver2.scc
Options
vssver2.scc
Player
vssver2.scc
Properties
vssver2.scc
Resources
FillDownHS.png
FillLeftHS.png
Folder256.png
FolderFind.png
FolderOpen256.png
GoLtrHS.png
MoveNext.png
MovePrevious.png
OptionsHS.png
PauseHS.png
PlayHS.png
Slider.gif
Start.png
StopHS.png
vssver2.scc
WinControls
vssver2.scc
WMFSDK
vssver2.scc
BSE.Platten.BO
BSE.Platten.BO.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
BSE.Platten.Common
BSE.Platten.Common.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
Resources
BSEsplash.png
DRIVEDSC.png
DRIVENET.png
Network.png
splash.png
vssver2.scc
BSE.Platten.Covers
BSE.Platten.Covers.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
Settings.settings
vssver2.scc
BSE.Platten.FreeDb
BSE.Platten.FreeDb.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
Resources
OpenCD.png
vssver2.scc
BSE.Platten.Ripper
BSE.Platten.Ripper.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
Resources
OpenCD.png
OptionsHS.png
vssver2.scc
BSE.Platten.Statistik
BSE.Platten.Statistik.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
BSE.Platten.Tunes
BSE.Platten.Tunes.csproj.user
BSE.Platten.Tunes.csproj.vspscc
mssccprj.scc
vssver2.scc
Filters
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
About.png
Album16.gif
AudioCD.png
AudioFile.png
AutoList.png
broadcast.png
BSE.png
BSEAbout.png
BSEsplash.png
BSEtunes.ico
BSE_16.png
cd_hoeren.png
coverflow.png
DataContainer_MoveNextHS.png
delete.gif
diskinfo.png
Filter2HS.png
FindHS.png
Folder256.png
FolderOpen256.png
Genre16.gif
Interpret16.gif
keinBild.gif
NewPlaylist16.gif
OptionsHS.png
PauseHS.png
RefreshDocViewHS.png
Removabledrive.png
saveHS.png
search.png
shuffle.png
Shuffle_icon.png
song.png
splash1.png
StopHS.png
TaskHS.png
TrackInfo.gif
vssver2.scc
wiedergabe16.gif
BSEadminSetup
BSEadminSetup.vdproj
BSEadminSetup.vdproj.vspscc
mssccprj.scc
vssver2.scc
Debug
Release
BSEtunesSetup
BSEtunesSetup.vdproj
BSEtunesSetup.vdproj.vspscc
mssccprj.scc
vssver2.scc
Debug
Release
dll
BSE.CDDrives.DLL
BSE.Charts.DLL
BSE.Configuration.DLL
BSE.RemovableDrives.DLL
BSE.Shell.DLL
BSE.Windows.Forms.DLL
Lame
lame_enc.dll
vssver2.scc
lame-3.97
BSE.Platten_en.zip
BSE.CoverFlow.WPFLib.csproj.user
close.png
exit.png
next.png
next_disabled.png
Note.jpg
pause.png
PlayButton.png
previous.png
previous_disabled.png
stop.png
vssver2.scc
Settings.settings
vssver2.scc
vssver2.scc
BSE.Platten.Admin.csproj.user
Settings.settings
vssver2.scc
Album16.gif
BSEadmin.ico
cdimport.png
cdrip.png
cd_hoeren.png
clearsearch.png
DataContainer_MoveFirsHS.png
DataContainer_MoveLastHS.png
DataContainer_MoveNextHS.png
DataContainer_MovePreviousHS.png
DataContainer_NewRecordHS.png
diskinfo.png
DRIVEDSC.png
DRIVENET.png
Edit_UndoHS.png
exportimage.png
findfile.png
FindHS.png
freedb.png
Genre16.png
Image.png
InsertPictureHS.png
Interpret16.png
OptionsHS.png
PieChart3DHS.png
PieChartHS.png
ProtectFormHS.png
RefreshDocViewHS.png
saveHS.png
search.png
song.png
system.png
tagger.png
tools_16.png
vssver2.scc
BSE.Platten.Admin.WinApp.csproj.user
Settings.settings
vssver2.scc
BSEadmin.ico
vssver2.scc
bse.ico
BSE.Platten.Audio.csproj.user
vssver2.scc
vssver2.scc
vssver2.scc
FillDownHS.png
FillLeftHS.png
Folder256.png
FolderFind.png
FolderOpen256.png
GoLtrHS.png
MoveNext.png
MovePrevious.png
OptionsHS.png
PauseHS.png
PlayHS.png
Slider.gif
Start.png
StopHS.png
vssver2.scc
vssver2.scc
vssver2.scc
BSE.Platten.BO.csproj.user
vssver2.scc
BSE.Platten.Common.csproj.user
vssver2.scc
BSEsplash.png
DRIVEDSC.png
DRIVENET.png
Network.png
splash.png
vssver2.scc
BSE.Platten.Covers.csproj.user
Settings.settings
vssver2.scc
BSE.Platten.FreeDb.csproj.user
vssver2.scc
OpenCD.png
vssver2.scc
AudioWriter
vssver2.scc
BSE.Platten.Ripper.csproj.user
Lame
vssver2.scc
vssver2.scc
OpenCD.png
OptionsHS.png
vssver2.scc
BSE.Platten.Statistik.csproj.user
vssver2.scc
BSE.Platten.Tunes.csproj.user
vssver2.scc
Settings.settings
vssver2.scc
About.png
Album16.gif
AudioCD.png
AudioFile.png
AutoList.png
broadcast.png
BSE.png
BSEAbout.png
BSEsplash.png
BSEtunes.ico
BSE_16.png
cd_hoeren.png
coverflow.png
DataContainer_MoveNextHS.png
delete.gif
diskinfo.png
Filter2HS.png
FindHS.png
Folder256.png
FolderOpen256.png
Genre16.gif
Interpret16.gif
keinBild.gif
NewPlaylist16.gif
OptionsHS.png
PauseHS.png
RefreshDocViewHS.png
Removabledrive.png
saveHS.png
search.png
shuffle.png
Shuffle_icon.png
song.png
splash1.png
StopHS.png
TaskHS.png
TrackInfo.gif
vssver2.scc
wiedergabe16.gif
BSEadminSetup.vdproj
BSEtunesSetup.vdproj
BSE.CDDrives.DLL
BSE.Charts.DLL
BSE.Configuration.DLL
BSE.RemovableDrives.DLL
BSE.Shell.DLL
BSE.ThreadedShell.DLL
BSE.Windows.Forms.DLL
lame_enc.dll
MySQL.chm.zip
MySqlCreateDataBase5x.sql.zip
//Widows Media Format Interfaces
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE. IT CAN BE DISTRIBUTED FREE OF CHARGE AS LONG AS THIS HEADER 
//  REMAINS UNCHANGED.
//
//  Email:  yetiicb@hotmail.com
//
//  Copyright (C) 2002-2004 Idael Cardoso. 
//

using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics.CodeAnalysis;

namespace BSE.Platten.Audio.WMFSDK
{
    /// <summary>
    /// The WM_READER_CLIENTINFO structure describes the client reader (player) accessing the media stream.
    /// </summary>
    /// <remarks>
    /// In earlier versions of this SDK, the pReserved member was named wszHostUniquePID. The application used
    /// this member to specify an ID to send to the server. In the current version, the reader object
    /// automatically generates a GUID for the ID, so this structure member is obsolete. It is present only to
    /// provide binary compatibility with earlier versions of the SDK.
    /// 
    /// The GUID generated by the reader object represents a unique user on a particular computer.
    /// The reader object stores this value in the registry. If the registry entry does not exist, the 
    /// SDK dynamically creates it. For more information, see IWMReaderAdvanced2.SetLogClientID.
    /// </remarks>
    [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")]
    [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
    [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct WM_READER_CLIENTINFO
    {
        /// <summary>
        /// Size of the structure in bytes.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint cbSize;
        /// <summary>
        /// wo-letter or three-letter language code.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wszLang;
        /// <summary>
        /// The browser's user-agent string.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wszBrowserUserAgent;
        /// <summary>
        /// Web page that contains the plug-in.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wszBrowserWebPage;
        /// <summary>
        /// Reserved.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        ulong qwReserved;
        /// <summary>
        /// Unused. See Remarks.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        [SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible")]
        public IntPtr pReserved;
        /// <summary>
        /// Host application's .exe file; for example, Iexplore.exe.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wszHostExe;
        /// <summary>
        /// Version number of the host application. The value is four unsigned WORD values packed into a 64-bit integer.
        /// When the client information is logged, each WORD value is unpacked and translated into its decimal
        /// equivalent. For example, if the value is 0x0001000200030004, the version number is 
        /// logged as "1.2.3.4".
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public ulong qwHostVersion;
        /// <summary>
        /// String identifying the player application. For example, "WMPlayer/9.0.0.0" identifies version 9 of the
        /// Windows Media Player.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        [MarshalAs(UnmanagedType.LPWStr)]
        public string wszPlayerUserAgent;
    };
    /// <summary>
    /// The WM_READER_STATISTICS structure describes the performance of a reading operation.
    /// </summary>
    /// <remarks>
    /// You must set the cbSize member manually before using this structure. It should always be set to sizeof(WM_READER_STATISTICS).
    /// </remarks>
    [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")]
    [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
    [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
    [StructLayout(LayoutKind.Sequential)]
    public struct WM_READER_STATISTICS
    {
        /// <summary>
        /// The size of the WM_READER_STATISTICS structure, in bytes.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint cbSize;
        /// <summary>
        /// DWORD containing the bandwidth, in bits per second.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint dwBandwidth;
        /// <summary>
        /// Count of packets received.
        /// </summary>
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint cPacketsReceived;
        /// <summary>
        /// Count of lost packets which were recovered. This value is only relevant during network playback.
        /// </summary>
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint cPacketsRecovered;
        /// <summary>
        /// Count of lost packets which were not recovered. This value is only relevant during network playback.
        /// </summary>
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint cPacketsLost;
        /// <summary>
        /// WORD containing the quality, which is the percentage of total packets that were received.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
        public uint wQuality;
    };
    /// <summary>
    /// The <b>IWMReaderAllocatorEx</b> interface provides expanded alternatives to the <b>AllocateForOutput</b> and
    /// AllocateForStream methods of the IWMReaderCallbackAdvanced interface. This interface is implemented by
    /// the application, which passes this interface pointer to the synchronous reader object by calling
    /// IWMSyncReader2.SetAllocateForStream or SetAllocateForOutput.
    /// </summary>
    [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
    [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")]
    [ComImport]
    [Guid("9F762FA7-A22E-428d-93C9-AC82F3AAFE5A")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IWMReaderAllocatorEx
    {
        /// <summary>
        /// Allocates a buffer for samples delivered to the IWMReaderCallbackAdvanced.OnStreamSample method.
        /// </summary>
        /// <param name="wStreamNum"><b>WORD</b> containing the stream number.</param>
        /// <param name="cbBuffer">Size of ppBuffer, in bytes.</param>
        /// <param name="ppBuffer">Pointer to a pointer to an <see cref="INSSBuffer"/> object.</param>
        /// <param name="dwFlags"><b>DWORD</b> containing the relevant flags.</param>
        /// <param name="cnsSampleTime">Specifies the sample time, in 100-nanosecond units.</param>
        /// <param name="cnsSampleDuration">Specifies the sample duration, in 100-nanosecond units.</param>
        /// <param name="pvContext">Generic pointer, for use by the application. This pointer is the context pointer
        /// given to the IWMReader.Start method.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")]
        [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms")]
        void AllocateForStreamEx([In] ushort wStreamNum,
                                 [In] uint cbBuffer,
                                 [Out] out INSSBuffer ppBuffer,
                                 [In] uint dwFlags,
                                 [In] ulong cnsSampleTime,
                                 [In] ulong cnsSampleDuration,
                                 [In] IntPtr pvContext);
        /// <summary>
        /// Allocates a buffer for samples delivered to the <b>IWMReaderCallback.OnSample</b> method.
        /// </summary>
        /// <param name="dwOutputNum"><b>DWORD</b> containing the output number.</param>
        /// <param name="cbBuffer">Size of ppBuffer, in bytes.</param>
        /// <param name="ppBuffer">Pointer to a pointer to an <see cref="INSSBuffer"/> object.</param>
        /// <param name="dwFlags"><b>DWORD</b> containing the relevant flags.</param>
        /// <param name="cnsSampleTime">Specifies the sample time, in 100-nanosecond units.</param>
        /// <param name="cnsSampleDuration">Specifies the sample duration, in 100-nanosecond units.</param>
        /// <param name="pvContext">Generic pointer, for use by the application. This pointer is the context pointer
        /// given to the IWMReader.Start method.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")]
        [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms")]
        void AllocateForOutputEx([In] uint dwOutputNum,
                                    [In] uint cbBuffer,
                                    [Out] out INSSBuffer ppBuffer,
                                    [In] uint dwFlags,
                                    [In] ulong cnsSampleTime,
                                    [In] ulong cnsSampleDuration,
                                    [In] IntPtr pvContext);
    }
    /// <summary>
    /// The IWMSyncReader interface provides the ability to read ASF files using synchronous calls. This is in
    /// contrast to many of the methods in IWMReader, which are called asynchronously.
    /// 
    /// You get a pointer to an IWMSyncReader interface when you create a new synchronous reader object with a
    /// call to WMCreateSyncReader.
    /// 
    /// In addition to enabling synchronous reading, the methods of IWMSyncReader are tailored to meet the 
    /// demands of editing applications. Default playback from IWMSyncReader delivers uncompressed samples for 
    /// the default streams of all outputs. However, you can manipulate the selected streams during streaming 
    /// without having to enable manual stream selection. You can also receive compressed or uncompressed samples,
    /// though you cannot change between them during streaming. Samples are delivered by either output number
    /// or stream number, so you can receive uncompressed samples from mutually exclusive streams.
    /// 
    /// Many of the methods in this interface are almost identical to corresponding methods in the asynchronous
    /// reader.
    /// 
    /// Use of this interface, as well as the implementation of an IStream COM object that passes data to this
    /// object, is demonstrated in the WMSyncReader SDK sample.
    /// </summary>
    [ComImport]
    [Guid("9397F121-7705-4dc9-B049-98B698188414")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IWMSyncReader
    {
        /// <summary>
        /// Opens a file for reading.
        /// </summary>
        /// <param name="pwszFilename">Pointer to a wide-character null-terminated string containing the file name
        /// to open. This must be a valid file name with an ASF file extension or an MP3 file name.</param>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void Open([In, MarshalAs(UnmanagedType.LPWStr)] string pwszFilename);
        /// <summary>
        /// Removes a file from the synchronous reader.
        /// </summary>
        void Close();
        /// <summary>
        /// Sets a start time and duration for playback.
        /// </summary>
        /// <param name="cnsStartTime">Offset into the file at which to start playback. This value is measured
        /// in 100-nanosecond units.</param>
        /// <param name="cnsDuration">Duration in 100-nanosecond units, or zero to continue playback to the
        /// end of the file.</param>
        void SetRange([In] ulong cnsStartTime, [In] long cnsDuration);
        /// <summary>
        /// Sets a start time and duration for playback based upon the frame number of a frame-indexed video stream.
        /// </summary>
        /// <param name="wStreamNum">Stream number.</param>
        /// <param name="qwFrameNumber">Frame number at which to begin playback. The first frame in a file is number 1.</param>
        /// <param name="cFramesToRead">Count of frames to read. Pass 0 to continue playback to the
        /// end of the file.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetRangeByFrame([In] ushort wStreamNum, [In] ulong qwFrameNumber, [In]long cFramesToRead);
        /// <summary>
        /// Gets the next sample from the file.
        /// </summary>
        /// <param name="wStreamNum"><b>WORD</b> containing the stream number for which you would like a sample.
        /// If you pass zero, the next sample in the file is returned, regardless of stream number.</param>
        /// <param name="ppSample">Pointer to a buffer that receives the sample. Set to NULL to retrieve the sample
        /// time without getting the sample. If set to NULL, pcnsDuration and pdwFlags must both be set to
        /// NULL as well.</param>
        /// <param name="pcnsSampleTime">Pointer to a QWORD variable that receives the sample time in 100-nanosecond
        /// units.</param>
        /// <param name="pcnsDuration">Pointer to <b>QWORD</b> variable that receives the duration of the sample in
        /// 100-nanosecond units.</param>
        /// <param name="pdwFlags">Pointer to a DWORD containing one or more of the following flags.</param>
        /// <param name="pdwOutputNum">Pointer to a DWORD that receives the output number.</param>
        /// <param name="pwStreamNum">Pointer to a WORD that receives the stream number.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms")]
        void GetNextSample([In] ushort wStreamNum,
                           [Out] out INSSBuffer ppSample,
                           [Out] out ulong pcnsSampleTime,
                           [Out] out ulong pcnsDuration,
                           [Out] out uint pdwFlags,
                           [Out] out uint pdwOutputNum,
                           [Out] out ushort pwStreamNum);
        /// <summary>
        /// Sets the streams for which the reader will deliver samples.
        /// </summary>
        /// <param name="cStreamCount">Count of streams listed at pwStreamNumbers.</param>
        /// <param name="pwStreamNumbers">Pointer to an array of WORD values containing the stream numbers.</param>
        /// <param name="pSelections">Pointer to an array of WMT_STREAM_SELECTION enumeration values. These values
        /// correspond with the stream numbers listed at pwStreamNumbers. Each value specifies the samples
        /// to deliver for the appropriate stream.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetStreamsSelected([In] ushort cStreamCount,
                                [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ushort[] pwStreamNumbers,
                                [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] WMT_STREAM_SELECTION[] pSelections);
        /// <summary>
        /// Retrieves whether or not a particular stream is selected for sample delivery.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="pSelection">Pointer to a variable that receives one member of the WMT_STREAM_SELECTION
        /// enumeration type on output. This value specifies the selection status for the
        /// specified stream.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetStreamSelected([In]ushort wStreamNum,
                               [Out] out WMT_STREAM_SELECTION pSelection);
        /// <summary>
        /// Sets a stream to deliver compressed or uncompressed samples.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="fCompressed">Boolean value that is True if samples will be compressed.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetReadStreamSamples([In] ushort wStreamNum,
                                  [In, MarshalAs(UnmanagedType.Bool)] bool fCompressed);
        /// <summary>
        /// Ascertains whether a stream is configured to deliver uncompressed samples.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="pfCompressed">Pointer to a flag that receives the status of compressed delivery
        /// for the stream specified.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetReadStreamSamples([In] ushort wStreamNum,
                                  [Out, MarshalAs(UnmanagedType.Bool)] out bool pfCompressed);
        /// <summary>
        /// Retrieves a setting for a particular output by name.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pszName">Pointer to a wide-character null-terminated string containing the name of the setting
        /// for which you want the value. For a list of global constants representing setting names,
        /// see Output Settings.</param>
        /// <param name="pType">Pointer to a variable that receives one value from the WMT_ATTR_DATATYPE enumeration
        /// type. The value received specifies the type of data in pValue.</param>
        /// <param name="pValue">Pointer to a byte buffer containing the value. Pass NULL to retrieve the length
        /// of the buffer required.</param>
        /// <param name="pcbLength">On input, pointer to a variable containing the length of pValue. On output,
        /// the variable contains the number of bytes in pValue used.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputSetting([In] uint dwOutputNum,
                              [In, MarshalAs(UnmanagedType.LPWStr)] string pszName,
                              [Out] out WMT_ATTR_DATATYPE pType,
            /*[out, size_is( *pcbLength )]*/ IntPtr pValue,
                              [In, Out] ref uint pcbLength);
        /// <summary>
        /// Sets a named setting for an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pszName">Pointer to a null-terminated string containing the name of the setting.
        /// For a list of global constants representing setting names, see Output Settings.</param>
        /// <param name="Type">Member of the WMT_ATTR_DATATYPE enumeration type. This value specifies the type
        /// of data in the buffer at pValue.</param>
        /// <param name="pValue">Pointer to a byte array containing the value of the setting. The type of data
        /// stored in this buffer is specified by Type.</param>
        /// <param name="cbLength">Size of pValue in bytes.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
        void SetOutputSetting([In] uint dwOutputNum,
                              [In, MarshalAs(UnmanagedType.LPWStr)] string pszName,
                              [In] WMT_ATTR_DATATYPE Type,
                              [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] byte[] pValue,
                              [In] uint cbLength);
        /// <summary>
        /// Retrieves the number of outputs in the file.
        /// </summary>
        /// <param name="pcOutputs">Pointer to a DWORD that receives the number of outputs in the file.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        void GetOutputCount([Out] out uint pcOutputs);
        /// <summary>
        /// Retrieves the current properties of an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="ppOutput">Pointer to a pointer to an IWMOutputMediaProps interface, which is created by
        /// a successful call to this method.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputProps([In] uint dwOutputNum, [Out, MarshalAs(UnmanagedType.Interface)] out IWMOutputMediaProps ppOutput);
        /// <summary>
        /// Sets the properties of an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pOutput">Pointer to an IWMOutputMediaProps interface.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetOutputProps([In] uint dwOutputNum, [In, MarshalAs(UnmanagedType.Interface)] IWMOutputMediaProps pOutput);
        /// <summary>
        /// Retrieves the number of formats supported by an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number for which you want to determine the
        /// number of supported formats.</param>
        /// <param name="pcFormats">Pointer to a DWORD that receives the number of supported formats.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputFormatCount([In] uint dwOutputNum, [Out] out uint pcFormats);
        /// <summary>
        /// Retrieves one output format for one output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="dwFormatNum">DWORD containing the format number.</param>
        /// <param name="ppProps">Pointer to a pointer to an IWMOutputMediaProps interface. This object is
        /// created by a successful call to this method.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputFormat([In] uint dwOutputNum,
                             [In] uint dwFormatNum,
                             [Out, MarshalAs(UnmanagedType.Interface)] out IWMOutputMediaProps ppProps);
        /// <summary>
        /// Retrieves the output number that corresponds to a stream in the file.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number for which you want to retrieve
        /// the corresponding output number.</param>
        /// <param name="pdwOutputNum">Pointer to a DWORD that will receive the output number that corresponds
        /// to the stream number specified in wStreamNum.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputNumberForStream([In] ushort wStreamNum, [Out] out uint pdwOutputNum);
        /// <summary>
        /// Retrieves the current stream number that corresponds to an output number in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD value specifying the output number for which you want to retrieve
        /// a stream number.</param>
        /// <param name="pwStreamNum">Pointer to a WORD value that receives the stream number that corresponds
        /// to the output specified by dwOutput.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetStreamNumberForOutput([In] uint dwOutputNum, [Out] out ushort pwStreamNum);
        /// <summary>
        /// Retrieves the maximum sample size for an output in the file.
        /// </summary>
        /// <param name="dwOutput">DWORD containing the output number for which you want to retrieve
        /// the maximum sample size.</param>
        /// <param name="pcbMax">Pointer to a DWORD value that receives the maximum sample size, in bytes,
        /// for the output specified in dwOutput.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetMaxOutputSampleSize([In] uint dwOutput, [Out] out uint pcbMax);
        /// <summary>
        /// Retrieves the maximum sample size for a stream in the file.
        /// </summary>
        /// <param name="wStream">WORD containing the stream number for which you want to retrieve the
        /// maximum sample size.</param>
        /// <param name="pcbMax">Pointer to a DWORD value that receives the maximum sample size, in bytes,
        /// for the stream specified in wStream.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetMaxStreamSampleSize([In] ushort wStream, [Out] out uint pcbMax);
        /// <summary>
        /// Opens a stream for reading.
        /// </summary>
        /// <param name="pStream">Pointer to an IStream interface.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void OpenStream([In, MarshalAs(UnmanagedType.Interface)] System.Runtime.InteropServices.ComTypes.IStream pStream);
    }
    /// <summary>
    /// The IWMSyncReader2 interface provides advanced features for the synchronous reader. It contains methods
    /// for allocating samples manually and for seeking to SMPTE time codes.
    /// 
    /// An IWMSyncReader2 interface exists for every synchronous reader object. You can obtain a pointer
    /// to an instance of this interface by calling the QueryInterface method of any other interface
    /// of the synchronous reader object.
    /// </summary>
    [ComImport]
    [Guid("faed3d21-1b6b-4af7-8cb6-3e189bbc187b")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IWMSyncReader2 : IWMSyncReader
    {
        /// <summary>
        /// Opens a file for reading.
        /// </summary>
        /// <param name="pwszFilename">Pointer to a wide-character null-terminated string containing the file name
        /// to open. This must be a valid file name with an ASF file extension or an MP3 file name.</param>
        new void Open([In, MarshalAs(UnmanagedType.LPWStr)] string pwszFilename);
        /// <summary>
        /// Removes a file from the synchronous reader.
        /// </summary>
        new void Close();
        /// <summary>
        /// Sets a start time and duration for playback.
        /// </summary>
        /// <param name="cnsStartTime">Offset into the file at which to start playback. This value is measured
        /// in 100-nanosecond units.</param>
        /// <param name="cnsDuration">Duration in 100-nanosecond units, or zero to continue playback to the
        /// end of the file.</param>
        new void SetRange([In] ulong cnsStartTime, [In] long cnsDuration);
        /// <summary>
        /// Sets a start time and duration for playback based upon the frame number of a frame-indexed video stream.
        /// </summary>
        /// <param name="wStreamNum">Stream number.</param>
        /// <param name="qwFrameNumber">Frame number at which to begin playback. The first frame in a file is number 1.</param>
        /// <param name="cFramesToRead">Count of frames to read. Pass 0 to continue playback to the
        /// end of the file.</param>
        new void SetRangeByFrame([In] ushort wStreamNum, [In] ulong qwFrameNumber, [In]long cFramesToRead);
        /// <summary>
        /// Gets the next sample from the file.
        /// </summary>
        /// <param name="wStreamNum"><b>WORD</b> containing the stream number for which you would like a sample.
        /// If you pass zero, the next sample in the file is returned, regardless of stream number.</param>
        /// <param name="ppSample">Pointer to a buffer that receives the sample. Set to NULL to retrieve the sample
        /// time without getting the sample. If set to NULL, pcnsDuration and pdwFlags must both be set to
        /// NULL as well.</param>
        /// <param name="pcnsSampleTime">Pointer to a QWORD variable that receives the sample time in 100-nanosecond
        /// units.</param>
        /// <param name="pcnsDuration">Pointer to <b>QWORD</b> variable that receives the duration of the sample in
        /// 100-nanosecond units.</param>
        /// <param name="pdwFlags">Pointer to a DWORD containing one or more of the following flags.</param>
        /// <param name="pdwOutputNum">Pointer to a DWORD that receives the output number.</param>
        /// <param name="pwStreamNum">Pointer to a WORD that receives the stream number.</param>
        new void GetNextSample([In] ushort wStreamNum,
          [Out] out INSSBuffer ppSample,
          [Out] out ulong pcnsSampleTime,
          [Out] out ulong pcnsDuration,
          [Out] out uint pdwFlags,
          [Out] out uint pdwOutputNum,
          [Out] out ushort pwStreamNum);
        /// <summary>
        /// Sets the streams for which the reader will deliver samples.
        /// </summary>
        /// <param name="cStreamCount">Count of streams listed at pwStreamNumbers.</param>
        /// <param name="pwStreamNumbers">Pointer to an array of WORD values containing the stream numbers.</param>
        /// <param name="pSelections">Pointer to an array of WMT_STREAM_SELECTION enumeration values. These values
        /// correspond with the stream numbers listed at pwStreamNumbers. Each value specifies the samples
        /// to deliver for the appropriate stream.</param>
        new void SetStreamsSelected([In] ushort cStreamCount,
         [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ushort[] pwStreamNumbers,
         [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] WMT_STREAM_SELECTION[] pSelections);
        /// <summary>
        /// Retrieves whether or not a particular stream is selected for sample delivery.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="pSelection">Pointer to a variable that receives one member of the WMT_STREAM_SELECTION
        /// enumeration type on output. This value specifies the selection status for the
        /// specified stream.</param>
        new void GetStreamSelected([In]ushort wStreamNum,
         [Out] out WMT_STREAM_SELECTION pSelection);
        /// <summary>
        /// Sets a stream to deliver compressed or uncompressed samples.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="fCompressed">Boolean value that is True if samples will be compressed.</param>
        new void SetReadStreamSamples([In] ushort wStreamNum,
         [In, MarshalAs(UnmanagedType.Bool)] bool fCompressed);
        /// <summary>
        /// Ascertains whether a stream is configured to deliver uncompressed samples.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="pfCompressed">Pointer to a flag that receives the status of compressed delivery
        /// for the stream specified.</param>
        new void GetReadStreamSamples([In] ushort wStreamNum,
         [Out, MarshalAs(UnmanagedType.Bool)] out bool pfCompressed);
        /// <summary>
        /// Retrieves a setting for a particular output by name.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pszName">Pointer to a wide-character null-terminated string containing the name of the setting
        /// for which you want the value. For a list of global constants representing setting names,
        /// see Output Settings.</param>
        /// <param name="pType">Pointer to a variable that receives one value from the WMT_ATTR_DATATYPE enumeration
        /// type. The value received specifies the type of data in pValue.</param>
        /// <param name="pValue">Pointer to a byte buffer containing the value. Pass NULL to retrieve the length
        /// of the buffer required.</param>
        /// <param name="pcbLength">On input, pointer to a variable containing the length of pValue. On output,
        /// the variable contains the number of bytes in pValue used.</param>
        new void GetOutputSetting([In] uint dwOutputNum,
         [In, MarshalAs(UnmanagedType.LPWStr)] string pszName,
         [Out] out WMT_ATTR_DATATYPE pType,
            /*[out, size_is( *pcbLength )]*/ IntPtr pValue,
         [In, Out] ref uint pcbLength);
        /// <summary>
        /// Sets a named setting for an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pszName">Pointer to a null-terminated string containing the name of the setting.
        /// For a list of global constants representing setting names, see Output Settings.</param>
        /// <param name="Type">Member of the WMT_ATTR_DATATYPE enumeration type. This value specifies the type
        /// of data in the buffer at pValue.</param>
        /// <param name="pValue">Pointer to a byte array containing the value of the setting. The type of data
        /// stored in this buffer is specified by Type.</param>
        /// <param name="cbLength">Size of pValue in bytes.</param>
        new void SetOutputSetting([In] uint dwOutputNum,
         [In, MarshalAs(UnmanagedType.LPWStr)] string pszName,
         [In] WMT_ATTR_DATATYPE Type,
         [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] byte[] pValue,
         [In] uint cbLength);
        /// <summary>
        /// Retrieves the number of outputs in the file.
        /// </summary>
        /// <param name="pcOutputs">Pointer to a DWORD that receives the number of outputs in the file.</param>
        new void GetOutputCount([Out] out uint pcOutputs);
        /// <summary>
        /// Retrieves the current properties of an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="ppOutput">Pointer to a pointer to an IWMOutputMediaProps interface, which is created by
        /// a successful call to this method.</param>
        new void GetOutputProps([In] uint dwOutputNum, [Out, MarshalAs(UnmanagedType.Interface)] out IWMOutputMediaProps ppOutput);
        /// <summary>
        /// Sets the properties of an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pOutput">Pointer to an IWMOutputMediaProps interface.</param>
        new void SetOutputProps([In] uint dwOutputNum, [In, MarshalAs(UnmanagedType.Interface)] IWMOutputMediaProps pOutput);
        /// <summary>
        /// Retrieves the number of formats supported by an output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number for which you want to determine the
        /// number of supported formats.</param>
        /// <param name="pcFormats">Pointer to a DWORD that receives the number of supported formats.</param>
        new void GetOutputFormatCount([In] uint dwOutputNum, [Out] out uint pcFormats);
        /// <summary>
        /// Retrieves one output format for one output in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="dwFormatNum">DWORD containing the format number.</param>
        /// <param name="ppProps">Pointer to a pointer to an IWMOutputMediaProps interface. This object is
        /// created by a successful call to this method.</param>
        new void GetOutputFormat([In] uint dwOutputNum,
         [In] uint dwFormatNum,
         [Out, MarshalAs(UnmanagedType.Interface)] out IWMOutputMediaProps ppProps);
        /// <summary>
        /// Retrieves the output number that corresponds to a stream in the file.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number for which you want to retrieve
        /// the corresponding output number.</param>
        /// <param name="pdwOutputNum">Pointer to a DWORD that will receive the output number that corresponds
        /// to the stream number specified in wStreamNum.</param>
        new void GetOutputNumberForStream([In] ushort wStreamNum, [Out] out uint pdwOutputNum);
        /// <summary>
        /// Retrieves the current stream number that corresponds to an output number in the file.
        /// </summary>
        /// <param name="dwOutputNum">DWORD value specifying the output number for which you want to retrieve
        /// a stream number.</param>
        /// <param name="pwStreamNum">Pointer to a WORD value that receives the stream number that corresponds
        /// to the output specified by dwOutput.</param>
        new void GetStreamNumberForOutput([In] uint dwOutputNum, [Out] out ushort pwStreamNum);
        /// <summary>
        /// Retrieves the maximum sample size for an output in the file.
        /// </summary>
        /// <param name="dwOutput">DWORD containing the output number for which you want to retrieve
        /// the maximum sample size.</param>
        /// <param name="pcbMax">Pointer to a DWORD value that receives the maximum sample size, in bytes,
        /// for the output specified in dwOutput.</param>
        new void GetMaxOutputSampleSize([In] uint dwOutput, [Out] out uint pcbMax);
        /// <summary>
        /// Retrieves the maximum sample size for a stream in the file.
        /// </summary>
        /// <param name="wStream">WORD containing the stream number for which you want to retrieve the
        /// maximum sample size.</param>
        /// <param name="pcbMax">Pointer to a DWORD value that receives the maximum sample size, in bytes,
        /// for the stream specified in wStream.</param>
        new void GetMaxStreamSampleSize([In] ushort wStream, [Out] out uint pcbMax);
        /// <summary>
        /// Opens a stream for reading.
        /// </summary>
        /// <param name="pStream">Pointer to an IStream interface.</param>
        new void OpenStream([In, MarshalAs(UnmanagedType.Interface)] System.Runtime.InteropServices.ComTypes.IStream pStream);
        /// <summary>
        /// Sets a start time and duration for playback using SMPTE time codes.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="pStart">Pointer to a WMT_TIMECODE_EXTENSION_DATA structure containing
        /// the starting time code.</param>
        /// <param name="pEnd">Pointer to a WMT_TIMECODE_EXTENSION_DATA structure containing
        /// the ending time code.</param>
        [SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetRangeByTimecode([In] ushort wStreamNum,
                                [In] ref WMT_TIMECODE_EXTENSION_DATA pStart,
                                [In] ref WMT_TIMECODE_EXTENSION_DATA pEnd);
        /// <summary>
        /// Enables you to play a portion of a file specified by frame numbers.
        /// </summary>
        /// <param name="wStreamNum">Stream number.</param>
        /// <param name="qwFrameNumber">Frame number at which to begin playback. The first frame in a file is number 1.</param>
        /// <param name="cFramesToRead">Count of frames to read. Pass 0 to continue playback to the end of the file.</param>
        /// <param name="pcnsStartTime">Start time in 100-nanosecond units.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")]
        void SetRangeByFrameEx([In] ushort wStreamNum,
                               [In] ulong qwFrameNumber,
                               [In] long cFramesToRead,
                               [Out] out ulong pcnsStartTime);
        /// <summary>
        /// Sets an IWMReaderAllocatorEx interface for allocating output samples.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pAllocator">Pointer to an IWMReaderAllocatorEx interface implemented in
        /// your application.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetAllocateForOutput([In] uint dwOutputNum, [In, MarshalAs(UnmanagedType.Interface)] IWMReaderAllocatorEx pAllocator);
        /// <summary>
        /// Retrieves an IWMReaderAllocatorEx interface for allocating output samples.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="ppAllocator">Pointer to a pointer to an IWMReaderAllocatorEx interface.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetAllocateForOutput([In] uint dwOutputNum, [Out, MarshalAs(UnmanagedType.Interface)] out IWMReaderAllocatorEx ppAllocator);
        /// <summary>
        /// Sets an IWMReaderAllocatorEx interface for allocating stream samples.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.</param>
        /// <param name="pAllocator">Pointer to an IWMReaderAllocatorEx interface implemented
        /// in your application.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetAllocateForStream([In] ushort wStreamNum, [In, MarshalAs(UnmanagedType.Interface)] IWMReaderAllocatorEx pAllocator);
        /// <summary>
        /// Retrieves an IWMReaderAllocatorEx interface for allocating stream samples.
        /// </summary>
        /// <param name="dwSreamNum">DWORD containing the stream number.</param>
        /// <param name="ppAllocator">Pointer to a pointer to an IWMReaderAllocatorEx interface.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetAllocateForStream([In] ushort dwSreamNum, [Out, MarshalAs(UnmanagedType.Interface)] out IWMReaderAllocatorEx ppAllocator);
    }
    /// <summary>
    /// The IWMReaderCallback is implemented by the application to handle data being read from a file.
    /// A pointer to the interface is passed to IWMReader.Open.
    /// 
    /// Methods
    /// 
    /// The IWMReaderCallback interface inherits from IWMStatusCallback.
    /// </summary>
    [ComImport]
    [Guid("96406BD8-2B2B-11d3-B36B-00C04F6108FF")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IWMReaderCallback : IWMStatusCallback
    {
        /// <summary>
        /// Called when status information must be communicated to the host application. This happens routinely
        /// when an ASF file is being opened and read, and when errors occur during reading.
        /// </summary>
        /// <param name="Status">One member of the WMT_STATUS enumeration type. For a description of possible
        /// WMT_STATUS values, see the tables in the Remarks section.</param>
        /// <param name="hr">HRESULT error code. If this indicates failure, you should not process the status as normal,
        /// as some error has occurred. Use if (FAILED(hr)) to check for a failed value. See the topic Error Codes
        /// for a list of possible results.</param>
        /// <param name="dwType">Member of the WMT_ATTR_DATATYPE enumeration type. This value specifies
        /// the type of data in the buffer at pValue.</param>
        /// <param name="pValue">Pointer to a byte array containing the value. The contents of this array
        /// depend on the value of Status and the value of dwType.</param>
        /// <param name="pvContext">Generic pointer provided by the application, for its own use. This pointer matches
        /// the context pointer given to the IWMReader::Open, IWMIndexer.StartIndexing, and other methods.
        /// The SDK makes no assumptions about the use of this pointer; it is simply provided by the application
        /// and passed back to the application when a callback is made.</param>
        new void OnStatus([In] WMT_STATUS Status,
         [In] IntPtr hr,
         [In] WMT_ATTR_DATATYPE dwType,
         [In] IntPtr pValue,
         [In] IntPtr pvContext);
        /// <summary>
        /// Called during the reading of a file (due to a Start call) indicating that new uncompressed data
        /// is available.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the number of the output to which the sample belongs.</param>
        /// <param name="cnsSampleTime">QWORD containing the sample time, in 100-nanosecond units.</param>
        /// <param name="cnsSampleDuration">QWORD containing the sample duration, in 100-nanosecond units. For video
        /// streams, if the SampleDuration data unit extension was set on this sample when the file was created,
        /// then this parameter will contain that value. For more information on SampleDuration ,
        /// see INSSBuffer3.GetProperty.</param>
        /// <param name="dwFlags">he flags that can be specified in dwFlags have the following uses.</param>
        /// <param name="pSample">Pointer to the INSSBuffer interface of an object containing the sample.
        /// The reader calls SAFE_RELEASE on this pointer after your OnSample method returns. You can call
        /// AddRef on this pointer if you need to keep a reference count on the buffer. Do not call Release
        /// on this pointer unless you have called AddRef.</param>
        /// <param name="pvContext">Generic pointer, for use by the application. This pointer is the context
        /// pointer given to the IWMReader::Start method.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms")]
        void OnSample([In] uint dwOutputNum,
                      [In] ulong cnsSampleTime,
                      [In] ulong cnsSampleDuration,
                      [In] uint dwFlags,
                      [In, MarshalAs(UnmanagedType.Interface)] INSSBuffer pSample,
                      [In] IntPtr pvContext);
    }
    /// <summary>
    /// The IWMReader interface is used to open, close, start, pause, resume, and unlock the WMReader object.
    /// It is also used to stop reading files, and to get and set the output properties.
    /// 
    /// Many of the methods in this interface are asynchronous and send status notifications to the application
    /// through an IWMStatusCallback::OnStatus method implemented in the application.
    /// Methods
    /// 
    /// The IWMReader interface inherits the methods of the IUnknown interface.
    /// </summary>
    [ComImport]
    [Guid("96406BD6-2B2B-11d3-B36B-00C04F6108FF")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IWMReader
    {
        /// <summary>
        /// Opens an ASF file for reading.
        /// </summary>
        /// <param name="pwszURL">Pointer to a wide-character null-terminated string containing the path and name
        /// of the file to be opened. This method accepts a path to a folder on a local machine, a path to
        /// a network share, or a uniform resource locator (URL).</param>
        /// <param name="pCallback">Pointer to the object that implements the IWMReaderCallback interface.</param>
        /// <param name="pvContext">Generic pointer, for use by the application. This is passed to the application
        /// in calls to OnStatus.</param>
        [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
        void Open([In, MarshalAs(UnmanagedType.LPWStr)] string pwszURL,
                  [In, MarshalAs(UnmanagedType.Interface)] IWMReaderCallback pCallback,
                  [In] IntPtr pvContext);
        /// <summary>
        /// Deletes all outputs on the reader and releases the file resources.
        /// </summary>
        void Close();
        /// <summary>
        /// Retrieves the number of uncompressed media streams sent from the reader.
        /// </summary>
        /// <param name="pcOutputs">Pointer to a count of outputs.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        void GetOutputCount([Out] out uint pcOutputs);
        /// <summary>
        /// Retrieves the current properties of an uncompressed output stream.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="ppOutput">Pointer to a pointer to an IWMOutputMediaProps interface. This interface belongs to
        /// an output media properties object created by a successful call to this method. Any changes made to
        /// the output media properties object will have no effect on the output of the reader unless you pass
        /// this interface in a call to IWMReader.SetOutputProps.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputProps([In] uint dwOutputNum,
                            [Out, MarshalAs(UnmanagedType.Interface)] out IWMOutputMediaProps ppOutput);
        /// <summary>
        /// Specifies the properties of an uncompressed output stream.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="pOutput">Pointer to an IWMOutputMediaProps interface.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetOutputProps([In] uint dwOutputNum,
                            [In, MarshalAs(UnmanagedType.Interface)] IWMOutputMediaProps pOutput);
        /// <summary>
        /// Retrieves the number of format types supported by this output media stream on the reader.
        /// </summary>
        /// <param name="dwOutputNumber">DWORD containing the output number.</param>
        /// <param name="pcFormats">Pointer to a count of formats.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputFormatCount([In] uint dwOutputNumber, [Out] out uint pcFormats);
        /// <summary>
        /// Retrieves the supported formats for a specified output media stream.
        /// </summary>
        /// <param name="dwOutputNumber">DWORD containing the output number.</param>
        /// <param name="dwFormatNumber">DWORD containing the format number.</param>
        /// <param name="ppProps">Pointer to a pointer to an IWMOutputMediaProps interface. This interface belongs
        /// to an output media properties object created by a successful call to this method. The properties
        /// exposed by this interface represent formats than can be supported by the specified output;
        /// the current properties set for the output can be obtained by calling IWMReader.GetOutputProps.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetOutputFormat([In] uint dwOutputNumber,
                             [In] uint dwFormatNumber,
                             [Out, MarshalAs(UnmanagedType.Interface)] out IWMOutputMediaProps ppProps);
        /// <summary>
        /// Starts reading from the current time offset. Uncompressed data is passed to IWMReaderCallback.OnSample.
        /// </summary>
        /// <param name="cnsStart">Time within the file at which to start reading, in 100-nanosecond units.
        /// If cnsStart is set to WM_START_CURRENTPOSITION, playback starts from the current position.</param>
        /// <param name="cnsDuration">Duration of the read in 100-nanosecond units, or zero to read to the end
        /// of the file.</param>
        /// <param name="fRate">Playback speed. Normal speed is 1.0. Higher numbers cause faster playback,
        /// and numbers less than zero indicate reverse rate (rewinding). The valid ranges are 1.0 through 10.0, and -1.0 through -10.0.</param>
        /// <param name="pvContext">Generic pointer, for use by the application. This pointer is passed back to
        /// the OnSample method.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void Start([In] ulong cnsStart,
                   [In] ulong cnsDuration,
                   [In] float fRate,
                   [In] IntPtr pvContext);
        /// <summary>
        /// Stops reading, after which there is no current read position.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords")]
        void Stop();
        /// <summary>
        /// Pauses the current read operation.
        /// </summary>
        void Pause();
        /// <summary>
        /// Restarts read operation from the current time offset.
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords")]
        void Resume();
    }
    /// <summary>
    /// A call to QueryInterface from a reader object exposes the advanced functionality described in this
    /// section.
    /// Methods
    /// 
    /// The IWMReaderAdvanced interface inherits the methods of the IUnknown interface.
    /// </summary>
    [ComImport]
    [Guid("96406BEA-2B2B-11d3-B36B-00C04F6108FF")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IWMReaderAdvanced
    {
        /// <summary>
        /// Specifies that a clock provided by the application is to be used.
        /// </summary>
        /// <param name="fUserClock">Boolean value that is True if an application-provided clock is to be used.</param>
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetUserProvidedClock([In, MarshalAs(UnmanagedType.Bool)] bool fUserClock);
        /// <summary>
        /// Ascertains whether a user-provided clock has been specified.
        /// </summary>
        /// <param name="pfUserClock">Pointer to a Boolean value that is set to True if a user-provided clock has
        /// been specified.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        void GetUserProvidedClock([Out, MarshalAs(UnmanagedType.Bool)] out bool pfUserClock);
        /// <summary>
        /// Provides the reader with a clock time. This is used only when the application is providing the clock.
        /// </summary>
        /// <param name="cnsTime">The time, in 100-nanosecond units.</param>
        void DeliverTime([In] ulong cnsTime);
        /// <summary>
        /// Specifies whether stream selection is to be controlled manually.
        /// </summary>
        /// <param name="fSelection">Boolean value that is True if manual selection is specified.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetManualStreamSelection([In, MarshalAs(UnmanagedType.Bool)] bool fSelection);
        /// <summary>
        /// Ascertains whether manual stream selection has been specified.
        /// </summary>
        /// <param name="pfSelection">Pointer to a Boolean value that is True if manual selection has
        /// been specified.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        void GetManualStreamSelection([Out, MarshalAs(UnmanagedType.Bool)] out bool pfSelection);
        /// <summary>
        /// Enables the selected state of a stream to be changed.
        /// </summary>
        /// <param name="cStreamCount">WORD containing the count of stream numbers in the pwStreamNumbers array.</param>
        /// <param name="pwStreamNumbers">Pointer to an array containing the stream numbers. Stream numbers are
        /// in the range of 1 through 63.</param>
        /// <param name="pSelections">Pointer to an array, of equal length to pwStreamNumbers, with each entry
        /// containing one member of the WMT_STREAM_SELECTION enumeration type.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetStreamsSelected([In] ushort cStreamCount,
                                [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] ushort[] pwStreamNumbers,
                                [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] WMT_STREAM_SELECTION[] pSelections);
        /// <summary>
        /// Ascertains whether a particular stream is currently selected. This can be used only when manual stream
        /// selection is specified.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number. Stream numbers are in the range of 1
        /// through 63.</param>
        /// <param name="pSelection">Pointer to one member of the WMT_STREAM_SELECTION enumeration type.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetStreamSelected([In] ushort wStreamNum, [Out] out WMT_STREAM_SELECTION pSelection);
        /// <summary>
        /// Specifies a flag indicating whether receiving selection callbacks is to be activated.
        /// </summary>
        /// <param name="fGetCallbacks">Boolean value that is True if stream selections must generate callbacks.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetReceiveSelectionCallbacks([In, MarshalAs(UnmanagedType.Bool)] bool fGetCallbacks);
        /// <summary>
        /// Retrieves a flag that indicates whether receiving stream selection notifications has been specified.
        /// </summary>
        /// <param name="pfGetCallbacks">Pointer to a Boolean value that is set to True if stream selection
        /// notifications are sent to IWMReaderCallbackAdvanced.OnStreamSelection.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        void GetReceiveSelectionCallbacks([Out, MarshalAs(UnmanagedType.Bool)] out bool pfGetCallbacks);
        /// <summary>
        /// Specifies whether the reader must deliver compressed stream samples to the callback.
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number. Stream numbers are in the range of 1 through 63.</param>
        /// <param name="fReceiveStreamSamples">Boolean value that is True if stream samples are delivered.</param>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void SetReceiveStreamSamples([In] ushort wStreamNum, [In, MarshalAs(UnmanagedType.Bool)] bool fReceiveStreamSamples);
        /// <summary>
        /// Ascertains whether the reader is configured to deliver stream samples (compressed samples).
        /// </summary>
        /// <param name="wStreamNum">WORD containing the stream number.
        /// Stream numbers are in the range of 1 through 63.</param>
        /// <param name="pfReceiveStreamSamples">Pointer to a Boolean value that is set to True if stream
        /// samples are delivered to OnStreamSample.</param>
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
        void GetReceiveStreamSamples([In] ushort wStreamNum, [Out, MarshalAs(UnmanagedType.Bool)] out bool pfReceiveStreamSamples);
        /// <summary>
        /// Specifies whether to allocate buffers from the user-supplied callback, or internally, for output samples.
        /// </summary>
        /// <param name="dwOutputNum">DWORD containing the output number.</param>
        /// <param name="fAllocate">Boolean value that is True if the reader gets buffers from your application.</param>