diff --git a/Bindings/PortAudio.hsc b/Bindings/PortAudio.hsc
--- a/Bindings/PortAudio.hsc
+++ b/Bindings/PortAudio.hsc
@@ -1,250 +1,250 @@
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-#include <bindings.dsl.h>
-#include <portaudio.h>
-module Bindings.PortAudio where
-import Foreign.Ptr
-#strict_import
-
-#synonym_t PaStream, ()
-
-#ccall Pa_GetVersion , IO CInt
-#ccall Pa_GetVersionText , IO CString
-{- typedef int PaError; -}
-#synonym_t PaError , CInt
-{- typedef enum PaErrorCode {
-            paNoError = 0,
-            paNotInitialized = -10000,
-            paUnanticipatedHostError,
-            paInvalidChannelCount,
-            paInvalidSampleRate,
-            paInvalidDevice,
-            paInvalidFlag,
-            paSampleFormatNotSupported,
-            paBadIODeviceCombination,
-            paInsufficientMemory,
-            paBufferTooBig,
-            paBufferTooSmall,
-            paNullCallback,
-            paBadStreamPtr,
-            paTimedOut,
-            paInternalError,
-            paDeviceUnavailable,
-            paIncompatibleHostApiSpecificStreamInfo,
-            paStreamIsStopped,
-            paStreamIsNotStopped,
-            paInputOverflowed,
-            paOutputUnderflowed,
-            paHostApiNotFound,
-            paInvalidHostApi,
-            paCanNotReadFromACallbackStream,
-            paCanNotWriteToACallbackStream,
-            paCanNotReadFromAnOutputOnlyStream,
-            paCanNotWriteToAnInputOnlyStream,
-            paIncompatibleStreamHostApi,
-            paBadBufferPtr
-        } PaErrorCode; -}
-#integral_t enum PaErrorCode
-#num paNoError
-#num paNotInitialized
-#num paUnanticipatedHostError
-#num paInvalidChannelCount
-#num paInvalidSampleRate
-#num paInvalidDevice
-#num paInvalidFlag
-#num paSampleFormatNotSupported
-#num paBadIODeviceCombination
-#num paInsufficientMemory
-#num paBufferTooBig
-#num paBufferTooSmall
-#num paNullCallback
-#num paBadStreamPtr
-#num paTimedOut
-#num paInternalError
-#num paDeviceUnavailable
-#num paIncompatibleHostApiSpecificStreamInfo
-#num paStreamIsStopped
-#num paStreamIsNotStopped
-#num paInputOverflowed
-#num paOutputUnderflowed
-#num paHostApiNotFound
-#num paInvalidHostApi
-#num paCanNotReadFromACallbackStream
-#num paCanNotWriteToACallbackStream
-#num paCanNotReadFromAnOutputOnlyStream
-#num paCanNotWriteToAnInputOnlyStream
-#num paIncompatibleStreamHostApi
-#num paBadBufferPtr
-#ccall Pa_GetErrorText , CInt -> IO CString
-#ccall Pa_Initialize , IO CInt
-#ccall Pa_Terminate , IO CInt
-{- typedef int PaDeviceIndex; -}
-#synonym_t PaDeviceIndex , CInt
-{- typedef int PaHostApiIndex; -}
-#synonym_t PaHostApiIndex , CInt
-#ccall Pa_GetHostApiCount , IO CInt
-#ccall Pa_GetDefaultHostApi , IO CInt
-{- typedef enum PaHostApiTypeId {
-            paInDevelopment = 0,
-            paDirectSound = 1,
-            paMME = 2,
-            paASIO = 3,
-            paSoundManager = 4,
-            paCoreAudio = 5,
-            paOSS = 7,
-            paALSA = 8,
-            paAL = 9,
-            paBeOS = 10,
-            paWDMKS = 11,
-            paJACK = 12,
-            paWASAPI = 13,
-            paAudioScienceHPI = 14
-        } PaHostApiTypeId; -}
-#integral_t enum PaHostApiTypeId
-#num paInDevelopment
-#num paDirectSound
-#num paMME
-#num paASIO
-#num paSoundManager
-#num paCoreAudio
-#num paOSS
-#num paALSA
-#num paAL
-#num paBeOS
-#num paWDMKS
-#num paJACK
-#num paWASAPI
-#num paAudioScienceHPI
-{- typedef struct PaHostApiInfo {
-            int structVersion;
-            PaHostApiTypeId type;
-            const char * name;
-            int deviceCount;
-            PaDeviceIndex defaultInputDevice;
-            PaDeviceIndex defaultOutputDevice;
-        } PaHostApiInfo; -}
-#starttype struct PaHostApiInfo
-#field structVersion , CInt
-#field type , <enum PaHostApiTypeId>
-#field name , CString
-#field deviceCount , CInt
-#field defaultInputDevice , CInt
-#field defaultOutputDevice , CInt
-#stoptype
-#ccall Pa_GetHostApiInfo , CInt -> IO (Ptr <struct PaHostApiInfo>)
-#ccall Pa_HostApiTypeIdToHostApiIndex , <enum PaHostApiTypeId> -> IO CInt
-#ccall Pa_HostApiDeviceIndexToDeviceIndex , CInt -> CInt -> IO CInt
-{- typedef struct PaHostErrorInfo {
-            PaHostApiTypeId hostApiType;
-            long errorCode;
-            const char * errorText;
-        } PaHostErrorInfo; -}
-#starttype struct PaHostErrorInfo
-#field hostApiType , <enum PaHostApiTypeId>
-#field errorCode , CLong
-#field errorText , CString
-#stoptype
-#ccall Pa_GetLastHostErrorInfo , IO (Ptr <struct PaHostErrorInfo>)
-#ccall Pa_GetDeviceCount , IO CInt
-#ccall Pa_GetDefaultInputDevice , IO CInt
-#ccall Pa_GetDefaultOutputDevice , IO CInt
-{- typedef double PaTime; -}
-#synonym_t PaTime , CDouble
-{- typedef unsigned long PaSampleFormat; -}
-#synonym_t PaSampleFormat , CULong
-{- typedef struct PaDeviceInfo {
-            int structVersion;
-            const char * name;
-            PaHostApiIndex hostApi;
-            int maxInputChannels;
-            int maxOutputChannels;
-            PaTime defaultLowInputLatency;
-            PaTime defaultLowOutputLatency;
-            PaTime defaultHighInputLatency;
-            PaTime defaultHighOutputLatency;
-            double defaultSampleRate;
-        } PaDeviceInfo; -}
-#starttype struct PaDeviceInfo
-#field structVersion , CInt
-#field name , CString
-#field hostApi , CInt
-#field maxInputChannels , CInt
-#field maxOutputChannels , CInt
-#field defaultLowInputLatency , CDouble
-#field defaultLowOutputLatency , CDouble
-#field defaultHighInputLatency , CDouble
-#field defaultHighOutputLatency , CDouble
-#field defaultSampleRate , CDouble
-#stoptype
-#ccall Pa_GetDeviceInfo , CInt -> IO (Ptr <struct PaDeviceInfo>)
-{- typedef struct PaStreamParameters {
-            PaDeviceIndex device;
-            int channelCount;
-            PaSampleFormat sampleFormat;
-            PaTime suggestedLatency;
-            void * hostApiSpecificStreamInfo;
-        } PaStreamParameters; -}
-#starttype struct PaStreamParameters
-#field device , CInt
-#field channelCount , CInt
-#field sampleFormat , CULong
-#field suggestedLatency , CDouble
-#field hostApiSpecificStreamInfo , Ptr ()
-#stoptype
-#ccall Pa_IsFormatSupported , Ptr <struct PaStreamParameters> -> Ptr <struct PaStreamParameters> -> CDouble -> IO CInt
-{- typedef void PaStream; -}
-{- typedef unsigned long PaStreamFlags; -}
-#synonym_t PaStreamFlags , CULong
-{- typedef struct PaStreamCallbackTimeInfo {
-            PaTime inputBufferAdcTime;
-            PaTime currentTime;
-            PaTime outputBufferDacTime;
-        } PaStreamCallbackTimeInfo; -}
-#starttype struct PaStreamCallbackTimeInfo
-#field inputBufferAdcTime , CDouble
-#field currentTime , CDouble
-#field outputBufferDacTime , CDouble
-#stoptype
-{- typedef unsigned long PaStreamCallbackFlags; -}
-#synonym_t PaStreamCallbackFlags , CULong
-{- typedef enum PaStreamCallbackResult {
-            paContinue = 0, paComplete = 1, paAbort = 2
-        } PaStreamCallbackResult; -}
-#integral_t enum PaStreamCallbackResult
-#num paContinue
-#num paComplete
-#num paAbort
-
-#callback PaStreamCallback, Ptr () -> Ptr () -> CULong -> Ptr C'PaStreamCallbackTimeInfo -> C'PaStreamCallbackFlags -> Ptr () -> IO <PaStreamCallbackResult>
-
-#callback PaStreamFinishedCallback, Ptr () -> IO ()
-
-#ccall Pa_OpenStream , Ptr (Ptr <PaStream>) -> Ptr <struct PaStreamParameters> -> Ptr <struct PaStreamParameters> -> CDouble -> CULong -> CULong -> <PaStreamCallback> -> Ptr () -> IO CInt
-#ccall Pa_OpenDefaultStream , Ptr (Ptr <PaStream>) -> CInt -> CInt -> CULong -> CDouble -> CULong -> <PaStreamCallback> -> Ptr () -> IO CInt
-#ccall Pa_CloseStream , Ptr <PaStream> -> IO CInt
-#ccall Pa_SetStreamFinishedCallback , Ptr <PaStream> -> Ptr <PaStreamFinishedCallback> -> IO CInt
-#ccall Pa_StartStream , Ptr <PaStream> -> IO CInt
-#ccall Pa_StopStream , Ptr <PaStream> -> IO CInt
-#ccall Pa_AbortStream , Ptr <PaStream> -> IO CInt
-#ccall Pa_IsStreamStopped , Ptr <PaStream> -> IO CInt
-#ccall Pa_IsStreamActive , Ptr <PaStream> -> IO CInt
-{- typedef struct PaStreamInfo {
-            int structVersion;
-            PaTime inputLatency;
-            PaTime outputLatency;
-            double sampleRate;
-        } PaStreamInfo; -}
-#starttype struct PaStreamInfo
-#field structVersion , CInt
-#field inputLatency , CDouble
-#field outputLatency , CDouble
-#field sampleRate , CDouble
-#stoptype
-#ccall Pa_GetStreamInfo , Ptr <PaStream> -> IO (Ptr <struct PaStreamInfo>)
-#ccall Pa_GetStreamTime , Ptr <PaStream> -> IO CDouble
-#ccall Pa_GetStreamCpuLoad , Ptr <PaStream> -> IO CDouble
-#ccall Pa_ReadStream , Ptr <PaStream> -> Ptr () -> CULong -> IO CInt
-#ccall Pa_WriteStream , Ptr <PaStream> -> Ptr () -> CULong -> IO CInt
-#ccall Pa_GetStreamReadAvailable , Ptr <PaStream> -> IO CLong
-#ccall Pa_GetStreamWriteAvailable , Ptr <PaStream> -> IO CLong
-#ccall Pa_GetSampleSize , CULong -> IO CInt
-#ccall Pa_Sleep , CLong -> IO ()
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+#include <bindings.dsl.h>
+#include <portaudio.h>
+module Bindings.PortAudio where
+import Foreign.Ptr
+#strict_import
+
+#synonym_t PaStream, ()
+
+#ccall Pa_GetVersion , IO CInt
+#ccall Pa_GetVersionText , IO CString
+{- typedef int PaError; -}
+#synonym_t PaError , CInt
+{- typedef enum PaErrorCode {
+            paNoError = 0,
+            paNotInitialized = -10000,
+            paUnanticipatedHostError,
+            paInvalidChannelCount,
+            paInvalidSampleRate,
+            paInvalidDevice,
+            paInvalidFlag,
+            paSampleFormatNotSupported,
+            paBadIODeviceCombination,
+            paInsufficientMemory,
+            paBufferTooBig,
+            paBufferTooSmall,
+            paNullCallback,
+            paBadStreamPtr,
+            paTimedOut,
+            paInternalError,
+            paDeviceUnavailable,
+            paIncompatibleHostApiSpecificStreamInfo,
+            paStreamIsStopped,
+            paStreamIsNotStopped,
+            paInputOverflowed,
+            paOutputUnderflowed,
+            paHostApiNotFound,
+            paInvalidHostApi,
+            paCanNotReadFromACallbackStream,
+            paCanNotWriteToACallbackStream,
+            paCanNotReadFromAnOutputOnlyStream,
+            paCanNotWriteToAnInputOnlyStream,
+            paIncompatibleStreamHostApi,
+            paBadBufferPtr
+        } PaErrorCode; -}
+#integral_t enum PaErrorCode
+#num paNoError
+#num paNotInitialized
+#num paUnanticipatedHostError
+#num paInvalidChannelCount
+#num paInvalidSampleRate
+#num paInvalidDevice
+#num paInvalidFlag
+#num paSampleFormatNotSupported
+#num paBadIODeviceCombination
+#num paInsufficientMemory
+#num paBufferTooBig
+#num paBufferTooSmall
+#num paNullCallback
+#num paBadStreamPtr
+#num paTimedOut
+#num paInternalError
+#num paDeviceUnavailable
+#num paIncompatibleHostApiSpecificStreamInfo
+#num paStreamIsStopped
+#num paStreamIsNotStopped
+#num paInputOverflowed
+#num paOutputUnderflowed
+#num paHostApiNotFound
+#num paInvalidHostApi
+#num paCanNotReadFromACallbackStream
+#num paCanNotWriteToACallbackStream
+#num paCanNotReadFromAnOutputOnlyStream
+#num paCanNotWriteToAnInputOnlyStream
+#num paIncompatibleStreamHostApi
+#num paBadBufferPtr
+#ccall Pa_GetErrorText , CInt -> IO CString
+#ccall Pa_Initialize , IO CInt
+#ccall Pa_Terminate , IO CInt
+{- typedef int PaDeviceIndex; -}
+#synonym_t PaDeviceIndex , CInt
+{- typedef int PaHostApiIndex; -}
+#synonym_t PaHostApiIndex , CInt
+#ccall Pa_GetHostApiCount , IO CInt
+#ccall Pa_GetDefaultHostApi , IO CInt
+{- typedef enum PaHostApiTypeId {
+            paInDevelopment = 0,
+            paDirectSound = 1,
+            paMME = 2,
+            paASIO = 3,
+            paSoundManager = 4,
+            paCoreAudio = 5,
+            paOSS = 7,
+            paALSA = 8,
+            paAL = 9,
+            paBeOS = 10,
+            paWDMKS = 11,
+            paJACK = 12,
+            paWASAPI = 13,
+            paAudioScienceHPI = 14
+        } PaHostApiTypeId; -}
+#integral_t enum PaHostApiTypeId
+#num paInDevelopment
+#num paDirectSound
+#num paMME
+#num paASIO
+#num paSoundManager
+#num paCoreAudio
+#num paOSS
+#num paALSA
+#num paAL
+#num paBeOS
+#num paWDMKS
+#num paJACK
+#num paWASAPI
+#num paAudioScienceHPI
+{- typedef struct PaHostApiInfo {
+            int structVersion;
+            PaHostApiTypeId type;
+            const char * name;
+            int deviceCount;
+            PaDeviceIndex defaultInputDevice;
+            PaDeviceIndex defaultOutputDevice;
+        } PaHostApiInfo; -}
+#starttype struct PaHostApiInfo
+#field structVersion , CInt
+#field type , <enum PaHostApiTypeId>
+#field name , CString
+#field deviceCount , CInt
+#field defaultInputDevice , CInt
+#field defaultOutputDevice , CInt
+#stoptype
+#ccall Pa_GetHostApiInfo , CInt -> IO (Ptr <struct PaHostApiInfo>)
+#ccall Pa_HostApiTypeIdToHostApiIndex , <enum PaHostApiTypeId> -> IO CInt
+#ccall Pa_HostApiDeviceIndexToDeviceIndex , CInt -> CInt -> IO CInt
+{- typedef struct PaHostErrorInfo {
+            PaHostApiTypeId hostApiType;
+            long errorCode;
+            const char * errorText;
+        } PaHostErrorInfo; -}
+#starttype struct PaHostErrorInfo
+#field hostApiType , <enum PaHostApiTypeId>
+#field errorCode , CLong
+#field errorText , CString
+#stoptype
+#ccall Pa_GetLastHostErrorInfo , IO (Ptr <struct PaHostErrorInfo>)
+#ccall Pa_GetDeviceCount , IO CInt
+#ccall Pa_GetDefaultInputDevice , IO CInt
+#ccall Pa_GetDefaultOutputDevice , IO CInt
+{- typedef double PaTime; -}
+#synonym_t PaTime , CDouble
+{- typedef unsigned long PaSampleFormat; -}
+#synonym_t PaSampleFormat , CULong
+{- typedef struct PaDeviceInfo {
+            int structVersion;
+            const char * name;
+            PaHostApiIndex hostApi;
+            int maxInputChannels;
+            int maxOutputChannels;
+            PaTime defaultLowInputLatency;
+            PaTime defaultLowOutputLatency;
+            PaTime defaultHighInputLatency;
+            PaTime defaultHighOutputLatency;
+            double defaultSampleRate;
+        } PaDeviceInfo; -}
+#starttype struct PaDeviceInfo
+#field structVersion , CInt
+#field name , CString
+#field hostApi , CInt
+#field maxInputChannels , CInt
+#field maxOutputChannels , CInt
+#field defaultLowInputLatency , CDouble
+#field defaultLowOutputLatency , CDouble
+#field defaultHighInputLatency , CDouble
+#field defaultHighOutputLatency , CDouble
+#field defaultSampleRate , CDouble
+#stoptype
+#ccall Pa_GetDeviceInfo , CInt -> IO (Ptr <struct PaDeviceInfo>)
+{- typedef struct PaStreamParameters {
+            PaDeviceIndex device;
+            int channelCount;
+            PaSampleFormat sampleFormat;
+            PaTime suggestedLatency;
+            void * hostApiSpecificStreamInfo;
+        } PaStreamParameters; -}
+#starttype struct PaStreamParameters
+#field device , CInt
+#field channelCount , CInt
+#field sampleFormat , CULong
+#field suggestedLatency , CDouble
+#field hostApiSpecificStreamInfo , Ptr ()
+#stoptype
+#ccall Pa_IsFormatSupported , Ptr <struct PaStreamParameters> -> Ptr <struct PaStreamParameters> -> CDouble -> IO CInt
+{- typedef void PaStream; -}
+{- typedef unsigned long PaStreamFlags; -}
+#synonym_t PaStreamFlags , CULong
+{- typedef struct PaStreamCallbackTimeInfo {
+            PaTime inputBufferAdcTime;
+            PaTime currentTime;
+            PaTime outputBufferDacTime;
+        } PaStreamCallbackTimeInfo; -}
+#starttype struct PaStreamCallbackTimeInfo
+#field inputBufferAdcTime , CDouble
+#field currentTime , CDouble
+#field outputBufferDacTime , CDouble
+#stoptype
+{- typedef unsigned long PaStreamCallbackFlags; -}
+#synonym_t PaStreamCallbackFlags , CULong
+{- typedef enum PaStreamCallbackResult {
+            paContinue = 0, paComplete = 1, paAbort = 2
+        } PaStreamCallbackResult; -}
+#integral_t enum PaStreamCallbackResult
+#num paContinue
+#num paComplete
+#num paAbort
+
+#callback PaStreamCallback, Ptr () -> Ptr () -> CULong -> Ptr C'PaStreamCallbackTimeInfo -> C'PaStreamCallbackFlags -> Ptr () -> IO <PaStreamCallbackResult>
+
+#callback PaStreamFinishedCallback, Ptr () -> IO ()
+
+#ccall Pa_OpenStream , Ptr (Ptr <PaStream>) -> Ptr <struct PaStreamParameters> -> Ptr <struct PaStreamParameters> -> CDouble -> CULong -> CULong -> <PaStreamCallback> -> Ptr () -> IO CInt
+#ccall Pa_OpenDefaultStream , Ptr (Ptr <PaStream>) -> CInt -> CInt -> CULong -> CDouble -> CULong -> <PaStreamCallback> -> Ptr () -> IO CInt
+#ccall Pa_CloseStream , Ptr <PaStream> -> IO CInt
+#ccall Pa_SetStreamFinishedCallback , Ptr <PaStream> -> Ptr <PaStreamFinishedCallback> -> IO CInt
+#ccall Pa_StartStream , Ptr <PaStream> -> IO CInt
+#ccall Pa_StopStream , Ptr <PaStream> -> IO CInt
+#ccall Pa_AbortStream , Ptr <PaStream> -> IO CInt
+#ccall Pa_IsStreamStopped , Ptr <PaStream> -> IO CInt
+#ccall Pa_IsStreamActive , Ptr <PaStream> -> IO CInt
+{- typedef struct PaStreamInfo {
+            int structVersion;
+            PaTime inputLatency;
+            PaTime outputLatency;
+            double sampleRate;
+        } PaStreamInfo; -}
+#starttype struct PaStreamInfo
+#field structVersion , CInt
+#field inputLatency , CDouble
+#field outputLatency , CDouble
+#field sampleRate , CDouble
+#stoptype
+#ccall Pa_GetStreamInfo , Ptr <PaStream> -> IO (Ptr <struct PaStreamInfo>)
+#ccall Pa_GetStreamTime , Ptr <PaStream> -> IO CDouble
+#ccall Pa_GetStreamCpuLoad , Ptr <PaStream> -> IO CDouble
+#ccall Pa_ReadStream , Ptr <PaStream> -> Ptr () -> CULong -> IO CInt
+#ccall Pa_WriteStream , Ptr <PaStream> -> Ptr () -> CULong -> IO CInt
+#ccall Pa_GetStreamReadAvailable , Ptr <PaStream> -> IO CLong
+#ccall Pa_GetStreamWriteAvailable , Ptr <PaStream> -> IO CLong
+#ccall Pa_GetSampleSize , CULong -> IO CInt
+#ccall Pa_Sleep , CLong -> IO ()
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,8 +1,8 @@
-PortAudio Portable Real-Time Audio Library 
-Copyright (c) 1999-2011 Ross Bencina and Phil Burk
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
+PortAudio Portable Real-Time Audio Library 
+Copyright (c) 1999-2011 Ross Bencina and Phil Burk
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
-bindings-portaudio
-==================
-
-Installation on Windows
-------------------------
-1. Download and unpack the latest [portaudio](http://www.portaudio.com/download.html) at a clear directory (e.g. `C:\portaudio`).
-2. Run `bash configure`, then `make`.
-3. Edit `portaudio-2.0` as follows:
-```
---- prefix=/usr/local
-+++ prefix=C:/portaudio
-
---- libdir=${exec_prefix}/lib
-+++ libdir=${exec_prefix}/lib/.libs
-```
-4. If you don't have pkgconfig, download `pkg-config` from [GTK+ Download: Windows (32-bit)](http://www.gtk.org/download/win32.php) and make sure `pkg-config.exe` is in your `PATH`.
-5. `set PKG_CONFIG_PATH=C:/portaudio`
+bindings-portaudio
+==================
+
+Installation on Windows
+------------------------
+1. Download and unpack the latest [portaudio](http://www.portaudio.com/download.html) at a clear directory (e.g. `C:\portaudio`).
+2. Run `bash configure`, then `make`.
+3. Edit `portaudio-2.0` as follows:
+```
+--- prefix=/usr/local
++++ prefix=C:/portaudio
+
+--- libdir=${exec_prefix}/lib
++++ libdir=${exec_prefix}/lib/.libs
+```
+4. If you don't have pkgconfig, download `pkg-config` from [GTK+ Download: Windows (32-bit)](http://www.gtk.org/download/win32.php) and make sure `pkg-config.exe` is in your `PATH`.
+5. `set PKG_CONFIG_PATH=C:/portaudio`
 6. Run `cabal update && cabal install bindings-portaudio`.
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,2 +1,2 @@
-import Distribution.Simple
-main = defaultMain
+import Distribution.Simple
+main = defaultMain
diff --git a/System/PortAudio.hs b/System/PortAudio.hs
new file mode 100644
--- /dev/null
+++ b/System/PortAudio.hs
@@ -0,0 +1,255 @@
+{-# LANGUAGE CPP, ViewPatterns, FlexibleContexts, ScopedTypeVariables, KindSignatures, TypeFamilies #-}
+{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
+module System.PortAudio(
+  -- * Initialization
+  withPortAudio
+  , Error(..)
+  -- * Devices
+  , getDevices
+  , Device(..)
+  , Input
+  , Output
+  -- * Opening a stream
+  , withStream
+  , StreamCallbackResult(..)
+  -- * Stream parameters
+  , StreamParameters
+  , streamParameters
+  , PortAudioSample
+  , Closed(..)
+  , noConnection
+  -- * Timestamps and status flags
+  , Status(..)
+  -- * Stream flags
+  , StreamFlags
+  , clipOff
+  , ditherOff
+  , neverDropInput
+  , primeOutputBuffersUsingStreamCallback
+  ) where
+
+import Bindings.PortAudio
+import Foreign.C.Types
+import Foreign.C.String
+import Foreign
+import Control.Monad
+import Control.Exception
+import Data.Typeable
+import qualified Data.Vector.Storable as V
+import qualified Data.Vector.Storable.Mutable as MV
+import Data.Foldable as F
+#if !MIN_VERSION_base(4,8,0)
+import Data.Int
+import Data.Word
+import Data.Proxy
+#endif
+
+data Error = NotInitialized
+  | UnanticipatedHostError
+  | InvalidChannelCount
+  | InvalidSampleRate
+  | InvalidDevice
+  | InvalidFlag
+  | SampleFormatNotSupported
+  | BadIODeviceCombination
+  | InsufficientMemory
+  | BufferTooBig
+  | BufferTooSmall
+  | NullCallback
+  | BadStreamPtr
+  | TimedOut
+  | InternalError
+  | DeviceUnavailable
+  | IncompatibleHostApiSpecificStreamInfo
+  | StreamIsStopped
+  | StreamIsNotStopped
+  | InputOverflowed
+  | OutputUnderflowed
+  | HostApiNotFound
+  | InvalidHostApi
+  | CanNotReadFromACallbackStream
+  | CanNotWriteToACallbackStream
+  | CanNotReadFromAnOutputOnlyStream
+  | CanNotWriteToAnInputOnlyStream
+  | IncompatibleStreamHostApi
+  | BadBufferPtr
+  deriving (Show, Eq, Ord, Enum, Typeable)
+
+instance Exception Error
+
+fromErrorCode :: CInt -> Error
+fromErrorCode n = toEnum (fromIntegral n + 10000)
+
+data Device t = Device {
+  deviceIndex :: CInt
+  , deviceName :: String
+  , deviceMaxChannels :: Int
+  , deviceLowLatency :: Double
+  , deviceHighLatency :: Double
+  , deviceDefaultSampleRate :: Double
+  } deriving (Show, Eq, Ord)
+
+data Input
+data Output
+
+getDevices :: IO ([Device Input], [Device Output])
+getDevices = do
+  n <- c'Pa_GetDeviceCount
+  foldM addDevice ([], []) [0..n-1]
+  where
+    addDevice (xs, ys) i = do
+      info <- c'Pa_GetDeviceInfo i >>= peek
+      name <- peekCAString $ c'PaDeviceInfo'name info
+      let chi = c'PaDeviceInfo'maxInputChannels info
+      let cho = c'PaDeviceInfo'maxOutputChannels info
+      return (if chi > 0
+        then Device i name (fromIntegral chi)
+          (realToFrac $ c'PaDeviceInfo'defaultLowInputLatency info)
+          (realToFrac $ c'PaDeviceInfo'defaultHighInputLatency info)
+          (realToFrac $ c'PaDeviceInfo'defaultSampleRate info) : xs
+        else xs
+        , if cho > 0
+          then Device i name (fromIntegral cho)
+            (realToFrac $ c'PaDeviceInfo'defaultLowOutputLatency info)
+            (realToFrac $ c'PaDeviceInfo'defaultHighOutputLatency info)
+            (realToFrac $ c'PaDeviceInfo'defaultSampleRate info) : ys
+          else ys)
+
+class PortAudioSample a where
+  paSampleFormat :: proxy a -> CULong
+
+instance PortAudioSample Float where
+  paSampleFormat _ = 1
+
+instance PortAudioSample Int32 where
+  paSampleFormat _ = 2
+
+instance PortAudioSample Int16 where
+  paSampleFormat _ = 8
+
+instance PortAudioSample Int8 where
+  paSampleFormat _ = 16
+
+instance PortAudioSample Word8 where
+  paSampleFormat _ = 32
+
+newtype StreamParameters t a = StreamParameters C'PaStreamParameters deriving Storable
+
+streamParameters :: forall t f a. (Applicative f, Foldable f, PortAudioSample a)
+  => Device t
+  -> Double
+  -> Maybe (StreamParameters t (f a))
+streamParameters dev t
+  | n > fromIntegral (deviceMaxChannels dev) = Nothing
+  | otherwise = Just $ StreamParameters $ C'PaStreamParameters
+    (deviceIndex dev)
+    n
+    (paSampleFormat (Proxy :: Proxy a))
+    (CDouble t)
+    nullPtr
+  where
+    n = F.sum (pure 1 :: f CInt)
+
+newtype StreamFlags = StreamFlags CULong
+
+instance Monoid StreamFlags where
+  mempty = StreamFlags 0
+  StreamFlags a `mappend` StreamFlags b = StreamFlags (a .|. b)
+
+clipOff :: StreamFlags
+clipOff = StreamFlags 0x00000001
+
+ditherOff :: StreamFlags
+ditherOff = StreamFlags 0x00000002
+
+neverDropInput :: StreamFlags
+neverDropInput = StreamFlags 0x00000004
+
+primeOutputBuffersUsingStreamCallback :: StreamFlags
+primeOutputBuffersUsingStreamCallback = StreamFlags 0x00000008
+
+w :: IO CInt -> IO ()
+w n = do
+  r <- n
+  unless (r == 0) $ throwIO $ fromErrorCode r
+
+withPortAudio :: IO a -> IO a
+withPortAudio = bracket_ (w c'Pa_Initialize) (w c'Pa_Terminate)
+
+data StreamCallbackResult = Continue | Complete | Abort deriving (Show, Eq, Ord, Enum)
+
+instance Monoid StreamCallbackResult where
+  mempty = Complete
+  mappend Complete x = x
+  mappend x Complete = x
+  mappend Abort _ = Abort
+  mappend _ Abort = Abort
+  mappend Continue Continue = Continue
+
+data Status = Status
+  { currentTime :: !Double
+  , inputBufferAdcTime :: !Double
+  , outputBufferDacTime :: !Double
+  , inputUnderflow :: !Bool
+  , inputOverflow :: !Bool
+  , outputUnderflow :: !Bool
+  , outputOverflow :: !Bool
+  , primingOutput :: !Bool }
+
+withStream :: (Storable i, Storable o)
+  => Double -- ^ sampling rate
+  -> Int -- ^ buffer size
+  -> Maybe (StreamParameters Input i)
+  -> Maybe (StreamParameters Output o)
+  -> StreamFlags
+  -> (Status -> V.Vector i -> MV.IOVector o -> IO StreamCallbackResult) -- ^ callback
+  -> IO r
+  -> IO r
+withStream rate buf paramI paramO (StreamFlags flags) f m =
+  withMaybe paramI $ \pin -> withMaybe paramO $ \pout -> do
+    cb <- mk'PaStreamCallback $ callback f
+    let opener = do
+          ps <- malloc
+          w $ c'Pa_OpenStream ps
+              (castPtr pin)
+              (castPtr pout)
+              (CDouble rate)
+              (fromIntegral buf)
+              flags
+              cb
+              nullPtr
+          peek ps
+    bracket opener (\s -> w (c'Pa_CloseStream s) >> free s)
+      $ \s -> bracket_ (w $ c'Pa_StartStream s) (w $ c'Pa_StopStream s) m
+
+data Closed = Closed
+
+instance Storable Closed where
+  sizeOf _ = 0
+  alignment _ = 1
+  peek _ = return Closed
+  poke _ _ = return ()
+
+-- | This is 'Nothing', but it explicitly specifies the stream type with zero-width unit type.
+noConnection :: Maybe (StreamParameters t Closed)
+noConnection = Nothing
+
+callback :: (Storable a, Storable b) => (Status -> V.Vector a -> MV.IOVector b -> IO StreamCallbackResult) -> Ptr () -> Ptr () -> CULong -> Ptr C'PaStreamCallbackTimeInfo -> CULong -> z -> IO CUInt
+callback f (castPtr -> pin) (castPtr -> pout) (fromIntegral -> n) pinfo flags _ = do
+  ip <- newForeignPtr_ pin
+  op <- newForeignPtr_ pout
+  info <- peek pinfo
+  fmap (toEnum . fromEnum) $ f (Status (realToFrac $ c'PaStreamCallbackTimeInfo'currentTime info)
+      (realToFrac $ c'PaStreamCallbackTimeInfo'inputBufferAdcTime info)
+      (realToFrac $ c'PaStreamCallbackTimeInfo'outputBufferDacTime info)
+      (testBit flags 0)
+      (testBit flags 1)
+      (testBit flags 2)
+      (testBit flags 3)
+      (testBit flags 4))
+    (V.unsafeFromForeignPtr0 ip n)
+    (MV.unsafeFromForeignPtr0 op n)
+
+withMaybe :: Storable a => Maybe a -> (Ptr a -> IO b) -> IO b
+withMaybe Nothing c = c nullPtr
+withMaybe (Just a) c = with a c
diff --git a/bindings-portaudio.cabal b/bindings-portaudio.cabal
--- a/bindings-portaudio.cabal
+++ b/bindings-portaudio.cabal
@@ -1,140 +1,141 @@
-name:         bindings-portaudio
-version:      0.1
-category:     Sound
-
-author:       Fumiaki Kinoshita <fumiexcel@gmail.com>
-maintainer:   Fumiaki Kinoshita <fumiexcel@gmail.com>
-
-license:      BSD3
-license-file: LICENSE
-
-synopsis:     Low-level bindings to portaudio library
-description:
-cabal-version: >= 1.10
-build-type:    Simple
-
-extra-source-files:
-  portaudio/include/*.h
-  portaudio/src/common/*.c
-  portaudio/src/common/*.h
-  portaudio/src/hostapi/wmme/*.c
-  portaudio/src/hostapi/wdmks/*.c
-  portaudio/src/hostapi/wasapi/*.c
-  portaudio/src/hostapi/wasapi/mingw-include/*.h
-  portaudio/src/os/win/*.c
-  portaudio/src/os/win/*.h
-  extra.c
-  LICENSE
-  README.md
-  example/*.hs
-  example/example-portaudio.cabal
-  example/LICENSE
-
---------------------------------------------------------------------------------
-
-flag WASAPI
-  default: False
-
-flag DirectSound
-  default: False
-
-flag WMME
-  default: False
-
-flag WDMKS
-  default: False
-
-flag Bundle
-  default: False
-  description: Use bundled C sources. It is unstable due to the GHC bug.
-
-library
-  default-language: Haskell2010
-
-  ghc-options: -Wall -O2
-  if impl(ghc >= 6.8)
-    ghc-options: -fwarn-tabs
-
-  exposed-modules:
-    Bindings.PortAudio
-
-  build-tools:
-    hsc2hs
-
-  build-depends:
-    base          < 5, bindings-DSL == 1.0.*
-
-  cc-options: -g
-
-  if os(linux) || os(freebsd) || os(darwin) || !flag(Bundle)
-    pkgconfig-depends: portaudio-2.0
-
-  if os(mingw32) && flag(Bundle)
-    include-dirs:
-      portaudio/src/os/win
-      portaudio/include
-      portaudio/src/common
-    c-sources:
-      extra.c
-      portaudio/src/os/win/pa_win_coinitialize.c
-      portaudio/src/os/win/pa_win_hostapis.c
-      portaudio/src/os/win/pa_win_util.c
-      portaudio/src/os/win/pa_win_waveformat.c
-      portaudio/src/os/win/pa_win_wdmks_utils.c
-      portaudio/src/common/pa_allocation.c
-      portaudio/src/common/pa_front.c
-      portaudio/src/common/pa_converters.c
-      portaudio/src/common/pa_process.c
-      portaudio/src/common/pa_cpuload.c
-      portaudio/src/common/pa_ringbuffer.c
-      portaudio/src/common/pa_debugprint.c
-      portaudio/src/common/pa_stream.c
-      portaudio/src/common/pa_dither.c
-      portaudio/src/common/pa_trace.c
-      -- portaudio/src/os/win/pa_x86_plain_converters.c
-    extra-libraries: winmm ole32
-    cc-options: -mthreads
-      -DHAVE_INTTYPES_H=1
-      -DHAVE_MEMORY_H=1
-      -DHAVE_STDINT_H=1
-      -DHAVE_STDLIB_H=1
-      -DHAVE_STRING_H=1
-      -DHAVE_STRINGS_H=1
-      -DHAVE_SYS_STAT_H=1
-      -DHAVE_SYS_TYPES_H=1
-      -DHAVE_UNISTD_H=1
-      -DPA_LITTLE_ENDIAN
-      -DSIZEOF_INT=4
-      -DSIZEOF_LONG=4
-      -DSIZEOF_SHORT=2
-      -DSTDC_HEADERS=1
-
-    if flag(WASAPI)
-      include-dirs:
-        portaudio/src/hostapi/wasapi/mingw-include
-      c-sources:
-        portaudio/src/hostapi/wasapi/pa_win_wasapi.c
-      cc-options: -DPA_USE_WASAPI=1
-
-    if flag(DirectSound)
-      include-dirs:
-        portaudio/src/hostapi/dsound
-      c-sources:
-        portaudio/src/hostapi/dsound/pa_win_ds.c
-        portaudio/src/hostapi/dsound/pa_win_ds_dynlink.c
-      cc-options: -DPA_USE_DS=1
-
-    if flag(WMME)
-      c-sources:
-        portaudio/src/hostapi/wmme/pa_win_wmme.c
-      cc-options: -DPA_USE_WMME=1
-
-    if flag(WDMKS)
-      c-sources:
-        portaudio/src/hostapi/wdmks/pa_win_wdmks.c
-      cc-options: -DPA_USE_WDMKS=1
-      extra-libraries: Setupapi
-
-source-repository head
-  type:     git
-  location: https://github.com/fumieval/bindings-portaudio.git
+name:         bindings-portaudio
+version:      0.2
+category:     Sound
+
+author:       Fumiaki Kinoshita <fumiexcel@gmail.com>
+maintainer:   Fumiaki Kinoshita <fumiexcel@gmail.com>
+
+license:      BSD3
+license-file: LICENSE
+
+synopsis:     Low-level bindings to portaudio library
+description:
+cabal-version: >= 1.10
+build-type:    Simple
+
+extra-source-files:
+  portaudio/include/*.h
+  portaudio/src/common/*.c
+  portaudio/src/common/*.h
+  portaudio/src/hostapi/wmme/*.c
+  portaudio/src/hostapi/wdmks/*.c
+  portaudio/src/hostapi/wasapi/*.c
+  portaudio/src/hostapi/wasapi/mingw-include/*.h
+  portaudio/src/os/win/*.c
+  portaudio/src/os/win/*.h
+  extra.c
+  LICENSE
+  README.md
+  example/*.hs
+  example/example-portaudio.cabal
+  example/LICENSE
+
+--------------------------------------------------------------------------------
+
+flag WASAPI
+  default: False
+
+flag DirectSound
+  default: False
+
+flag WMME
+  default: False
+
+flag WDMKS
+  default: False
+
+flag Bundle
+  default: False
+  description: Use bundled C sources. It is unstable due to the GHC bug.
+
+library
+  default-language: Haskell2010
+
+  ghc-options: -Wall -O2
+  if impl(ghc >= 6.8)
+    ghc-options: -fwarn-tabs
+
+  exposed-modules:
+    Bindings.PortAudio
+    System.PortAudio
+
+  build-tools:
+    hsc2hs
+
+  build-depends:
+    base          < 5, bindings-DSL == 1.0.*, vector
+
+  cc-options: -g
+
+  if os(linux) || os(freebsd) || os(darwin) || !flag(Bundle)
+    pkgconfig-depends: portaudio-2.0
+
+  if os(mingw32) && flag(Bundle)
+    include-dirs:
+      portaudio/src/os/win
+      portaudio/include
+      portaudio/src/common
+    c-sources:
+      portaudio/src/os/win/pa_win_coinitialize.c
+      portaudio/src/os/win/pa_win_hostapis.c
+      portaudio/src/os/win/pa_win_util.c
+      portaudio/src/os/win/pa_win_waveformat.c
+      portaudio/src/os/win/pa_win_wdmks_utils.c
+      portaudio/src/common/pa_allocation.c
+      portaudio/src/common/pa_converters.c
+      portaudio/src/common/pa_cpuload.c
+      portaudio/src/common/pa_debugprint.c
+      portaudio/src/common/pa_dither.c
+      portaudio/src/common/pa_front.c
+      portaudio/src/common/pa_process.c
+      portaudio/src/common/pa_ringbuffer.c
+      portaudio/src/common/pa_stream.c
+      portaudio/src/common/pa_trace.c
+      -- portaudio/src/os/win/pa_x86_plain_converters.c
+    extra-libraries: winmm ole32
+    cc-options: -mthreads
+      -DHAVE_INTTYPES_H=1
+      -DHAVE_MEMORY_H=1
+      -DHAVE_STDINT_H=1
+      -DHAVE_STDLIB_H=1
+      -DHAVE_STRING_H=1
+      -DHAVE_STRINGS_H=1
+      -DHAVE_SYS_STAT_H=1
+      -DHAVE_SYS_TYPES_H=1
+      -DHAVE_UNISTD_H=1
+      -DPA_LITTLE_ENDIAN
+      -DSIZEOF_INT=4
+      -DSIZEOF_LONG=4
+      -DSIZEOF_SHORT=2
+      -DSTDC_HEADERS=1
+
+    if flag(WASAPI)
+      include-dirs:
+        portaudio/src/hostapi/wasapi/mingw-include
+      c-sources:
+        portaudio/src/hostapi/wasapi/pa_win_wasapi.c
+      cc-options: -DPA_USE_WASAPI=1
+
+    if flag(DirectSound)
+      include-dirs:
+        portaudio/src/hostapi/dsound
+      c-sources:
+        portaudio/src/hostapi/dsound/pa_win_ds.c
+        portaudio/src/hostapi/dsound/pa_win_ds_dynlink.c
+      cc-options: -DPA_USE_DS=1
+
+    if flag(WMME)
+      c-sources:
+        portaudio/src/hostapi/wmme/pa_win_wmme.c
+        extra.c
+      cc-options: -DPA_USE_WMME=1
+
+    if flag(WDMKS)
+      c-sources:
+        portaudio/src/hostapi/wdmks/pa_win_wdmks.c
+      cc-options: -DPA_USE_WDMKS=1
+      extra-libraries: Setupapi
+
+source-repository head
+  type:     git
+  location: https://github.com/fumieval/bindings-portaudio.git
diff --git a/example/LICENSE b/example/LICENSE
--- a/example/LICENSE
+++ b/example/LICENSE
@@ -1,30 +1,30 @@
-Copyright (c) 2014, Fumiaki Kinoshita <fumiexcel@gmail.com>
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-
-    * Neither the name of cosmo0920 nor the names of other
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Copyright (c) 2014, Fumiaki Kinoshita <fumiexcel@gmail.com>
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of cosmo0920 nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/example/Setup.hs b/example/Setup.hs
--- a/example/Setup.hs
+++ b/example/Setup.hs
@@ -1,2 +1,2 @@
-import Distribution.Simple
-main = defaultMain
+import Distribution.Simple
+main = defaultMain
diff --git a/example/example-portaudio.cabal b/example/example-portaudio.cabal
--- a/example/example-portaudio.cabal
+++ b/example/example-portaudio.cabal
@@ -1,27 +1,28 @@
--- Initial example-portaudio.cabal generated by cabal init.  For further
--- documentation, see http://haskell.org/cabal/users-guide/
-
-name:                example-portaudio
-version:             0.0
--- synopsis:
--- description:
-license:             BSD3
-license-file:        LICENSE
-author:              Fumiaki Kinoshita <fumiexcel@gmail.com>
-maintainer:          Fumiaki Kinoshita <fumiexcel@gmail.com>
--- copyright:
-category:            Sound
-build-type:          Simple
--- extra-source-files:
-cabal-version:       >=1.10
-
-executable example-portaudio
-  main-is:             sine.hs
-  -- other-modules:
-  -- other-extensions:
-  build-depends:       base >=4.6 && < 5
-                     , bindings-portaudio
-                     , vector >= 0.10 && < 0.11
-  -- hs-source-dirs:
-  ghc-options: -threaded
-  default-language:    Haskell2010
+-- Initial example-portaudio.cabal generated by cabal init.  For further
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                example-portaudio
+version:             0.0
+-- synopsis:
+-- description:
+license:             BSD3
+license-file:        LICENSE
+author:              Fumiaki Kinoshita <fumiexcel@gmail.com>
+maintainer:          Fumiaki Kinoshita <fumiexcel@gmail.com>
+-- copyright:
+category:            Sound
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+executable example-portaudio
+  main-is:             sine.hs
+  -- other-modules:
+  -- other-extensions:
+  build-depends:       base >=4.6 && < 5
+                     , bindings-portaudio
+                     , vector >= 0.10 && < 0.12
+                     , linear
+  -- hs-source-dirs:
+  ghc-options: -threaded -Wall -O2
+  default-language:    Haskell2010
diff --git a/example/sine.hs b/example/sine.hs
--- a/example/sine.hs
+++ b/example/sine.hs
@@ -1,58 +1,51 @@
 {-# LANGUAGE ViewPatterns, LambdaCase #-}
-import Bindings.PortAudio
+import System.PortAudio
 import Control.Applicative
-import Control.Concurrent.MVar
+import Control.Concurrent
 import Control.Monad
 import Foreign.C.String
 import Foreign.C.Types
-import Foreign
+import Foreign hiding (void)
+import Linear (V2(..))
 import qualified Data.Vector as V
+import qualified Data.Vector.Storable.Mutable as MV
 import System.Environment
+import System.Exit
 
 period :: Int
 period = 128
 
-table :: V.Vector CFloat
+table :: V.Vector Float
 table = V.fromList [sin t | i <- [0..period - 1], let t = fromIntegral i / fromIntegral period * 2 * pi]
 
-callback phase _ (castPtr -> o) (fromIntegral -> n) info _ _ = do
+callback :: MVar Int -> Status -> input -> MV.IOVector (V2 Float) -> IO StreamCallbackResult
+callback phase _ _ o = do
   i0 <- takeMVar phase
   go i0 0
   putMVar phase $ i0 + n
-  return c'paContinue
+  return Continue
   where
+    n = MV.length o
+    go :: Int -> Int -> IO ()
     go i0 i
       | i == n = return ()
       | otherwise = do
         let v = table V.! ((i0 + i) `mod` period)
-        pokeElemOff o (2 * i) v
-        pokeElemOff o (2 * i + 1) v
+        MV.write o i (V2 v v)
         go i0 (i + 1)
 
-dbg s m = do
-  e <- m
-  putStrLn $ s ++ ": " ++ show e
-  unless (e == 0) $ fail "Failed."
-
+main :: IO ()
 main = getArgs >>= \case
-  ((read -> rate) : (read -> buf) : _) -> do
-    dbg "Initialization" c'Pa_Initialize
-    n <- c'Pa_GetHostApiCount
-    putStrLn "Available APIs: "
-    forM_ [0..n - 1] $ \i -> do
-      info <- c'Pa_GetHostApiInfo i >>= peek
-      name <- peekCAString $ c'PaHostApiInfo'name info
-      print (i, name)
-
-    ref <- newMVar 0
-    cb <- mk'PaStreamCallback $ callback ref
-    
-    ps <- malloc
-    dbg "Opening the default stream" $ c'Pa_OpenDefaultStream ps 0 2 1 rate buf cb nullPtr
-    s <- peek ps
+  ((read -> rate) : (read -> buf) : _) -> withPortAudio $ do
+    (_, dev : _) <- getDevices
+    phase <- newMVar 0
+    let output = streamParameters dev 0
+    withStream rate buf noConnection output mempty (callback phase)
+      $ threadDelay $ 1000 * 1000
+  _ -> usageExit
 
-    dbg "Starting the stream" $ c'Pa_StartStream s
-    c'Pa_Sleep 1000
-    dbg "Stopping the stream" $ c'Pa_StopStream s
-    dbg "Closing the stream" $ c'Pa_CloseStream s
-    c'Pa_Terminate
+usageExit :: IO ()
+usageExit = do
+  pname <- getProgName
+  putStrLn $ "\nUsage: " ++ pname ++ " <sample rate> <buffer size>\n"
+  exitSuccess
diff --git a/portaudio/include/pa_asio.h b/portaudio/include/pa_asio.h
--- a/portaudio/include/pa_asio.h
+++ b/portaudio/include/pa_asio.h
@@ -1,7 +1,8 @@
 #ifndef PA_ASIO_H
 #define PA_ASIO_H
+
 /*
- * $Id: pa_asio.h 1667 2011-05-02 15:49:20Z rossb $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * ASIO specific extensions
  *
@@ -28,13 +29,13 @@
  */
 
 /*
- * The text above constitutes the entire PortAudio license; however, 
+ * The text above constitutes the entire PortAudio license; however,
  * the PortAudio community also makes the following non-binding requests:
  *
  * Any person wishing to distribute modifications to the Software is
  * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
  * license above.
  */
 
@@ -97,7 +98,7 @@
 PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
         const char** channelName );
 
-        
+
 /** Retrieve a pointer to a string containing the name of the specified
  input channel. The string is valid until Pa_Terminate is called.
 
@@ -108,11 +109,11 @@
 
 
 /** Set the sample rate of an open paASIO stream.
- 
+
  @param stream The stream to operate on.
- @param sampleRate The new sample rate. 
+ @param sampleRate The new sample rate.
 
- Note that this function may fail if the stream is alredy running and the 
+ Note that this function may fail if the stream is alredy running and the
  ASIO driver does not support switching the sample rate of a running stream.
 
  Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
diff --git a/portaudio/include/pa_linux_alsa.h b/portaudio/include/pa_linux_alsa.h
--- a/portaudio/include/pa_linux_alsa.h
+++ b/portaudio/include/pa_linux_alsa.h
@@ -2,7 +2,7 @@
 #define PA_LINUX_ALSA_H
 
 /*
- * $Id: pa_linux_alsa.h 1597 2011-02-11 00:15:51Z dmitrykos $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * ALSA-specific extensions
  *
diff --git a/portaudio/include/pa_win_ds.h b/portaudio/include/pa_win_ds.h
--- a/portaudio/include/pa_win_ds.h
+++ b/portaudio/include/pa_win_ds.h
@@ -1,95 +1,95 @@
-#ifndef PA_WIN_DS_H
-#define PA_WIN_DS_H
-/*
- * $Id:  $
- * PortAudio Portable Real-Time Audio Library
- * DirectSound specific extensions
- *
- * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup public_header
- @brief DirectSound-specific PortAudio API extension header file.
-*/
-
-#include "portaudio.h"
-#include "pa_win_waveformat.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-
-#define paWinDirectSoundUseLowLevelLatencyParameters            (0x01)
-#define paWinDirectSoundUseChannelMask                          (0x04)
-
-
-typedef struct PaWinDirectSoundStreamInfo{
-    unsigned long size;             /**< sizeof(PaWinDirectSoundStreamInfo) */
-    PaHostApiTypeId hostApiType;    /**< paDirectSound */
-    unsigned long version;          /**< 2 */
-
-    unsigned long flags;            /**< enable other features of this struct */
-
-    /** 
-       low-level latency setting support
-       Sets the size of the DirectSound host buffer.
-       When flags contains the paWinDirectSoundUseLowLevelLatencyParameters
-       this size will be used instead of interpreting the generic latency 
-       parameters to Pa_OpenStream(). If the flag is not set this value is ignored.
-
-       If the stream is a full duplex stream the implementation requires that
-       the values of framesPerBuffer for input and output match (if both are specified).
-    */
-    unsigned long framesPerBuffer;
-
-    /**
-        support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
-        paWinDirectSoundUseChannelMask this allows you to specify which speakers 
-        to address in a multichannel stream. Constants for channelMask
-        are specified in pa_win_waveformat.h
-
-    */
-    PaWinWaveFormatChannelMask channelMask;
-
-}PaWinDirectSoundStreamInfo;
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* PA_WIN_DS_H */                                  
+#ifndef PA_WIN_DS_H
+#define PA_WIN_DS_H
+/*
+ * $Id:  $
+ * PortAudio Portable Real-Time Audio Library
+ * DirectSound specific extensions
+ *
+ * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief DirectSound-specific PortAudio API extension header file.
+*/
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define paWinDirectSoundUseLowLevelLatencyParameters            (0x01)
+#define paWinDirectSoundUseChannelMask                          (0x04)
+
+
+typedef struct PaWinDirectSoundStreamInfo{
+    unsigned long size;             /**< sizeof(PaWinDirectSoundStreamInfo) */
+    PaHostApiTypeId hostApiType;    /**< paDirectSound */
+    unsigned long version;          /**< 2 */
+
+    unsigned long flags;            /**< enable other features of this struct */
+
+    /** 
+       low-level latency setting support
+       Sets the size of the DirectSound host buffer.
+       When flags contains the paWinDirectSoundUseLowLevelLatencyParameters
+       this size will be used instead of interpreting the generic latency 
+       parameters to Pa_OpenStream(). If the flag is not set this value is ignored.
+
+       If the stream is a full duplex stream the implementation requires that
+       the values of framesPerBuffer for input and output match (if both are specified).
+    */
+    unsigned long framesPerBuffer;
+
+    /**
+        support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
+        paWinDirectSoundUseChannelMask this allows you to specify which speakers 
+        to address in a multichannel stream. Constants for channelMask
+        are specified in pa_win_waveformat.h
+
+    */
+    PaWinWaveFormatChannelMask channelMask;
+
+}PaWinDirectSoundStreamInfo;
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_DS_H */                                  
diff --git a/portaudio/include/pa_win_wasapi.h b/portaudio/include/pa_win_wasapi.h
--- a/portaudio/include/pa_win_wasapi.h
+++ b/portaudio/include/pa_win_wasapi.h
@@ -1,391 +1,443 @@
-#ifndef PA_WIN_WASAPI_H
-#define PA_WIN_WASAPI_H
-/*
- * $Id:  $
- * PortAudio Portable Real-Time Audio Library
- * DirectSound specific extensions
- *
- * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup public_header
- @brief WASAPI-specific PortAudio API extension header file.
-*/
-
-#include "portaudio.h"
-#include "pa_win_waveformat.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-
-/* Setup flags */
-typedef enum PaWasapiFlags
-{
-    /* puts WASAPI into exclusive mode */
-    paWinWasapiExclusive                = (1 << 0),
-
-    /* allows to skip internal PA processing completely */
-    paWinWasapiRedirectHostProcessor    = (1 << 1),
-
-    /* assigns custom channel mask */
-    paWinWasapiUseChannelMask           = (1 << 2),
-
-    /* selects non-Event driven method of data read/write
-       Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
-             method can only provide 15-20ms latency. */
-    paWinWasapiPolling                  = (1 << 3),
-
-    /* forces custom thread priority setting. must be used if PaWasapiStreamInfo::threadPriority 
-       is set to custom value. */
-    paWinWasapiThreadPriority           = (1 << 4)
-}
-PaWasapiFlags;
-#define paWinWasapiExclusive             (paWinWasapiExclusive)
-#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)
-#define paWinWasapiUseChannelMask        (paWinWasapiUseChannelMask)
-#define paWinWasapiPolling               (paWinWasapiPolling)
-#define paWinWasapiThreadPriority        (paWinWasapiThreadPriority)
-
-
-/* Host processor. Allows to skip internal PA processing completely. 
-   You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
-   in order to have host processor redirected to your callback.
-   Use with caution! inputFrames and outputFrames depend solely on final device setup.
-   To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
-*/
-typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer,  long inputFrames,
-                                               void *outputBuffer, long outputFrames,
-                                               void *userData);
-
-/* Device role */
-typedef enum PaWasapiDeviceRole
-{
-    eRoleRemoteNetworkDevice = 0,
-    eRoleSpeakers,
-    eRoleLineLevel,
-    eRoleHeadphones,
-    eRoleMicrophone,
-    eRoleHeadset,
-    eRoleHandset,
-    eRoleUnknownDigitalPassthrough,
-    eRoleSPDIF,
-    eRoleHDMI,
-    eRoleUnknownFormFactor
-}
-PaWasapiDeviceRole;
-
-
-/* Jack connection type */
-typedef enum PaWasapiJackConnectionType
-{
-    eJackConnTypeUnknown,
-    eJackConnType3Point5mm,
-    eJackConnTypeQuarter,
-    eJackConnTypeAtapiInternal,
-    eJackConnTypeRCA,
-    eJackConnTypeOptical,
-    eJackConnTypeOtherDigital,
-    eJackConnTypeOtherAnalog,
-    eJackConnTypeMultichannelAnalogDIN,
-    eJackConnTypeXlrProfessional,
-    eJackConnTypeRJ11Modem,
-    eJackConnTypeCombination
-} 
-PaWasapiJackConnectionType;
-
-
-/* Jack geometric location */
-typedef enum PaWasapiJackGeoLocation
-{
-	eJackGeoLocUnk = 0,
-    eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
-    eJackGeoLocFront,
-    eJackGeoLocLeft,
-    eJackGeoLocRight,
-    eJackGeoLocTop,
-    eJackGeoLocBottom,
-    eJackGeoLocRearPanel,
-    eJackGeoLocRiser,
-    eJackGeoLocInsideMobileLid,
-    eJackGeoLocDrivebay,
-    eJackGeoLocHDMI,
-    eJackGeoLocOutsideMobileLid,
-    eJackGeoLocATAPI,
-    eJackGeoLocReserved5,
-    eJackGeoLocReserved6,
-} 
-PaWasapiJackGeoLocation;
-
-
-/* Jack general location */
-typedef enum PaWasapiJackGenLocation
-{
-    eJackGenLocPrimaryBox = 0,
-    eJackGenLocInternal,
-    eJackGenLocSeparate,
-    eJackGenLocOther
-} 
-PaWasapiJackGenLocation;
-
-
-/* Jack's type of port */
-typedef enum PaWasapiJackPortConnection
-{
-    eJackPortConnJack = 0,
-    eJackPortConnIntegratedDevice,
-    eJackPortConnBothIntegratedAndJack,
-    eJackPortConnUnknown
-} 
-PaWasapiJackPortConnection;
-
-
-/* Thread priority */
-typedef enum PaWasapiThreadPriority
-{
-    eThreadPriorityNone = 0,
-    eThreadPriorityAudio,            //!< Default for Shared mode.
-    eThreadPriorityCapture,
-    eThreadPriorityDistribution,
-    eThreadPriorityGames,
-    eThreadPriorityPlayback,
-    eThreadPriorityProAudio,        //!< Default for Exclusive mode.
-    eThreadPriorityWindowManager
-}
-PaWasapiThreadPriority;
-
-
-/* Stream descriptor. */
-typedef struct PaWasapiJackDescription 
-{
-    unsigned long              channelMapping;
-    unsigned long              color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
-    PaWasapiJackConnectionType connectionType;
-    PaWasapiJackGeoLocation    geoLocation;
-    PaWasapiJackGenLocation    genLocation;
-    PaWasapiJackPortConnection portConnection;
-    unsigned int               isConnected;
-}
-PaWasapiJackDescription;
-
-
-/* Stream descriptor. */
-typedef struct PaWasapiStreamInfo 
-{
-    unsigned long size;             /**< sizeof(PaWasapiStreamInfo) */
-    PaHostApiTypeId hostApiType;    /**< paWASAPI */
-    unsigned long version;          /**< 1 */
-
-    unsigned long flags;            /**< collection of PaWasapiFlags */
-
-    /* Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
-       paWinWasapiUseChannelMask this allows you to specify which speakers 
-       to address in a multichannel stream. Constants for channelMask
-       are specified in pa_win_waveformat.h. Will be used only if 
-       paWinWasapiUseChannelMask flag is specified.
-    */
-    PaWinWaveFormatChannelMask channelMask;
-
-    /* Delivers raw data to callback obtained from GetBuffer() methods skipping 
-       internal PortAudio processing inventory completely. userData parameter will 
-       be the same that was passed to Pa_OpenStream method. Will be used only if 
-       paWinWasapiRedirectHostProcessor flag is specified.
-    */
-    PaWasapiHostProcessorCallback hostProcessorOutput;
-    PaWasapiHostProcessorCallback hostProcessorInput;
-
-    /* Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
-       is specified.
-
-       Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
-       you shall specify same value for threadPriority or othervise one of the values will be used
-       to setup thread priority.
-    */
-    PaWasapiThreadPriority threadPriority;
-} 
-PaWasapiStreamInfo;
-
-
-/** Returns default sound format for device. Format is represented by PaWinWaveFormat or 
-    WAVEFORMATEXTENSIBLE structure.
-
- @param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
- @param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
- @param nDevice Device index.
-
- @return Non-negative value indicating the number of bytes copied into format decriptor
-         or, a PaErrorCode (which are always negative) if PortAudio is not initialized
-         or an error is encountered.
-*/
-int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );
-
-
-/** Returns device role (PaWasapiDeviceRole enum).
-
- @param nDevice device index.
-
- @return Non-negative value indicating device role or, a PaErrorCode (which are always negative)
-         if PortAudio is not initialized or an error is encountered.
-*/
-int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );
-
-
-/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
-    which makes calls to Pa_WriteStream/Pa_ReadStream.
-
- @param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
-              method to revert thread priority to initial state.
-
- @param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying 
-                       eThreadPriorityNone does nothing.
-
- @return Error code indicating success or failure.
- @see    PaWasapi_RevertThreadPriority
-*/
-PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );
-
-
-/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
-    which makes calls to Pa_WriteStream/Pa_ReadStream.
-
- @param  hTask Task handle obtained by PaWasapi_BoostThreadPriority method.
- @return Error code indicating success or failure.
- @see    PaWasapi_BoostThreadPriority
-*/
-PaError PaWasapi_ThreadPriorityRevert( void *hTask );
-
-
-/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which 
-    can be locked for operations. Use this method as helper to findout maximal values of 
-    inputFrames/outputFrames of PaWasapiHostProcessorCallback.
-
- @param  pStream Pointer to PaStream to query.
- @param  nInput  Pointer to variable to receive number of input frames. Can be NULL.
- @param  nOutput Pointer to variable to receive number of output frames. Can be NULL.
- @return Error code indicating success or failure.
- @see    PaWasapiHostProcessorCallback
-*/
-PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );
-
-
-/** Get number of jacks associated with a WASAPI device.  Use this method to determine if
-    there are any jacks associated with the provided WASAPI device.  Not all audio devices
-	will support this capability.  This is valid for both input and output devices.
- @param  nDevice  device index.
- @param  jcount   Number of jacks is returned in this variable
- @return Error code indicating success or failure
- @see PaWasapi_GetJackDescription
- */
-PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);
-
-
-/** Get the jack description associated with a WASAPI device and jack number
-    Before this function is called, use PaWasapi_GetJackCount to determine the
-	number of jacks associated with device.  If jcount is greater than zero, then
-	each jack from 0 to jcount can be queried with this function to get the jack
-	description.
- @param  nDevice  device index.
- @param  jindex   Which jack to return information
- @param  KSJACK_DESCRIPTION This structure filled in on success.
- @return Error code indicating success or failure
- @see PaWasapi_GetJackCount
- */
-PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);
-
-
-/*
-    IMPORTANT:
-
-    WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
-    share modes. 
-    
-    Exclusive Mode:
-
-        Exclusive mode allows to deliver audio data directly to hardware bypassing
-        software mixing.
-        Exclusive mode is specified by 'paWinWasapiExclusive' flag.
-
-    Callback Interface:
-
-        Provides best audio quality with low latency. Callback interface is implemented in 
-        two versions:
-
-        1) Event-Driven:
-        This is the most powerful WASAPI implementation which provides glitch-free
-        audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is 
-        3 ms for HD Audio class audio chips. For the Shared mode latency can not be 
-		lower than 20 ms.
-
-        2) Poll-Driven:
-        Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
-        and provides latency at around 10-13ms. Polling must be used to overcome a system bug
-        under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply 
-        times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug 
-        does not exist in Vista x86 or Windows 7.
-        Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
-        WOW64 bug and sets 'paWinWasapiPolling' automatically.
-
-    Thread priority:
-
-        Normally thread priority is set automatically and does not require modification. Although
-        if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
-        flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority 
-        enum.
-
-    Blocking Interface:
-
-        Blocking interface is implemented but due to above described Poll-Driven method can not
-        deliver lowest possible latency. Specifying too low latency in Shared mode will result in 
-        distorted audio although Exclusive mode adds stability.
-
-    Pa_IsFormatSupported:
-
-        To check format with correct Share Mode (Exclusive/Shared) you must supply
-        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
-        PaStreamParameters::hostApiSpecificStreamInfo structure.
-
-    Pa_OpenStream:
-
-        To set desired Share Mode (Exclusive/Shared) you must supply
-        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
-        PaStreamParameters::hostApiSpecificStreamInfo structure.
-*/
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* PA_WIN_WASAPI_H */                                  
+#ifndef PA_WIN_WASAPI_H
+#define PA_WIN_WASAPI_H
+/*
+ * $Id:  $
+ * PortAudio Portable Real-Time Audio Library
+ * DirectSound specific extensions
+ *
+ * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief WASAPI-specific PortAudio API extension header file.
+*/
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/* Setup flags */
+typedef enum PaWasapiFlags
+{
+    /* puts WASAPI into exclusive mode */
+    paWinWasapiExclusive                = (1 << 0),
+
+    /* allows to skip internal PA processing completely */
+    paWinWasapiRedirectHostProcessor    = (1 << 1),
+
+    /* assigns custom channel mask */
+    paWinWasapiUseChannelMask           = (1 << 2),
+
+    /* selects non-Event driven method of data read/write
+       Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
+             method can only provide 15-20ms latency. */
+    paWinWasapiPolling                  = (1 << 3),
+
+    /* forces custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority 
+       is set to a custom value */
+    paWinWasapiThreadPriority           = (1 << 4)
+}
+PaWasapiFlags;
+#define paWinWasapiExclusive             (paWinWasapiExclusive)
+#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)
+#define paWinWasapiUseChannelMask        (paWinWasapiUseChannelMask)
+#define paWinWasapiPolling               (paWinWasapiPolling)
+#define paWinWasapiThreadPriority        (paWinWasapiThreadPriority)
+
+
+/* Host processor. Allows to skip internal PA processing completely. 
+   You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
+   in order to have host processor redirected to your callback.
+   Use with caution! inputFrames and outputFrames depend solely on final device setup.
+   To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
+*/
+typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer,  long inputFrames,
+                                               void *outputBuffer, long outputFrames,
+                                               void *userData);
+
+/* Device role. */
+typedef enum PaWasapiDeviceRole
+{
+    eRoleRemoteNetworkDevice = 0,
+    eRoleSpeakers,
+    eRoleLineLevel,
+    eRoleHeadphones,
+    eRoleMicrophone,
+    eRoleHeadset,
+    eRoleHandset,
+    eRoleUnknownDigitalPassthrough,
+    eRoleSPDIF,
+    eRoleHDMI,
+    eRoleUnknownFormFactor
+}
+PaWasapiDeviceRole;
+
+
+/* Jack connection type. */
+typedef enum PaWasapiJackConnectionType
+{
+    eJackConnTypeUnknown,
+    eJackConnType3Point5mm,
+    eJackConnTypeQuarter,
+    eJackConnTypeAtapiInternal,
+    eJackConnTypeRCA,
+    eJackConnTypeOptical,
+    eJackConnTypeOtherDigital,
+    eJackConnTypeOtherAnalog,
+    eJackConnTypeMultichannelAnalogDIN,
+    eJackConnTypeXlrProfessional,
+    eJackConnTypeRJ11Modem,
+    eJackConnTypeCombination
+} 
+PaWasapiJackConnectionType;
+
+
+/* Jack geometric location. */
+typedef enum PaWasapiJackGeoLocation
+{
+    eJackGeoLocUnk = 0,
+    eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
+    eJackGeoLocFront,
+    eJackGeoLocLeft,
+    eJackGeoLocRight,
+    eJackGeoLocTop,
+    eJackGeoLocBottom,
+    eJackGeoLocRearPanel,
+    eJackGeoLocRiser,
+    eJackGeoLocInsideMobileLid,
+    eJackGeoLocDrivebay,
+    eJackGeoLocHDMI,
+    eJackGeoLocOutsideMobileLid,
+    eJackGeoLocATAPI,
+    eJackGeoLocReserved5,
+    eJackGeoLocReserved6,
+} 
+PaWasapiJackGeoLocation;
+
+
+/* Jack general location. */
+typedef enum PaWasapiJackGenLocation
+{
+    eJackGenLocPrimaryBox = 0,
+    eJackGenLocInternal,
+    eJackGenLocSeparate,
+    eJackGenLocOther
+} 
+PaWasapiJackGenLocation;
+
+
+/* Jack's type of port. */
+typedef enum PaWasapiJackPortConnection
+{
+    eJackPortConnJack = 0,
+    eJackPortConnIntegratedDevice,
+    eJackPortConnBothIntegratedAndJack,
+    eJackPortConnUnknown
+} 
+PaWasapiJackPortConnection;
+
+
+/* Thread priority. */
+typedef enum PaWasapiThreadPriority
+{
+    eThreadPriorityNone = 0,
+    eThreadPriorityAudio,            //!< Default for Shared mode.
+    eThreadPriorityCapture,
+    eThreadPriorityDistribution,
+    eThreadPriorityGames,
+    eThreadPriorityPlayback,
+    eThreadPriorityProAudio,        //!< Default for Exclusive mode.
+    eThreadPriorityWindowManager
+}
+PaWasapiThreadPriority;
+
+
+/* Stream descriptor. */
+typedef struct PaWasapiJackDescription 
+{
+    unsigned long              channelMapping;
+    unsigned long              color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
+    PaWasapiJackConnectionType connectionType;
+    PaWasapiJackGeoLocation    geoLocation;
+    PaWasapiJackGenLocation    genLocation;
+    PaWasapiJackPortConnection portConnection;
+    unsigned int               isConnected;
+}
+PaWasapiJackDescription;
+
+
+/** Stream category.
+   Note:
+    - values are equal to WASAPI AUDIO_STREAM_CATEGORY enum
+    - supported since Windows 8.0, noop on earler versions
+    - values 1,2 are deprecated on Windows 10 and not included into enumeration
+
+ @version Available as of 19.6.0
+*/
+typedef enum PaWasapiStreamCategory
+{
+    eAudioCategoryOther           = 0,
+    eAudioCategoryCommunications  = 3,
+    eAudioCategoryAlerts          = 4,
+    eAudioCategorySoundEffects    = 5,
+    eAudioCategoryGameEffects     = 6,
+    eAudioCategoryGameMedia       = 7,
+    eAudioCategoryGameChat        = 8,
+    eAudioCategorySpeech          = 9,
+    eAudioCategoryMovie           = 10,
+    eAudioCategoryMedia           = 11
+}
+PaWasapiStreamCategory;
+
+
+/** Stream option.
+   Note:
+    - values are equal to WASAPI AUDCLNT_STREAMOPTIONS enum
+    - supported since Windows 8.1, noop on earler versions
+
+ @version Available as of 19.6.0
+*/
+typedef enum PaWasapiStreamOption
+{
+    eStreamOptionNone        = 0, //!< default
+    eStreamOptionRaw         = 1, //!< bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1
+    eStreamOptionMatchFormat = 2  //!< force WASAPI Audio Engine into a stream format, supported since Windows 10
+}
+PaWasapiStreamOption;
+
+
+/* Stream descriptor. */
+typedef struct PaWasapiStreamInfo 
+{
+    unsigned long size;             /**< sizeof(PaWasapiStreamInfo) */
+    PaHostApiTypeId hostApiType;    /**< paWASAPI */
+    unsigned long version;          /**< 1 */
+
+    unsigned long flags;            /**< collection of PaWasapiFlags */
+
+    /** Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
+       paWinWasapiUseChannelMask this allows you to specify which speakers 
+       to address in a multichannel stream. Constants for channelMask
+       are specified in pa_win_waveformat.h. Will be used only if 
+       paWinWasapiUseChannelMask flag is specified.
+    */
+    PaWinWaveFormatChannelMask channelMask;
+
+    /** Delivers raw data to callback obtained from GetBuffer() methods skipping
+       internal PortAudio processing inventory completely. userData parameter will 
+       be the same that was passed to Pa_OpenStream method. Will be used only if 
+       paWinWasapiRedirectHostProcessor flag is specified.
+    */
+    PaWasapiHostProcessorCallback hostProcessorOutput;
+    PaWasapiHostProcessorCallback hostProcessorInput;
+
+    /** Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
+       is specified.
+
+       Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
+       you shall specify same value for threadPriority or othervise one of the values will be used
+       to setup thread priority.
+    */
+    PaWasapiThreadPriority threadPriority;
+
+    /** Stream category.
+     @see PaWasapiStreamCategory
+     @version Available as of 19.6.0
+    */
+    PaWasapiStreamCategory streamCategory;
+
+    /** Stream option.
+     @see PaWasapiStreamOption
+     @version Available as of 19.6.0
+    */
+    PaWasapiStreamOption streamOption;
+} 
+PaWasapiStreamInfo;
+
+
+/** Returns default sound format for device. Format is represented by PaWinWaveFormat or 
+    WAVEFORMATEXTENSIBLE structure.
+
+ @param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
+ @param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
+ @param nDevice Device index.
+
+ @return Non-negative value indicating the number of bytes copied into format decriptor
+         or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+         or an error is encountered.
+*/
+int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );
+
+
+/** Returns device role (PaWasapiDeviceRole enum).
+
+ @param nDevice device index.
+
+ @return Non-negative value indicating device role or, a PaErrorCode (which are always negative)
+         if PortAudio is not initialized or an error is encountered.
+*/
+int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );
+
+
+/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
+    which makes calls to Pa_WriteStream/Pa_ReadStream.
+
+ @param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
+              method to revert thread priority to initial state.
+
+ @param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying 
+                       eThreadPriorityNone does nothing.
+
+ @return Error code indicating success or failure.
+ @see    PaWasapi_RevertThreadPriority
+*/
+PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );
+
+
+/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
+    which makes calls to Pa_WriteStream/Pa_ReadStream.
+
+ @param  hTask Task handle obtained by PaWasapi_BoostThreadPriority method.
+ @return Error code indicating success or failure.
+ @see    PaWasapi_BoostThreadPriority
+*/
+PaError PaWasapi_ThreadPriorityRevert( void *hTask );
+
+
+/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which 
+    can be locked for operations. Use this method as helper to findout maximal values of 
+    inputFrames/outputFrames of PaWasapiHostProcessorCallback.
+
+ @param  pStream Pointer to PaStream to query.
+ @param  nInput  Pointer to variable to receive number of input frames. Can be NULL.
+ @param  nOutput Pointer to variable to receive number of output frames. Can be NULL.
+ @return Error code indicating success or failure.
+ @see    PaWasapiHostProcessorCallback
+*/
+PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );
+
+
+/** Get number of jacks associated with a WASAPI device.  Use this method to determine if
+    there are any jacks associated with the provided WASAPI device.  Not all audio devices
+    will support this capability.  This is valid for both input and output devices.
+ @param  nDevice  device index.
+ @param  jcount   Number of jacks is returned in this variable
+ @return Error code indicating success or failure
+ @see PaWasapi_GetJackDescription
+ */
+PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);
+
+
+/** Get the jack description associated with a WASAPI device and jack number
+    Before this function is called, use PaWasapi_GetJackCount to determine the
+    number of jacks associated with device.  If jcount is greater than zero, then
+    each jack from 0 to jcount can be queried with this function to get the jack
+    description.
+ @param  nDevice  device index.
+ @param  jindex   Which jack to return information
+ @param  KSJACK_DESCRIPTION This structure filled in on success.
+ @return Error code indicating success or failure
+ @see PaWasapi_GetJackCount
+ */
+PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);
+
+
+/*
+    IMPORTANT:
+
+    WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
+    share modes. 
+    
+    Exclusive Mode:
+
+        Exclusive mode allows to deliver audio data directly to hardware bypassing
+        software mixing.
+        Exclusive mode is specified by 'paWinWasapiExclusive' flag.
+
+    Callback Interface:
+
+        Provides best audio quality with low latency. Callback interface is implemented in 
+        two versions:
+
+        1) Event-Driven:
+        This is the most powerful WASAPI implementation which provides glitch-free
+        audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is 
+        3 ms for HD Audio class audio chips. For the Shared mode latency can not be 
+        lower than 20 ms.
+
+        2) Poll-Driven:
+        Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
+        and provides latency at around 10-13ms. Polling must be used to overcome a system bug
+        under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply 
+        times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug 
+        does not exist in Vista x86 or Windows 7.
+        Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
+        WOW64 bug and sets 'paWinWasapiPolling' automatically.
+
+    Thread priority:
+
+        Normally thread priority is set automatically and does not require modification. Although
+        if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
+        flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority 
+        enum.
+
+    Blocking Interface:
+
+        Blocking interface is implemented but due to above described Poll-Driven method can not
+        deliver lowest possible latency. Specifying too low latency in Shared mode will result in 
+        distorted audio although Exclusive mode adds stability.
+
+    Pa_IsFormatSupported:
+
+        To check format with correct Share Mode (Exclusive/Shared) you must supply
+        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
+        PaStreamParameters::hostApiSpecificStreamInfo structure.
+
+    Pa_OpenStream:
+
+        To set desired Share Mode (Exclusive/Shared) you must supply
+        PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of 
+        PaStreamParameters::hostApiSpecificStreamInfo structure.
+*/
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_WASAPI_H */                                  
diff --git a/portaudio/include/pa_win_waveformat.h b/portaudio/include/pa_win_waveformat.h
--- a/portaudio/include/pa_win_waveformat.h
+++ b/portaudio/include/pa_win_waveformat.h
@@ -1,199 +1,199 @@
-#ifndef PA_WIN_WAVEFORMAT_H
-#define PA_WIN_WAVEFORMAT_H
-
-/*
- * PortAudio Portable Real-Time Audio Library
- * Windows WAVEFORMAT* data structure utilities
- * portaudio.h should be included before this file.
- *
- * Copyright (c) 2007 Ross Bencina
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup public_header
- @brief Windows specific PortAudio API extension and utilities header file.
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-	The following #defines for speaker channel masks are the same
-	as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed
-	in some cases, and casts to PaWinWaveFormatChannelMask added.
-*/
-
-typedef unsigned long PaWinWaveFormatChannelMask;
-
-/* Speaker Positions: */
-#define PAWIN_SPEAKER_FRONT_LEFT				((PaWinWaveFormatChannelMask)0x1)
-#define PAWIN_SPEAKER_FRONT_RIGHT				((PaWinWaveFormatChannelMask)0x2)
-#define PAWIN_SPEAKER_FRONT_CENTER				((PaWinWaveFormatChannelMask)0x4)
-#define PAWIN_SPEAKER_LOW_FREQUENCY				((PaWinWaveFormatChannelMask)0x8)
-#define PAWIN_SPEAKER_BACK_LEFT					((PaWinWaveFormatChannelMask)0x10)
-#define PAWIN_SPEAKER_BACK_RIGHT				((PaWinWaveFormatChannelMask)0x20)
-#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER		((PaWinWaveFormatChannelMask)0x40)
-#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER		((PaWinWaveFormatChannelMask)0x80)
-#define PAWIN_SPEAKER_BACK_CENTER				((PaWinWaveFormatChannelMask)0x100)
-#define PAWIN_SPEAKER_SIDE_LEFT					((PaWinWaveFormatChannelMask)0x200)
-#define PAWIN_SPEAKER_SIDE_RIGHT				((PaWinWaveFormatChannelMask)0x400)
-#define PAWIN_SPEAKER_TOP_CENTER				((PaWinWaveFormatChannelMask)0x800)
-#define PAWIN_SPEAKER_TOP_FRONT_LEFT			((PaWinWaveFormatChannelMask)0x1000)
-#define PAWIN_SPEAKER_TOP_FRONT_CENTER			((PaWinWaveFormatChannelMask)0x2000)
-#define PAWIN_SPEAKER_TOP_FRONT_RIGHT			((PaWinWaveFormatChannelMask)0x4000)
-#define PAWIN_SPEAKER_TOP_BACK_LEFT				((PaWinWaveFormatChannelMask)0x8000)
-#define PAWIN_SPEAKER_TOP_BACK_CENTER			((PaWinWaveFormatChannelMask)0x10000)
-#define PAWIN_SPEAKER_TOP_BACK_RIGHT			((PaWinWaveFormatChannelMask)0x20000)
-
-/* Bit mask locations reserved for future use */
-#define PAWIN_SPEAKER_RESERVED					((PaWinWaveFormatChannelMask)0x7FFC0000)
-
-/* Used to specify that any possible permutation of speaker configurations */
-#define PAWIN_SPEAKER_ALL						((PaWinWaveFormatChannelMask)0x80000000)
-
-/* DirectSound Speaker Config */
-#define PAWIN_SPEAKER_DIRECTOUT					0
-#define PAWIN_SPEAKER_MONO						(PAWIN_SPEAKER_FRONT_CENTER)
-#define PAWIN_SPEAKER_STEREO					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)
-#define PAWIN_SPEAKER_QUAD						(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
-#define PAWIN_SPEAKER_SURROUND					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)
-#define PAWIN_SPEAKER_5POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
-#define PAWIN_SPEAKER_7POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
-												PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)
-#define PAWIN_SPEAKER_5POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_SIDE_LEFT  | PAWIN_SPEAKER_SIDE_RIGHT)
-#define PAWIN_SPEAKER_7POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
-												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
-												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
-												PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)
-/*
- According to the Microsoft documentation:
- The following are obsolete 5.1 and 7.1 settings (they lack side speakers).  Note this means
- that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
- similarly obsolete but are unchanged for compatibility reasons).
-*/
-#define PAWIN_SPEAKER_5POINT1_BACK				PAWIN_SPEAKER_5POINT1
-#define PAWIN_SPEAKER_7POINT1_WIDE				PAWIN_SPEAKER_7POINT1
-
-/* DVD Speaker Positions */
-#define PAWIN_SPEAKER_GROUND_FRONT_LEFT			PAWIN_SPEAKER_FRONT_LEFT
-#define PAWIN_SPEAKER_GROUND_FRONT_CENTER		PAWIN_SPEAKER_FRONT_CENTER
-#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT		PAWIN_SPEAKER_FRONT_RIGHT
-#define PAWIN_SPEAKER_GROUND_REAR_LEFT			PAWIN_SPEAKER_BACK_LEFT
-#define PAWIN_SPEAKER_GROUND_REAR_RIGHT			PAWIN_SPEAKER_BACK_RIGHT
-#define PAWIN_SPEAKER_TOP_MIDDLE				PAWIN_SPEAKER_TOP_CENTER
-#define PAWIN_SPEAKER_SUPER_WOOFER				PAWIN_SPEAKER_LOW_FREQUENCY
-
-
-/*
-	PaWinWaveFormat is defined here to provide compatibility with
-	compilation environments which don't have headers defining 
-	WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.
-
-	The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an
-    unsigned char array here to avoid clients who include this file having 
-    a dependency on windows.h and mmsystem.h, and also to to avoid having
-    to write separate packing pragmas for each compiler.
-*/
-#define PAWIN_SIZEOF_WAVEFORMATEX   18
-#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)
-
-typedef struct{
-    unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];
-    unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */ 
-} PaWinWaveFormat;
-
-/*
-    WAVEFORMATEXTENSIBLE fields:
-    
-    union  {
-	    WORD  wValidBitsPerSample;    
-	    WORD  wSamplesPerBlock;    
-	    WORD  wReserved;  
-    } Samples;
-    DWORD  dwChannelMask;  
-    GUID  SubFormat;
-*/
-
-#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE	(PAWIN_SIZEOF_WAVEFORMATEX+0)
-#define PAWIN_INDEXOF_DWCHANNELMASK			(PAWIN_SIZEOF_WAVEFORMATEX+2)
-#define PAWIN_INDEXOF_SUBFORMAT				(PAWIN_SIZEOF_WAVEFORMATEX+6)
-
-
-/*
-    Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and
-    PaWin_InitializeWaveFormatExtensible functions below. These must match
-    the standard Windows WAVE_FORMAT_* values.
-*/
-#define PAWIN_WAVE_FORMAT_PCM               (1)
-#define PAWIN_WAVE_FORMAT_IEEE_FLOAT        (3)
-#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF   (0x0092)
-#define PAWIN_WAVE_FORMAT_WMA_SPDIF         (0x0164)
-
-
-/*
-    returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT
-    depending on the sampleFormat parameter.
-*/
-int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );
-
-/*
-	Use the following two functions to initialize the waveformat structure.
-*/
-
-void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, 
-		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );
-
-
-void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, 
-		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
-	    PaWinWaveFormatChannelMask channelMask );
-
-
-/* Map a channel count to a speaker channel mask */
-PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+#ifndef PA_WIN_WAVEFORMAT_H
+#define PA_WIN_WAVEFORMAT_H
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WAVEFORMAT* data structure utilities
+ * portaudio.h should be included before this file.
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief Windows specific PortAudio API extension and utilities header file.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+	The following #defines for speaker channel masks are the same
+	as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed
+	in some cases, and casts to PaWinWaveFormatChannelMask added.
+*/
+
+typedef unsigned long PaWinWaveFormatChannelMask;
+
+/* Speaker Positions: */
+#define PAWIN_SPEAKER_FRONT_LEFT				((PaWinWaveFormatChannelMask)0x1)
+#define PAWIN_SPEAKER_FRONT_RIGHT				((PaWinWaveFormatChannelMask)0x2)
+#define PAWIN_SPEAKER_FRONT_CENTER				((PaWinWaveFormatChannelMask)0x4)
+#define PAWIN_SPEAKER_LOW_FREQUENCY				((PaWinWaveFormatChannelMask)0x8)
+#define PAWIN_SPEAKER_BACK_LEFT					((PaWinWaveFormatChannelMask)0x10)
+#define PAWIN_SPEAKER_BACK_RIGHT				((PaWinWaveFormatChannelMask)0x20)
+#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER		((PaWinWaveFormatChannelMask)0x40)
+#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER		((PaWinWaveFormatChannelMask)0x80)
+#define PAWIN_SPEAKER_BACK_CENTER				((PaWinWaveFormatChannelMask)0x100)
+#define PAWIN_SPEAKER_SIDE_LEFT					((PaWinWaveFormatChannelMask)0x200)
+#define PAWIN_SPEAKER_SIDE_RIGHT				((PaWinWaveFormatChannelMask)0x400)
+#define PAWIN_SPEAKER_TOP_CENTER				((PaWinWaveFormatChannelMask)0x800)
+#define PAWIN_SPEAKER_TOP_FRONT_LEFT			((PaWinWaveFormatChannelMask)0x1000)
+#define PAWIN_SPEAKER_TOP_FRONT_CENTER			((PaWinWaveFormatChannelMask)0x2000)
+#define PAWIN_SPEAKER_TOP_FRONT_RIGHT			((PaWinWaveFormatChannelMask)0x4000)
+#define PAWIN_SPEAKER_TOP_BACK_LEFT				((PaWinWaveFormatChannelMask)0x8000)
+#define PAWIN_SPEAKER_TOP_BACK_CENTER			((PaWinWaveFormatChannelMask)0x10000)
+#define PAWIN_SPEAKER_TOP_BACK_RIGHT			((PaWinWaveFormatChannelMask)0x20000)
+
+/* Bit mask locations reserved for future use */
+#define PAWIN_SPEAKER_RESERVED					((PaWinWaveFormatChannelMask)0x7FFC0000)
+
+/* Used to specify that any possible permutation of speaker configurations */
+#define PAWIN_SPEAKER_ALL						((PaWinWaveFormatChannelMask)0x80000000)
+
+/* DirectSound Speaker Config */
+#define PAWIN_SPEAKER_DIRECTOUT					0
+#define PAWIN_SPEAKER_MONO						(PAWIN_SPEAKER_FRONT_CENTER)
+#define PAWIN_SPEAKER_STEREO					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)
+#define PAWIN_SPEAKER_QUAD						(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
+#define PAWIN_SPEAKER_SURROUND					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)
+#define PAWIN_SPEAKER_5POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_BACK_LEFT  | PAWIN_SPEAKER_BACK_RIGHT)
+#define PAWIN_SPEAKER_7POINT1					(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
+												PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)
+#define PAWIN_SPEAKER_5POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_SIDE_LEFT  | PAWIN_SPEAKER_SIDE_RIGHT)
+#define PAWIN_SPEAKER_7POINT1_SURROUND			(PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+												PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+												PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
+												PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)
+/*
+ According to the Microsoft documentation:
+ The following are obsolete 5.1 and 7.1 settings (they lack side speakers).  Note this means
+ that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
+ similarly obsolete but are unchanged for compatibility reasons).
+*/
+#define PAWIN_SPEAKER_5POINT1_BACK				PAWIN_SPEAKER_5POINT1
+#define PAWIN_SPEAKER_7POINT1_WIDE				PAWIN_SPEAKER_7POINT1
+
+/* DVD Speaker Positions */
+#define PAWIN_SPEAKER_GROUND_FRONT_LEFT			PAWIN_SPEAKER_FRONT_LEFT
+#define PAWIN_SPEAKER_GROUND_FRONT_CENTER		PAWIN_SPEAKER_FRONT_CENTER
+#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT		PAWIN_SPEAKER_FRONT_RIGHT
+#define PAWIN_SPEAKER_GROUND_REAR_LEFT			PAWIN_SPEAKER_BACK_LEFT
+#define PAWIN_SPEAKER_GROUND_REAR_RIGHT			PAWIN_SPEAKER_BACK_RIGHT
+#define PAWIN_SPEAKER_TOP_MIDDLE				PAWIN_SPEAKER_TOP_CENTER
+#define PAWIN_SPEAKER_SUPER_WOOFER				PAWIN_SPEAKER_LOW_FREQUENCY
+
+
+/*
+	PaWinWaveFormat is defined here to provide compatibility with
+	compilation environments which don't have headers defining 
+	WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.
+
+	The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an
+    unsigned char array here to avoid clients who include this file having 
+    a dependency on windows.h and mmsystem.h, and also to to avoid having
+    to write separate packing pragmas for each compiler.
+*/
+#define PAWIN_SIZEOF_WAVEFORMATEX   18
+#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)
+
+typedef struct{
+    unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];
+    unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */ 
+} PaWinWaveFormat;
+
+/*
+    WAVEFORMATEXTENSIBLE fields:
+    
+    union  {
+	    WORD  wValidBitsPerSample;    
+	    WORD  wSamplesPerBlock;    
+	    WORD  wReserved;  
+    } Samples;
+    DWORD  dwChannelMask;  
+    GUID  SubFormat;
+*/
+
+#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE	(PAWIN_SIZEOF_WAVEFORMATEX+0)
+#define PAWIN_INDEXOF_DWCHANNELMASK			(PAWIN_SIZEOF_WAVEFORMATEX+2)
+#define PAWIN_INDEXOF_SUBFORMAT				(PAWIN_SIZEOF_WAVEFORMATEX+6)
+
+
+/*
+    Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and
+    PaWin_InitializeWaveFormatExtensible functions below. These must match
+    the standard Windows WAVE_FORMAT_* values.
+*/
+#define PAWIN_WAVE_FORMAT_PCM               (1)
+#define PAWIN_WAVE_FORMAT_IEEE_FLOAT        (3)
+#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF   (0x0092)
+#define PAWIN_WAVE_FORMAT_WMA_SPDIF         (0x0164)
+
+
+/*
+    returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT
+    depending on the sampleFormat parameter.
+*/
+int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );
+
+/*
+	Use the following two functions to initialize the waveformat structure.
+*/
+
+void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, 
+		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );
+
+
+void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, 
+		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
+	    PaWinWaveFormatChannelMask channelMask );
+
+
+/* Map a channel count to a speaker channel mask */
+PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* PA_WIN_WAVEFORMAT_H */
diff --git a/portaudio/include/pa_win_wdmks.h b/portaudio/include/pa_win_wdmks.h
--- a/portaudio/include/pa_win_wdmks.h
+++ b/portaudio/include/pa_win_wdmks.h
@@ -1,7 +1,7 @@
 #ifndef PA_WIN_WDMKS_H
 #define PA_WIN_WDMKS_H
 /*
- * $Id: pa_win_wdmks.h 1812 2012-02-14 09:32:57Z robiwan $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * WDM/KS specific extensions
  *
@@ -52,13 +52,44 @@
 extern "C"
 {
 #endif /* __cplusplus */
+
+    /** Flags to indicate valid fields in PaWinWDMKSInfo.
+     @see PaWinWDMKSInfo
+     @version Available as of 19.5.0.
+    */
+    typedef enum PaWinWDMKSFlags
+    {
+        /** Makes WDMKS use the supplied latency figures instead of relying on the frame size reported
+         by the WaveCyclic device. Use at own risk!
+        */
+        paWinWDMKSOverrideFramesize   = (1 << 0),
+
+        /** Makes WDMKS (output stream) use the given channelMask instead of the default.
+          @version Available as of 19.5.0.
+        */
+        paWinWDMKSUseGivenChannelMask = (1 << 1),
+
+    } PaWinWDMKSFlags;
+
     typedef struct PaWinWDMKSInfo{
         unsigned long size;             /**< sizeof(PaWinWDMKSInfo) */
         PaHostApiTypeId hostApiType;    /**< paWDMKS */
         unsigned long version;          /**< 1 */
 
-        /* The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */
+        /** Flags indicate which fields are valid.
+         @see PaWinWDMKSFlags
+         @version Available as of 19.5.0.
+        */
+        unsigned long flags;
+
+        /** The number of packets to use for WaveCyclic devices, range is [2, 8]. Set to zero for default value of 2. */
         unsigned noOfPackets;
+
+        /** If paWinWDMKSUseGivenChannelMask bit is set in flags, use this as channelMask instead of default.
+         @see PaWinWDMKSFlags
+         @version Available as of 19.5.0.
+        */
+        unsigned channelMask;
     } PaWinWDMKSInfo;
 
     typedef enum PaWDMKSType
diff --git a/portaudio/include/pa_win_wmme.h b/portaudio/include/pa_win_wmme.h
--- a/portaudio/include/pa_win_wmme.h
+++ b/portaudio/include/pa_win_wmme.h
@@ -1,7 +1,7 @@
 #ifndef PA_WIN_WMME_H
 #define PA_WIN_WMME_H
 /*
- * $Id: pa_win_wmme.h 1592 2011-02-04 10:41:58Z rossb $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * MME specific extensions
  *
diff --git a/portaudio/include/portaudio.h b/portaudio/include/portaudio.h
--- a/portaudio/include/portaudio.h
+++ b/portaudio/include/portaudio.h
@@ -1,7 +1,7 @@
 #ifndef PORTAUDIO_H
 #define PORTAUDIO_H
 /*
- * $Id: portaudio.h 1859 2012-09-01 00:10:13Z philburk $
+ * $Id$
  * PortAudio Portable Real-Time Audio Library
  * PortAudio API Header File
  * Latest version available at: http://www.portaudio.com/
@@ -50,19 +50,70 @@
 {
 #endif /* __cplusplus */
 
- 
-/** Retrieve the release number of the currently running PortAudio build,
- eg 1900.
+/** Retrieve the release number of the currently running PortAudio build.
+ For example, for version "19.5.1" this will return 0x00130501.
+
+ @see paMakeVersionNumber
 */
 int Pa_GetVersion( void );
 
-
 /** Retrieve a textual description of the current PortAudio build,
- eg "PortAudio V19-devel 13 October 2002".
+ e.g. "PortAudio V19.5.0-devel, revision 1952M".
+ The format of the text may change in the future. Do not try to parse the
+ returned string.
+
+ @deprecated As of 19.5.0, use Pa_GetVersionInfo()->versionText instead.
 */
 const char* Pa_GetVersionText( void );
 
+/**
+ Generate a packed integer version number in the same format used
+ by Pa_GetVersion(). Use this to compare a specified version number with
+ the currently running version. For example:
 
+ @code
+     if( Pa_GetVersion() < paMakeVersionNumber(19,5,1) ) {}
+ @endcode
+
+ @see Pa_GetVersion, Pa_GetVersionInfo
+ @version Available as of 19.5.0.
+*/
+#define paMakeVersionNumber(major, minor, subminor) \
+    (((major)&0xFF)<<16 | ((minor)&0xFF)<<8 | ((subminor)&0xFF))
+
+
+/**
+ A structure containing PortAudio API version information.
+ @see Pa_GetVersionInfo, paMakeVersionNumber
+ @version Available as of 19.5.0.
+*/
+typedef struct PaVersionInfo {
+    int versionMajor;
+    int versionMinor;
+    int versionSubMinor;
+    /**
+     This is currently the Git revision hash but may change in the future.
+     The versionControlRevision is updated by running a script before compiling the library.
+     If the update does not occur, this value may refer to an earlier revision.
+    */
+    const char *versionControlRevision;
+    /** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
+    const char *versionText;
+} PaVersionInfo;
+    
+/** Retrieve version information for the currently running PortAudio build.
+ @return A pointer to an immutable PaVersionInfo structure.
+
+ @note This function can be called at any time. It does not require PortAudio
+ to be initialized. The structure pointed to is statically allocated. Do not
+ attempt to free it or modify it.
+
+ @see PaVersionInfo, paMakeVersionNumber
+ @version Available as of 19.5.0.
+*/
+const PaVersionInfo* Pa_GetVersionInfo();
+
+
 /** Error codes returned by PortAudio functions.
  Note that with the exception of paNoError, all PaErrorCodes are negative.
 */
@@ -900,7 +951,7 @@
  (ie once a call to Pa_StopStream() will not block).
  A stream will become inactive after the stream callback returns non-zero,
  or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
- output, if the stream callback returns paComplete, or Pa_StopStream is called,
+ output, if the stream callback returns paComplete, or Pa_StopStream() is called,
  the stream finished callback will not be called until all generated sample data
  has been played.
  
@@ -1098,7 +1149,7 @@
 
 
 /** Write samples to an output stream. This function doesn't return until the
- entire buffer has been consumed - this may involve waiting for the operating
+ entire buffer has been written - this may involve waiting for the operating
  system to consume the data.
 
  @param stream A pointer to an open stream previously created with Pa_OpenStream.
diff --git a/portaudio/src/common/pa_allocation.c b/portaudio/src/common/pa_allocation.c
--- a/portaudio/src/common/pa_allocation.c
+++ b/portaudio/src/common/pa_allocation.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_allocation.c 1097 2006-08-26 08:27:53Z rossb $
+ * $Id$
  * Portable Audio I/O Library allocation group implementation
  * memory allocation group for tracking allocation groups
  *
diff --git a/portaudio/src/common/pa_allocation.h b/portaudio/src/common/pa_allocation.h
--- a/portaudio/src/common/pa_allocation.h
+++ b/portaudio/src/common/pa_allocation.h
@@ -1,7 +1,7 @@
 #ifndef PA_ALLOCATION_H
 #define PA_ALLOCATION_H
 /*
- * $Id: pa_allocation.h 1339 2008-02-15 07:50:33Z rossb $
+ * $Id$
  * Portable Audio I/O Library allocation context header
  * memory allocation context for tracking allocation groups
  *
diff --git a/portaudio/src/common/pa_converters.c b/portaudio/src/common/pa_converters.c
--- a/portaudio/src/common/pa_converters.c
+++ b/portaudio/src/common/pa_converters.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_converters.c 1748 2011-09-01 22:08:32Z philburk $
+ * $Id$
  * Portable Audio I/O Library sample conversion mechanism
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/common/pa_converters.h b/portaudio/src/common/pa_converters.h
--- a/portaudio/src/common/pa_converters.h
+++ b/portaudio/src/common/pa_converters.h
@@ -1,7 +1,7 @@
 #ifndef PA_CONVERTERS_H
 #define PA_CONVERTERS_H
 /*
- * $Id: pa_converters.h 1097 2006-08-26 08:27:53Z rossb $
+ * $Id$
  * Portable Audio I/O Library sample conversion mechanism
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/common/pa_cpuload.c b/portaudio/src/common/pa_cpuload.c
--- a/portaudio/src/common/pa_cpuload.c
+++ b/portaudio/src/common/pa_cpuload.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_cpuload.c 1577 2011-02-01 13:03:45Z rossb $
+ * $Id$
  * Portable Audio I/O Library CPU Load measurement functions
  * Portable CPU load measurement facility.
  *
diff --git a/portaudio/src/common/pa_cpuload.h b/portaudio/src/common/pa_cpuload.h
--- a/portaudio/src/common/pa_cpuload.h
+++ b/portaudio/src/common/pa_cpuload.h
@@ -1,7 +1,7 @@
 #ifndef PA_CPULOAD_H
 #define PA_CPULOAD_H
 /*
- * $Id: pa_cpuload.h 1097 2006-08-26 08:27:53Z rossb $
+ * $Id$
  * Portable Audio I/O Library CPU Load measurement functions
  * Portable CPU load measurement facility.
  *
diff --git a/portaudio/src/common/pa_debugprint.c b/portaudio/src/common/pa_debugprint.c
--- a/portaudio/src/common/pa_debugprint.c
+++ b/portaudio/src/common/pa_debugprint.c
@@ -1,123 +1,123 @@
-/*
- * $Id: pa_log.c $
- * Portable Audio I/O Library Multi-Host API front end
- * Validate function parameters and manage multiple host APIs.
- *
- * Based on the Open Source API proposed by Ross Bencina
- * Copyright (c) 1999-2006 Ross Bencina, Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however,
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also
- * requested that these non-binding requests be included along with the
- * license above.
- */
-
-/** @file
- @ingroup common_src
-
- @brief Implements log function.
-
-    PaUtil_SetLogPrintFunction can be user called to replace the provided
-	DefaultLogPrint function, which writes to stderr.
-	One can NOT pass var_args across compiler/dll boundaries as it is not
-	"byte code/abi portable". So the technique used here is to allocate a local
-	a static array, write in it, then callback the user with a pointer to its
-	start.
-*/
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pa_debugprint.h"
-
-// for OutputDebugStringA
-#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)
-	#define WIN32_LEAN_AND_MEAN // exclude rare headers
-	#include "windows.h"
-#endif
-
-// User callback
-static PaUtilLogCallback userCB = NULL;
-
-// Sets user callback
-void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)
-{
-    userCB = cb;
-}
-
-/*
- If your platform doesnt have vsnprintf, you are stuck with a
- VERY dangerous alternative, vsprintf (with no n)
-*/
-#if _MSC_VER
-	/* Some Windows Mobile SDKs don't define vsnprintf but all define _vsnprintf (hopefully).
-	   According to MSDN "vsnprintf is identical to _vsnprintf". So we use _vsnprintf with MSC.
-	*/
-	#define VSNPRINTF  _vsnprintf 
-#else
-	#define VSNPRINTF  vsnprintf
-#endif
-
-#define PA_LOG_BUF_SIZE 2048
-
-void PaUtil_DebugPrint( const char *format, ... )
-{
-	// Optional logging into Output console of Visual Studio
-#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)
-	{
-		char buf[PA_LOG_BUF_SIZE];
-		va_list ap;
-		va_start(ap, format);
-		VSNPRINTF(buf, sizeof(buf), format, ap);
-		buf[sizeof(buf)-1] = 0;
-		OutputDebugStringA(buf);
-		va_end(ap);
-	}
-#endif
-
-	// Output to User-Callback
-    if (userCB != NULL)
-    {
-        char strdump[PA_LOG_BUF_SIZE];
-        va_list ap;
-        va_start(ap, format);
-        VSNPRINTF(strdump, sizeof(strdump), format, ap);
-        strdump[sizeof(strdump)-1] = 0;
-        userCB(strdump);
-        va_end(ap);
-    }
-    else
-	// Standard output to stderr
-    {
-        va_list ap;
-        va_start(ap, format);
-        vfprintf(stderr, format, ap);
-        va_end(ap);
-        fflush(stderr);
-    }
-}
+/*
+ * $Id: pa_log.c $
+ * Portable Audio I/O Library Multi-Host API front end
+ * Validate function parameters and manage multiple host APIs.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2006 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup common_src
+
+ @brief Implements log function.
+
+    PaUtil_SetLogPrintFunction can be user called to replace the provided
+	DefaultLogPrint function, which writes to stderr.
+	One can NOT pass var_args across compiler/dll boundaries as it is not
+	"byte code/abi portable". So the technique used here is to allocate a local
+	a static array, write in it, then callback the user with a pointer to its
+	start.
+*/
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "pa_debugprint.h"
+
+// for OutputDebugStringA
+#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)
+	#define WIN32_LEAN_AND_MEAN // exclude rare headers
+	#include "windows.h"
+#endif
+
+// User callback
+static PaUtilLogCallback userCB = NULL;
+
+// Sets user callback
+void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)
+{
+    userCB = cb;
+}
+
+/*
+ If your platform doesnt have vsnprintf, you are stuck with a
+ VERY dangerous alternative, vsprintf (with no n)
+*/
+#if _MSC_VER
+	/* Some Windows Mobile SDKs don't define vsnprintf but all define _vsnprintf (hopefully).
+	   According to MSDN "vsnprintf is identical to _vsnprintf". So we use _vsnprintf with MSC.
+	*/
+	#define VSNPRINTF  _vsnprintf 
+#else
+	#define VSNPRINTF  vsnprintf
+#endif
+
+#define PA_LOG_BUF_SIZE 2048
+
+void PaUtil_DebugPrint( const char *format, ... )
+{
+	// Optional logging into Output console of Visual Studio
+#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)
+	{
+		char buf[PA_LOG_BUF_SIZE];
+		va_list ap;
+		va_start(ap, format);
+		VSNPRINTF(buf, sizeof(buf), format, ap);
+		buf[sizeof(buf)-1] = 0;
+		OutputDebugStringA(buf);
+		va_end(ap);
+	}
+#endif
+
+	// Output to User-Callback
+    if (userCB != NULL)
+    {
+        char strdump[PA_LOG_BUF_SIZE];
+        va_list ap;
+        va_start(ap, format);
+        VSNPRINTF(strdump, sizeof(strdump), format, ap);
+        strdump[sizeof(strdump)-1] = 0;
+        userCB(strdump);
+        va_end(ap);
+    }
+    else
+	// Standard output to stderr
+    {
+        va_list ap;
+        va_start(ap, format);
+        vfprintf(stderr, format, ap);
+        va_end(ap);
+        fflush(stderr);
+    }
+}
diff --git a/portaudio/src/common/pa_debugprint.h b/portaudio/src/common/pa_debugprint.h
--- a/portaudio/src/common/pa_debugprint.h
+++ b/portaudio/src/common/pa_debugprint.h
@@ -1,149 +1,149 @@
-#ifndef PA_LOG_H
-#define PA_LOG_H
-/*
- * Log file redirector function
- * Copyright (c) 1999-2006 Ross Bencina, Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however,
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also
- * requested that these non-binding requests be included along with the
- * license above.
- */
-
-/** @file
- @ingroup common_src
-*/
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-
-
-void PaUtil_DebugPrint( const char *format, ... );
-
-
-/*
-    The basic format for log messages is described below. If you need to
-    add any log messages, please follow this format.
-
-    Function entry (void function):
-
-        "FunctionName called.\n"
-
-    Function entry (non void function):
-
-        "FunctionName called:\n"
-        "\tParam1Type param1: param1Value\n"
-        "\tParam2Type param2: param2Value\n"      (etc...)
-
-
-    Function exit (no return value):
-
-        "FunctionName returned.\n"
-
-    Function exit (simple return value):
-
-        "FunctionName returned:\n"
-        "\tReturnType: returnValue\n"
-
-    If the return type is an error code, the error text is displayed in ()
-
-    If the return type is not an error code, but has taken a special value
-    because an error occurred, then the reason for the error is shown in []
-
-    If the return type is a struct ptr, the struct is dumped.
-
-    See the code below for examples
-*/
-
-/** PA_DEBUG() provides a simple debug message printing facility. The macro
- passes it's argument to a printf-like function called PaUtil_DebugPrint()
- which prints to stderr and always flushes the stream after printing.
- Because preprocessor macros cannot directly accept variable length argument
- lists, calls to the macro must include an additional set of parenthesis, eg:
- PA_DEBUG(("errorno: %d", 1001 ));
-*/
-
-
-#ifdef PA_ENABLE_DEBUG_OUTPUT
-#define PA_DEBUG(x) PaUtil_DebugPrint x ;
-#else
-#define PA_DEBUG(x)
-#endif
-
-
-#ifdef PA_LOG_API_CALLS
-#define PA_LOGAPI(x) PaUtil_DebugPrint x 
-
-#define PA_LOGAPI_ENTER(functionName) PaUtil_DebugPrint( functionName " called.\n" )
-
-#define PA_LOGAPI_ENTER_PARAMS(functionName) PaUtil_DebugPrint( functionName " called:\n" )
-
-#define PA_LOGAPI_EXIT(functionName) PaUtil_DebugPrint( functionName " returned.\n" )
-
-#define PA_LOGAPI_EXIT_PAERROR( functionName, result ) \
-	PaUtil_DebugPrint( functionName " returned:\n" ); \
-	PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )
-
-#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result ) \
-	PaUtil_DebugPrint( functionName " returned:\n" ); \
-	PaUtil_DebugPrint("\t" resultFormatString "\n", result )
-
-#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result ) \
-	PaUtil_DebugPrint( functionName " returned:\n" ); \
-	if( result > 0 ) \
-        PaUtil_DebugPrint("\t" positiveResultFormatString "\n", result ); \
-    else \
-        PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )
-#else
-#define PA_LOGAPI(x)
-#define PA_LOGAPI_ENTER(functionName)
-#define PA_LOGAPI_ENTER_PARAMS(functionName)
-#define PA_LOGAPI_EXIT(functionName)
-#define PA_LOGAPI_EXIT_PAERROR( functionName, result )
-#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result )
-#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result )
-#endif
-
-    
-typedef void (*PaUtilLogCallback ) (const char *log);
-
-/**
-    Install user provided log function
-*/
-void PaUtil_SetDebugPrintFunction(PaUtilLogCallback  cb);
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* PA_LOG_H */
+#ifndef PA_LOG_H
+#define PA_LOG_H
+/*
+ * Log file redirector function
+ * Copyright (c) 1999-2006 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup common_src
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+
+void PaUtil_DebugPrint( const char *format, ... );
+
+
+/*
+    The basic format for log messages is described below. If you need to
+    add any log messages, please follow this format.
+
+    Function entry (void function):
+
+        "FunctionName called.\n"
+
+    Function entry (non void function):
+
+        "FunctionName called:\n"
+        "\tParam1Type param1: param1Value\n"
+        "\tParam2Type param2: param2Value\n"      (etc...)
+
+
+    Function exit (no return value):
+
+        "FunctionName returned.\n"
+
+    Function exit (simple return value):
+
+        "FunctionName returned:\n"
+        "\tReturnType: returnValue\n"
+
+    If the return type is an error code, the error text is displayed in ()
+
+    If the return type is not an error code, but has taken a special value
+    because an error occurred, then the reason for the error is shown in []
+
+    If the return type is a struct ptr, the struct is dumped.
+
+    See the code below for examples
+*/
+
+/** PA_DEBUG() provides a simple debug message printing facility. The macro
+ passes it's argument to a printf-like function called PaUtil_DebugPrint()
+ which prints to stderr and always flushes the stream after printing.
+ Because preprocessor macros cannot directly accept variable length argument
+ lists, calls to the macro must include an additional set of parenthesis, eg:
+ PA_DEBUG(("errorno: %d", 1001 ));
+*/
+
+
+#ifdef PA_ENABLE_DEBUG_OUTPUT
+#define PA_DEBUG(x) PaUtil_DebugPrint x ;
+#else
+#define PA_DEBUG(x)
+#endif
+
+
+#ifdef PA_LOG_API_CALLS
+#define PA_LOGAPI(x) PaUtil_DebugPrint x 
+
+#define PA_LOGAPI_ENTER(functionName) PaUtil_DebugPrint( functionName " called.\n" )
+
+#define PA_LOGAPI_ENTER_PARAMS(functionName) PaUtil_DebugPrint( functionName " called:\n" )
+
+#define PA_LOGAPI_EXIT(functionName) PaUtil_DebugPrint( functionName " returned.\n" )
+
+#define PA_LOGAPI_EXIT_PAERROR( functionName, result ) \
+	PaUtil_DebugPrint( functionName " returned:\n" ); \
+	PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )
+
+#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result ) \
+	PaUtil_DebugPrint( functionName " returned:\n" ); \
+	PaUtil_DebugPrint("\t" resultFormatString "\n", result )
+
+#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result ) \
+	PaUtil_DebugPrint( functionName " returned:\n" ); \
+	if( result > 0 ) \
+        PaUtil_DebugPrint("\t" positiveResultFormatString "\n", result ); \
+    else \
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )
+#else
+#define PA_LOGAPI(x)
+#define PA_LOGAPI_ENTER(functionName)
+#define PA_LOGAPI_ENTER_PARAMS(functionName)
+#define PA_LOGAPI_EXIT(functionName)
+#define PA_LOGAPI_EXIT_PAERROR( functionName, result )
+#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result )
+#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result )
+#endif
+
+    
+typedef void (*PaUtilLogCallback ) (const char *log);
+
+/**
+    Install user provided log function
+*/
+void PaUtil_SetDebugPrintFunction(PaUtilLogCallback  cb);
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_LOG_H */
diff --git a/portaudio/src/common/pa_dither.c b/portaudio/src/common/pa_dither.c
--- a/portaudio/src/common/pa_dither.c
+++ b/portaudio/src/common/pa_dither.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_dither.c 1418 2009-10-12 21:00:53Z philburk $
+ * $Id$
  * Portable Audio I/O Library triangular dither generator
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/common/pa_dither.h b/portaudio/src/common/pa_dither.h
--- a/portaudio/src/common/pa_dither.h
+++ b/portaudio/src/common/pa_dither.h
@@ -1,7 +1,7 @@
 #ifndef PA_DITHER_H
 #define PA_DITHER_H
 /*
- * $Id: pa_dither.h 1418 2009-10-12 21:00:53Z philburk $
+ * $Id$
  * Portable Audio I/O Library triangular dither generator
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/common/pa_endianness.h b/portaudio/src/common/pa_endianness.h
--- a/portaudio/src/common/pa_endianness.h
+++ b/portaudio/src/common/pa_endianness.h
@@ -1,7 +1,7 @@
 #ifndef PA_ENDIANNESS_H
 #define PA_ENDIANNESS_H
 /*
- * $Id: pa_endianness.h 1324 2008-01-27 02:03:30Z bjornroche $
+ * $Id$
  * Portable Audio I/O Library current platform endianness macros
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/common/pa_front.c b/portaudio/src/common/pa_front.c
--- a/portaudio/src/common/pa_front.c
+++ b/portaudio/src/common/pa_front.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_front.c 1880 2012-12-04 18:39:48Z rbencina $
+ * $Id$
  * Portable Audio I/O Library Multi-Host API front end
  * Validate function parameters and manage multiple host APIs.
  *
@@ -27,26 +27,26 @@
  */
 
 /*
- * The text above constitutes the entire PortAudio license; however, 
+ * The text above constitutes the entire PortAudio license; however,
  * the PortAudio community also makes the following non-binding requests:
  *
  * Any person wishing to distribute modifications to the Software is
  * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
  * license above.
  */
 
 /** @file
  @ingroup common_src
 
- @brief Implements PortAudio API functions defined in portaudio.h, checks 
+ @brief Implements PortAudio API functions defined in portaudio.h, checks
  some errors, delegates platform-specific behavior to host API implementations.
- 
- Implements the functions defined in the PortAudio API (portaudio.h), 
- validates some parameters and checks for state inconsistencies before 
- forwarding API requests to specific Host API implementations (via the 
- interface declared in pa_hostapi.h), and Streams (via the interface 
+
+ Implements the functions defined in the PortAudio API (portaudio.h),
+ validates some parameters and checks for state inconsistencies before
+ forwarding API requests to specific Host API implementations (via the
+ interface declared in pa_hostapi.h), and Streams (via the interface
  declared in pa_stream.h).
 
  This file manages initialization and termination of Host API
@@ -65,6 +65,7 @@
 #include <stdio.h>
 #include <memory.h>
 #include <string.h>
+#include <stdlib.h> /* needed for strtol() */
 #include <assert.h> /* needed by PA_VALIDATE_ENDIANNESS */
 
 #include "portaudio.h"
@@ -76,25 +77,63 @@
 #include "pa_trace.h" /* still usefull?*/
 #include "pa_debugprint.h"
 
+#ifndef PA_GIT_REVISION
+#include "pa_gitrevision.h"
+#endif
 
-#define PA_VERSION_  1899
-#define PA_VERSION_TEXT_ "PortAudio V19-devel (built " __DATE__  " " __TIME__ ")"
+/**
+ * This is incremented if we make incompatible API changes.
+ * This version scheme is based loosely on http://semver.org/
+ */
+#define paVersionMajor     19
 
+/**
+ * This is incremented when we add functionality in a backwards-compatible manner.
+ * Or it is set to zero when paVersionMajor is incremented.
+ */
+#define paVersionMinor      6
 
+/**
+ * This is incremented when we make backwards-compatible bug fixes.
+ * Or it is set to zero when paVersionMinor changes.
+ */
+#define paVersionSubMinor   0
 
+/**
+ * This is a combination of paVersionMajor, paVersionMinor and paVersionSubMinor.
+ * It will always increase so that version numbers can be compared as integers to
+ * see which is later.
+ */
+#define paVersion  paMakeVersionNumber(paVersionMajor, paVersionMinor, paVersionSubMinor)
 
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
+#define PA_VERSION_STRING_ TOSTRING(paVersionMajor) "." TOSTRING(paVersionMinor) "." TOSTRING(paVersionSubMinor)
+#define PA_VERSION_TEXT_   "PortAudio V" PA_VERSION_STRING_ "-devel, revision " TOSTRING(PA_GIT_REVISION)
+
 int Pa_GetVersion( void )
 {
-    return PA_VERSION_;
+    return paVersion;
 }
 
-
 const char* Pa_GetVersionText( void )
 {
     return PA_VERSION_TEXT_;
 }
 
+static PaVersionInfo versionInfo_ = {
+    /*.versionMajor =*/ paVersionMajor,
+    /*.versionMinor =*/ paVersionMinor,
+    /*.versionSubMinor =*/ paVersionSubMinor,
+    /*.versionControlRevision =*/ TOSTRING(PA_GIT_REVISION),
+    /*.versionText =*/ PA_VERSION_TEXT_
+};
 
+const PaVersionInfo* Pa_GetVersionInfo()
+{
+    return &versionInfo_;
+}
 
 #define PA_LAST_HOST_ERROR_TEXT_LENGTH_  1024
 
@@ -170,7 +209,7 @@
     if( !hostApis_ )
     {
         result = paInsufficientMemory;
-        goto error; 
+        goto error;
     }
 
     hostApisCount_ = 0;
@@ -196,11 +235,11 @@
             assert( hostApi->info.defaultInputDevice < hostApi->info.deviceCount );
             assert( hostApi->info.defaultOutputDevice < hostApi->info.deviceCount );
 
-            /* the first successfully initialized host API with a default input *or* 
+            /* the first successfully initialized host API with a default input *or*
                output device is used as the default host API.
             */
             if( (defaultHostApiIndex_ == -1) &&
-                    ( hostApi->info.defaultInputDevice != paNoDevice 
+                    ( hostApi->info.defaultInputDevice != paNoDevice
                         || hostApi->info.defaultOutputDevice != paNoDevice ) )
             {
                 defaultHostApiIndex_ = hostApisCount_;
@@ -238,7 +277,7 @@
     <device> belongs and returns it. if <hostSpecificDeviceIndex> is
     non-null, the host specific device index is returned in it.
     returns -1 if <device> is out of range.
- 
+
 */
 static int FindHostApi( PaDeviceIndex device, int *hostSpecificDeviceIndex )
 {
@@ -328,7 +367,7 @@
     {
         PA_VALIDATE_TYPE_SIZES;
         PA_VALIDATE_ENDIANNESS;
-        
+
         PaUtil_InitializeClock();
         PaUtil_ResetTraceMessages();
 
@@ -351,7 +390,8 @@
 
     if( PA_IS_INITIALISED_ )
     {
-        if( --initializationCount_ == 0 )
+        // leave initializationCount_>0 so that Pa_CloseStream() can execute
+        if( initializationCount_ == 1 )
         {
             CloseOpenStreams();
 
@@ -359,6 +399,7 @@
 
             PaUtil_DumpTraceMessages();
         }
+        --initializationCount_;
         result = paNoError;
     }
     else
@@ -415,11 +456,11 @@
     case paCanNotWriteToAnInputOnlyStream:      result = "Can't write to an input only stream"; break;
     case paIncompatibleStreamHostApi: result = "Incompatible stream host API"; break;
     case paBadBufferPtr:             result = "Bad buffer pointer"; break;
-    default:                         
+    default:
 		if( errorCode > 0 )
-			result = "Invalid error code (value greater than zero)"; 
+			result = "Invalid error code (value greater than zero)";
         else
-			result = "Invalid error code"; 
+			result = "Invalid error code";
         break;
     }
     return result;
@@ -430,7 +471,7 @@
 {
     PaHostApiIndex result;
     int i;
-    
+
     PA_LOGAPI_ENTER_PARAMS( "Pa_HostApiTypeIdToHostApiIndex" );
     PA_LOGAPI(("\tPaHostApiTypeId type: %d\n", type ));
 
@@ -441,14 +482,14 @@
     else
     {
         result = paHostApiNotFound;
-        
+
         for( i=0; i < hostApisCount_; ++i )
         {
             if( hostApis_[i]->info.type == type )
             {
                 result = i;
                 break;
-            }         
+            }
         }
     }
 
@@ -463,7 +504,7 @@
 {
     PaError result;
     int i;
-    
+
     if( !PA_IS_INITIALISED_ )
     {
         result = paNotInitialized;
@@ -471,7 +512,7 @@
     else
     {
         result = paHostApiNotFound;
-                
+
         for( i=0; i < hostApisCount_; ++i )
         {
             if( hostApis_[i]->info.type == type )
@@ -492,7 +533,7 @@
 {
     PaError result;
     PaDeviceIndex x;
-    
+
     x = device - hostApi->privatePaFrontInfo.baseDeviceIndex;
 
     if( x < 0 || x >= hostApi->info.deviceCount )
@@ -577,7 +618,7 @@
     else if( hostApi < 0 || hostApi >= hostApisCount_ )
     {
         info = NULL;
-        
+
         PA_LOGAPI(("Pa_GetHostApiInfo returned:\n" ));
         PA_LOGAPI(("\tPaHostApiInfo*: NULL [ hostApi out of range ]\n" ));
 
@@ -686,7 +727,7 @@
 {
     PaHostApiIndex hostApi;
     PaDeviceIndex result;
-    
+
     PA_LOGAPI_ENTER( "Pa_GetDefaultOutputDevice" );
 
     hostApi = Pa_GetDefaultHostApi();
@@ -770,7 +811,7 @@
     ValidateOpenStreamParameters() checks that parameters to Pa_OpenStream()
     conform to the expected values as described below. This function is
     also designed to be used with the proposed Pa_IsFormatSupported() function.
-    
+
     There are basically two types of validation that could be performed:
     Generic conformance validation, and device capability mismatch
     validation. This function performs only generic conformance validation.
@@ -779,21 +820,21 @@
     combinations of parameters - for example, even if the sampleRate
     seems ok, it might not be for a duplex stream - we have no way of
     checking this in an API-neutral way, so we don't try.
- 
+
     On success the function returns PaNoError and fills in hostApi,
     hostApiInputDeviceID, and hostApiOutputDeviceID fields. On failure
     the function returns an error code indicating the first encountered
     parameter error.
- 
- 
+
+
     If ValidateOpenStreamParameters() returns paNoError, the following
     assertions are guaranteed to be true.
- 
+
     - at least one of inputParameters & outputParmeters is valid (not NULL)
 
     - if inputParameters & outputParameters are both valid, that
         inputParameters->device & outputParameters->device  both use the same host api
- 
+
     PaDeviceIndex inputParameters->device
         - is within range (0 to Pa_GetDeviceCount-1) Or:
         - is paUseHostApiSpecificDeviceSpecification and
@@ -803,30 +844,30 @@
     int inputParameters->channelCount
         - if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, channelCount is > 0
         - upper bound is NOT validated against device capabilities
- 
+
     PaSampleFormat inputParameters->sampleFormat
         - is one of the sample formats defined in portaudio.h
 
     void *inputParameters->hostApiSpecificStreamInfo
         - if supplied its hostApi field matches the input device's host Api
- 
+
     PaDeviceIndex outputParmeters->device
         - is within range (0 to Pa_GetDeviceCount-1)
- 
+
     int outputParmeters->channelCount
         - if inputDevice is valid, channelCount is > 0
         - upper bound is NOT validated against device capabilities
- 
+
     PaSampleFormat outputParmeters->sampleFormat
         - is one of the sample formats defined in portaudio.h
-        
+
     void *outputParmeters->hostApiSpecificStreamInfo
         - if supplied its hostApi field matches the output device's host Api
- 
+
     double sampleRate
         - is not an 'absurd' rate (less than 1000. or greater than 384000.)
         - sampleRate is NOT validated against device capabilities
- 
+
     PaStreamFlags streamFlags
         - unused platform neutral flags are zero
         - paNeverDropInput is only used for full-duplex callback streams with
@@ -953,7 +994,7 @@
                         != (*hostApi)->info.type )
                     return paIncompatibleHostApiSpecificStreamInfo;
             }
-        }   
+        }
 
         if( (inputParameters != NULL) && (outputParameters != NULL) )
         {
@@ -962,8 +1003,8 @@
                 return paBadIODeviceCombination;
         }
     }
-    
-    
+
+
     /* Check for absurd sample rates. */
     if( (sampleRate < 1000.0) || (sampleRate > 384000.0) )
         return paInvalidSampleRate;
@@ -985,7 +1026,7 @@
         if( framesPerBuffer != paFramesPerBufferUnspecified )
             return paInvalidFlag;
     }
-    
+
     return paNoError;
 }
 
@@ -1025,7 +1066,7 @@
         PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
         PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
     }
-    
+
     PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
 #endif
 
@@ -1048,8 +1089,8 @@
         PA_LOGAPI_EXIT_PAERROR( "Pa_IsFormatSupported", result );
         return result;
     }
-    
 
+
     if( inputParameters )
     {
         hostApiInputParameters.device = hostApiInputDevice;
@@ -1135,7 +1176,7 @@
         PA_LOGAPI(("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency ));
         PA_LOGAPI(("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo ));
     }
-    
+
     PA_LOGAPI(("\tdouble sampleRate: %g\n", sampleRate ));
     PA_LOGAPI(("\tunsigned long framesPerBuffer: %d\n", framesPerBuffer ));
     PA_LOGAPI(("\tPaStreamFlags streamFlags: 0x%x\n", streamFlags ));
@@ -1182,8 +1223,8 @@
         PA_LOGAPI(("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) ));
         return result;
     }
-    
 
+
     if( inputParameters )
     {
         hostApiInputParameters.device = hostApiInputDevice;
@@ -1256,8 +1297,8 @@
     {
         hostApiInputParameters.device = Pa_GetDefaultInputDevice();
 		if( hostApiInputParameters.device == paNoDevice )
-			return paDeviceUnavailable; 
-	
+			return paDeviceUnavailable;
+
         hostApiInputParameters.channelCount = inputChannelCount;
         hostApiInputParameters.sampleFormat = sampleFormat;
         /* defaultHighInputLatency is used below instead of
@@ -1265,7 +1306,7 @@
            stream to work reliably than it is for it to work with the lowest
            latency.
          */
-        hostApiInputParameters.suggestedLatency = 
+        hostApiInputParameters.suggestedLatency =
              Pa_GetDeviceInfo( hostApiInputParameters.device )->defaultHighInputLatency;
         hostApiInputParameters.hostApiSpecificStreamInfo = NULL;
         hostApiInputParametersPtr = &hostApiInputParameters;
@@ -1279,7 +1320,7 @@
     {
         hostApiOutputParameters.device = Pa_GetDefaultOutputDevice();
 		if( hostApiOutputParameters.device == paNoDevice )
-			return paDeviceUnavailable; 
+			return paDeviceUnavailable;
 
         hostApiOutputParameters.channelCount = outputChannelCount;
         hostApiOutputParameters.sampleFormat = sampleFormat;
@@ -1663,7 +1704,7 @@
             else if( result == 1 )
             {
                 result = paStreamIsStopped;
-            }  
+            }
         }
     }
 
diff --git a/portaudio/src/common/pa_gitrevision.h b/portaudio/src/common/pa_gitrevision.h
new file mode 100644
--- /dev/null
+++ b/portaudio/src/common/pa_gitrevision.h
@@ -0,0 +1,1 @@
+#define PA_GIT_REVISION 396fe4b6699ae929d3a685b3ef8a7e97396139a4
diff --git a/portaudio/src/common/pa_hostapi.h b/portaudio/src/common/pa_hostapi.h
--- a/portaudio/src/common/pa_hostapi.h
+++ b/portaudio/src/common/pa_hostapi.h
@@ -1,7 +1,7 @@
 #ifndef PA_HOSTAPI_H
 #define PA_HOSTAPI_H
 /*
- * $Id: pa_hostapi.h 1880 2012-12-04 18:39:48Z rbencina $
+ * $Id$
  * Portable Audio I/O Library
  * host api representation
  *
diff --git a/portaudio/src/common/pa_process.c b/portaudio/src/common/pa_process.c
--- a/portaudio/src/common/pa_process.c
+++ b/portaudio/src/common/pa_process.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_process.c 1913 2013-11-18 11:42:27Z gineera $
+ * $Id$
  * Portable Audio I/O Library
  * streamCallback <-> host buffer processing adapter
  *
@@ -744,7 +744,7 @@
                     destChannelStrideBytes = bp->bytesPerUserInputSample;
 
                     /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved,
-                     * or if the number of channels differs between the host (set in stride) and the user */
+                     * or if num channels differs between the host (set in stride) and the user (eg with some Alsa hw:) */
                     if( bp->userInputSampleFormatIsEqualToHost && bp->hostInputIsInterleaved
                         && bp->hostInputChannels[0][0].data && bp->inputChannelCount == hostInputChannels[0].stride )
                     {
@@ -834,8 +834,10 @@
             {
                 if( bp->userOutputIsInterleaved )
                 {
-                    /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved */
-                    if( bp->userOutputSampleFormatIsEqualToHost && bp->hostOutputIsInterleaved )
+                    /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved,
+                     * or if num channels differs between the host (set in stride) and the user (eg with some Alsa hw:) */
+                    if( bp->userOutputSampleFormatIsEqualToHost && bp->hostOutputIsInterleaved
+                          && bp->outputChannelCount == hostOutputChannels[0].stride )
                     {
                         userOutput = hostOutputChannels[0].data;
                         skipOutputConvert = 1;
diff --git a/portaudio/src/common/pa_process.h b/portaudio/src/common/pa_process.h
--- a/portaudio/src/common/pa_process.h
+++ b/portaudio/src/common/pa_process.h
@@ -1,7 +1,7 @@
 #ifndef PA_PROCESS_H
 #define PA_PROCESS_H
 /*
- * $Id: pa_process.h 1668 2011-05-02 17:07:11Z rossb $
+ * $Id$
  * Portable Audio I/O Library callback buffer processing adapters
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/common/pa_ringbuffer.c b/portaudio/src/common/pa_ringbuffer.c
--- a/portaudio/src/common/pa_ringbuffer.c
+++ b/portaudio/src/common/pa_ringbuffer.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_ringbuffer.c 1738 2011-08-18 11:47:28Z rossb $
+ * $Id$
  * Portable Audio I/O Library
  * Ring Buffer utility.
  *
diff --git a/portaudio/src/common/pa_ringbuffer.h b/portaudio/src/common/pa_ringbuffer.h
--- a/portaudio/src/common/pa_ringbuffer.h
+++ b/portaudio/src/common/pa_ringbuffer.h
@@ -1,7 +1,7 @@
 #ifndef PA_RINGBUFFER_H
 #define PA_RINGBUFFER_H
 /*
- * $Id: pa_ringbuffer.h 1873 2012-10-07 19:00:11Z philburk $
+ * $Id$
  * Portable Audio I/O Library
  * Ring Buffer utility.
  *
diff --git a/portaudio/src/common/pa_stream.c b/portaudio/src/common/pa_stream.c
--- a/portaudio/src/common/pa_stream.c
+++ b/portaudio/src/common/pa_stream.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_stream.c 1339 2008-02-15 07:50:33Z rossb $
+ * $Id$
  * Portable Audio I/O Library
  * stream interface
  *
diff --git a/portaudio/src/common/pa_stream.h b/portaudio/src/common/pa_stream.h
--- a/portaudio/src/common/pa_stream.h
+++ b/portaudio/src/common/pa_stream.h
@@ -1,7 +1,7 @@
 #ifndef PA_STREAM_H
 #define PA_STREAM_H
 /*
- * $Id: pa_stream.h 1339 2008-02-15 07:50:33Z rossb $
+ * $Id$
  * Portable Audio I/O Library
  * stream interface
  *
diff --git a/portaudio/src/common/pa_trace.c b/portaudio/src/common/pa_trace.c
--- a/portaudio/src/common/pa_trace.c
+++ b/portaudio/src/common/pa_trace.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_trace.c 1916 2014-01-17 03:45:15Z philburk $
+ * $Id$
  * Portable Audio I/O Library Trace Facility
  * Store trace information in real-time for later printing.
  *
diff --git a/portaudio/src/common/pa_trace.h b/portaudio/src/common/pa_trace.h
--- a/portaudio/src/common/pa_trace.h
+++ b/portaudio/src/common/pa_trace.h
@@ -1,7 +1,7 @@
 #ifndef PA_TRACE_H
 #define PA_TRACE_H
 /*
- * $Id: pa_trace.h 1812 2012-02-14 09:32:57Z robiwan $
+ * $Id$
  * Portable Audio I/O Library Trace Facility
  * Store trace information in real-time for later printing.
  *
diff --git a/portaudio/src/common/pa_util.h b/portaudio/src/common/pa_util.h
--- a/portaudio/src/common/pa_util.h
+++ b/portaudio/src/common/pa_util.h
@@ -1,7 +1,7 @@
 #ifndef PA_UTIL_H
 #define PA_UTIL_H
 /*
- * $Id: pa_util.h 1584 2011-02-02 18:58:17Z rossb $
+ * $Id$
  * Portable Audio I/O Library implementation utilities header
  * common implementation utilities and interfaces
  *
diff --git a/portaudio/src/hostapi/dsound/pa_win_ds.c b/portaudio/src/hostapi/dsound/pa_win_ds.c
--- a/portaudio/src/hostapi/dsound/pa_win_ds.c
+++ b/portaudio/src/hostapi/dsound/pa_win_ds.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_win_ds.c 1877 2012-11-10 02:55:20Z rbencina $
+ * $Id$
  * Portable Audio I/O Library DirectSound implementation
  *
  * Authors: Phil Burk, Robert Marsanyi & Ross Bencina
@@ -208,9 +208,9 @@
     PaUtil_SetLastHostErrorInfo( paDirectSound, hr, "DirectSound error" )
 
 /************************************************* DX Prototypes **********/
-static BOOL CALLBACK CollectGUIDsProcA(LPGUID lpGUID,
-                                     LPCSTR lpszDesc,
-                                     LPCSTR lpszDrvName,
+static BOOL CALLBACK CollectGUIDsProcW(LPGUID lpGUID,
+                                     LPCWSTR lpszDesc,
+                                     LPCWSTR lpszDrvName,
                                      LPVOID lpContext );
 
 /************************************************************************************/
@@ -318,30 +318,43 @@
  */
 static double PaWinDS_GetMinSystemLatencySeconds( void )
 {
+/*
+NOTE: GetVersionEx() is deprecated as of Windows 8.1 and can not be used to reliably detect
+versions of Windows higher than Windows 8 (due to manifest requirements for reporting higher versions).
+Microsoft recommends switching to VerifyVersionInfo (available on Win 2k and later), however GetVersionEx
+is is faster, for now we just disable the deprecation warning.
+See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx
+See: http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe
+*/
+#pragma warning (disable : 4996) /* use of GetVersionEx */
+
     double minLatencySeconds;
     /* Set minimal latency based on whether NT or other OS.
      * NT has higher latency.
      */
+
     OSVERSIONINFO osvi;
-	osvi.dwOSVersionInfoSize = sizeof( osvi );
-	GetVersionEx( &osvi );
+    osvi.dwOSVersionInfoSize = sizeof( osvi );
+    GetVersionEx( &osvi );
     DBUG(("PA - PlatformId = 0x%x\n", osvi.dwPlatformId ));
     DBUG(("PA - MajorVersion = 0x%x\n", osvi.dwMajorVersion ));
     DBUG(("PA - MinorVersion = 0x%x\n", osvi.dwMinorVersion ));
     /* Check for NT */
-	if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )
-	{
-		minLatencySeconds = PA_DS_WIN_NT_DEFAULT_LATENCY_;
-	}
-	else if(osvi.dwMajorVersion >= 5)
-	{
-		minLatencySeconds = PA_DS_WIN_WDM_DEFAULT_LATENCY_;
-	}
-	else
-	{
-		minLatencySeconds = PA_DS_WIN_9X_DEFAULT_LATENCY_;
-	}
+    if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )
+    {
+        minLatencySeconds = PA_DS_WIN_NT_DEFAULT_LATENCY_;
+    }
+    else if(osvi.dwMajorVersion >= 5)
+    {
+        minLatencySeconds = PA_DS_WIN_WDM_DEFAULT_LATENCY_;
+    }
+    else
+    {
+        minLatencySeconds = PA_DS_WIN_9X_DEFAULT_LATENCY_;
+    }
     return minLatencySeconds;
+
+#pragma warning (default : 4996)
 }
 
 
@@ -385,20 +398,35 @@
 
 
 /************************************************************************************
-** Duplicate the input string using the allocations allocator.
+** Duplicate and convert the input string using the group allocations allocator.
 ** A NULL string is converted to a zero length string.
 ** If memory cannot be allocated, NULL is returned.
 **/
-static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const char* src )
+static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const wchar_t* src )
 {
     char *result = 0;
     
     if( src != NULL )
     {
-        size_t len = strlen(src);
+#if !defined(_UNICODE) && !defined(UNICODE)
+        size_t len = WideCharToMultiByte(CP_ACP, 0, src, -1, NULL, 0, NULL, NULL);
+
         result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
-        if( result )
-            memcpy( (void *) result, src, len+1 );
+        if( result ) {
+            if (WideCharToMultiByte(CP_ACP, 0, src, -1, result, (int)len, NULL, NULL) == 0) {
+                result = 0;
+            }
+        }
+#else
+        size_t len = WideCharToMultiByte(CP_UTF8, 0, src, -1, NULL, 0, NULL, NULL);
+
+        result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
+        if( result ) {
+            if (WideCharToMultiByte(CP_UTF8, 0, src, -1, result, (int)len, NULL, NULL) == 0) {
+                result = 0;
+            }
+        }
+#endif
     }
     else
     {
@@ -513,9 +541,9 @@
 /************************************************************************************
 ** Collect preliminary device information during DirectSound enumeration 
 */
-static BOOL CALLBACK CollectGUIDsProcA(LPGUID lpGUID,
-                                     LPCSTR lpszDesc,
-                                     LPCSTR lpszDrvName,
+static BOOL CALLBACK CollectGUIDsProcW(LPGUID lpGUID,
+                                     LPCWSTR lpszDesc,
+                                     LPCWSTR lpszDrvName,
                                      LPVOID lpContext )
 {
     DSDeviceNameAndGUIDVector *namesAndGUIDs = (DSDeviceNameAndGUIDVector*)lpContext;
@@ -938,7 +966,7 @@
                     }
                     else
                     {
-	                    deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;
+                        deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;
                     }
                 }
                 else if( (caps.dwMinSecondarySampleRate < 1000.0) && (caps.dwMaxSecondarySampleRate > 50000.0) )
@@ -1211,9 +1239,9 @@
     if( result != paNoError )
         goto error;
 
-    paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateA( (LPDSENUMCALLBACKA)CollectGUIDsProcA, (void *)&deviceNamesAndGUIDs.inputNamesAndGUIDs );
+    paWinDsDSoundEntryPoints.DirectSoundCaptureEnumerateW( (LPDSENUMCALLBACKW)CollectGUIDsProcW, (void *)&deviceNamesAndGUIDs.inputNamesAndGUIDs );
 
-    paWinDsDSoundEntryPoints.DirectSoundEnumerateA( (LPDSENUMCALLBACKA)CollectGUIDsProcA, (void *)&deviceNamesAndGUIDs.outputNamesAndGUIDs );
+    paWinDsDSoundEntryPoints.DirectSoundEnumerateW( (LPDSENUMCALLBACKW)CollectGUIDsProcW, (void *)&deviceNamesAndGUIDs.outputNamesAndGUIDs );
 
     if( deviceNamesAndGUIDs.inputNamesAndGUIDs.enumerationError != paNoError )
     {
@@ -1347,13 +1375,13 @@
         const PaStreamParameters *streamParameters,
         const PaWinDirectSoundStreamInfo *streamInfo )
 {
-	if( streamInfo )
-	{
-	    if( streamInfo->size != sizeof( PaWinDirectSoundStreamInfo )
-	            || streamInfo->version != 2 )
-	    {
-	        return paIncompatibleHostApiSpecificStreamInfo;
-	    }
+    if( streamInfo )
+    {
+        if( streamInfo->size != sizeof( PaWinDirectSoundStreamInfo )
+                || streamInfo->version != 2 )
+        {
+            return paIncompatibleHostApiSpecificStreamInfo;
+        }
 
         if( streamInfo->flags & paWinDirectSoundUseLowLevelLatencyParameters )
         {
@@ -1361,9 +1389,9 @@
                 return paIncompatibleHostApiSpecificStreamInfo;
 
         }
-	}
+    }
 
-	return paNoError;
+    return paNoError;
 }
 
 /***********************************************************************************/
@@ -1400,8 +1428,8 @@
 
         /* validate inputStreamInfo */
         inputStreamInfo = (PaWinDirectSoundStreamInfo*)inputParameters->hostApiSpecificStreamInfo;
-		result = ValidateWinDirectSoundSpecificStreamInfo( inputParameters, inputStreamInfo );
-		if( result != paNoError ) return result;
+        result = ValidateWinDirectSoundSpecificStreamInfo( inputParameters, inputStreamInfo );
+        if( result != paNoError ) return result;
     }
     else
     {
@@ -1429,8 +1457,8 @@
 
         /* validate outputStreamInfo */
         outputStreamInfo = (PaWinDirectSoundStreamInfo*)outputParameters->hostApiSpecificStreamInfo;
-		result = ValidateWinDirectSoundSpecificStreamInfo( outputParameters, outputStreamInfo );
-		if( result != paNoError ) return result;
+        result = ValidateWinDirectSoundSpecificStreamInfo( outputParameters, outputStreamInfo );
+        if( result != paNoError ) return result;
     }
     else
     {
@@ -1887,8 +1915,8 @@
             
         /* validate hostApiSpecificStreamInfo */
         inputStreamInfo = (PaWinDirectSoundStreamInfo*)inputParameters->hostApiSpecificStreamInfo;
-		result = ValidateWinDirectSoundSpecificStreamInfo( inputParameters, inputStreamInfo );
-		if( result != paNoError ) return result;
+        result = ValidateWinDirectSoundSpecificStreamInfo( inputParameters, inputStreamInfo );
+        if( result != paNoError ) return result;
 
         if( inputStreamInfo && inputStreamInfo->flags & paWinDirectSoundUseLowLevelLatencyParameters )
             userRequestedHostInputBufferSizeFrames = inputStreamInfo->framesPerBuffer;
@@ -1901,7 +1929,7 @@
     else
     {
         inputChannelCount = 0;
-		inputSampleFormat = 0;
+        inputSampleFormat = 0;
         suggestedInputLatencyFrames = 0;
     }
 
@@ -1927,8 +1955,8 @@
 
         /* validate hostApiSpecificStreamInfo */
         outputStreamInfo = (PaWinDirectSoundStreamInfo*)outputParameters->hostApiSpecificStreamInfo;
-		result = ValidateWinDirectSoundSpecificStreamInfo( outputParameters, outputStreamInfo );
-		if( result != paNoError ) return result;   
+        result = ValidateWinDirectSoundSpecificStreamInfo( outputParameters, outputStreamInfo );
+        if( result != paNoError ) return result;   
 
         if( outputStreamInfo && outputStreamInfo->flags & paWinDirectSoundUseLowLevelLatencyParameters )
             userRequestedHostOutputBufferSizeFrames = outputStreamInfo->framesPerBuffer;
@@ -1941,7 +1969,7 @@
     else
     {
         outputChannelCount = 0;
-		outputSampleFormat = 0;
+        outputSampleFormat = 0;
         suggestedOutputLatencyFrames = 0;
     }
 
@@ -2022,10 +2050,10 @@
         hostInputSampleFormat =
             PaUtil_SelectClosestAvailableFormat( nativeInputFormats, inputParameters->sampleFormat );
     }
-	else
-	{
-		hostInputSampleFormat = 0;
-	}
+    else
+    {
+        hostInputSampleFormat = 0;
+    }
 
     if( outputParameters )
     {
@@ -2037,9 +2065,9 @@
             PaUtil_SelectClosestAvailableFormat( nativeOutputFormats, outputParameters->sampleFormat );
     }
     else
-	{
-		hostOutputSampleFormat = 0;
-	}
+    {
+        hostOutputSampleFormat = 0;
+    }
 
     result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
                     inputChannelCount, inputSampleFormat, hostInputSampleFormat,
@@ -2082,7 +2110,7 @@
 #endif
 
 #ifndef PA_WIN_DS_USE_WMME_TIMER
-		stream->processingThreadCompleted = CreateEvent( NULL, /* bManualReset = */ TRUE, /* bInitialState = */ FALSE, NULL );
+        stream->processingThreadCompleted = CreateEvent( NULL, /* bManualReset = */ TRUE, /* bInitialState = */ FALSE, NULL );
         if( stream->processingThreadCompleted == NULL )
         {
             result = paUnanticipatedHostError;
@@ -2482,8 +2510,8 @@
         framesToXfer = numOutFramesReady = bytesEmpty / stream->outputFrameSizeBytes;
 
         /* Check for underflow */
-		/* FIXME QueryOutputSpace should not adjust underflow count as a side effect. 
-			A query function should be a const operator on the stream and return a flag on underflow. */
+        /* FIXME QueryOutputSpace should not adjust underflow count as a side effect. 
+            A query function should be a const operator on the stream and return a flag on underflow. */
         if( stream->outputUnderflowCount != previousUnderflowCount )
             stream->callbackFlags |= paOutputUnderflow;
 
@@ -2548,8 +2576,8 @@
         if( stream->bufferProcessor.outputChannelCount > 0 )
         {
             /*
-			We don't currently add outputLatency here because it appears to produce worse
-			results than not adding it. Need to do more testing to verify this.
+            We don't currently add outputLatency here because it appears to produce worse
+            results than not adding it. Need to do more testing to verify this.
             */
             /* timeInfo.outputBufferDacTime = timeInfo.currentTime + outputLatency; */
             timeInfo.outputBufferDacTime = timeInfo.currentTime;
@@ -2798,7 +2826,7 @@
 #endif
 
 #ifndef PA_WIN_DS_USE_WMME_TIMER
-	CloseHandle( stream->processingThreadCompleted );
+    CloseHandle( stream->processingThreadCompleted );
 #endif
 
     // Cleanup the sound buffers
@@ -2896,7 +2924,7 @@
     ResetEvent( stream->processingCompleted );
 
 #ifndef PA_WIN_DS_USE_WMME_TIMER
-	ResetEvent( stream->processingThreadCompleted );
+    ResetEvent( stream->processingThreadCompleted );
 #endif
 
     if( stream->bufferProcessor.inputChannelCount > 0 )
@@ -3006,9 +3034,9 @@
             goto error;
         }
 #else
-		/* Create processing thread which calls TimerCallback */
+        /* Create processing thread which calls TimerCallback */
 
-		stream->processingThread = CREATE_THREAD( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId );
+        stream->processingThread = CREATE_THREAD( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId );
         if( !stream->processingThread )
         {
             result = paUnanticipatedHostError;
@@ -3078,8 +3106,8 @@
 #else
     if( stream->processingThread )
     {
-		if( WaitForSingleObject( stream->processingThreadCompleted, 30*100 ) == WAIT_TIMEOUT )
-			return paUnanticipatedHostError;
+        if( WaitForSingleObject( stream->processingThreadCompleted, 30*100 ) == WAIT_TIMEOUT )
+            return paUnanticipatedHostError;
 
 #ifdef CLOSE_THREAD_HANDLE
         CloseHandle( stream->processingThread ); /* Delete thread. */
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/AudioSessionTypes.h b/portaudio/src/hostapi/wasapi/mingw-include/AudioSessionTypes.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/AudioSessionTypes.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/AudioSessionTypes.h
@@ -1,94 +1,94 @@
-//
-// AudioSessionTypes.h -- Copyright Microsoft Corporation, All Rights Reserved.
-//
-// Description: Type definitions used by the audio session manager RPC/COM interfaces
-//
-#pragma once
-
-#ifndef __AUDIOSESSIONTYPES__
-#define __AUDIOSESSIONTYPES__
-
-#if defined(__midl)
-#define MIDL_SIZE_IS(x) [size_is(x)]
-#define MIDL_STRING [string]
-#define MIDL_ANYSIZE_ARRAY
-#else   // !defined(__midl)
-#define MIDL_SIZE_IS(x)
-#define MIDL_STRING
-#define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY
-#endif  // defined(__midl)
-
-//-------------------------------------------------------------------------
-// Description: AudioClient share mode
-//                                   
-//     AUDCLNT_SHAREMODE_SHARED -    The device will be opened in shared mode and use the 
-//                                   WAS format.
-//     AUDCLNT_SHAREMODE_EXCLUSIVE - The device will be opened in exclusive mode and use the 
-//                                   application specified format.
-//
-typedef enum _AUDCLNT_SHAREMODE
-{ 
-    AUDCLNT_SHAREMODE_SHARED, 
-    AUDCLNT_SHAREMODE_EXCLUSIVE 
-} AUDCLNT_SHAREMODE;
-
-//-------------------------------------------------------------------------
-// Description: AudioClient stream flags
-// 
-// Can be a combination of AUDCLNT_STREAMFLAGS and AUDCLNT_SYSFXFLAGS:
-// 
-// AUDCLNT_STREAMFLAGS (this group of flags uses the high word, w/exception of high-bit which is reserved, 0x7FFF0000):
-//                                  
-//     AUDCLNT_STREAMFLAGS_CROSSPROCESS - Audio policy control for this stream will be shared with 
-//                                        with other process sessions that use the same audio session 
-//                                        GUID.
-//     AUDCLNT_STREAMFLAGS_LOOPBACK -     Initializes a renderer endpoint for a loopback audio application. 
-//                                        In this mode, a capture stream will be opened on the specified 
-//                                        renderer endpoint. Shared mode and a renderer endpoint is required.
-//                                        Otherwise the IAudioClient::Initialize call will fail. If the 
-//                                        initialize is successful, a capture stream will be available 
-//                                        from the IAudioClient object.
-//
-//     AUDCLNT_STREAMFLAGS_EVENTCALLBACK - An exclusive mode client will supply an event handle that will be
-//                                         signaled when an IRP completes (or a waveRT buffer completes) telling
-//                                         it to fill the next buffer
-//
-//     AUDCLNT_STREAMFLAGS_NOPERSIST -    Session state will not be persisted
-//
-// AUDCLNT_SYSFXFLAGS (these flags use low word 0x0000FFFF):
-//
-//     none defined currently
-//
-#define AUDCLNT_STREAMFLAGS_CROSSPROCESS  0x00010000
-#define AUDCLNT_STREAMFLAGS_LOOPBACK      0x00020000
-#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000
-#define AUDCLNT_STREAMFLAGS_NOPERSIST     0x00080000
-
-//-------------------------------------------------------------------------
-// Description: Device share mode - sharing mode for the audio device.
-//
-//      DeviceShared - The device can be shared with other processes.
-//      DeviceExclusive - The device will only be used by this process.
-//
-typedef enum _DeviceShareMode
-{ 
-    DeviceShared, 
-    DeviceExclusive 
-} DeviceShareMode;
-
-
-//-------------------------------------------------------------------------
-// Description: AudioSession State.
-//
-//      AudioSessionStateInactive - The session has no active audio streams.
-//      AudioSessionStateActive - The session has active audio streams.
-//      AudioSessionStateExpired - The session is dormant.
-typedef enum _AudioSessionState
-{
-    AudioSessionStateInactive = 0,
-    AudioSessionStateActive = 1,
-    AudioSessionStateExpired = 2
-} AudioSessionState;
-
-#endif
-
+//
+// AudioSessionTypes.h -- Copyright Microsoft Corporation, All Rights Reserved.
+//
+// Description: Type definitions used by the audio session manager RPC/COM interfaces
+//
+#pragma once
+
+#ifndef __AUDIOSESSIONTYPES__
+#define __AUDIOSESSIONTYPES__
+
+#if defined(__midl)
+#define MIDL_SIZE_IS(x) [size_is(x)]
+#define MIDL_STRING [string]
+#define MIDL_ANYSIZE_ARRAY
+#else   // !defined(__midl)
+#define MIDL_SIZE_IS(x)
+#define MIDL_STRING
+#define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY
+#endif  // defined(__midl)
+
+//-------------------------------------------------------------------------
+// Description: AudioClient share mode
+//                                   
+//     AUDCLNT_SHAREMODE_SHARED -    The device will be opened in shared mode and use the 
+//                                   WAS format.
+//     AUDCLNT_SHAREMODE_EXCLUSIVE - The device will be opened in exclusive mode and use the 
+//                                   application specified format.
+//
+typedef enum _AUDCLNT_SHAREMODE
+{ 
+    AUDCLNT_SHAREMODE_SHARED, 
+    AUDCLNT_SHAREMODE_EXCLUSIVE 
+} AUDCLNT_SHAREMODE;
+
+//-------------------------------------------------------------------------
+// Description: AudioClient stream flags
+// 
+// Can be a combination of AUDCLNT_STREAMFLAGS and AUDCLNT_SYSFXFLAGS:
+// 
+// AUDCLNT_STREAMFLAGS (this group of flags uses the high word, w/exception of high-bit which is reserved, 0x7FFF0000):
+//                                  
+//     AUDCLNT_STREAMFLAGS_CROSSPROCESS - Audio policy control for this stream will be shared with 
+//                                        with other process sessions that use the same audio session 
+//                                        GUID.
+//     AUDCLNT_STREAMFLAGS_LOOPBACK -     Initializes a renderer endpoint for a loopback audio application. 
+//                                        In this mode, a capture stream will be opened on the specified 
+//                                        renderer endpoint. Shared mode and a renderer endpoint is required.
+//                                        Otherwise the IAudioClient::Initialize call will fail. If the 
+//                                        initialize is successful, a capture stream will be available 
+//                                        from the IAudioClient object.
+//
+//     AUDCLNT_STREAMFLAGS_EVENTCALLBACK - An exclusive mode client will supply an event handle that will be
+//                                         signaled when an IRP completes (or a waveRT buffer completes) telling
+//                                         it to fill the next buffer
+//
+//     AUDCLNT_STREAMFLAGS_NOPERSIST -    Session state will not be persisted
+//
+// AUDCLNT_SYSFXFLAGS (these flags use low word 0x0000FFFF):
+//
+//     none defined currently
+//
+#define AUDCLNT_STREAMFLAGS_CROSSPROCESS  0x00010000
+#define AUDCLNT_STREAMFLAGS_LOOPBACK      0x00020000
+#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000
+#define AUDCLNT_STREAMFLAGS_NOPERSIST     0x00080000
+
+//-------------------------------------------------------------------------
+// Description: Device share mode - sharing mode for the audio device.
+//
+//      DeviceShared - The device can be shared with other processes.
+//      DeviceExclusive - The device will only be used by this process.
+//
+typedef enum _DeviceShareMode
+{ 
+    DeviceShared, 
+    DeviceExclusive 
+} DeviceShareMode;
+
+
+//-------------------------------------------------------------------------
+// Description: AudioSession State.
+//
+//      AudioSessionStateInactive - The session has no active audio streams.
+//      AudioSessionStateActive - The session has active audio streams.
+//      AudioSessionStateExpired - The session is dormant.
+typedef enum _AudioSessionState
+{
+    AudioSessionStateInactive = 0,
+    AudioSessionStateActive = 1,
+    AudioSessionStateExpired = 2
+} AudioSessionState;
+
+#endif
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/FunctionDiscoveryKeys_devpkey.h b/portaudio/src/hostapi/wasapi/mingw-include/FunctionDiscoveryKeys_devpkey.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/FunctionDiscoveryKeys_devpkey.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/FunctionDiscoveryKeys_devpkey.h
@@ -1,186 +1,186 @@
-
-/*++
-
-Copyright (c) Microsoft Corporation.  All rights reserved.
-
-Module Name:
-
-    devpkey.h
-
-Abstract:
-
-    Defines property keys for the Plug and Play Device Property API.
-
-Author:
-
-    Jim Cavalaris (jamesca) 10-14-2003
-
-Environment:
-
-    User-mode only.
-
-Revision History:
-
-    14-October-2003     jamesca
-
-        Creation and initial implementation.
-
-    20-June-2006        dougb
-
-        Copied Jim's version replaced "DEFINE_DEVPROPKEY(DEVPKEY_" with "DEFINE_PROPERTYKEY(PKEY_"
-    
---*/
-
-//#include <devpropdef.h>
-
-//
-// _NAME
-//
-
-DEFINE_PROPERTYKEY(PKEY_NAME,                          0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10);    // DEVPROP_TYPE_STRING
-
-//
-// Device properties
-// These PKEYs correspond to the old setupapi SPDRP_XXX properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc,             0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_HardwareIds,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_CompatibleIds,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_Service,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Class,                  0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_ClassGuid,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10);    // DEVPROP_TYPE_GUID
-DEFINE_PROPERTYKEY(PKEY_Device_Driver,                 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_ConfigFlags,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Manufacturer,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_LocationInfo,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_PDOName,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Capabilities,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17);    // DEVPROP_TYPE_UNINT32
-DEFINE_PROPERTYKEY(PKEY_Device_UINumber,               0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_UpperFilters,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19);    // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_LowerFilters,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20);    // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_BusTypeGuid,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21);    // DEVPROP_TYPE_GUID
-DEFINE_PROPERTYKEY(PKEY_Device_LegacyBusType,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_BusNumber,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_EnumeratorName,         0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Security,               0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR
-DEFINE_PROPERTYKEY(PKEY_Device_SecuritySDS,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DevType,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Exclusive,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Characteristics,        0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_Address,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_UINumberDescFormat,     0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31);    // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_PowerData,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32);    // DEVPROP_TYPE_BINARY
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicy,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyDefault,   0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyOverride,  0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_InstallState,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_LocationPaths,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37);    // DEVPROP_TYPE_STRING_LIST
-
-//
-// Device properties
-// These PKEYs correspond to a device's status and problem code
-//
-DEFINE_PROPERTYKEY(PKEY_Device_DevNodeStatus,          0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2);     // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_ProblemCode,            0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3);     // DEVPROP_TYPE_UINT32
-
-//
-// Device properties
-// These PKEYs correspond to device relations
-//
-DEFINE_PROPERTYKEY(PKEY_Device_EjectionRelations,      0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalRelations,       0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_PowerRelations,         0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_BusRelations,           0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_Parent,                 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_Children,               0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_Siblings,               0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10);    // DEVPROP_TYPE_STRING_LIST
-
-//
-// Other Device properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_Reported,               0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2);     // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_Legacy,                 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3);     // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_InstanceId,             0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256);   // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Numa_Proximity_Domain,         0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1);     // DEVPROP_TYPE_UINT32
-
-//
-// Device driver properties
-//
-DEFINE_PROPERTYKEY(PKEY_Device_DriverDate,             0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2);      // DEVPROP_TYPE_FILETIME
-DEFINE_PROPERTYKEY(PKEY_Device_DriverVersion,          0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverDesc,             0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfPath,          0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSection,       0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSectionExt,    0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_MatchingDeviceId,       0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverProvider,         0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9);      // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverCoInstallers,     0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerTags,     0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_Device_DriverRank,             0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14);     // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_DriverLogoLevel,        0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15);     // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_Device_NoConnectSound,         0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17);     // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18);     // DEVPROP_TYPE_BOOLEAN
-
-
-//
-// Device properties that were set by the driver package that was installed
-// on the device.
-//
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_Model,                  0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_VendorWebSite,          0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_DetailedDescription,    0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_DocumentationLink,      0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5);     // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_Icon,                   0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6);     // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_BrandingIcon,           0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7);     // DEVPROP_TYPE_STRING_LIST
-
-//
-// Device setup class properties
-// These PKEYs correspond to the old setupapi SPCRP_XXX properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_UpperFilters,      0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19);    // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_LowerFilters,      0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20);    // DEVPROP_TYPE_STRING_LIST
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Security,          0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_SecuritySDS,       0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_DevType,           0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Exclusive,         0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28);    // DEVPROP_TYPE_UINT32
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Characteristics,   0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29);    // DEVPROP_TYPE_UINT32
-
-//
-// Device setup class properties
-// These PKEYs correspond to registry values under the device class GUID key
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Name,              0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2);  // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassName,         0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3);  // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Icon,              0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4);  // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassInstaller,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5);  // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_PropPageProvider,  0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6);  // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoInstallClass,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7);  // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoDisplayClass,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8);  // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_SilentInstall,     0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9);  // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoUseClass,        0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_DefaultService,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_IconPath,          0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST
-
-//
-// Other Device setup class properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST
-
-//
-// Device interface properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName,  0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Enabled,       0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_ClassGuid,     0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID
-
-//
-// Device interface class properties
-//
-DEFINE_PROPERTYKEY(PKEY_DeviceInterfaceClass_DefaultInterface,  0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING
-
-
-
-
+
+/*++
+
+Copyright (c) Microsoft Corporation.  All rights reserved.
+
+Module Name:
+
+    devpkey.h
+
+Abstract:
+
+    Defines property keys for the Plug and Play Device Property API.
+
+Author:
+
+    Jim Cavalaris (jamesca) 10-14-2003
+
+Environment:
+
+    User-mode only.
+
+Revision History:
+
+    14-October-2003     jamesca
+
+        Creation and initial implementation.
+
+    20-June-2006        dougb
+
+        Copied Jim's version replaced "DEFINE_DEVPROPKEY(DEVPKEY_" with "DEFINE_PROPERTYKEY(PKEY_"
+    
+--*/
+
+//#include <devpropdef.h>
+
+//
+// _NAME
+//
+
+DEFINE_PROPERTYKEY(PKEY_NAME,                          0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10);    // DEVPROP_TYPE_STRING
+
+//
+// Device properties
+// These PKEYs correspond to the old setupapi SPDRP_XXX properties
+//
+DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc,             0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_HardwareIds,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_CompatibleIds,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_Service,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Class,                  0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_ClassGuid,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10);    // DEVPROP_TYPE_GUID
+DEFINE_PROPERTYKEY(PKEY_Device_Driver,                 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_ConfigFlags,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Manufacturer,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_LocationInfo,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_PDOName,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Capabilities,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17);    // DEVPROP_TYPE_UNINT32
+DEFINE_PROPERTYKEY(PKEY_Device_UINumber,               0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_UpperFilters,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19);    // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_LowerFilters,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20);    // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_BusTypeGuid,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21);    // DEVPROP_TYPE_GUID
+DEFINE_PROPERTYKEY(PKEY_Device_LegacyBusType,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_BusNumber,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_EnumeratorName,         0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Security,               0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR
+DEFINE_PROPERTYKEY(PKEY_Device_SecuritySDS,            0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DevType,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Exclusive,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Characteristics,        0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Address,                0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_UINumberDescFormat,     0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31);    // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_PowerData,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32);    // DEVPROP_TYPE_BINARY
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicy,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyDefault,   0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyOverride,  0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_InstallState,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_LocationPaths,          0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37);    // DEVPROP_TYPE_STRING_LIST
+
+//
+// Device properties
+// These PKEYs correspond to a device's status and problem code
+//
+DEFINE_PROPERTYKEY(PKEY_Device_DevNodeStatus,          0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2);     // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_ProblemCode,            0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3);     // DEVPROP_TYPE_UINT32
+
+//
+// Device properties
+// These PKEYs correspond to device relations
+//
+DEFINE_PROPERTYKEY(PKEY_Device_EjectionRelations,      0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalRelations,       0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_PowerRelations,         0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_BusRelations,           0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_Parent,                 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Children,               0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_Siblings,               0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10);    // DEVPROP_TYPE_STRING_LIST
+
+//
+// Other Device properties
+//
+DEFINE_PROPERTYKEY(PKEY_Device_Reported,               0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2);     // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_Device_Legacy,                 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3);     // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_Device_InstanceId,             0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256);   // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Numa_Proximity_Domain,         0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1);     // DEVPROP_TYPE_UINT32
+
+//
+// Device driver properties
+//
+DEFINE_PROPERTYKEY(PKEY_Device_DriverDate,             0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2);      // DEVPROP_TYPE_FILETIME
+DEFINE_PROPERTYKEY(PKEY_Device_DriverVersion,          0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverDesc,             0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverInfPath,          0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSection,       0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSectionExt,    0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_MatchingDeviceId,       0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverProvider,         0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9);      // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverCoInstallers,     0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerTags,     0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverRank,             0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14);     // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_DriverLogoLevel,        0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15);     // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_NoConnectSound,         0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17);     // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18);     // DEVPROP_TYPE_BOOLEAN
+
+
+//
+// Device properties that were set by the driver package that was installed
+// on the device.
+//
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_Model,                  0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_VendorWebSite,          0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_DetailedDescription,    0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_DocumentationLink,      0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5);     // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_Icon,                   0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6);     // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_BrandingIcon,           0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7);     // DEVPROP_TYPE_STRING_LIST
+
+//
+// Device setup class properties
+// These PKEYs correspond to the old setupapi SPCRP_XXX properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_UpperFilters,      0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19);    // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_LowerFilters,      0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20);    // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Security,          0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_SecuritySDS,       0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26);    // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_DevType,           0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Exclusive,         0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28);    // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Characteristics,   0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29);    // DEVPROP_TYPE_UINT32
+
+//
+// Device setup class properties
+// These PKEYs correspond to registry values under the device class GUID key
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Name,              0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2);  // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassName,         0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3);  // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Icon,              0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4);  // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassInstaller,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5);  // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_PropPageProvider,  0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6);  // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoInstallClass,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7);  // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoDisplayClass,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8);  // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_SilentInstall,     0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9);  // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoUseClass,        0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_DefaultService,    0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_IconPath,          0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Other Device setup class properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Device interface properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName,  0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Enabled,       0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_ClassGuid,     0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID
+
+//
+// Device interface class properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceInterfaceClass_DefaultInterface,  0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING
+
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/audioclient.h b/portaudio/src/hostapi/wasapi/mingw-include/audioclient.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/audioclient.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/audioclient.h
@@ -1,1177 +1,1177 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for audioclient.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 500
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __audioclient_h__
-#define __audioclient_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IAudioClient_FWD_DEFINED__
-#define __IAudioClient_FWD_DEFINED__
-typedef interface IAudioClient IAudioClient;
-#endif 	/* __IAudioClient_FWD_DEFINED__ */
-
-
-#ifndef __IAudioRenderClient_FWD_DEFINED__
-#define __IAudioRenderClient_FWD_DEFINED__
-typedef interface IAudioRenderClient IAudioRenderClient;
-#endif 	/* __IAudioRenderClient_FWD_DEFINED__ */
-
-
-#ifndef __IAudioCaptureClient_FWD_DEFINED__
-#define __IAudioCaptureClient_FWD_DEFINED__
-typedef interface IAudioCaptureClient IAudioCaptureClient;
-#endif 	/* __IAudioCaptureClient_FWD_DEFINED__ */
-
-
-#ifndef __IAudioClock_FWD_DEFINED__
-#define __IAudioClock_FWD_DEFINED__
-typedef interface IAudioClock IAudioClock;
-#endif 	/* __IAudioClock_FWD_DEFINED__ */
-
-
-#ifndef __ISimpleAudioVolume_FWD_DEFINED__
-#define __ISimpleAudioVolume_FWD_DEFINED__
-typedef interface ISimpleAudioVolume ISimpleAudioVolume;
-#endif 	/* __ISimpleAudioVolume_FWD_DEFINED__ */
-
-
-#ifndef __IAudioStreamVolume_FWD_DEFINED__
-#define __IAudioStreamVolume_FWD_DEFINED__
-typedef interface IAudioStreamVolume IAudioStreamVolume;
-#endif 	/* __IAudioStreamVolume_FWD_DEFINED__ */
-
-
-#ifndef __IChannelAudioVolume_FWD_DEFINED__
-#define __IChannelAudioVolume_FWD_DEFINED__
-typedef interface IChannelAudioVolume IChannelAudioVolume;
-#endif 	/* __IChannelAudioVolume_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "wtypes.h"
-#include "unknwn.h"
-#include "AudioSessionTypes.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_audioclient_0000_0000 */
-/* [local] */ 
-
-#if 0
-typedef /* [hidden][restricted] */ struct WAVEFORMATEX
-    {
-    WORD wFormatTag;
-    WORD nChannels;
-    DWORD nSamplesPerSec;
-    DWORD nAvgBytesPerSec;
-    WORD nBlockAlign;
-    WORD wBitsPerSample;
-    WORD cbSize;
-    } 	WAVEFORMATEX;
-
-#else
-#include <mmreg.h>
-#endif
-#if 0
-typedef /* [hidden][restricted] */ LONGLONG REFERENCE_TIME;
-
-#else
-#define _IKsControl_
-#include <ks.h>
-#include <ksmedia.h>
-#endif
-
-enum _AUDCLNT_BUFFERFLAGS
-    {	AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY	= 0x1,
-	AUDCLNT_BUFFERFLAGS_SILENT	= 0x2,
-	AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR	= 0x4
-    } ;
-
-
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IAudioClient_INTERFACE_DEFINED__
-#define __IAudioClient_INTERFACE_DEFINED__
-
-/* interface IAudioClient */
-/* [local][unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IAudioClient;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2")
-    IAudioClient : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Initialize( 
-            /* [in] */ 
-            __in  AUDCLNT_SHAREMODE ShareMode,
-            /* [in] */ 
-            __in  DWORD StreamFlags,
-            /* [in] */ 
-            __in  REFERENCE_TIME hnsBufferDuration,
-            /* [in] */ 
-            __in  REFERENCE_TIME hnsPeriodicity,
-            /* [in] */ 
-            __in  const WAVEFORMATEX *pFormat,
-            /* [in] */ 
-            __in_opt  LPCGUID AudioSessionGuid) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetBufferSize( 
-            /* [out] */ 
-            __out  UINT32 *pNumBufferFrames) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetStreamLatency( 
-            /* [out] */ 
-            __out  REFERENCE_TIME *phnsLatency) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCurrentPadding( 
-            /* [out] */ 
-            __out  UINT32 *pNumPaddingFrames) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsFormatSupported( 
-            /* [in] */ 
-            __in  AUDCLNT_SHAREMODE ShareMode,
-            /* [in] */ 
-            __in  const WAVEFORMATEX *pFormat,
-            /* [unique][out] */ 
-            __out_opt  WAVEFORMATEX **ppClosestMatch) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetMixFormat( 
-            /* [out] */ 
-            __out  WAVEFORMATEX **ppDeviceFormat) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDevicePeriod( 
-            /* [out] */ 
-            __out_opt  REFERENCE_TIME *phnsDefaultDevicePeriod,
-            /* [out] */ 
-            __out_opt  REFERENCE_TIME *phnsMinimumDevicePeriod) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetEventHandle( 
-            /* [in] */ HANDLE eventHandle) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetService( 
-            /* [in] */ 
-            __in  REFIID riid,
-            /* [iid_is][out] */ 
-            __out  void **ppv) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioClientVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioClient * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioClient * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioClient * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Initialize )( 
-            IAudioClient * This,
-            /* [in] */ 
-            __in  AUDCLNT_SHAREMODE ShareMode,
-            /* [in] */ 
-            __in  DWORD StreamFlags,
-            /* [in] */ 
-            __in  REFERENCE_TIME hnsBufferDuration,
-            /* [in] */ 
-            __in  REFERENCE_TIME hnsPeriodicity,
-            /* [in] */ 
-            __in  const WAVEFORMATEX *pFormat,
-            /* [in] */ 
-            __in_opt  LPCGUID AudioSessionGuid);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBufferSize )( 
-            IAudioClient * This,
-            /* [out] */ 
-            __out  UINT32 *pNumBufferFrames);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetStreamLatency )( 
-            IAudioClient * This,
-            /* [out] */ 
-            __out  REFERENCE_TIME *phnsLatency);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCurrentPadding )( 
-            IAudioClient * This,
-            /* [out] */ 
-            __out  UINT32 *pNumPaddingFrames);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( 
-            IAudioClient * This,
-            /* [in] */ 
-            __in  AUDCLNT_SHAREMODE ShareMode,
-            /* [in] */ 
-            __in  const WAVEFORMATEX *pFormat,
-            /* [unique][out] */ 
-            __out_opt  WAVEFORMATEX **ppClosestMatch);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetMixFormat )( 
-            IAudioClient * This,
-            /* [out] */ 
-            __out  WAVEFORMATEX **ppDeviceFormat);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDevicePeriod )( 
-            IAudioClient * This,
-            /* [out] */ 
-            __out_opt  REFERENCE_TIME *phnsDefaultDevicePeriod,
-            /* [out] */ 
-            __out_opt  REFERENCE_TIME *phnsMinimumDevicePeriod);
-        
-        HRESULT ( STDMETHODCALLTYPE *Start )( 
-            IAudioClient * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Stop )( 
-            IAudioClient * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Reset )( 
-            IAudioClient * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetEventHandle )( 
-            IAudioClient * This,
-            /* [in] */ HANDLE eventHandle);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetService )( 
-            IAudioClient * This,
-            /* [in] */ 
-            __in  REFIID riid,
-            /* [iid_is][out] */ 
-            __out  void **ppv);
-        
-        END_INTERFACE
-    } IAudioClientVtbl;
-
-    interface IAudioClient
-    {
-        CONST_VTBL struct IAudioClientVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioClient_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioClient_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioClient_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid)	\
-    ( (This)->lpVtbl -> Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) ) 
-
-#define IAudioClient_GetBufferSize(This,pNumBufferFrames)	\
-    ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) ) 
-
-#define IAudioClient_GetStreamLatency(This,phnsLatency)	\
-    ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) ) 
-
-#define IAudioClient_GetCurrentPadding(This,pNumPaddingFrames)	\
-    ( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) ) 
-
-#define IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch)	\
-    ( (This)->lpVtbl -> IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) ) 
-
-#define IAudioClient_GetMixFormat(This,ppDeviceFormat)	\
-    ( (This)->lpVtbl -> GetMixFormat(This,ppDeviceFormat) ) 
-
-#define IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod)	\
-    ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ) 
-
-#define IAudioClient_Start(This)	\
-    ( (This)->lpVtbl -> Start(This) ) 
-
-#define IAudioClient_Stop(This)	\
-    ( (This)->lpVtbl -> Stop(This) ) 
-
-#define IAudioClient_Reset(This)	\
-    ( (This)->lpVtbl -> Reset(This) ) 
-
-#define IAudioClient_SetEventHandle(This,eventHandle)	\
-    ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) ) 
-
-#define IAudioClient_GetService(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetService(This,riid,ppv) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioClient_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioRenderClient_INTERFACE_DEFINED__
-#define __IAudioRenderClient_INTERFACE_DEFINED__
-
-/* interface IAudioRenderClient */
-/* [local][unique][helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IAudioRenderClient;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("F294ACFC-3146-4483-A7BF-ADDCA7C260E2")
-    IAudioRenderClient : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetBuffer( 
-            /* [in] */ 
-            __in  UINT32 NumFramesRequested,
-            /* [out] */ 
-            __out  BYTE **ppData) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 
-            /* [in] */ 
-            __in  UINT32 NumFramesWritten,
-            /* [in] */ 
-            __in  DWORD dwFlags) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioRenderClientVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioRenderClient * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioRenderClient * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioRenderClient * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( 
-            IAudioRenderClient * This,
-            /* [in] */ 
-            __in  UINT32 NumFramesRequested,
-            /* [out] */ 
-            __out  BYTE **ppData);
-        
-        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 
-            IAudioRenderClient * This,
-            /* [in] */ 
-            __in  UINT32 NumFramesWritten,
-            /* [in] */ 
-            __in  DWORD dwFlags);
-        
-        END_INTERFACE
-    } IAudioRenderClientVtbl;
-
-    interface IAudioRenderClient
-    {
-        CONST_VTBL struct IAudioRenderClientVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioRenderClient_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioRenderClient_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioRenderClient_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData)	\
-    ( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) ) 
-
-#define IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags)	\
-    ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioRenderClient_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioCaptureClient_INTERFACE_DEFINED__
-#define __IAudioCaptureClient_INTERFACE_DEFINED__
-
-/* interface IAudioCaptureClient */
-/* [local][unique][helpstring][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IAudioCaptureClient;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C8ADBD64-E71E-48a0-A4DE-185C395CD317")
-    IAudioCaptureClient : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetBuffer( 
-            /* [out] */ 
-            __out  BYTE **ppData,
-            /* [out] */ 
-            __out  UINT32 *pNumFramesToRead,
-            /* [out] */ 
-            __out  DWORD *pdwFlags,
-            /* [unique][out] */ 
-            __out_opt  UINT64 *pu64DevicePosition,
-            /* [unique][out] */ 
-            __out_opt  UINT64 *pu64QPCPosition) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 
-            /* [in] */ 
-            __in  UINT32 NumFramesRead) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetNextPacketSize( 
-            /* [out] */ 
-            __out  UINT32 *pNumFramesInNextPacket) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioCaptureClientVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioCaptureClient * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioCaptureClient * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioCaptureClient * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( 
-            IAudioCaptureClient * This,
-            /* [out] */ 
-            __out  BYTE **ppData,
-            /* [out] */ 
-            __out  UINT32 *pNumFramesToRead,
-            /* [out] */ 
-            __out  DWORD *pdwFlags,
-            /* [unique][out] */ 
-            __out_opt  UINT64 *pu64DevicePosition,
-            /* [unique][out] */ 
-            __out_opt  UINT64 *pu64QPCPosition);
-        
-        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 
-            IAudioCaptureClient * This,
-            /* [in] */ 
-            __in  UINT32 NumFramesRead);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetNextPacketSize )( 
-            IAudioCaptureClient * This,
-            /* [out] */ 
-            __out  UINT32 *pNumFramesInNextPacket);
-        
-        END_INTERFACE
-    } IAudioCaptureClientVtbl;
-
-    interface IAudioCaptureClient
-    {
-        CONST_VTBL struct IAudioCaptureClientVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioCaptureClient_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioCaptureClient_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioCaptureClient_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition)	\
-    ( (This)->lpVtbl -> GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) ) 
-
-#define IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead)	\
-    ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesRead) ) 
-
-#define IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket)	\
-    ( (This)->lpVtbl -> GetNextPacketSize(This,pNumFramesInNextPacket) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioCaptureClient_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_audioclient_0000_0003 */
-/* [local] */ 
-
-#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ  0x00000001
-
-
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_s_ifspec;
-
-#ifndef __IAudioClock_INTERFACE_DEFINED__
-#define __IAudioClock_INTERFACE_DEFINED__
-
-/* interface IAudioClock */
-/* [local][unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IAudioClock;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("CD63314F-3FBA-4a1b-812C-EF96358728E7")
-    IAudioClock : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetFrequency( 
-            /* [out] */ 
-            __out  UINT64 *pu64Frequency) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPosition( 
-            /* [out] */ 
-            __out  UINT64 *pu64Position,
-            /* [unique][out] */ 
-            __out_opt  UINT64 *pu64QPCPosition) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCharacteristics( 
-            /* [out] */ 
-            __out  DWORD *pdwCharacteristics) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioClockVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioClock * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioClock * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioClock * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetFrequency )( 
-            IAudioClock * This,
-            /* [out] */ 
-            __out  UINT64 *pu64Frequency);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPosition )( 
-            IAudioClock * This,
-            /* [out] */ 
-            __out  UINT64 *pu64Position,
-            /* [unique][out] */ 
-            __out_opt  UINT64 *pu64QPCPosition);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCharacteristics )( 
-            IAudioClock * This,
-            /* [out] */ 
-            __out  DWORD *pdwCharacteristics);
-        
-        END_INTERFACE
-    } IAudioClockVtbl;
-
-    interface IAudioClock
-    {
-        CONST_VTBL struct IAudioClockVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioClock_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioClock_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioClock_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioClock_GetFrequency(This,pu64Frequency)	\
-    ( (This)->lpVtbl -> GetFrequency(This,pu64Frequency) ) 
-
-#define IAudioClock_GetPosition(This,pu64Position,pu64QPCPosition)	\
-    ( (This)->lpVtbl -> GetPosition(This,pu64Position,pu64QPCPosition) ) 
-
-#define IAudioClock_GetCharacteristics(This,pdwCharacteristics)	\
-    ( (This)->lpVtbl -> GetCharacteristics(This,pdwCharacteristics) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioClock_INTERFACE_DEFINED__ */
-
-
-#ifndef __ISimpleAudioVolume_INTERFACE_DEFINED__
-#define __ISimpleAudioVolume_INTERFACE_DEFINED__
-
-/* interface ISimpleAudioVolume */
-/* [local][unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_ISimpleAudioVolume;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("87CE5498-68D6-44E5-9215-6DA47EF883D8")
-    ISimpleAudioVolume : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SetMasterVolume( 
-            /* [in] */ 
-            __in  float fLevel,
-            /* [unique][in] */ LPCGUID EventContext) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetMasterVolume( 
-            /* [out] */ 
-            __out  float *pfLevel) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetMute( 
-            /* [in] */ 
-            __in  const BOOL bMute,
-            /* [unique][in] */ LPCGUID EventContext) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetMute( 
-            /* [out] */ 
-            __out  BOOL *pbMute) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct ISimpleAudioVolumeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ISimpleAudioVolume * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ISimpleAudioVolume * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ISimpleAudioVolume * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetMasterVolume )( 
-            ISimpleAudioVolume * This,
-            /* [in] */ 
-            __in  float fLevel,
-            /* [unique][in] */ LPCGUID EventContext);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetMasterVolume )( 
-            ISimpleAudioVolume * This,
-            /* [out] */ 
-            __out  float *pfLevel);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetMute )( 
-            ISimpleAudioVolume * This,
-            /* [in] */ 
-            __in  const BOOL bMute,
-            /* [unique][in] */ LPCGUID EventContext);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetMute )( 
-            ISimpleAudioVolume * This,
-            /* [out] */ 
-            __out  BOOL *pbMute);
-        
-        END_INTERFACE
-    } ISimpleAudioVolumeVtbl;
-
-    interface ISimpleAudioVolume
-    {
-        CONST_VTBL struct ISimpleAudioVolumeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ISimpleAudioVolume_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ISimpleAudioVolume_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ISimpleAudioVolume_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define ISimpleAudioVolume_SetMasterVolume(This,fLevel,EventContext)	\
-    ( (This)->lpVtbl -> SetMasterVolume(This,fLevel,EventContext) ) 
-
-#define ISimpleAudioVolume_GetMasterVolume(This,pfLevel)	\
-    ( (This)->lpVtbl -> GetMasterVolume(This,pfLevel) ) 
-
-#define ISimpleAudioVolume_SetMute(This,bMute,EventContext)	\
-    ( (This)->lpVtbl -> SetMute(This,bMute,EventContext) ) 
-
-#define ISimpleAudioVolume_GetMute(This,pbMute)	\
-    ( (This)->lpVtbl -> GetMute(This,pbMute) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ISimpleAudioVolume_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioStreamVolume_INTERFACE_DEFINED__
-#define __IAudioStreamVolume_INTERFACE_DEFINED__
-
-/* interface IAudioStreamVolume */
-/* [local][unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IAudioStreamVolume;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("93014887-242D-4068-8A15-CF5E93B90FE3")
-    IAudioStreamVolume : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetChannelCount( 
-            /* [out] */ 
-            __out  UINT32 *pdwCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( 
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [in] */ 
-            __in  const float fLevel) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( 
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [out] */ 
-            __out  float *pfLevel) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( 
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][in] */ 
-            __in_ecount(dwCount)  const float *pfVolumes) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( 
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][out] */ 
-            __out_ecount(dwCount)  float *pfVolumes) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioStreamVolumeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioStreamVolume * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioStreamVolume * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioStreamVolume * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioStreamVolume * This,
-            /* [out] */ 
-            __out  UINT32 *pdwCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( 
-            IAudioStreamVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [in] */ 
-            __in  const float fLevel);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( 
-            IAudioStreamVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [out] */ 
-            __out  float *pfLevel);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( 
-            IAudioStreamVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][in] */ 
-            __in_ecount(dwCount)  const float *pfVolumes);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( 
-            IAudioStreamVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][out] */ 
-            __out_ecount(dwCount)  float *pfVolumes);
-        
-        END_INTERFACE
-    } IAudioStreamVolumeVtbl;
-
-    interface IAudioStreamVolume
-    {
-        CONST_VTBL struct IAudioStreamVolumeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioStreamVolume_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioStreamVolume_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioStreamVolume_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioStreamVolume_GetChannelCount(This,pdwCount)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) 
-
-#define IAudioStreamVolume_SetChannelVolume(This,dwIndex,fLevel)	\
-    ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel) ) 
-
-#define IAudioStreamVolume_GetChannelVolume(This,dwIndex,pfLevel)	\
-    ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) 
-
-#define IAudioStreamVolume_SetAllVolumes(This,dwCount,pfVolumes)	\
-    ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes) ) 
-
-#define IAudioStreamVolume_GetAllVolumes(This,dwCount,pfVolumes)	\
-    ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioStreamVolume_INTERFACE_DEFINED__ */
-
-
-#ifndef __IChannelAudioVolume_INTERFACE_DEFINED__
-#define __IChannelAudioVolume_INTERFACE_DEFINED__
-
-/* interface IChannelAudioVolume */
-/* [local][unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IChannelAudioVolume;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("1C158861-B533-4B30-B1CF-E853E51C59B8")
-    IChannelAudioVolume : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetChannelCount( 
-            /* [out] */ 
-            __out  UINT32 *pdwCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( 
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [in] */ 
-            __in  const float fLevel,
-            /* [unique][in] */ LPCGUID EventContext) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( 
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [out] */ 
-            __out  float *pfLevel) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( 
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][in] */ 
-            __in_ecount(dwCount)  const float *pfVolumes,
-            /* [unique][in] */ LPCGUID EventContext) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( 
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][out] */ 
-            __out_ecount(dwCount)  float *pfVolumes) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IChannelAudioVolumeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IChannelAudioVolume * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IChannelAudioVolume * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IChannelAudioVolume * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IChannelAudioVolume * This,
-            /* [out] */ 
-            __out  UINT32 *pdwCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( 
-            IChannelAudioVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [in] */ 
-            __in  const float fLevel,
-            /* [unique][in] */ LPCGUID EventContext);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( 
-            IChannelAudioVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwIndex,
-            /* [out] */ 
-            __out  float *pfLevel);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( 
-            IChannelAudioVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][in] */ 
-            __in_ecount(dwCount)  const float *pfVolumes,
-            /* [unique][in] */ LPCGUID EventContext);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( 
-            IChannelAudioVolume * This,
-            /* [in] */ 
-            __in  UINT32 dwCount,
-            /* [size_is][out] */ 
-            __out_ecount(dwCount)  float *pfVolumes);
-        
-        END_INTERFACE
-    } IChannelAudioVolumeVtbl;
-
-    interface IChannelAudioVolume
-    {
-        CONST_VTBL struct IChannelAudioVolumeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IChannelAudioVolume_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IChannelAudioVolume_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IChannelAudioVolume_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IChannelAudioVolume_GetChannelCount(This,pdwCount)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) 
-
-#define IChannelAudioVolume_SetChannelVolume(This,dwIndex,fLevel,EventContext)	\
-    ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel,EventContext) ) 
-
-#define IChannelAudioVolume_GetChannelVolume(This,dwIndex,pfLevel)	\
-    ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) 
-
-#define IChannelAudioVolume_SetAllVolumes(This,dwCount,pfVolumes,EventContext)	\
-    ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes,EventContext) ) 
-
-#define IChannelAudioVolume_GetAllVolumes(This,dwCount,pfVolumes)	\
-    ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IChannelAudioVolume_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_audioclient_0000_0007 */
-/* [local] */ 
-
-#define FACILITY_AUDCLNT 0x889
-#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n)
-#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n)
-#define AUDCLNT_E_NOT_INITIALIZED            AUDCLNT_ERR(0x001)
-#define AUDCLNT_E_ALREADY_INITIALIZED        AUDCLNT_ERR(0x002)
-#define AUDCLNT_E_WRONG_ENDPOINT_TYPE        AUDCLNT_ERR(0x003)
-#define AUDCLNT_E_DEVICE_INVALIDATED         AUDCLNT_ERR(0x004)
-#define AUDCLNT_E_NOT_STOPPED                AUDCLNT_ERR(0x005)
-#define AUDCLNT_E_BUFFER_TOO_LARGE           AUDCLNT_ERR(0x006)
-#define AUDCLNT_E_OUT_OF_ORDER               AUDCLNT_ERR(0x007)
-#define AUDCLNT_E_UNSUPPORTED_FORMAT         AUDCLNT_ERR(0x008)
-#define AUDCLNT_E_INVALID_SIZE               AUDCLNT_ERR(0x009)
-#define AUDCLNT_E_DEVICE_IN_USE              AUDCLNT_ERR(0x00a)
-#define AUDCLNT_E_BUFFER_OPERATION_PENDING   AUDCLNT_ERR(0x00b)
-#define AUDCLNT_E_THREAD_NOT_REGISTERED      AUDCLNT_ERR(0x00c)
-#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x00e)
-#define AUDCLNT_E_ENDPOINT_CREATE_FAILED     AUDCLNT_ERR(0x00f)
-#define AUDCLNT_E_SERVICE_NOT_RUNNING        AUDCLNT_ERR(0x010)
-#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     AUDCLNT_ERR(0x011)
-#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY          AUDCLNT_ERR(0x012)
-#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x013)
-#define AUDCLNT_E_EVENTHANDLE_NOT_SET          AUDCLNT_ERR(0x014)
-#define AUDCLNT_E_INCORRECT_BUFFER_SIZE        AUDCLNT_ERR(0x015)
-#define AUDCLNT_E_BUFFER_SIZE_ERROR            AUDCLNT_ERR(0x016)
-#define AUDCLNT_E_CPUUSAGE_EXCEEDED            AUDCLNT_ERR(0x017)
-#define AUDCLNT_S_BUFFER_EMPTY              AUDCLNT_SUCCESS(0x001)
-#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x002)
-#define AUDCLNT_S_POSITION_STALLED		   AUDCLNT_SUCCESS(0x003)
-
-
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_s_ifspec;
-
-/* Additional Prototypes for ALL interfaces */
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for audioclient.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __audioclient_h__
+#define __audioclient_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IAudioClient_FWD_DEFINED__
+#define __IAudioClient_FWD_DEFINED__
+typedef interface IAudioClient IAudioClient;
+#endif 	/* __IAudioClient_FWD_DEFINED__ */
+
+
+#ifndef __IAudioRenderClient_FWD_DEFINED__
+#define __IAudioRenderClient_FWD_DEFINED__
+typedef interface IAudioRenderClient IAudioRenderClient;
+#endif 	/* __IAudioRenderClient_FWD_DEFINED__ */
+
+
+#ifndef __IAudioCaptureClient_FWD_DEFINED__
+#define __IAudioCaptureClient_FWD_DEFINED__
+typedef interface IAudioCaptureClient IAudioCaptureClient;
+#endif 	/* __IAudioCaptureClient_FWD_DEFINED__ */
+
+
+#ifndef __IAudioClock_FWD_DEFINED__
+#define __IAudioClock_FWD_DEFINED__
+typedef interface IAudioClock IAudioClock;
+#endif 	/* __IAudioClock_FWD_DEFINED__ */
+
+
+#ifndef __ISimpleAudioVolume_FWD_DEFINED__
+#define __ISimpleAudioVolume_FWD_DEFINED__
+typedef interface ISimpleAudioVolume ISimpleAudioVolume;
+#endif 	/* __ISimpleAudioVolume_FWD_DEFINED__ */
+
+
+#ifndef __IAudioStreamVolume_FWD_DEFINED__
+#define __IAudioStreamVolume_FWD_DEFINED__
+typedef interface IAudioStreamVolume IAudioStreamVolume;
+#endif 	/* __IAudioStreamVolume_FWD_DEFINED__ */
+
+
+#ifndef __IChannelAudioVolume_FWD_DEFINED__
+#define __IChannelAudioVolume_FWD_DEFINED__
+typedef interface IChannelAudioVolume IChannelAudioVolume;
+#endif 	/* __IChannelAudioVolume_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "wtypes.h"
+#include "unknwn.h"
+#include "AudioSessionTypes.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_audioclient_0000_0000 */
+/* [local] */ 
+
+#if 0
+typedef /* [hidden][restricted] */ struct WAVEFORMATEX
+    {
+    WORD wFormatTag;
+    WORD nChannels;
+    DWORD nSamplesPerSec;
+    DWORD nAvgBytesPerSec;
+    WORD nBlockAlign;
+    WORD wBitsPerSample;
+    WORD cbSize;
+    } 	WAVEFORMATEX;
+
+#else
+#include <mmreg.h>
+#endif
+#if 0
+typedef /* [hidden][restricted] */ LONGLONG REFERENCE_TIME;
+
+#else
+#define _IKsControl_
+#include <ks.h>
+#include <ksmedia.h>
+#endif
+
+enum _AUDCLNT_BUFFERFLAGS
+    {	AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY	= 0x1,
+	AUDCLNT_BUFFERFLAGS_SILENT	= 0x2,
+	AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR	= 0x4
+    } ;
+
+
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IAudioClient_INTERFACE_DEFINED__
+#define __IAudioClient_INTERFACE_DEFINED__
+
+/* interface IAudioClient */
+/* [local][unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IAudioClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2")
+    IAudioClient : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Initialize( 
+            /* [in] */ 
+            __in  AUDCLNT_SHAREMODE ShareMode,
+            /* [in] */ 
+            __in  DWORD StreamFlags,
+            /* [in] */ 
+            __in  REFERENCE_TIME hnsBufferDuration,
+            /* [in] */ 
+            __in  REFERENCE_TIME hnsPeriodicity,
+            /* [in] */ 
+            __in  const WAVEFORMATEX *pFormat,
+            /* [in] */ 
+            __in_opt  LPCGUID AudioSessionGuid) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetBufferSize( 
+            /* [out] */ 
+            __out  UINT32 *pNumBufferFrames) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetStreamLatency( 
+            /* [out] */ 
+            __out  REFERENCE_TIME *phnsLatency) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetCurrentPadding( 
+            /* [out] */ 
+            __out  UINT32 *pNumPaddingFrames) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE IsFormatSupported( 
+            /* [in] */ 
+            __in  AUDCLNT_SHAREMODE ShareMode,
+            /* [in] */ 
+            __in  const WAVEFORMATEX *pFormat,
+            /* [unique][out] */ 
+            __out_opt  WAVEFORMATEX **ppClosestMatch) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetMixFormat( 
+            /* [out] */ 
+            __out  WAVEFORMATEX **ppDeviceFormat) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDevicePeriod( 
+            /* [out] */ 
+            __out_opt  REFERENCE_TIME *phnsDefaultDevicePeriod,
+            /* [out] */ 
+            __out_opt  REFERENCE_TIME *phnsMinimumDevicePeriod) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetEventHandle( 
+            /* [in] */ HANDLE eventHandle) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetService( 
+            /* [in] */ 
+            __in  REFIID riid,
+            /* [iid_is][out] */ 
+            __out  void **ppv) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioClientVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioClient * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioClient * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioClient * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Initialize )( 
+            IAudioClient * This,
+            /* [in] */ 
+            __in  AUDCLNT_SHAREMODE ShareMode,
+            /* [in] */ 
+            __in  DWORD StreamFlags,
+            /* [in] */ 
+            __in  REFERENCE_TIME hnsBufferDuration,
+            /* [in] */ 
+            __in  REFERENCE_TIME hnsPeriodicity,
+            /* [in] */ 
+            __in  const WAVEFORMATEX *pFormat,
+            /* [in] */ 
+            __in_opt  LPCGUID AudioSessionGuid);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetBufferSize )( 
+            IAudioClient * This,
+            /* [out] */ 
+            __out  UINT32 *pNumBufferFrames);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetStreamLatency )( 
+            IAudioClient * This,
+            /* [out] */ 
+            __out  REFERENCE_TIME *phnsLatency);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCurrentPadding )( 
+            IAudioClient * This,
+            /* [out] */ 
+            __out  UINT32 *pNumPaddingFrames);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( 
+            IAudioClient * This,
+            /* [in] */ 
+            __in  AUDCLNT_SHAREMODE ShareMode,
+            /* [in] */ 
+            __in  const WAVEFORMATEX *pFormat,
+            /* [unique][out] */ 
+            __out_opt  WAVEFORMATEX **ppClosestMatch);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetMixFormat )( 
+            IAudioClient * This,
+            /* [out] */ 
+            __out  WAVEFORMATEX **ppDeviceFormat);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevicePeriod )( 
+            IAudioClient * This,
+            /* [out] */ 
+            __out_opt  REFERENCE_TIME *phnsDefaultDevicePeriod,
+            /* [out] */ 
+            __out_opt  REFERENCE_TIME *phnsMinimumDevicePeriod);
+        
+        HRESULT ( STDMETHODCALLTYPE *Start )( 
+            IAudioClient * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Stop )( 
+            IAudioClient * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            IAudioClient * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetEventHandle )( 
+            IAudioClient * This,
+            /* [in] */ HANDLE eventHandle);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetService )( 
+            IAudioClient * This,
+            /* [in] */ 
+            __in  REFIID riid,
+            /* [iid_is][out] */ 
+            __out  void **ppv);
+        
+        END_INTERFACE
+    } IAudioClientVtbl;
+
+    interface IAudioClient
+    {
+        CONST_VTBL struct IAudioClientVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioClient_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioClient_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioClient_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid)	\
+    ( (This)->lpVtbl -> Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) ) 
+
+#define IAudioClient_GetBufferSize(This,pNumBufferFrames)	\
+    ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) ) 
+
+#define IAudioClient_GetStreamLatency(This,phnsLatency)	\
+    ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) ) 
+
+#define IAudioClient_GetCurrentPadding(This,pNumPaddingFrames)	\
+    ( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) ) 
+
+#define IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch)	\
+    ( (This)->lpVtbl -> IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) ) 
+
+#define IAudioClient_GetMixFormat(This,ppDeviceFormat)	\
+    ( (This)->lpVtbl -> GetMixFormat(This,ppDeviceFormat) ) 
+
+#define IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod)	\
+    ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ) 
+
+#define IAudioClient_Start(This)	\
+    ( (This)->lpVtbl -> Start(This) ) 
+
+#define IAudioClient_Stop(This)	\
+    ( (This)->lpVtbl -> Stop(This) ) 
+
+#define IAudioClient_Reset(This)	\
+    ( (This)->lpVtbl -> Reset(This) ) 
+
+#define IAudioClient_SetEventHandle(This,eventHandle)	\
+    ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) ) 
+
+#define IAudioClient_GetService(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetService(This,riid,ppv) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioClient_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioRenderClient_INTERFACE_DEFINED__
+#define __IAudioRenderClient_INTERFACE_DEFINED__
+
+/* interface IAudioRenderClient */
+/* [local][unique][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IAudioRenderClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("F294ACFC-3146-4483-A7BF-ADDCA7C260E2")
+    IAudioRenderClient : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetBuffer( 
+            /* [in] */ 
+            __in  UINT32 NumFramesRequested,
+            /* [out] */ 
+            __out  BYTE **ppData) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 
+            /* [in] */ 
+            __in  UINT32 NumFramesWritten,
+            /* [in] */ 
+            __in  DWORD dwFlags) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioRenderClientVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioRenderClient * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioRenderClient * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioRenderClient * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( 
+            IAudioRenderClient * This,
+            /* [in] */ 
+            __in  UINT32 NumFramesRequested,
+            /* [out] */ 
+            __out  BYTE **ppData);
+        
+        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 
+            IAudioRenderClient * This,
+            /* [in] */ 
+            __in  UINT32 NumFramesWritten,
+            /* [in] */ 
+            __in  DWORD dwFlags);
+        
+        END_INTERFACE
+    } IAudioRenderClientVtbl;
+
+    interface IAudioRenderClient
+    {
+        CONST_VTBL struct IAudioRenderClientVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioRenderClient_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioRenderClient_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioRenderClient_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData)	\
+    ( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) ) 
+
+#define IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags)	\
+    ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioRenderClient_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioCaptureClient_INTERFACE_DEFINED__
+#define __IAudioCaptureClient_INTERFACE_DEFINED__
+
+/* interface IAudioCaptureClient */
+/* [local][unique][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IAudioCaptureClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("C8ADBD64-E71E-48a0-A4DE-185C395CD317")
+    IAudioCaptureClient : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetBuffer( 
+            /* [out] */ 
+            __out  BYTE **ppData,
+            /* [out] */ 
+            __out  UINT32 *pNumFramesToRead,
+            /* [out] */ 
+            __out  DWORD *pdwFlags,
+            /* [unique][out] */ 
+            __out_opt  UINT64 *pu64DevicePosition,
+            /* [unique][out] */ 
+            __out_opt  UINT64 *pu64QPCPosition) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 
+            /* [in] */ 
+            __in  UINT32 NumFramesRead) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetNextPacketSize( 
+            /* [out] */ 
+            __out  UINT32 *pNumFramesInNextPacket) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioCaptureClientVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioCaptureClient * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioCaptureClient * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioCaptureClient * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( 
+            IAudioCaptureClient * This,
+            /* [out] */ 
+            __out  BYTE **ppData,
+            /* [out] */ 
+            __out  UINT32 *pNumFramesToRead,
+            /* [out] */ 
+            __out  DWORD *pdwFlags,
+            /* [unique][out] */ 
+            __out_opt  UINT64 *pu64DevicePosition,
+            /* [unique][out] */ 
+            __out_opt  UINT64 *pu64QPCPosition);
+        
+        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 
+            IAudioCaptureClient * This,
+            /* [in] */ 
+            __in  UINT32 NumFramesRead);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetNextPacketSize )( 
+            IAudioCaptureClient * This,
+            /* [out] */ 
+            __out  UINT32 *pNumFramesInNextPacket);
+        
+        END_INTERFACE
+    } IAudioCaptureClientVtbl;
+
+    interface IAudioCaptureClient
+    {
+        CONST_VTBL struct IAudioCaptureClientVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioCaptureClient_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioCaptureClient_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioCaptureClient_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition)	\
+    ( (This)->lpVtbl -> GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) ) 
+
+#define IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead)	\
+    ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesRead) ) 
+
+#define IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket)	\
+    ( (This)->lpVtbl -> GetNextPacketSize(This,pNumFramesInNextPacket) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioCaptureClient_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_audioclient_0000_0003 */
+/* [local] */ 
+
+#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ  0x00000001
+
+
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_s_ifspec;
+
+#ifndef __IAudioClock_INTERFACE_DEFINED__
+#define __IAudioClock_INTERFACE_DEFINED__
+
+/* interface IAudioClock */
+/* [local][unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IAudioClock;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("CD63314F-3FBA-4a1b-812C-EF96358728E7")
+    IAudioClock : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetFrequency( 
+            /* [out] */ 
+            __out  UINT64 *pu64Frequency) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPosition( 
+            /* [out] */ 
+            __out  UINT64 *pu64Position,
+            /* [unique][out] */ 
+            __out_opt  UINT64 *pu64QPCPosition) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetCharacteristics( 
+            /* [out] */ 
+            __out  DWORD *pdwCharacteristics) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioClockVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioClock * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioClock * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioClock * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetFrequency )( 
+            IAudioClock * This,
+            /* [out] */ 
+            __out  UINT64 *pu64Frequency);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPosition )( 
+            IAudioClock * This,
+            /* [out] */ 
+            __out  UINT64 *pu64Position,
+            /* [unique][out] */ 
+            __out_opt  UINT64 *pu64QPCPosition);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCharacteristics )( 
+            IAudioClock * This,
+            /* [out] */ 
+            __out  DWORD *pdwCharacteristics);
+        
+        END_INTERFACE
+    } IAudioClockVtbl;
+
+    interface IAudioClock
+    {
+        CONST_VTBL struct IAudioClockVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioClock_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioClock_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioClock_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioClock_GetFrequency(This,pu64Frequency)	\
+    ( (This)->lpVtbl -> GetFrequency(This,pu64Frequency) ) 
+
+#define IAudioClock_GetPosition(This,pu64Position,pu64QPCPosition)	\
+    ( (This)->lpVtbl -> GetPosition(This,pu64Position,pu64QPCPosition) ) 
+
+#define IAudioClock_GetCharacteristics(This,pdwCharacteristics)	\
+    ( (This)->lpVtbl -> GetCharacteristics(This,pdwCharacteristics) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioClock_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISimpleAudioVolume_INTERFACE_DEFINED__
+#define __ISimpleAudioVolume_INTERFACE_DEFINED__
+
+/* interface ISimpleAudioVolume */
+/* [local][unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_ISimpleAudioVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("87CE5498-68D6-44E5-9215-6DA47EF883D8")
+    ISimpleAudioVolume : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE SetMasterVolume( 
+            /* [in] */ 
+            __in  float fLevel,
+            /* [unique][in] */ LPCGUID EventContext) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetMasterVolume( 
+            /* [out] */ 
+            __out  float *pfLevel) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetMute( 
+            /* [in] */ 
+            __in  const BOOL bMute,
+            /* [unique][in] */ LPCGUID EventContext) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetMute( 
+            /* [out] */ 
+            __out  BOOL *pbMute) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct ISimpleAudioVolumeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ISimpleAudioVolume * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ISimpleAudioVolume * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ISimpleAudioVolume * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetMasterVolume )( 
+            ISimpleAudioVolume * This,
+            /* [in] */ 
+            __in  float fLevel,
+            /* [unique][in] */ LPCGUID EventContext);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetMasterVolume )( 
+            ISimpleAudioVolume * This,
+            /* [out] */ 
+            __out  float *pfLevel);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetMute )( 
+            ISimpleAudioVolume * This,
+            /* [in] */ 
+            __in  const BOOL bMute,
+            /* [unique][in] */ LPCGUID EventContext);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetMute )( 
+            ISimpleAudioVolume * This,
+            /* [out] */ 
+            __out  BOOL *pbMute);
+        
+        END_INTERFACE
+    } ISimpleAudioVolumeVtbl;
+
+    interface ISimpleAudioVolume
+    {
+        CONST_VTBL struct ISimpleAudioVolumeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ISimpleAudioVolume_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ISimpleAudioVolume_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ISimpleAudioVolume_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ISimpleAudioVolume_SetMasterVolume(This,fLevel,EventContext)	\
+    ( (This)->lpVtbl -> SetMasterVolume(This,fLevel,EventContext) ) 
+
+#define ISimpleAudioVolume_GetMasterVolume(This,pfLevel)	\
+    ( (This)->lpVtbl -> GetMasterVolume(This,pfLevel) ) 
+
+#define ISimpleAudioVolume_SetMute(This,bMute,EventContext)	\
+    ( (This)->lpVtbl -> SetMute(This,bMute,EventContext) ) 
+
+#define ISimpleAudioVolume_GetMute(This,pbMute)	\
+    ( (This)->lpVtbl -> GetMute(This,pbMute) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ISimpleAudioVolume_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioStreamVolume_INTERFACE_DEFINED__
+#define __IAudioStreamVolume_INTERFACE_DEFINED__
+
+/* interface IAudioStreamVolume */
+/* [local][unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IAudioStreamVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("93014887-242D-4068-8A15-CF5E93B90FE3")
+    IAudioStreamVolume : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetChannelCount( 
+            /* [out] */ 
+            __out  UINT32 *pdwCount) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( 
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [in] */ 
+            __in  const float fLevel) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( 
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [out] */ 
+            __out  float *pfLevel) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( 
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][in] */ 
+            __in_ecount(dwCount)  const float *pfVolumes) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( 
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][out] */ 
+            __out_ecount(dwCount)  float *pfVolumes) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioStreamVolumeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioStreamVolume * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioStreamVolume * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioStreamVolume * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioStreamVolume * This,
+            /* [out] */ 
+            __out  UINT32 *pdwCount);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( 
+            IAudioStreamVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [in] */ 
+            __in  const float fLevel);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( 
+            IAudioStreamVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [out] */ 
+            __out  float *pfLevel);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( 
+            IAudioStreamVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][in] */ 
+            __in_ecount(dwCount)  const float *pfVolumes);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( 
+            IAudioStreamVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][out] */ 
+            __out_ecount(dwCount)  float *pfVolumes);
+        
+        END_INTERFACE
+    } IAudioStreamVolumeVtbl;
+
+    interface IAudioStreamVolume
+    {
+        CONST_VTBL struct IAudioStreamVolumeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioStreamVolume_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioStreamVolume_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioStreamVolume_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioStreamVolume_GetChannelCount(This,pdwCount)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) 
+
+#define IAudioStreamVolume_SetChannelVolume(This,dwIndex,fLevel)	\
+    ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel) ) 
+
+#define IAudioStreamVolume_GetChannelVolume(This,dwIndex,pfLevel)	\
+    ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) 
+
+#define IAudioStreamVolume_SetAllVolumes(This,dwCount,pfVolumes)	\
+    ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes) ) 
+
+#define IAudioStreamVolume_GetAllVolumes(This,dwCount,pfVolumes)	\
+    ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioStreamVolume_INTERFACE_DEFINED__ */
+
+
+#ifndef __IChannelAudioVolume_INTERFACE_DEFINED__
+#define __IChannelAudioVolume_INTERFACE_DEFINED__
+
+/* interface IChannelAudioVolume */
+/* [local][unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IChannelAudioVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("1C158861-B533-4B30-B1CF-E853E51C59B8")
+    IChannelAudioVolume : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetChannelCount( 
+            /* [out] */ 
+            __out  UINT32 *pdwCount) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( 
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [in] */ 
+            __in  const float fLevel,
+            /* [unique][in] */ LPCGUID EventContext) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( 
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [out] */ 
+            __out  float *pfLevel) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( 
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][in] */ 
+            __in_ecount(dwCount)  const float *pfVolumes,
+            /* [unique][in] */ LPCGUID EventContext) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( 
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][out] */ 
+            __out_ecount(dwCount)  float *pfVolumes) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IChannelAudioVolumeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IChannelAudioVolume * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IChannelAudioVolume * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IChannelAudioVolume * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IChannelAudioVolume * This,
+            /* [out] */ 
+            __out  UINT32 *pdwCount);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( 
+            IChannelAudioVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [in] */ 
+            __in  const float fLevel,
+            /* [unique][in] */ LPCGUID EventContext);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( 
+            IChannelAudioVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwIndex,
+            /* [out] */ 
+            __out  float *pfLevel);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( 
+            IChannelAudioVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][in] */ 
+            __in_ecount(dwCount)  const float *pfVolumes,
+            /* [unique][in] */ LPCGUID EventContext);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( 
+            IChannelAudioVolume * This,
+            /* [in] */ 
+            __in  UINT32 dwCount,
+            /* [size_is][out] */ 
+            __out_ecount(dwCount)  float *pfVolumes);
+        
+        END_INTERFACE
+    } IChannelAudioVolumeVtbl;
+
+    interface IChannelAudioVolume
+    {
+        CONST_VTBL struct IChannelAudioVolumeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IChannelAudioVolume_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IChannelAudioVolume_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IChannelAudioVolume_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IChannelAudioVolume_GetChannelCount(This,pdwCount)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) 
+
+#define IChannelAudioVolume_SetChannelVolume(This,dwIndex,fLevel,EventContext)	\
+    ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel,EventContext) ) 
+
+#define IChannelAudioVolume_GetChannelVolume(This,dwIndex,pfLevel)	\
+    ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) 
+
+#define IChannelAudioVolume_SetAllVolumes(This,dwCount,pfVolumes,EventContext)	\
+    ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes,EventContext) ) 
+
+#define IChannelAudioVolume_GetAllVolumes(This,dwCount,pfVolumes)	\
+    ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IChannelAudioVolume_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_audioclient_0000_0007 */
+/* [local] */ 
+
+#define FACILITY_AUDCLNT 0x889
+#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n)
+#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n)
+#define AUDCLNT_E_NOT_INITIALIZED            AUDCLNT_ERR(0x001)
+#define AUDCLNT_E_ALREADY_INITIALIZED        AUDCLNT_ERR(0x002)
+#define AUDCLNT_E_WRONG_ENDPOINT_TYPE        AUDCLNT_ERR(0x003)
+#define AUDCLNT_E_DEVICE_INVALIDATED         AUDCLNT_ERR(0x004)
+#define AUDCLNT_E_NOT_STOPPED                AUDCLNT_ERR(0x005)
+#define AUDCLNT_E_BUFFER_TOO_LARGE           AUDCLNT_ERR(0x006)
+#define AUDCLNT_E_OUT_OF_ORDER               AUDCLNT_ERR(0x007)
+#define AUDCLNT_E_UNSUPPORTED_FORMAT         AUDCLNT_ERR(0x008)
+#define AUDCLNT_E_INVALID_SIZE               AUDCLNT_ERR(0x009)
+#define AUDCLNT_E_DEVICE_IN_USE              AUDCLNT_ERR(0x00a)
+#define AUDCLNT_E_BUFFER_OPERATION_PENDING   AUDCLNT_ERR(0x00b)
+#define AUDCLNT_E_THREAD_NOT_REGISTERED      AUDCLNT_ERR(0x00c)
+#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x00e)
+#define AUDCLNT_E_ENDPOINT_CREATE_FAILED     AUDCLNT_ERR(0x00f)
+#define AUDCLNT_E_SERVICE_NOT_RUNNING        AUDCLNT_ERR(0x010)
+#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     AUDCLNT_ERR(0x011)
+#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY          AUDCLNT_ERR(0x012)
+#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x013)
+#define AUDCLNT_E_EVENTHANDLE_NOT_SET          AUDCLNT_ERR(0x014)
+#define AUDCLNT_E_INCORRECT_BUFFER_SIZE        AUDCLNT_ERR(0x015)
+#define AUDCLNT_E_BUFFER_SIZE_ERROR            AUDCLNT_ERR(0x016)
+#define AUDCLNT_E_CPUUSAGE_EXCEEDED            AUDCLNT_ERR(0x017)
+#define AUDCLNT_S_BUFFER_EMPTY              AUDCLNT_SUCCESS(0x001)
+#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x002)
+#define AUDCLNT_S_POSITION_STALLED		   AUDCLNT_SUCCESS(0x003)
+
+
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/devicetopology.h b/portaudio/src/hostapi/wasapi/mingw-include/devicetopology.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/devicetopology.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/devicetopology.h
@@ -1,3275 +1,3275 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for devicetopology.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 500
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __devicetopology_h__
-#define __devicetopology_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IKsControl_FWD_DEFINED__
-#define __IKsControl_FWD_DEFINED__
-typedef interface IKsControl IKsControl;
-#endif 	/* __IKsControl_FWD_DEFINED__ */
-
-
-#ifndef __IPerChannelDbLevel_FWD_DEFINED__
-#define __IPerChannelDbLevel_FWD_DEFINED__
-typedef interface IPerChannelDbLevel IPerChannelDbLevel;
-#endif 	/* __IPerChannelDbLevel_FWD_DEFINED__ */
-
-
-#ifndef __IAudioVolumeLevel_FWD_DEFINED__
-#define __IAudioVolumeLevel_FWD_DEFINED__
-typedef interface IAudioVolumeLevel IAudioVolumeLevel;
-#endif 	/* __IAudioVolumeLevel_FWD_DEFINED__ */
-
-
-#ifndef __IAudioChannelConfig_FWD_DEFINED__
-#define __IAudioChannelConfig_FWD_DEFINED__
-typedef interface IAudioChannelConfig IAudioChannelConfig;
-#endif 	/* __IAudioChannelConfig_FWD_DEFINED__ */
-
-
-#ifndef __IAudioLoudness_FWD_DEFINED__
-#define __IAudioLoudness_FWD_DEFINED__
-typedef interface IAudioLoudness IAudioLoudness;
-#endif 	/* __IAudioLoudness_FWD_DEFINED__ */
-
-
-#ifndef __IAudioInputSelector_FWD_DEFINED__
-#define __IAudioInputSelector_FWD_DEFINED__
-typedef interface IAudioInputSelector IAudioInputSelector;
-#endif 	/* __IAudioInputSelector_FWD_DEFINED__ */
-
-
-#ifndef __IAudioOutputSelector_FWD_DEFINED__
-#define __IAudioOutputSelector_FWD_DEFINED__
-typedef interface IAudioOutputSelector IAudioOutputSelector;
-#endif 	/* __IAudioOutputSelector_FWD_DEFINED__ */
-
-
-#ifndef __IAudioMute_FWD_DEFINED__
-#define __IAudioMute_FWD_DEFINED__
-typedef interface IAudioMute IAudioMute;
-#endif 	/* __IAudioMute_FWD_DEFINED__ */
-
-
-#ifndef __IAudioBass_FWD_DEFINED__
-#define __IAudioBass_FWD_DEFINED__
-typedef interface IAudioBass IAudioBass;
-#endif 	/* __IAudioBass_FWD_DEFINED__ */
-
-
-#ifndef __IAudioMidrange_FWD_DEFINED__
-#define __IAudioMidrange_FWD_DEFINED__
-typedef interface IAudioMidrange IAudioMidrange;
-#endif 	/* __IAudioMidrange_FWD_DEFINED__ */
-
-
-#ifndef __IAudioTreble_FWD_DEFINED__
-#define __IAudioTreble_FWD_DEFINED__
-typedef interface IAudioTreble IAudioTreble;
-#endif 	/* __IAudioTreble_FWD_DEFINED__ */
-
-
-#ifndef __IAudioAutoGainControl_FWD_DEFINED__
-#define __IAudioAutoGainControl_FWD_DEFINED__
-typedef interface IAudioAutoGainControl IAudioAutoGainControl;
-#endif 	/* __IAudioAutoGainControl_FWD_DEFINED__ */
-
-
-#ifndef __IAudioPeakMeter_FWD_DEFINED__
-#define __IAudioPeakMeter_FWD_DEFINED__
-typedef interface IAudioPeakMeter IAudioPeakMeter;
-#endif 	/* __IAudioPeakMeter_FWD_DEFINED__ */
-
-
-#ifndef __IDeviceSpecificProperty_FWD_DEFINED__
-#define __IDeviceSpecificProperty_FWD_DEFINED__
-typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;
-#endif 	/* __IDeviceSpecificProperty_FWD_DEFINED__ */
-
-
-#ifndef __IKsFormatSupport_FWD_DEFINED__
-#define __IKsFormatSupport_FWD_DEFINED__
-typedef interface IKsFormatSupport IKsFormatSupport;
-#endif 	/* __IKsFormatSupport_FWD_DEFINED__ */
-
-
-#ifndef __IKsJackDescription_FWD_DEFINED__
-#define __IKsJackDescription_FWD_DEFINED__
-typedef interface IKsJackDescription IKsJackDescription;
-#endif 	/* __IKsJackDescription_FWD_DEFINED__ */
-
-
-#ifndef __IPartsList_FWD_DEFINED__
-#define __IPartsList_FWD_DEFINED__
-typedef interface IPartsList IPartsList;
-#endif 	/* __IPartsList_FWD_DEFINED__ */
-
-
-#ifndef __IPart_FWD_DEFINED__
-#define __IPart_FWD_DEFINED__
-typedef interface IPart IPart;
-#endif 	/* __IPart_FWD_DEFINED__ */
-
-
-#ifndef __IConnector_FWD_DEFINED__
-#define __IConnector_FWD_DEFINED__
-typedef interface IConnector IConnector;
-#endif 	/* __IConnector_FWD_DEFINED__ */
-
-
-#ifndef __ISubunit_FWD_DEFINED__
-#define __ISubunit_FWD_DEFINED__
-typedef interface ISubunit ISubunit;
-#endif 	/* __ISubunit_FWD_DEFINED__ */
-
-
-#ifndef __IControlInterface_FWD_DEFINED__
-#define __IControlInterface_FWD_DEFINED__
-typedef interface IControlInterface IControlInterface;
-#endif 	/* __IControlInterface_FWD_DEFINED__ */
-
-
-#ifndef __IControlChangeNotify_FWD_DEFINED__
-#define __IControlChangeNotify_FWD_DEFINED__
-typedef interface IControlChangeNotify IControlChangeNotify;
-#endif 	/* __IControlChangeNotify_FWD_DEFINED__ */
-
-
-#ifndef __IDeviceTopology_FWD_DEFINED__
-#define __IDeviceTopology_FWD_DEFINED__
-typedef interface IDeviceTopology IDeviceTopology;
-#endif 	/* __IDeviceTopology_FWD_DEFINED__ */
-
-
-#ifndef __DeviceTopology_FWD_DEFINED__
-#define __DeviceTopology_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class DeviceTopology DeviceTopology;
-#else
-typedef struct DeviceTopology DeviceTopology;
-#endif /* __cplusplus */
-
-#endif 	/* __DeviceTopology_FWD_DEFINED__ */
-
-
-#ifndef __IPartsList_FWD_DEFINED__
-#define __IPartsList_FWD_DEFINED__
-typedef interface IPartsList IPartsList;
-#endif 	/* __IPartsList_FWD_DEFINED__ */
-
-
-#ifndef __IPerChannelDbLevel_FWD_DEFINED__
-#define __IPerChannelDbLevel_FWD_DEFINED__
-typedef interface IPerChannelDbLevel IPerChannelDbLevel;
-#endif 	/* __IPerChannelDbLevel_FWD_DEFINED__ */
-
-
-#ifndef __IAudioVolumeLevel_FWD_DEFINED__
-#define __IAudioVolumeLevel_FWD_DEFINED__
-typedef interface IAudioVolumeLevel IAudioVolumeLevel;
-#endif 	/* __IAudioVolumeLevel_FWD_DEFINED__ */
-
-
-#ifndef __IAudioLoudness_FWD_DEFINED__
-#define __IAudioLoudness_FWD_DEFINED__
-typedef interface IAudioLoudness IAudioLoudness;
-#endif 	/* __IAudioLoudness_FWD_DEFINED__ */
-
-
-#ifndef __IAudioInputSelector_FWD_DEFINED__
-#define __IAudioInputSelector_FWD_DEFINED__
-typedef interface IAudioInputSelector IAudioInputSelector;
-#endif 	/* __IAudioInputSelector_FWD_DEFINED__ */
-
-
-#ifndef __IAudioMute_FWD_DEFINED__
-#define __IAudioMute_FWD_DEFINED__
-typedef interface IAudioMute IAudioMute;
-#endif 	/* __IAudioMute_FWD_DEFINED__ */
-
-
-#ifndef __IAudioBass_FWD_DEFINED__
-#define __IAudioBass_FWD_DEFINED__
-typedef interface IAudioBass IAudioBass;
-#endif 	/* __IAudioBass_FWD_DEFINED__ */
-
-
-#ifndef __IAudioMidrange_FWD_DEFINED__
-#define __IAudioMidrange_FWD_DEFINED__
-typedef interface IAudioMidrange IAudioMidrange;
-#endif 	/* __IAudioMidrange_FWD_DEFINED__ */
-
-
-#ifndef __IAudioTreble_FWD_DEFINED__
-#define __IAudioTreble_FWD_DEFINED__
-typedef interface IAudioTreble IAudioTreble;
-#endif 	/* __IAudioTreble_FWD_DEFINED__ */
-
-
-#ifndef __IAudioAutoGainControl_FWD_DEFINED__
-#define __IAudioAutoGainControl_FWD_DEFINED__
-typedef interface IAudioAutoGainControl IAudioAutoGainControl;
-#endif 	/* __IAudioAutoGainControl_FWD_DEFINED__ */
-
-
-#ifndef __IAudioOutputSelector_FWD_DEFINED__
-#define __IAudioOutputSelector_FWD_DEFINED__
-typedef interface IAudioOutputSelector IAudioOutputSelector;
-#endif 	/* __IAudioOutputSelector_FWD_DEFINED__ */
-
-
-#ifndef __IAudioPeakMeter_FWD_DEFINED__
-#define __IAudioPeakMeter_FWD_DEFINED__
-typedef interface IAudioPeakMeter IAudioPeakMeter;
-#endif 	/* __IAudioPeakMeter_FWD_DEFINED__ */
-
-
-#ifndef __IDeviceSpecificProperty_FWD_DEFINED__
-#define __IDeviceSpecificProperty_FWD_DEFINED__
-typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;
-#endif 	/* __IDeviceSpecificProperty_FWD_DEFINED__ */
-
-
-#ifndef __IKsFormatSupport_FWD_DEFINED__
-#define __IKsFormatSupport_FWD_DEFINED__
-typedef interface IKsFormatSupport IKsFormatSupport;
-#endif 	/* __IKsFormatSupport_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "oaidl.h"
-#include "ocidl.h"
-#include "propidl.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_devicetopology_0000_0000 */
-/* [local] */ 
-
-#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
-//
-//   Flag for clients of IControlChangeNotify::OnNotify to allow those clients to identify hardware initiated notifications
-//
-#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 'draH'
-/* E2C2E9DE-09B1-4B04-84E5-07931225EE04 */
-DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xE2C2E9DE,0x09B1,0x4B04,0x84, 0xE5, 0x07, 0x93, 0x12, 0x25, 0xEE, 0x04);
-#define _IKsControl_
-#include "ks.h"
-#include "ksmedia.h"
-#ifndef _KS_
-typedef /* [public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001
-    {
-    ULONG FormatSize;
-    ULONG Flags;
-    ULONG SampleSize;
-    ULONG Reserved;
-    GUID MajorFormat;
-    GUID SubFormat;
-    GUID Specifier;
-    } 	KSDATAFORMAT;
-
-typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001 *PKSDATAFORMAT;
-
-typedef /* [public][public][public][public][public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002
-    {
-    union 
-        {
-        struct 
-            {
-            GUID Set;
-            ULONG Id;
-            ULONG Flags;
-            } 	;
-        LONGLONG Alignment;
-        } 	;
-    } 	KSIDENTIFIER;
-
-typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002 *PKSIDENTIFIER;
-
-typedef /* [public][public][public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0005
-    {	ePcxChanMap_FL_FR	= 0,
-	ePcxChanMap_FC_LFE	= ( ePcxChanMap_FL_FR + 1 ) ,
-	ePcxChanMap_BL_BR	= ( ePcxChanMap_FC_LFE + 1 ) ,
-	ePcxChanMap_FLC_FRC	= ( ePcxChanMap_BL_BR + 1 ) ,
-	ePcxChanMap_SL_SR	= ( ePcxChanMap_FLC_FRC + 1 ) ,
-	ePcxChanMap_Unknown	= ( ePcxChanMap_SL_SR + 1 ) 
-    } 	EChannelMapping;
-
-typedef /* [public][public][public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0006
-    {	eConnTypeUnknown	= 0,
-	eConnTypeEighth	= ( eConnTypeUnknown + 1 ) ,
-	eConnTypeQuarter	= ( eConnTypeEighth + 1 ) ,
-	eConnTypeAtapiInternal	= ( eConnTypeQuarter + 1 ) ,
-	eConnTypeRCA	= ( eConnTypeAtapiInternal + 1 ) ,
-	eConnTypeOptical	= ( eConnTypeRCA + 1 ) ,
-	eConnTypeOtherDigital	= ( eConnTypeOptical + 1 ) ,
-	eConnTypeOtherAnalog	= ( eConnTypeOtherDigital + 1 ) ,
-	eConnTypeMultichannelAnalogDIN	= ( eConnTypeOtherAnalog + 1 ) ,
-	eConnTypeXlrProfessional	= ( eConnTypeMultichannelAnalogDIN + 1 ) ,
-	eConnTypeRJ11Modem	= ( eConnTypeXlrProfessional + 1 ) ,
-	eConnTypeCombination	= ( eConnTypeRJ11Modem + 1 ) 
-    } 	EPcxConnectionType;
-
-typedef /* [public][public][public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0007
-    {	eGeoLocRear	= 0x1,
-	eGeoLocFront	= ( eGeoLocRear + 1 ) ,
-	eGeoLocLeft	= ( eGeoLocFront + 1 ) ,
-	eGeoLocRight	= ( eGeoLocLeft + 1 ) ,
-	eGeoLocTop	= ( eGeoLocRight + 1 ) ,
-	eGeoLocBottom	= ( eGeoLocTop + 1 ) ,
-	eGeoLocRearOPanel	= ( eGeoLocBottom + 1 ) ,
-	eGeoLocRiser	= ( eGeoLocRearOPanel + 1 ) ,
-	eGeoLocInsideMobileLid	= ( eGeoLocRiser + 1 ) ,
-	eGeoLocDrivebay	= ( eGeoLocInsideMobileLid + 1 ) ,
-	eGeoLocHDMI	= ( eGeoLocDrivebay + 1 ) ,
-	eGeoLocOutsideMobileLid	= ( eGeoLocHDMI + 1 ) ,
-	eGeoLocATAPI	= ( eGeoLocOutsideMobileLid + 1 ) ,
-	eGeoLocReserved5	= ( eGeoLocATAPI + 1 ) ,
-	eGeoLocReserved6	= ( eGeoLocReserved5 + 1 ) 
-    } 	EPcxGeoLocation;
-
-typedef /* [public][public][public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0008
-    {	eGenLocPrimaryBox	= 0,
-	eGenLocInternal	= ( eGenLocPrimaryBox + 1 ) ,
-	eGenLocSeperate	= ( eGenLocInternal + 1 ) ,
-	eGenLocOther	= ( eGenLocSeperate + 1 ) 
-    } 	EPcxGenLocation;
-
-typedef /* [public][public][public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0009
-    {	ePortConnJack	= 0,
-	ePortConnIntegratedDevice	= ( ePortConnJack + 1 ) ,
-	ePortConnBothIntegratedAndJack	= ( ePortConnIntegratedDevice + 1 ) ,
-	ePortConnUnknown	= ( ePortConnBothIntegratedAndJack + 1 ) 
-    } 	EPxcPortConnection;
-
-typedef /* [public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010
-    {
-    EChannelMapping ChannelMapping;
-    COLORREF Color;
-    EPcxConnectionType ConnectionType;
-    EPcxGeoLocation GeoLocation;
-    EPcxGenLocation GenLocation;
-    EPxcPortConnection PortConnection;
-    BOOL IsConnected;
-    } 	KSJACK_DESCRIPTION;
-
-typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010 *PKSJACK_DESCRIPTION;
-
-typedef KSIDENTIFIER KSPROPERTY;
-
-typedef KSIDENTIFIER *PKSPROPERTY;
-
-typedef KSIDENTIFIER KSMETHOD;
-
-typedef KSIDENTIFIER *PKSMETHOD;
-
-typedef KSIDENTIFIER KSEVENT;
-
-typedef KSIDENTIFIER *PKSEVENT;
-
-#endif
-
-
-
-
-
-
-
-
-typedef /* [public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0011
-    {	In	= 0,
-	Out	= ( In + 1 ) 
-    } 	DataFlow;
-
-typedef /* [public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0012
-    {	Connector	= 0,
-	Subunit	= ( Connector + 1 ) 
-    } 	PartType;
-
-#define PARTTYPE_FLAG_CONNECTOR 0x00010000
-#define PARTTYPE_FLAG_SUBUNIT   0x00020000
-#define PARTTYPE_MASK           0x00030000
-#define PARTID_MASK             0x0000ffff
-typedef /* [public][public] */ 
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0013
-    {	Unknown_Connector	= 0,
-	Physical_Internal	= ( Unknown_Connector + 1 ) ,
-	Physical_External	= ( Physical_Internal + 1 ) ,
-	Software_IO	= ( Physical_External + 1 ) ,
-	Software_Fixed	= ( Software_IO + 1 ) ,
-	Network	= ( Software_Fixed + 1 ) 
-    } 	ConnectorType;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IKsControl_INTERFACE_DEFINED__
-#define __IKsControl_INTERFACE_DEFINED__
-
-/* interface IKsControl */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IKsControl;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("28F54685-06FD-11D2-B27A-00A0C9223196")
-    IKsControl : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE KsProperty( 
-            /* [in] */ PKSPROPERTY Property,
-            /* [in] */ ULONG PropertyLength,
-            /* [out][in] */ void *PropertyData,
-            /* [in] */ ULONG DataLength,
-            /* [out] */ ULONG *BytesReturned) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE KsMethod( 
-            /* [in] */ PKSMETHOD Method,
-            /* [in] */ ULONG MethodLength,
-            /* [out][in] */ void *MethodData,
-            /* [in] */ ULONG DataLength,
-            /* [out] */ ULONG *BytesReturned) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE KsEvent( 
-            /* [in] */ PKSEVENT Event,
-            /* [in] */ ULONG EventLength,
-            /* [out][in] */ void *EventData,
-            /* [in] */ ULONG DataLength,
-            /* [out] */ ULONG *BytesReturned) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IKsControlVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IKsControl * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IKsControl * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IKsControl * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *KsProperty )( 
-            IKsControl * This,
-            /* [in] */ PKSPROPERTY Property,
-            /* [in] */ ULONG PropertyLength,
-            /* [out][in] */ void *PropertyData,
-            /* [in] */ ULONG DataLength,
-            /* [out] */ ULONG *BytesReturned);
-        
-        HRESULT ( STDMETHODCALLTYPE *KsMethod )( 
-            IKsControl * This,
-            /* [in] */ PKSMETHOD Method,
-            /* [in] */ ULONG MethodLength,
-            /* [out][in] */ void *MethodData,
-            /* [in] */ ULONG DataLength,
-            /* [out] */ ULONG *BytesReturned);
-        
-        HRESULT ( STDMETHODCALLTYPE *KsEvent )( 
-            IKsControl * This,
-            /* [in] */ PKSEVENT Event,
-            /* [in] */ ULONG EventLength,
-            /* [out][in] */ void *EventData,
-            /* [in] */ ULONG DataLength,
-            /* [out] */ ULONG *BytesReturned);
-        
-        END_INTERFACE
-    } IKsControlVtbl;
-
-    interface IKsControl
-    {
-        CONST_VTBL struct IKsControlVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IKsControl_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IKsControl_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IKsControl_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IKsControl_KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned)	\
-    ( (This)->lpVtbl -> KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) ) 
-
-#define IKsControl_KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned)	\
-    ( (This)->lpVtbl -> KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) ) 
-
-#define IKsControl_KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned)	\
-    ( (This)->lpVtbl -> KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IKsControl_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPerChannelDbLevel_INTERFACE_DEFINED__
-#define __IPerChannelDbLevel_INTERFACE_DEFINED__
-
-/* interface IPerChannelDbLevel */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IPerChannelDbLevel;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C2F8E001-F205-4BC9-99BC-C13B1E048CCB")
-    IPerChannelDbLevel : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( 
-            /* [out] */ 
-            __out  UINT *pcChannels) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevelRange( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfMinLevelDB,
-            /* [out] */ 
-            __out  float *pfMaxLevelDB,
-            /* [out] */ 
-            __out  float *pfStepping) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevel( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelUniform( 
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelAllChannels( 
-            /* [size_is][in] */ 
-            __in_ecount(cChannels)  float aLevelsDB[  ],
-            /* [in] */ 
-            __in  ULONG cChannels,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPerChannelDbLevelVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPerChannelDbLevel * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPerChannelDbLevel * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPerChannelDbLevel * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IPerChannelDbLevel * This,
-            /* [out] */ 
-            __out  UINT *pcChannels);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
-            IPerChannelDbLevel * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfMinLevelDB,
-            /* [out] */ 
-            __out  float *pfMaxLevelDB,
-            /* [out] */ 
-            __out  float *pfStepping);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
-            IPerChannelDbLevel * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
-            IPerChannelDbLevel * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
-            IPerChannelDbLevel * This,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
-            IPerChannelDbLevel * This,
-            /* [size_is][in] */ 
-            __in_ecount(cChannels)  float aLevelsDB[  ],
-            /* [in] */ 
-            __in  ULONG cChannels,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IPerChannelDbLevelVtbl;
-
-    interface IPerChannelDbLevel
-    {
-        CONST_VTBL struct IPerChannelDbLevelVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPerChannelDbLevel_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPerChannelDbLevel_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPerChannelDbLevel_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPerChannelDbLevel_GetChannelCount(This,pcChannels)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
-
-#define IPerChannelDbLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
-    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
-
-#define IPerChannelDbLevel_GetLevel(This,nChannel,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
-
-#define IPerChannelDbLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
-
-#define IPerChannelDbLevel_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
-
-#define IPerChannelDbLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPerChannelDbLevel_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioVolumeLevel_INTERFACE_DEFINED__
-#define __IAudioVolumeLevel_INTERFACE_DEFINED__
-
-/* interface IAudioVolumeLevel */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioVolumeLevel;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("7FB7B48F-531D-44A2-BCB3-5AD5A134B3DC")
-    IAudioVolumeLevel : public IPerChannelDbLevel
-    {
-    public:
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioVolumeLevelVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioVolumeLevel * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioVolumeLevel * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioVolumeLevel * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioVolumeLevel * This,
-            /* [out] */ 
-            __out  UINT *pcChannels);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
-            IAudioVolumeLevel * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfMinLevelDB,
-            /* [out] */ 
-            __out  float *pfMaxLevelDB,
-            /* [out] */ 
-            __out  float *pfStepping);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
-            IAudioVolumeLevel * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
-            IAudioVolumeLevel * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
-            IAudioVolumeLevel * This,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
-            IAudioVolumeLevel * This,
-            /* [size_is][in] */ 
-            __in_ecount(cChannels)  float aLevelsDB[  ],
-            /* [in] */ 
-            __in  ULONG cChannels,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioVolumeLevelVtbl;
-
-    interface IAudioVolumeLevel
-    {
-        CONST_VTBL struct IAudioVolumeLevelVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioVolumeLevel_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioVolumeLevel_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioVolumeLevel_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioVolumeLevel_GetChannelCount(This,pcChannels)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
-
-#define IAudioVolumeLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
-    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
-
-#define IAudioVolumeLevel_GetLevel(This,nChannel,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
-
-#define IAudioVolumeLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
-
-#define IAudioVolumeLevel_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
-
-#define IAudioVolumeLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
-
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioVolumeLevel_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioChannelConfig_INTERFACE_DEFINED__
-#define __IAudioChannelConfig_INTERFACE_DEFINED__
-
-/* interface IAudioChannelConfig */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioChannelConfig;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("BB11C46F-EC28-493C-B88A-5DB88062CE98")
-    IAudioChannelConfig : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetChannelConfig( 
-            /* [in] */ DWORD dwConfig,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelConfig( 
-            /* [retval][out] */ DWORD *pdwConfig) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioChannelConfigVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioChannelConfig * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioChannelConfig * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioChannelConfig * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetChannelConfig )( 
-            IAudioChannelConfig * This,
-            /* [in] */ DWORD dwConfig,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelConfig )( 
-            IAudioChannelConfig * This,
-            /* [retval][out] */ DWORD *pdwConfig);
-        
-        END_INTERFACE
-    } IAudioChannelConfigVtbl;
-
-    interface IAudioChannelConfig
-    {
-        CONST_VTBL struct IAudioChannelConfigVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioChannelConfig_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioChannelConfig_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioChannelConfig_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioChannelConfig_SetChannelConfig(This,dwConfig,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetChannelConfig(This,dwConfig,pguidEventContext) ) 
-
-#define IAudioChannelConfig_GetChannelConfig(This,pdwConfig)	\
-    ( (This)->lpVtbl -> GetChannelConfig(This,pdwConfig) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioChannelConfig_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioLoudness_INTERFACE_DEFINED__
-#define __IAudioLoudness_INTERFACE_DEFINED__
-
-/* interface IAudioLoudness */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioLoudness;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("7D8B1437-DD53-4350-9C1B-1EE2890BD938")
-    IAudioLoudness : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( 
-            /* [out] */ 
-            __out  BOOL *pbEnabled) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( 
-            /* [in] */ 
-            __in  BOOL bEnable,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioLoudnessVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioLoudness * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioLoudness * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioLoudness * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( 
-            IAudioLoudness * This,
-            /* [out] */ 
-            __out  BOOL *pbEnabled);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( 
-            IAudioLoudness * This,
-            /* [in] */ 
-            __in  BOOL bEnable,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioLoudnessVtbl;
-
-    interface IAudioLoudness
-    {
-        CONST_VTBL struct IAudioLoudnessVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioLoudness_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioLoudness_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioLoudness_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioLoudness_GetEnabled(This,pbEnabled)	\
-    ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) 
-
-#define IAudioLoudness_SetEnabled(This,bEnable,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioLoudness_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioInputSelector_INTERFACE_DEFINED__
-#define __IAudioInputSelector_INTERFACE_DEFINED__
-
-/* interface IAudioInputSelector */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioInputSelector;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("4F03DC02-5E6E-4653-8F72-A030C123D598")
-    IAudioInputSelector : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( 
-            /* [out] */ 
-            __out  UINT *pnIdSelected) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( 
-            /* [in] */ 
-            __in  UINT nIdSelect,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioInputSelectorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioInputSelector * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioInputSelector * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioInputSelector * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( 
-            IAudioInputSelector * This,
-            /* [out] */ 
-            __out  UINT *pnIdSelected);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( 
-            IAudioInputSelector * This,
-            /* [in] */ 
-            __in  UINT nIdSelect,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioInputSelectorVtbl;
-
-    interface IAudioInputSelector
-    {
-        CONST_VTBL struct IAudioInputSelectorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioInputSelector_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioInputSelector_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioInputSelector_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioInputSelector_GetSelection(This,pnIdSelected)	\
-    ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) 
-
-#define IAudioInputSelector_SetSelection(This,nIdSelect,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioInputSelector_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioOutputSelector_INTERFACE_DEFINED__
-#define __IAudioOutputSelector_INTERFACE_DEFINED__
-
-/* interface IAudioOutputSelector */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioOutputSelector;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("BB515F69-94A7-429e-8B9C-271B3F11A3AB")
-    IAudioOutputSelector : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( 
-            /* [out] */ 
-            __out  UINT *pnIdSelected) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( 
-            /* [in] */ 
-            __in  UINT nIdSelect,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioOutputSelectorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioOutputSelector * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioOutputSelector * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioOutputSelector * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( 
-            IAudioOutputSelector * This,
-            /* [out] */ 
-            __out  UINT *pnIdSelected);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( 
-            IAudioOutputSelector * This,
-            /* [in] */ 
-            __in  UINT nIdSelect,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioOutputSelectorVtbl;
-
-    interface IAudioOutputSelector
-    {
-        CONST_VTBL struct IAudioOutputSelectorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioOutputSelector_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioOutputSelector_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioOutputSelector_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioOutputSelector_GetSelection(This,pnIdSelected)	\
-    ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) 
-
-#define IAudioOutputSelector_SetSelection(This,nIdSelect,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioOutputSelector_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioMute_INTERFACE_DEFINED__
-#define __IAudioMute_INTERFACE_DEFINED__
-
-/* interface IAudioMute */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioMute;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("DF45AEEA-B74A-4B6B-AFAD-2366B6AA012E")
-    IAudioMute : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetMute( 
-            /* [in] */ 
-            __in  BOOL bMuted,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMute( 
-            /* [out] */ 
-            __out  BOOL *pbMuted) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioMuteVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioMute * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioMute * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioMute * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( 
-            IAudioMute * This,
-            /* [in] */ 
-            __in  BOOL bMuted,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( 
-            IAudioMute * This,
-            /* [out] */ 
-            __out  BOOL *pbMuted);
-        
-        END_INTERFACE
-    } IAudioMuteVtbl;
-
-    interface IAudioMute
-    {
-        CONST_VTBL struct IAudioMuteVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioMute_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioMute_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioMute_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioMute_SetMute(This,bMuted,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetMute(This,bMuted,pguidEventContext) ) 
-
-#define IAudioMute_GetMute(This,pbMuted)	\
-    ( (This)->lpVtbl -> GetMute(This,pbMuted) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioMute_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioBass_INTERFACE_DEFINED__
-#define __IAudioBass_INTERFACE_DEFINED__
-
-/* interface IAudioBass */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioBass;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A2B1A1D9-4DB3-425D-A2B2-BD335CB3E2E5")
-    IAudioBass : public IPerChannelDbLevel
-    {
-    public:
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioBassVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioBass * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioBass * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioBass * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioBass * This,
-            /* [out] */ 
-            __out  UINT *pcChannels);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
-            IAudioBass * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfMinLevelDB,
-            /* [out] */ 
-            __out  float *pfMaxLevelDB,
-            /* [out] */ 
-            __out  float *pfStepping);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
-            IAudioBass * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
-            IAudioBass * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
-            IAudioBass * This,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
-            IAudioBass * This,
-            /* [size_is][in] */ 
-            __in_ecount(cChannels)  float aLevelsDB[  ],
-            /* [in] */ 
-            __in  ULONG cChannels,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioBassVtbl;
-
-    interface IAudioBass
-    {
-        CONST_VTBL struct IAudioBassVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioBass_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioBass_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioBass_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioBass_GetChannelCount(This,pcChannels)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
-
-#define IAudioBass_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
-    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
-
-#define IAudioBass_GetLevel(This,nChannel,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
-
-#define IAudioBass_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
-
-#define IAudioBass_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
-
-#define IAudioBass_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
-
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioBass_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioMidrange_INTERFACE_DEFINED__
-#define __IAudioMidrange_INTERFACE_DEFINED__
-
-/* interface IAudioMidrange */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioMidrange;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("5E54B6D7-B44B-40D9-9A9E-E691D9CE6EDF")
-    IAudioMidrange : public IPerChannelDbLevel
-    {
-    public:
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioMidrangeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioMidrange * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioMidrange * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioMidrange * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioMidrange * This,
-            /* [out] */ 
-            __out  UINT *pcChannels);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
-            IAudioMidrange * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfMinLevelDB,
-            /* [out] */ 
-            __out  float *pfMaxLevelDB,
-            /* [out] */ 
-            __out  float *pfStepping);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
-            IAudioMidrange * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
-            IAudioMidrange * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
-            IAudioMidrange * This,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
-            IAudioMidrange * This,
-            /* [size_is][in] */ 
-            __in_ecount(cChannels)  float aLevelsDB[  ],
-            /* [in] */ 
-            __in  ULONG cChannels,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioMidrangeVtbl;
-
-    interface IAudioMidrange
-    {
-        CONST_VTBL struct IAudioMidrangeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioMidrange_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioMidrange_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioMidrange_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioMidrange_GetChannelCount(This,pcChannels)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
-
-#define IAudioMidrange_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
-    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
-
-#define IAudioMidrange_GetLevel(This,nChannel,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
-
-#define IAudioMidrange_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
-
-#define IAudioMidrange_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
-
-#define IAudioMidrange_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
-
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioMidrange_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioTreble_INTERFACE_DEFINED__
-#define __IAudioTreble_INTERFACE_DEFINED__
-
-/* interface IAudioTreble */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioTreble;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("0A717812-694E-4907-B74B-BAFA5CFDCA7B")
-    IAudioTreble : public IPerChannelDbLevel
-    {
-    public:
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioTrebleVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioTreble * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioTreble * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioTreble * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioTreble * This,
-            /* [out] */ 
-            __out  UINT *pcChannels);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
-            IAudioTreble * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfMinLevelDB,
-            /* [out] */ 
-            __out  float *pfMaxLevelDB,
-            /* [out] */ 
-            __out  float *pfStepping);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
-            IAudioTreble * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
-            IAudioTreble * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
-            IAudioTreble * This,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
-            IAudioTreble * This,
-            /* [size_is][in] */ 
-            __in_ecount(cChannels)  float aLevelsDB[  ],
-            /* [in] */ 
-            __in  ULONG cChannels,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioTrebleVtbl;
-
-    interface IAudioTreble
-    {
-        CONST_VTBL struct IAudioTrebleVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioTreble_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioTreble_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioTreble_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioTreble_GetChannelCount(This,pcChannels)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
-
-#define IAudioTreble_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
-    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
-
-#define IAudioTreble_GetLevel(This,nChannel,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
-
-#define IAudioTreble_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
-
-#define IAudioTreble_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
-
-#define IAudioTreble_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
-
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioTreble_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioAutoGainControl_INTERFACE_DEFINED__
-#define __IAudioAutoGainControl_INTERFACE_DEFINED__
-
-/* interface IAudioAutoGainControl */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioAutoGainControl;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("85401FD4-6DE4-4b9d-9869-2D6753A82F3C")
-    IAudioAutoGainControl : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( 
-            /* [out] */ 
-            __out  BOOL *pbEnabled) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( 
-            /* [in] */ 
-            __in  BOOL bEnable,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioAutoGainControlVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioAutoGainControl * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioAutoGainControl * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioAutoGainControl * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( 
-            IAudioAutoGainControl * This,
-            /* [out] */ 
-            __out  BOOL *pbEnabled);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( 
-            IAudioAutoGainControl * This,
-            /* [in] */ 
-            __in  BOOL bEnable,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IAudioAutoGainControlVtbl;
-
-    interface IAudioAutoGainControl
-    {
-        CONST_VTBL struct IAudioAutoGainControlVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioAutoGainControl_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioAutoGainControl_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioAutoGainControl_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioAutoGainControl_GetEnabled(This,pbEnabled)	\
-    ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) 
-
-#define IAudioAutoGainControl_SetEnabled(This,bEnable,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioAutoGainControl_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioPeakMeter_INTERFACE_DEFINED__
-#define __IAudioPeakMeter_INTERFACE_DEFINED__
-
-/* interface IAudioPeakMeter */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioPeakMeter;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("DD79923C-0599-45e0-B8B6-C8DF7DB6E796")
-    IAudioPeakMeter : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( 
-            /* [out] */ 
-            __out  UINT *pcChannels) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevel) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioPeakMeterVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioPeakMeter * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioPeakMeter * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioPeakMeter * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioPeakMeter * This,
-            /* [out] */ 
-            __out  UINT *pcChannels);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
-            IAudioPeakMeter * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevel);
-        
-        END_INTERFACE
-    } IAudioPeakMeterVtbl;
-
-    interface IAudioPeakMeter
-    {
-        CONST_VTBL struct IAudioPeakMeterVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioPeakMeter_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioPeakMeter_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioPeakMeter_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioPeakMeter_GetChannelCount(This,pcChannels)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
-
-#define IAudioPeakMeter_GetLevel(This,nChannel,pfLevel)	\
-    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevel) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioPeakMeter_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeviceSpecificProperty_INTERFACE_DEFINED__
-#define __IDeviceSpecificProperty_INTERFACE_DEFINED__
-
-/* interface IDeviceSpecificProperty */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IDeviceSpecificProperty;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3B22BCBF-2586-4af0-8583-205D391B807C")
-    IDeviceSpecificProperty : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( 
-            /* [out] */ 
-            __deref_out  VARTYPE *pVType) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetValue( 
-            /* [out] */ 
-            __out  void *pvValue,
-            /* [out][in] */ 
-            __inout  DWORD *pcbValue) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetValue( 
-            /* [in] */ 
-            __in  void *pvValue,
-            /* [in] */ DWORD cbValue,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Get4BRange( 
-            /* [out] */ 
-            __deref_out  LONG *plMin,
-            /* [out] */ 
-            __deref_out  LONG *plMax,
-            /* [out] */ 
-            __deref_out  LONG *plStepping) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeviceSpecificPropertyVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeviceSpecificProperty * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeviceSpecificProperty * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeviceSpecificProperty * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( 
-            IDeviceSpecificProperty * This,
-            /* [out] */ 
-            __deref_out  VARTYPE *pVType);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetValue )( 
-            IDeviceSpecificProperty * This,
-            /* [out] */ 
-            __out  void *pvValue,
-            /* [out][in] */ 
-            __inout  DWORD *pcbValue);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetValue )( 
-            IDeviceSpecificProperty * This,
-            /* [in] */ 
-            __in  void *pvValue,
-            /* [in] */ DWORD cbValue,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Get4BRange )( 
-            IDeviceSpecificProperty * This,
-            /* [out] */ 
-            __deref_out  LONG *plMin,
-            /* [out] */ 
-            __deref_out  LONG *plMax,
-            /* [out] */ 
-            __deref_out  LONG *plStepping);
-        
-        END_INTERFACE
-    } IDeviceSpecificPropertyVtbl;
-
-    interface IDeviceSpecificProperty
-    {
-        CONST_VTBL struct IDeviceSpecificPropertyVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeviceSpecificProperty_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeviceSpecificProperty_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeviceSpecificProperty_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeviceSpecificProperty_GetType(This,pVType)	\
-    ( (This)->lpVtbl -> GetType(This,pVType) ) 
-
-#define IDeviceSpecificProperty_GetValue(This,pvValue,pcbValue)	\
-    ( (This)->lpVtbl -> GetValue(This,pvValue,pcbValue) ) 
-
-#define IDeviceSpecificProperty_SetValue(This,pvValue,cbValue,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetValue(This,pvValue,cbValue,pguidEventContext) ) 
-
-#define IDeviceSpecificProperty_Get4BRange(This,plMin,plMax,plStepping)	\
-    ( (This)->lpVtbl -> Get4BRange(This,plMin,plMax,plStepping) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeviceSpecificProperty_INTERFACE_DEFINED__ */
-
-
-#ifndef __IKsFormatSupport_INTERFACE_DEFINED__
-#define __IKsFormatSupport_INTERFACE_DEFINED__
-
-/* interface IKsFormatSupport */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IKsFormatSupport;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3CB4A69D-BB6F-4D2B-95B7-452D2C155DB5")
-    IKsFormatSupport : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsFormatSupported( 
-            /* [size_is][in] */ PKSDATAFORMAT pKsFormat,
-            /* [in] */ 
-            __in  DWORD cbFormat,
-            /* [out] */ 
-            __out  BOOL *pbSupported) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevicePreferredFormat( 
-            /* [out] */ PKSDATAFORMAT *ppKsFormat) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IKsFormatSupportVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IKsFormatSupport * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IKsFormatSupport * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IKsFormatSupport * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( 
-            IKsFormatSupport * This,
-            /* [size_is][in] */ PKSDATAFORMAT pKsFormat,
-            /* [in] */ 
-            __in  DWORD cbFormat,
-            /* [out] */ 
-            __out  BOOL *pbSupported);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevicePreferredFormat )( 
-            IKsFormatSupport * This,
-            /* [out] */ PKSDATAFORMAT *ppKsFormat);
-        
-        END_INTERFACE
-    } IKsFormatSupportVtbl;
-
-    interface IKsFormatSupport
-    {
-        CONST_VTBL struct IKsFormatSupportVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IKsFormatSupport_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IKsFormatSupport_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IKsFormatSupport_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IKsFormatSupport_IsFormatSupported(This,pKsFormat,cbFormat,pbSupported)	\
-    ( (This)->lpVtbl -> IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) ) 
-
-#define IKsFormatSupport_GetDevicePreferredFormat(This,ppKsFormat)	\
-    ( (This)->lpVtbl -> GetDevicePreferredFormat(This,ppKsFormat) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IKsFormatSupport_INTERFACE_DEFINED__ */
-
-
-#ifndef __IKsJackDescription_INTERFACE_DEFINED__
-#define __IKsJackDescription_INTERFACE_DEFINED__
-
-/* interface IKsJackDescription */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IKsJackDescription;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("4509F757-2D46-4637-8E62-CE7DB944F57B")
-    IKsJackDescription : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackCount( 
-            /* [out] */ 
-            __out  UINT *pcJacks) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackDescription( 
-            /* [in] */ UINT nJack,
-            /* [out] */ 
-            __out  KSJACK_DESCRIPTION *pDescription) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IKsJackDescriptionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IKsJackDescription * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IKsJackDescription * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IKsJackDescription * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackCount )( 
-            IKsJackDescription * This,
-            /* [out] */ 
-            __out  UINT *pcJacks);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackDescription )( 
-            IKsJackDescription * This,
-            /* [in] */ UINT nJack,
-            /* [out] */ 
-            __out  KSJACK_DESCRIPTION *pDescription);
-        
-        END_INTERFACE
-    } IKsJackDescriptionVtbl;
-
-    interface IKsJackDescription
-    {
-        CONST_VTBL struct IKsJackDescriptionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IKsJackDescription_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IKsJackDescription_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IKsJackDescription_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IKsJackDescription_GetJackCount(This,pcJacks)	\
-    ( (This)->lpVtbl -> GetJackCount(This,pcJacks) ) 
-
-#define IKsJackDescription_GetJackDescription(This,nJack,pDescription)	\
-    ( (This)->lpVtbl -> GetJackDescription(This,nJack,pDescription) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IKsJackDescription_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPartsList_INTERFACE_DEFINED__
-#define __IPartsList_INTERFACE_DEFINED__
-
-/* interface IPartsList */
-/* [object][unique][helpstring][uuid][local] */ 
-
-
-EXTERN_C const IID IID_IPartsList;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("6DAA848C-5EB0-45CC-AEA5-998A2CDA1FFB")
-    IPartsList : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( 
-            /* [out] */ 
-            __out  UINT *pCount) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPart( 
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __out  IPart **ppPart) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPartsListVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPartsList * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPartsList * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPartsList * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IPartsList * This,
-            /* [out] */ 
-            __out  UINT *pCount);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPart )( 
-            IPartsList * This,
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __out  IPart **ppPart);
-        
-        END_INTERFACE
-    } IPartsListVtbl;
-
-    interface IPartsList
-    {
-        CONST_VTBL struct IPartsListVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPartsList_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPartsList_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPartsList_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPartsList_GetCount(This,pCount)	\
-    ( (This)->lpVtbl -> GetCount(This,pCount) ) 
-
-#define IPartsList_GetPart(This,nIndex,ppPart)	\
-    ( (This)->lpVtbl -> GetPart(This,nIndex,ppPart) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPartsList_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPart_INTERFACE_DEFINED__
-#define __IPart_INTERFACE_DEFINED__
-
-/* interface IPart */
-/* [object][unique][helpstring][uuid][local] */ 
-
-
-EXTERN_C const IID IID_IPart;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9")
-    IPart : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrName) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLocalId( 
-            /* [out] */ 
-            __out  UINT *pnId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetGlobalId( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrGlobalId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartType( 
-            /* [out] */ 
-            __out  PartType *pPartType) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubType( 
-            /* [out] */ GUID *pSubType) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterfaceCount( 
-            /* [out] */ 
-            __out  UINT *pCount) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterface( 
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __out  IControlInterface **ppInterfaceDesc) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsIncoming( 
-            /* [out] */ 
-            __out  IPartsList **ppParts) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsOutgoing( 
-            /* [out] */ 
-            __out  IPartsList **ppParts) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetTopologyObject( 
-            /* [out] */ 
-            __out  IDeviceTopology **ppTopology) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( 
-            /* [in] */ 
-            __in  DWORD dwClsContext,
-            /* [in] */ 
-            __in  REFIID refiid,
-            /* [iid_is][out] */ 
-            __out_opt  void **ppvObject) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeCallback( 
-            /* [in] */ 
-            __in  REFGUID riid,
-            /* [in] */ 
-            __in  IControlChangeNotify *pNotify) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeCallback( 
-            /* [in] */ 
-            __in  IControlChangeNotify *pNotify) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPartVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPart * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPart * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPart * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( 
-            IPart * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrName);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLocalId )( 
-            IPart * This,
-            /* [out] */ 
-            __out  UINT *pnId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetGlobalId )( 
-            IPart * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrGlobalId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartType )( 
-            IPart * This,
-            /* [out] */ 
-            __out  PartType *pPartType);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubType )( 
-            IPart * This,
-            /* [out] */ GUID *pSubType);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterfaceCount )( 
-            IPart * This,
-            /* [out] */ 
-            __out  UINT *pCount);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterface )( 
-            IPart * This,
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __out  IControlInterface **ppInterfaceDesc);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsIncoming )( 
-            IPart * This,
-            /* [out] */ 
-            __out  IPartsList **ppParts);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsOutgoing )( 
-            IPart * This,
-            /* [out] */ 
-            __out  IPartsList **ppParts);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetTopologyObject )( 
-            IPart * This,
-            /* [out] */ 
-            __out  IDeviceTopology **ppTopology);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( 
-            IPart * This,
-            /* [in] */ 
-            __in  DWORD dwClsContext,
-            /* [in] */ 
-            __in  REFIID refiid,
-            /* [iid_is][out] */ 
-            __out_opt  void **ppvObject);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeCallback )( 
-            IPart * This,
-            /* [in] */ 
-            __in  REFGUID riid,
-            /* [in] */ 
-            __in  IControlChangeNotify *pNotify);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeCallback )( 
-            IPart * This,
-            /* [in] */ 
-            __in  IControlChangeNotify *pNotify);
-        
-        END_INTERFACE
-    } IPartVtbl;
-
-    interface IPart
-    {
-        CONST_VTBL struct IPartVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPart_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPart_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPart_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPart_GetName(This,ppwstrName)	\
-    ( (This)->lpVtbl -> GetName(This,ppwstrName) ) 
-
-#define IPart_GetLocalId(This,pnId)	\
-    ( (This)->lpVtbl -> GetLocalId(This,pnId) ) 
-
-#define IPart_GetGlobalId(This,ppwstrGlobalId)	\
-    ( (This)->lpVtbl -> GetGlobalId(This,ppwstrGlobalId) ) 
-
-#define IPart_GetPartType(This,pPartType)	\
-    ( (This)->lpVtbl -> GetPartType(This,pPartType) ) 
-
-#define IPart_GetSubType(This,pSubType)	\
-    ( (This)->lpVtbl -> GetSubType(This,pSubType) ) 
-
-#define IPart_GetControlInterfaceCount(This,pCount)	\
-    ( (This)->lpVtbl -> GetControlInterfaceCount(This,pCount) ) 
-
-#define IPart_GetControlInterface(This,nIndex,ppInterfaceDesc)	\
-    ( (This)->lpVtbl -> GetControlInterface(This,nIndex,ppInterfaceDesc) ) 
-
-#define IPart_EnumPartsIncoming(This,ppParts)	\
-    ( (This)->lpVtbl -> EnumPartsIncoming(This,ppParts) ) 
-
-#define IPart_EnumPartsOutgoing(This,ppParts)	\
-    ( (This)->lpVtbl -> EnumPartsOutgoing(This,ppParts) ) 
-
-#define IPart_GetTopologyObject(This,ppTopology)	\
-    ( (This)->lpVtbl -> GetTopologyObject(This,ppTopology) ) 
-
-#define IPart_Activate(This,dwClsContext,refiid,ppvObject)	\
-    ( (This)->lpVtbl -> Activate(This,dwClsContext,refiid,ppvObject) ) 
-
-#define IPart_RegisterControlChangeCallback(This,riid,pNotify)	\
-    ( (This)->lpVtbl -> RegisterControlChangeCallback(This,riid,pNotify) ) 
-
-#define IPart_UnregisterControlChangeCallback(This,pNotify)	\
-    ( (This)->lpVtbl -> UnregisterControlChangeCallback(This,pNotify) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPart_INTERFACE_DEFINED__ */
-
-
-#ifndef __IConnector_INTERFACE_DEFINED__
-#define __IConnector_INTERFACE_DEFINED__
-
-/* interface IConnector */
-/* [object][unique][helpstring][uuid][local] */ 
-
-
-EXTERN_C const IID IID_IConnector;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("9c2c4058-23f5-41de-877a-df3af236a09e")
-    IConnector : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( 
-            /* [out] */ 
-            __out  ConnectorType *pType) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( 
-            /* [out] */ 
-            __out  DataFlow *pFlow) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectTo( 
-            /* [in] */ 
-            __in  IConnector *pConnectTo) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Disconnect( void) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsConnected( 
-            /* [out] */ 
-            __out  BOOL *pbConnected) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectedTo( 
-            /* [out] */ 
-            __out  IConnector **ppConTo) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorIdConnectedTo( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrConnectorId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceIdConnectedTo( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrDeviceId) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IConnectorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IConnector * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IConnector * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IConnector * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( 
-            IConnector * This,
-            /* [out] */ 
-            __out  ConnectorType *pType);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( 
-            IConnector * This,
-            /* [out] */ 
-            __out  DataFlow *pFlow);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectTo )( 
-            IConnector * This,
-            /* [in] */ 
-            __in  IConnector *pConnectTo);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Disconnect )( 
-            IConnector * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsConnected )( 
-            IConnector * This,
-            /* [out] */ 
-            __out  BOOL *pbConnected);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectedTo )( 
-            IConnector * This,
-            /* [out] */ 
-            __out  IConnector **ppConTo);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorIdConnectedTo )( 
-            IConnector * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrConnectorId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceIdConnectedTo )( 
-            IConnector * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrDeviceId);
-        
-        END_INTERFACE
-    } IConnectorVtbl;
-
-    interface IConnector
-    {
-        CONST_VTBL struct IConnectorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IConnector_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IConnector_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IConnector_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IConnector_GetType(This,pType)	\
-    ( (This)->lpVtbl -> GetType(This,pType) ) 
-
-#define IConnector_GetDataFlow(This,pFlow)	\
-    ( (This)->lpVtbl -> GetDataFlow(This,pFlow) ) 
-
-#define IConnector_ConnectTo(This,pConnectTo)	\
-    ( (This)->lpVtbl -> ConnectTo(This,pConnectTo) ) 
-
-#define IConnector_Disconnect(This)	\
-    ( (This)->lpVtbl -> Disconnect(This) ) 
-
-#define IConnector_IsConnected(This,pbConnected)	\
-    ( (This)->lpVtbl -> IsConnected(This,pbConnected) ) 
-
-#define IConnector_GetConnectedTo(This,ppConTo)	\
-    ( (This)->lpVtbl -> GetConnectedTo(This,ppConTo) ) 
-
-#define IConnector_GetConnectorIdConnectedTo(This,ppwstrConnectorId)	\
-    ( (This)->lpVtbl -> GetConnectorIdConnectedTo(This,ppwstrConnectorId) ) 
-
-#define IConnector_GetDeviceIdConnectedTo(This,ppwstrDeviceId)	\
-    ( (This)->lpVtbl -> GetDeviceIdConnectedTo(This,ppwstrDeviceId) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IConnector_INTERFACE_DEFINED__ */
-
-
-#ifndef __ISubunit_INTERFACE_DEFINED__
-#define __ISubunit_INTERFACE_DEFINED__
-
-/* interface ISubunit */
-/* [object][unique][helpstring][uuid][local] */ 
-
-
-EXTERN_C const IID IID_ISubunit;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("82149A85-DBA6-4487-86BB-EA8F7FEFCC71")
-    ISubunit : public IUnknown
-    {
-    public:
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct ISubunitVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ISubunit * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ISubunit * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ISubunit * This);
-        
-        END_INTERFACE
-    } ISubunitVtbl;
-
-    interface ISubunit
-    {
-        CONST_VTBL struct ISubunitVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ISubunit_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ISubunit_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ISubunit_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ISubunit_INTERFACE_DEFINED__ */
-
-
-#ifndef __IControlInterface_INTERFACE_DEFINED__
-#define __IControlInterface_INTERFACE_DEFINED__
-
-/* interface IControlInterface */
-/* [object][unique][helpstring][uuid][local] */ 
-
-
-EXTERN_C const IID IID_IControlInterface;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("45d37c3f-5140-444a-ae24-400789f3cbf3")
-    IControlInterface : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrName) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetIID( 
-            /* [out] */ 
-            __out  GUID *pIID) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IControlInterfaceVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IControlInterface * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IControlInterface * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IControlInterface * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( 
-            IControlInterface * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrName);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetIID )( 
-            IControlInterface * This,
-            /* [out] */ 
-            __out  GUID *pIID);
-        
-        END_INTERFACE
-    } IControlInterfaceVtbl;
-
-    interface IControlInterface
-    {
-        CONST_VTBL struct IControlInterfaceVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IControlInterface_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IControlInterface_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IControlInterface_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IControlInterface_GetName(This,ppwstrName)	\
-    ( (This)->lpVtbl -> GetName(This,ppwstrName) ) 
-
-#define IControlInterface_GetIID(This,pIID)	\
-    ( (This)->lpVtbl -> GetIID(This,pIID) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IControlInterface_INTERFACE_DEFINED__ */
-
-
-#ifndef __IControlChangeNotify_INTERFACE_DEFINED__
-#define __IControlChangeNotify_INTERFACE_DEFINED__
-
-/* interface IControlChangeNotify */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IControlChangeNotify;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A09513ED-C709-4d21-BD7B-5F34C47F3947")
-    IControlChangeNotify : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNotify( 
-            /* [in] */ 
-            __in  DWORD dwSenderProcessId,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IControlChangeNotifyVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IControlChangeNotify * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IControlChangeNotify * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IControlChangeNotify * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnNotify )( 
-            IControlChangeNotify * This,
-            /* [in] */ 
-            __in  DWORD dwSenderProcessId,
-            /* [unique][in] */ 
-            __in_opt  LPCGUID pguidEventContext);
-        
-        END_INTERFACE
-    } IControlChangeNotifyVtbl;
-
-    interface IControlChangeNotify
-    {
-        CONST_VTBL struct IControlChangeNotifyVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IControlChangeNotify_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IControlChangeNotify_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IControlChangeNotify_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IControlChangeNotify_OnNotify(This,dwSenderProcessId,pguidEventContext)	\
-    ( (This)->lpVtbl -> OnNotify(This,dwSenderProcessId,pguidEventContext) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IControlChangeNotify_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDeviceTopology_INTERFACE_DEFINED__
-#define __IDeviceTopology_INTERFACE_DEFINED__
-
-/* interface IDeviceTopology */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IDeviceTopology;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("2A07407E-6497-4A18-9787-32F79BD0D98F")
-    IDeviceTopology : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorCount( 
-            /* [out] */ 
-            __out  UINT *pCount) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnector( 
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __out  IConnector **ppConnector) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunitCount( 
-            /* [out] */ 
-            __out  UINT *pCount) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunit( 
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __deref_out  ISubunit **ppSubunit) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartById( 
-            /* [in] */ 
-            __in  UINT nId,
-            /* [out] */ 
-            __deref_out  IPart **ppPart) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceId( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrDeviceId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSignalPath( 
-            /* [in] */ 
-            __in  IPart *pIPartFrom,
-            /* [in] */ 
-            __in  IPart *pIPartTo,
-            /* [in] */ 
-            __in  BOOL bRejectMixedPaths,
-            /* [out] */ 
-            __deref_out  IPartsList **ppParts) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDeviceTopologyVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDeviceTopology * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDeviceTopology * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDeviceTopology * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorCount )( 
-            IDeviceTopology * This,
-            /* [out] */ 
-            __out  UINT *pCount);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnector )( 
-            IDeviceTopology * This,
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __out  IConnector **ppConnector);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunitCount )( 
-            IDeviceTopology * This,
-            /* [out] */ 
-            __out  UINT *pCount);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunit )( 
-            IDeviceTopology * This,
-            /* [in] */ 
-            __in  UINT nIndex,
-            /* [out] */ 
-            __deref_out  ISubunit **ppSubunit);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartById )( 
-            IDeviceTopology * This,
-            /* [in] */ 
-            __in  UINT nId,
-            /* [out] */ 
-            __deref_out  IPart **ppPart);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceId )( 
-            IDeviceTopology * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppwstrDeviceId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSignalPath )( 
-            IDeviceTopology * This,
-            /* [in] */ 
-            __in  IPart *pIPartFrom,
-            /* [in] */ 
-            __in  IPart *pIPartTo,
-            /* [in] */ 
-            __in  BOOL bRejectMixedPaths,
-            /* [out] */ 
-            __deref_out  IPartsList **ppParts);
-        
-        END_INTERFACE
-    } IDeviceTopologyVtbl;
-
-    interface IDeviceTopology
-    {
-        CONST_VTBL struct IDeviceTopologyVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDeviceTopology_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDeviceTopology_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDeviceTopology_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDeviceTopology_GetConnectorCount(This,pCount)	\
-    ( (This)->lpVtbl -> GetConnectorCount(This,pCount) ) 
-
-#define IDeviceTopology_GetConnector(This,nIndex,ppConnector)	\
-    ( (This)->lpVtbl -> GetConnector(This,nIndex,ppConnector) ) 
-
-#define IDeviceTopology_GetSubunitCount(This,pCount)	\
-    ( (This)->lpVtbl -> GetSubunitCount(This,pCount) ) 
-
-#define IDeviceTopology_GetSubunit(This,nIndex,ppSubunit)	\
-    ( (This)->lpVtbl -> GetSubunit(This,nIndex,ppSubunit) ) 
-
-#define IDeviceTopology_GetPartById(This,nId,ppPart)	\
-    ( (This)->lpVtbl -> GetPartById(This,nId,ppPart) ) 
-
-#define IDeviceTopology_GetDeviceId(This,ppwstrDeviceId)	\
-    ( (This)->lpVtbl -> GetDeviceId(This,ppwstrDeviceId) ) 
-
-#define IDeviceTopology_GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts)	\
-    ( (This)->lpVtbl -> GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDeviceTopology_INTERFACE_DEFINED__ */
-
-
-
-#ifndef __DevTopologyLib_LIBRARY_DEFINED__
-#define __DevTopologyLib_LIBRARY_DEFINED__
-
-/* library DevTopologyLib */
-/* [helpstring][version][uuid] */ 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-EXTERN_C const IID LIBID_DevTopologyLib;
-
-EXTERN_C const CLSID CLSID_DeviceTopology;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("1DF639D0-5EC1-47AA-9379-828DC1AA8C59")
-DeviceTopology;
-#endif
-#endif /* __DevTopologyLib_LIBRARY_DEFINED__ */
-
-/* Additional Prototypes for ALL interfaces */
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for devicetopology.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __devicetopology_h__
+#define __devicetopology_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IKsControl_FWD_DEFINED__
+#define __IKsControl_FWD_DEFINED__
+typedef interface IKsControl IKsControl;
+#endif 	/* __IKsControl_FWD_DEFINED__ */
+
+
+#ifndef __IPerChannelDbLevel_FWD_DEFINED__
+#define __IPerChannelDbLevel_FWD_DEFINED__
+typedef interface IPerChannelDbLevel IPerChannelDbLevel;
+#endif 	/* __IPerChannelDbLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioVolumeLevel_FWD_DEFINED__
+#define __IAudioVolumeLevel_FWD_DEFINED__
+typedef interface IAudioVolumeLevel IAudioVolumeLevel;
+#endif 	/* __IAudioVolumeLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioChannelConfig_FWD_DEFINED__
+#define __IAudioChannelConfig_FWD_DEFINED__
+typedef interface IAudioChannelConfig IAudioChannelConfig;
+#endif 	/* __IAudioChannelConfig_FWD_DEFINED__ */
+
+
+#ifndef __IAudioLoudness_FWD_DEFINED__
+#define __IAudioLoudness_FWD_DEFINED__
+typedef interface IAudioLoudness IAudioLoudness;
+#endif 	/* __IAudioLoudness_FWD_DEFINED__ */
+
+
+#ifndef __IAudioInputSelector_FWD_DEFINED__
+#define __IAudioInputSelector_FWD_DEFINED__
+typedef interface IAudioInputSelector IAudioInputSelector;
+#endif 	/* __IAudioInputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioOutputSelector_FWD_DEFINED__
+#define __IAudioOutputSelector_FWD_DEFINED__
+typedef interface IAudioOutputSelector IAudioOutputSelector;
+#endif 	/* __IAudioOutputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMute_FWD_DEFINED__
+#define __IAudioMute_FWD_DEFINED__
+typedef interface IAudioMute IAudioMute;
+#endif 	/* __IAudioMute_FWD_DEFINED__ */
+
+
+#ifndef __IAudioBass_FWD_DEFINED__
+#define __IAudioBass_FWD_DEFINED__
+typedef interface IAudioBass IAudioBass;
+#endif 	/* __IAudioBass_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMidrange_FWD_DEFINED__
+#define __IAudioMidrange_FWD_DEFINED__
+typedef interface IAudioMidrange IAudioMidrange;
+#endif 	/* __IAudioMidrange_FWD_DEFINED__ */
+
+
+#ifndef __IAudioTreble_FWD_DEFINED__
+#define __IAudioTreble_FWD_DEFINED__
+typedef interface IAudioTreble IAudioTreble;
+#endif 	/* __IAudioTreble_FWD_DEFINED__ */
+
+
+#ifndef __IAudioAutoGainControl_FWD_DEFINED__
+#define __IAudioAutoGainControl_FWD_DEFINED__
+typedef interface IAudioAutoGainControl IAudioAutoGainControl;
+#endif 	/* __IAudioAutoGainControl_FWD_DEFINED__ */
+
+
+#ifndef __IAudioPeakMeter_FWD_DEFINED__
+#define __IAudioPeakMeter_FWD_DEFINED__
+typedef interface IAudioPeakMeter IAudioPeakMeter;
+#endif 	/* __IAudioPeakMeter_FWD_DEFINED__ */
+
+
+#ifndef __IDeviceSpecificProperty_FWD_DEFINED__
+#define __IDeviceSpecificProperty_FWD_DEFINED__
+typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;
+#endif 	/* __IDeviceSpecificProperty_FWD_DEFINED__ */
+
+
+#ifndef __IKsFormatSupport_FWD_DEFINED__
+#define __IKsFormatSupport_FWD_DEFINED__
+typedef interface IKsFormatSupport IKsFormatSupport;
+#endif 	/* __IKsFormatSupport_FWD_DEFINED__ */
+
+
+#ifndef __IKsJackDescription_FWD_DEFINED__
+#define __IKsJackDescription_FWD_DEFINED__
+typedef interface IKsJackDescription IKsJackDescription;
+#endif 	/* __IKsJackDescription_FWD_DEFINED__ */
+
+
+#ifndef __IPartsList_FWD_DEFINED__
+#define __IPartsList_FWD_DEFINED__
+typedef interface IPartsList IPartsList;
+#endif 	/* __IPartsList_FWD_DEFINED__ */
+
+
+#ifndef __IPart_FWD_DEFINED__
+#define __IPart_FWD_DEFINED__
+typedef interface IPart IPart;
+#endif 	/* __IPart_FWD_DEFINED__ */
+
+
+#ifndef __IConnector_FWD_DEFINED__
+#define __IConnector_FWD_DEFINED__
+typedef interface IConnector IConnector;
+#endif 	/* __IConnector_FWD_DEFINED__ */
+
+
+#ifndef __ISubunit_FWD_DEFINED__
+#define __ISubunit_FWD_DEFINED__
+typedef interface ISubunit ISubunit;
+#endif 	/* __ISubunit_FWD_DEFINED__ */
+
+
+#ifndef __IControlInterface_FWD_DEFINED__
+#define __IControlInterface_FWD_DEFINED__
+typedef interface IControlInterface IControlInterface;
+#endif 	/* __IControlInterface_FWD_DEFINED__ */
+
+
+#ifndef __IControlChangeNotify_FWD_DEFINED__
+#define __IControlChangeNotify_FWD_DEFINED__
+typedef interface IControlChangeNotify IControlChangeNotify;
+#endif 	/* __IControlChangeNotify_FWD_DEFINED__ */
+
+
+#ifndef __IDeviceTopology_FWD_DEFINED__
+#define __IDeviceTopology_FWD_DEFINED__
+typedef interface IDeviceTopology IDeviceTopology;
+#endif 	/* __IDeviceTopology_FWD_DEFINED__ */
+
+
+#ifndef __DeviceTopology_FWD_DEFINED__
+#define __DeviceTopology_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class DeviceTopology DeviceTopology;
+#else
+typedef struct DeviceTopology DeviceTopology;
+#endif /* __cplusplus */
+
+#endif 	/* __DeviceTopology_FWD_DEFINED__ */
+
+
+#ifndef __IPartsList_FWD_DEFINED__
+#define __IPartsList_FWD_DEFINED__
+typedef interface IPartsList IPartsList;
+#endif 	/* __IPartsList_FWD_DEFINED__ */
+
+
+#ifndef __IPerChannelDbLevel_FWD_DEFINED__
+#define __IPerChannelDbLevel_FWD_DEFINED__
+typedef interface IPerChannelDbLevel IPerChannelDbLevel;
+#endif 	/* __IPerChannelDbLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioVolumeLevel_FWD_DEFINED__
+#define __IAudioVolumeLevel_FWD_DEFINED__
+typedef interface IAudioVolumeLevel IAudioVolumeLevel;
+#endif 	/* __IAudioVolumeLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioLoudness_FWD_DEFINED__
+#define __IAudioLoudness_FWD_DEFINED__
+typedef interface IAudioLoudness IAudioLoudness;
+#endif 	/* __IAudioLoudness_FWD_DEFINED__ */
+
+
+#ifndef __IAudioInputSelector_FWD_DEFINED__
+#define __IAudioInputSelector_FWD_DEFINED__
+typedef interface IAudioInputSelector IAudioInputSelector;
+#endif 	/* __IAudioInputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMute_FWD_DEFINED__
+#define __IAudioMute_FWD_DEFINED__
+typedef interface IAudioMute IAudioMute;
+#endif 	/* __IAudioMute_FWD_DEFINED__ */
+
+
+#ifndef __IAudioBass_FWD_DEFINED__
+#define __IAudioBass_FWD_DEFINED__
+typedef interface IAudioBass IAudioBass;
+#endif 	/* __IAudioBass_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMidrange_FWD_DEFINED__
+#define __IAudioMidrange_FWD_DEFINED__
+typedef interface IAudioMidrange IAudioMidrange;
+#endif 	/* __IAudioMidrange_FWD_DEFINED__ */
+
+
+#ifndef __IAudioTreble_FWD_DEFINED__
+#define __IAudioTreble_FWD_DEFINED__
+typedef interface IAudioTreble IAudioTreble;
+#endif 	/* __IAudioTreble_FWD_DEFINED__ */
+
+
+#ifndef __IAudioAutoGainControl_FWD_DEFINED__
+#define __IAudioAutoGainControl_FWD_DEFINED__
+typedef interface IAudioAutoGainControl IAudioAutoGainControl;
+#endif 	/* __IAudioAutoGainControl_FWD_DEFINED__ */
+
+
+#ifndef __IAudioOutputSelector_FWD_DEFINED__
+#define __IAudioOutputSelector_FWD_DEFINED__
+typedef interface IAudioOutputSelector IAudioOutputSelector;
+#endif 	/* __IAudioOutputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioPeakMeter_FWD_DEFINED__
+#define __IAudioPeakMeter_FWD_DEFINED__
+typedef interface IAudioPeakMeter IAudioPeakMeter;
+#endif 	/* __IAudioPeakMeter_FWD_DEFINED__ */
+
+
+#ifndef __IDeviceSpecificProperty_FWD_DEFINED__
+#define __IDeviceSpecificProperty_FWD_DEFINED__
+typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;
+#endif 	/* __IDeviceSpecificProperty_FWD_DEFINED__ */
+
+
+#ifndef __IKsFormatSupport_FWD_DEFINED__
+#define __IKsFormatSupport_FWD_DEFINED__
+typedef interface IKsFormatSupport IKsFormatSupport;
+#endif 	/* __IKsFormatSupport_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "propidl.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_devicetopology_0000_0000 */
+/* [local] */ 
+
+#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
+//
+//   Flag for clients of IControlChangeNotify::OnNotify to allow those clients to identify hardware initiated notifications
+//
+#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 'draH'
+/* E2C2E9DE-09B1-4B04-84E5-07931225EE04 */
+DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xE2C2E9DE,0x09B1,0x4B04,0x84, 0xE5, 0x07, 0x93, 0x12, 0x25, 0xEE, 0x04);
+#define _IKsControl_
+#include "ks.h"
+#include "ksmedia.h"
+#ifndef _KS_
+typedef /* [public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001
+    {
+    ULONG FormatSize;
+    ULONG Flags;
+    ULONG SampleSize;
+    ULONG Reserved;
+    GUID MajorFormat;
+    GUID SubFormat;
+    GUID Specifier;
+    } 	KSDATAFORMAT;
+
+typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001 *PKSDATAFORMAT;
+
+typedef /* [public][public][public][public][public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002
+    {
+    union 
+        {
+        struct 
+            {
+            GUID Set;
+            ULONG Id;
+            ULONG Flags;
+            } 	;
+        LONGLONG Alignment;
+        } 	;
+    } 	KSIDENTIFIER;
+
+typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002 *PKSIDENTIFIER;
+
+typedef /* [public][public][public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0005
+    {	ePcxChanMap_FL_FR	= 0,
+	ePcxChanMap_FC_LFE	= ( ePcxChanMap_FL_FR + 1 ) ,
+	ePcxChanMap_BL_BR	= ( ePcxChanMap_FC_LFE + 1 ) ,
+	ePcxChanMap_FLC_FRC	= ( ePcxChanMap_BL_BR + 1 ) ,
+	ePcxChanMap_SL_SR	= ( ePcxChanMap_FLC_FRC + 1 ) ,
+	ePcxChanMap_Unknown	= ( ePcxChanMap_SL_SR + 1 ) 
+    } 	EChannelMapping;
+
+typedef /* [public][public][public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0006
+    {	eConnTypeUnknown	= 0,
+	eConnTypeEighth	= ( eConnTypeUnknown + 1 ) ,
+	eConnTypeQuarter	= ( eConnTypeEighth + 1 ) ,
+	eConnTypeAtapiInternal	= ( eConnTypeQuarter + 1 ) ,
+	eConnTypeRCA	= ( eConnTypeAtapiInternal + 1 ) ,
+	eConnTypeOptical	= ( eConnTypeRCA + 1 ) ,
+	eConnTypeOtherDigital	= ( eConnTypeOptical + 1 ) ,
+	eConnTypeOtherAnalog	= ( eConnTypeOtherDigital + 1 ) ,
+	eConnTypeMultichannelAnalogDIN	= ( eConnTypeOtherAnalog + 1 ) ,
+	eConnTypeXlrProfessional	= ( eConnTypeMultichannelAnalogDIN + 1 ) ,
+	eConnTypeRJ11Modem	= ( eConnTypeXlrProfessional + 1 ) ,
+	eConnTypeCombination	= ( eConnTypeRJ11Modem + 1 ) 
+    } 	EPcxConnectionType;
+
+typedef /* [public][public][public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0007
+    {	eGeoLocRear	= 0x1,
+	eGeoLocFront	= ( eGeoLocRear + 1 ) ,
+	eGeoLocLeft	= ( eGeoLocFront + 1 ) ,
+	eGeoLocRight	= ( eGeoLocLeft + 1 ) ,
+	eGeoLocTop	= ( eGeoLocRight + 1 ) ,
+	eGeoLocBottom	= ( eGeoLocTop + 1 ) ,
+	eGeoLocRearOPanel	= ( eGeoLocBottom + 1 ) ,
+	eGeoLocRiser	= ( eGeoLocRearOPanel + 1 ) ,
+	eGeoLocInsideMobileLid	= ( eGeoLocRiser + 1 ) ,
+	eGeoLocDrivebay	= ( eGeoLocInsideMobileLid + 1 ) ,
+	eGeoLocHDMI	= ( eGeoLocDrivebay + 1 ) ,
+	eGeoLocOutsideMobileLid	= ( eGeoLocHDMI + 1 ) ,
+	eGeoLocATAPI	= ( eGeoLocOutsideMobileLid + 1 ) ,
+	eGeoLocReserved5	= ( eGeoLocATAPI + 1 ) ,
+	eGeoLocReserved6	= ( eGeoLocReserved5 + 1 ) 
+    } 	EPcxGeoLocation;
+
+typedef /* [public][public][public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0008
+    {	eGenLocPrimaryBox	= 0,
+	eGenLocInternal	= ( eGenLocPrimaryBox + 1 ) ,
+	eGenLocSeperate	= ( eGenLocInternal + 1 ) ,
+	eGenLocOther	= ( eGenLocSeperate + 1 ) 
+    } 	EPcxGenLocation;
+
+typedef /* [public][public][public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0009
+    {	ePortConnJack	= 0,
+	ePortConnIntegratedDevice	= ( ePortConnJack + 1 ) ,
+	ePortConnBothIntegratedAndJack	= ( ePortConnIntegratedDevice + 1 ) ,
+	ePortConnUnknown	= ( ePortConnBothIntegratedAndJack + 1 ) 
+    } 	EPxcPortConnection;
+
+typedef /* [public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010
+    {
+    EChannelMapping ChannelMapping;
+    COLORREF Color;
+    EPcxConnectionType ConnectionType;
+    EPcxGeoLocation GeoLocation;
+    EPcxGenLocation GenLocation;
+    EPxcPortConnection PortConnection;
+    BOOL IsConnected;
+    } 	KSJACK_DESCRIPTION;
+
+typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010 *PKSJACK_DESCRIPTION;
+
+typedef KSIDENTIFIER KSPROPERTY;
+
+typedef KSIDENTIFIER *PKSPROPERTY;
+
+typedef KSIDENTIFIER KSMETHOD;
+
+typedef KSIDENTIFIER *PKSMETHOD;
+
+typedef KSIDENTIFIER KSEVENT;
+
+typedef KSIDENTIFIER *PKSEVENT;
+
+#endif
+
+
+
+
+
+
+
+
+typedef /* [public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0011
+    {	In	= 0,
+	Out	= ( In + 1 ) 
+    } 	DataFlow;
+
+typedef /* [public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0012
+    {	Connector	= 0,
+	Subunit	= ( Connector + 1 ) 
+    } 	PartType;
+
+#define PARTTYPE_FLAG_CONNECTOR 0x00010000
+#define PARTTYPE_FLAG_SUBUNIT   0x00020000
+#define PARTTYPE_MASK           0x00030000
+#define PARTID_MASK             0x0000ffff
+typedef /* [public][public] */ 
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0013
+    {	Unknown_Connector	= 0,
+	Physical_Internal	= ( Unknown_Connector + 1 ) ,
+	Physical_External	= ( Physical_Internal + 1 ) ,
+	Software_IO	= ( Physical_External + 1 ) ,
+	Software_Fixed	= ( Software_IO + 1 ) ,
+	Network	= ( Software_Fixed + 1 ) 
+    } 	ConnectorType;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IKsControl_INTERFACE_DEFINED__
+#define __IKsControl_INTERFACE_DEFINED__
+
+/* interface IKsControl */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IKsControl;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("28F54685-06FD-11D2-B27A-00A0C9223196")
+    IKsControl : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE KsProperty( 
+            /* [in] */ PKSPROPERTY Property,
+            /* [in] */ ULONG PropertyLength,
+            /* [out][in] */ void *PropertyData,
+            /* [in] */ ULONG DataLength,
+            /* [out] */ ULONG *BytesReturned) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE KsMethod( 
+            /* [in] */ PKSMETHOD Method,
+            /* [in] */ ULONG MethodLength,
+            /* [out][in] */ void *MethodData,
+            /* [in] */ ULONG DataLength,
+            /* [out] */ ULONG *BytesReturned) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE KsEvent( 
+            /* [in] */ PKSEVENT Event,
+            /* [in] */ ULONG EventLength,
+            /* [out][in] */ void *EventData,
+            /* [in] */ ULONG DataLength,
+            /* [out] */ ULONG *BytesReturned) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IKsControlVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IKsControl * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IKsControl * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IKsControl * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *KsProperty )( 
+            IKsControl * This,
+            /* [in] */ PKSPROPERTY Property,
+            /* [in] */ ULONG PropertyLength,
+            /* [out][in] */ void *PropertyData,
+            /* [in] */ ULONG DataLength,
+            /* [out] */ ULONG *BytesReturned);
+        
+        HRESULT ( STDMETHODCALLTYPE *KsMethod )( 
+            IKsControl * This,
+            /* [in] */ PKSMETHOD Method,
+            /* [in] */ ULONG MethodLength,
+            /* [out][in] */ void *MethodData,
+            /* [in] */ ULONG DataLength,
+            /* [out] */ ULONG *BytesReturned);
+        
+        HRESULT ( STDMETHODCALLTYPE *KsEvent )( 
+            IKsControl * This,
+            /* [in] */ PKSEVENT Event,
+            /* [in] */ ULONG EventLength,
+            /* [out][in] */ void *EventData,
+            /* [in] */ ULONG DataLength,
+            /* [out] */ ULONG *BytesReturned);
+        
+        END_INTERFACE
+    } IKsControlVtbl;
+
+    interface IKsControl
+    {
+        CONST_VTBL struct IKsControlVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IKsControl_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IKsControl_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IKsControl_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IKsControl_KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned)	\
+    ( (This)->lpVtbl -> KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) ) 
+
+#define IKsControl_KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned)	\
+    ( (This)->lpVtbl -> KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) ) 
+
+#define IKsControl_KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned)	\
+    ( (This)->lpVtbl -> KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IKsControl_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPerChannelDbLevel_INTERFACE_DEFINED__
+#define __IPerChannelDbLevel_INTERFACE_DEFINED__
+
+/* interface IPerChannelDbLevel */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IPerChannelDbLevel;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("C2F8E001-F205-4BC9-99BC-C13B1E048CCB")
+    IPerChannelDbLevel : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( 
+            /* [out] */ 
+            __out  UINT *pcChannels) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevelRange( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfMinLevelDB,
+            /* [out] */ 
+            __out  float *pfMaxLevelDB,
+            /* [out] */ 
+            __out  float *pfStepping) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevel( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelUniform( 
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelAllChannels( 
+            /* [size_is][in] */ 
+            __in_ecount(cChannels)  float aLevelsDB[  ],
+            /* [in] */ 
+            __in  ULONG cChannels,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPerChannelDbLevelVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPerChannelDbLevel * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPerChannelDbLevel * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPerChannelDbLevel * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IPerChannelDbLevel * This,
+            /* [out] */ 
+            __out  UINT *pcChannels);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
+            IPerChannelDbLevel * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfMinLevelDB,
+            /* [out] */ 
+            __out  float *pfMaxLevelDB,
+            /* [out] */ 
+            __out  float *pfStepping);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
+            IPerChannelDbLevel * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
+            IPerChannelDbLevel * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
+            IPerChannelDbLevel * This,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
+            IPerChannelDbLevel * This,
+            /* [size_is][in] */ 
+            __in_ecount(cChannels)  float aLevelsDB[  ],
+            /* [in] */ 
+            __in  ULONG cChannels,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IPerChannelDbLevelVtbl;
+
+    interface IPerChannelDbLevel
+    {
+        CONST_VTBL struct IPerChannelDbLevelVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPerChannelDbLevel_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPerChannelDbLevel_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPerChannelDbLevel_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPerChannelDbLevel_GetChannelCount(This,pcChannels)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
+
+#define IPerChannelDbLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
+    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
+
+#define IPerChannelDbLevel_GetLevel(This,nChannel,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
+
+#define IPerChannelDbLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
+
+#define IPerChannelDbLevel_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
+
+#define IPerChannelDbLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPerChannelDbLevel_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioVolumeLevel_INTERFACE_DEFINED__
+#define __IAudioVolumeLevel_INTERFACE_DEFINED__
+
+/* interface IAudioVolumeLevel */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioVolumeLevel;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("7FB7B48F-531D-44A2-BCB3-5AD5A134B3DC")
+    IAudioVolumeLevel : public IPerChannelDbLevel
+    {
+    public:
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioVolumeLevelVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioVolumeLevel * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioVolumeLevel * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioVolumeLevel * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioVolumeLevel * This,
+            /* [out] */ 
+            __out  UINT *pcChannels);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
+            IAudioVolumeLevel * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfMinLevelDB,
+            /* [out] */ 
+            __out  float *pfMaxLevelDB,
+            /* [out] */ 
+            __out  float *pfStepping);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
+            IAudioVolumeLevel * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
+            IAudioVolumeLevel * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
+            IAudioVolumeLevel * This,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
+            IAudioVolumeLevel * This,
+            /* [size_is][in] */ 
+            __in_ecount(cChannels)  float aLevelsDB[  ],
+            /* [in] */ 
+            __in  ULONG cChannels,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioVolumeLevelVtbl;
+
+    interface IAudioVolumeLevel
+    {
+        CONST_VTBL struct IAudioVolumeLevelVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioVolumeLevel_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioVolumeLevel_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioVolumeLevel_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioVolumeLevel_GetChannelCount(This,pcChannels)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
+
+#define IAudioVolumeLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
+    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
+
+#define IAudioVolumeLevel_GetLevel(This,nChannel,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
+
+#define IAudioVolumeLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
+
+#define IAudioVolumeLevel_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
+
+#define IAudioVolumeLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
+
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioVolumeLevel_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioChannelConfig_INTERFACE_DEFINED__
+#define __IAudioChannelConfig_INTERFACE_DEFINED__
+
+/* interface IAudioChannelConfig */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioChannelConfig;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("BB11C46F-EC28-493C-B88A-5DB88062CE98")
+    IAudioChannelConfig : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetChannelConfig( 
+            /* [in] */ DWORD dwConfig,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelConfig( 
+            /* [retval][out] */ DWORD *pdwConfig) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioChannelConfigVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioChannelConfig * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioChannelConfig * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioChannelConfig * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetChannelConfig )( 
+            IAudioChannelConfig * This,
+            /* [in] */ DWORD dwConfig,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelConfig )( 
+            IAudioChannelConfig * This,
+            /* [retval][out] */ DWORD *pdwConfig);
+        
+        END_INTERFACE
+    } IAudioChannelConfigVtbl;
+
+    interface IAudioChannelConfig
+    {
+        CONST_VTBL struct IAudioChannelConfigVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioChannelConfig_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioChannelConfig_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioChannelConfig_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioChannelConfig_SetChannelConfig(This,dwConfig,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetChannelConfig(This,dwConfig,pguidEventContext) ) 
+
+#define IAudioChannelConfig_GetChannelConfig(This,pdwConfig)	\
+    ( (This)->lpVtbl -> GetChannelConfig(This,pdwConfig) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioChannelConfig_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioLoudness_INTERFACE_DEFINED__
+#define __IAudioLoudness_INTERFACE_DEFINED__
+
+/* interface IAudioLoudness */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioLoudness;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("7D8B1437-DD53-4350-9C1B-1EE2890BD938")
+    IAudioLoudness : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( 
+            /* [out] */ 
+            __out  BOOL *pbEnabled) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( 
+            /* [in] */ 
+            __in  BOOL bEnable,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioLoudnessVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioLoudness * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioLoudness * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioLoudness * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( 
+            IAudioLoudness * This,
+            /* [out] */ 
+            __out  BOOL *pbEnabled);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( 
+            IAudioLoudness * This,
+            /* [in] */ 
+            __in  BOOL bEnable,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioLoudnessVtbl;
+
+    interface IAudioLoudness
+    {
+        CONST_VTBL struct IAudioLoudnessVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioLoudness_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioLoudness_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioLoudness_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioLoudness_GetEnabled(This,pbEnabled)	\
+    ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) 
+
+#define IAudioLoudness_SetEnabled(This,bEnable,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioLoudness_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioInputSelector_INTERFACE_DEFINED__
+#define __IAudioInputSelector_INTERFACE_DEFINED__
+
+/* interface IAudioInputSelector */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioInputSelector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("4F03DC02-5E6E-4653-8F72-A030C123D598")
+    IAudioInputSelector : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( 
+            /* [out] */ 
+            __out  UINT *pnIdSelected) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( 
+            /* [in] */ 
+            __in  UINT nIdSelect,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioInputSelectorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioInputSelector * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioInputSelector * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioInputSelector * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( 
+            IAudioInputSelector * This,
+            /* [out] */ 
+            __out  UINT *pnIdSelected);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( 
+            IAudioInputSelector * This,
+            /* [in] */ 
+            __in  UINT nIdSelect,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioInputSelectorVtbl;
+
+    interface IAudioInputSelector
+    {
+        CONST_VTBL struct IAudioInputSelectorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioInputSelector_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioInputSelector_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioInputSelector_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioInputSelector_GetSelection(This,pnIdSelected)	\
+    ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) 
+
+#define IAudioInputSelector_SetSelection(This,nIdSelect,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioInputSelector_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioOutputSelector_INTERFACE_DEFINED__
+#define __IAudioOutputSelector_INTERFACE_DEFINED__
+
+/* interface IAudioOutputSelector */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioOutputSelector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("BB515F69-94A7-429e-8B9C-271B3F11A3AB")
+    IAudioOutputSelector : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( 
+            /* [out] */ 
+            __out  UINT *pnIdSelected) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( 
+            /* [in] */ 
+            __in  UINT nIdSelect,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioOutputSelectorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioOutputSelector * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioOutputSelector * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioOutputSelector * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( 
+            IAudioOutputSelector * This,
+            /* [out] */ 
+            __out  UINT *pnIdSelected);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( 
+            IAudioOutputSelector * This,
+            /* [in] */ 
+            __in  UINT nIdSelect,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioOutputSelectorVtbl;
+
+    interface IAudioOutputSelector
+    {
+        CONST_VTBL struct IAudioOutputSelectorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioOutputSelector_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioOutputSelector_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioOutputSelector_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioOutputSelector_GetSelection(This,pnIdSelected)	\
+    ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) 
+
+#define IAudioOutputSelector_SetSelection(This,nIdSelect,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioOutputSelector_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioMute_INTERFACE_DEFINED__
+#define __IAudioMute_INTERFACE_DEFINED__
+
+/* interface IAudioMute */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioMute;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("DF45AEEA-B74A-4B6B-AFAD-2366B6AA012E")
+    IAudioMute : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetMute( 
+            /* [in] */ 
+            __in  BOOL bMuted,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMute( 
+            /* [out] */ 
+            __out  BOOL *pbMuted) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioMuteVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioMute * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioMute * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioMute * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( 
+            IAudioMute * This,
+            /* [in] */ 
+            __in  BOOL bMuted,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( 
+            IAudioMute * This,
+            /* [out] */ 
+            __out  BOOL *pbMuted);
+        
+        END_INTERFACE
+    } IAudioMuteVtbl;
+
+    interface IAudioMute
+    {
+        CONST_VTBL struct IAudioMuteVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioMute_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioMute_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioMute_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioMute_SetMute(This,bMuted,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetMute(This,bMuted,pguidEventContext) ) 
+
+#define IAudioMute_GetMute(This,pbMuted)	\
+    ( (This)->lpVtbl -> GetMute(This,pbMuted) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioMute_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioBass_INTERFACE_DEFINED__
+#define __IAudioBass_INTERFACE_DEFINED__
+
+/* interface IAudioBass */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioBass;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("A2B1A1D9-4DB3-425D-A2B2-BD335CB3E2E5")
+    IAudioBass : public IPerChannelDbLevel
+    {
+    public:
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioBassVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioBass * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioBass * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioBass * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioBass * This,
+            /* [out] */ 
+            __out  UINT *pcChannels);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
+            IAudioBass * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfMinLevelDB,
+            /* [out] */ 
+            __out  float *pfMaxLevelDB,
+            /* [out] */ 
+            __out  float *pfStepping);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
+            IAudioBass * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
+            IAudioBass * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
+            IAudioBass * This,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
+            IAudioBass * This,
+            /* [size_is][in] */ 
+            __in_ecount(cChannels)  float aLevelsDB[  ],
+            /* [in] */ 
+            __in  ULONG cChannels,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioBassVtbl;
+
+    interface IAudioBass
+    {
+        CONST_VTBL struct IAudioBassVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioBass_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioBass_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioBass_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioBass_GetChannelCount(This,pcChannels)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
+
+#define IAudioBass_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
+    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
+
+#define IAudioBass_GetLevel(This,nChannel,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
+
+#define IAudioBass_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
+
+#define IAudioBass_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
+
+#define IAudioBass_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
+
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioBass_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioMidrange_INTERFACE_DEFINED__
+#define __IAudioMidrange_INTERFACE_DEFINED__
+
+/* interface IAudioMidrange */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioMidrange;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("5E54B6D7-B44B-40D9-9A9E-E691D9CE6EDF")
+    IAudioMidrange : public IPerChannelDbLevel
+    {
+    public:
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioMidrangeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioMidrange * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioMidrange * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioMidrange * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioMidrange * This,
+            /* [out] */ 
+            __out  UINT *pcChannels);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
+            IAudioMidrange * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfMinLevelDB,
+            /* [out] */ 
+            __out  float *pfMaxLevelDB,
+            /* [out] */ 
+            __out  float *pfStepping);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
+            IAudioMidrange * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
+            IAudioMidrange * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
+            IAudioMidrange * This,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
+            IAudioMidrange * This,
+            /* [size_is][in] */ 
+            __in_ecount(cChannels)  float aLevelsDB[  ],
+            /* [in] */ 
+            __in  ULONG cChannels,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioMidrangeVtbl;
+
+    interface IAudioMidrange
+    {
+        CONST_VTBL struct IAudioMidrangeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioMidrange_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioMidrange_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioMidrange_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioMidrange_GetChannelCount(This,pcChannels)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
+
+#define IAudioMidrange_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
+    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
+
+#define IAudioMidrange_GetLevel(This,nChannel,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
+
+#define IAudioMidrange_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
+
+#define IAudioMidrange_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
+
+#define IAudioMidrange_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
+
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioMidrange_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioTreble_INTERFACE_DEFINED__
+#define __IAudioTreble_INTERFACE_DEFINED__
+
+/* interface IAudioTreble */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioTreble;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("0A717812-694E-4907-B74B-BAFA5CFDCA7B")
+    IAudioTreble : public IPerChannelDbLevel
+    {
+    public:
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioTrebleVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioTreble * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioTreble * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioTreble * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioTreble * This,
+            /* [out] */ 
+            __out  UINT *pcChannels);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( 
+            IAudioTreble * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfMinLevelDB,
+            /* [out] */ 
+            __out  float *pfMaxLevelDB,
+            /* [out] */ 
+            __out  float *pfStepping);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
+            IAudioTreble * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( 
+            IAudioTreble * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( 
+            IAudioTreble * This,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( 
+            IAudioTreble * This,
+            /* [size_is][in] */ 
+            __in_ecount(cChannels)  float aLevelsDB[  ],
+            /* [in] */ 
+            __in  ULONG cChannels,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioTrebleVtbl;
+
+    interface IAudioTreble
+    {
+        CONST_VTBL struct IAudioTrebleVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioTreble_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioTreble_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioTreble_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioTreble_GetChannelCount(This,pcChannels)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
+
+#define IAudioTreble_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping)	\
+    ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) 
+
+#define IAudioTreble_GetLevel(This,nChannel,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) 
+
+#define IAudioTreble_SetLevel(This,nChannel,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
+
+#define IAudioTreble_SetLevelUniform(This,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) 
+
+#define IAudioTreble_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) 
+
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioTreble_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioAutoGainControl_INTERFACE_DEFINED__
+#define __IAudioAutoGainControl_INTERFACE_DEFINED__
+
+/* interface IAudioAutoGainControl */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioAutoGainControl;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("85401FD4-6DE4-4b9d-9869-2D6753A82F3C")
+    IAudioAutoGainControl : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( 
+            /* [out] */ 
+            __out  BOOL *pbEnabled) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( 
+            /* [in] */ 
+            __in  BOOL bEnable,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioAutoGainControlVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioAutoGainControl * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioAutoGainControl * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioAutoGainControl * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( 
+            IAudioAutoGainControl * This,
+            /* [out] */ 
+            __out  BOOL *pbEnabled);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( 
+            IAudioAutoGainControl * This,
+            /* [in] */ 
+            __in  BOOL bEnable,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IAudioAutoGainControlVtbl;
+
+    interface IAudioAutoGainControl
+    {
+        CONST_VTBL struct IAudioAutoGainControlVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioAutoGainControl_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioAutoGainControl_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioAutoGainControl_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioAutoGainControl_GetEnabled(This,pbEnabled)	\
+    ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) 
+
+#define IAudioAutoGainControl_SetEnabled(This,bEnable,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioAutoGainControl_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioPeakMeter_INTERFACE_DEFINED__
+#define __IAudioPeakMeter_INTERFACE_DEFINED__
+
+/* interface IAudioPeakMeter */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioPeakMeter;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("DD79923C-0599-45e0-B8B6-C8DF7DB6E796")
+    IAudioPeakMeter : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( 
+            /* [out] */ 
+            __out  UINT *pcChannels) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevel) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioPeakMeterVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioPeakMeter * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioPeakMeter * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioPeakMeter * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioPeakMeter * This,
+            /* [out] */ 
+            __out  UINT *pcChannels);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( 
+            IAudioPeakMeter * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevel);
+        
+        END_INTERFACE
+    } IAudioPeakMeterVtbl;
+
+    interface IAudioPeakMeter
+    {
+        CONST_VTBL struct IAudioPeakMeterVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioPeakMeter_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioPeakMeter_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioPeakMeter_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioPeakMeter_GetChannelCount(This,pcChannels)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) 
+
+#define IAudioPeakMeter_GetLevel(This,nChannel,pfLevel)	\
+    ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevel) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioPeakMeter_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDeviceSpecificProperty_INTERFACE_DEFINED__
+#define __IDeviceSpecificProperty_INTERFACE_DEFINED__
+
+/* interface IDeviceSpecificProperty */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IDeviceSpecificProperty;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("3B22BCBF-2586-4af0-8583-205D391B807C")
+    IDeviceSpecificProperty : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( 
+            /* [out] */ 
+            __deref_out  VARTYPE *pVType) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetValue( 
+            /* [out] */ 
+            __out  void *pvValue,
+            /* [out][in] */ 
+            __inout  DWORD *pcbValue) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetValue( 
+            /* [in] */ 
+            __in  void *pvValue,
+            /* [in] */ DWORD cbValue,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Get4BRange( 
+            /* [out] */ 
+            __deref_out  LONG *plMin,
+            /* [out] */ 
+            __deref_out  LONG *plMax,
+            /* [out] */ 
+            __deref_out  LONG *plStepping) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IDeviceSpecificPropertyVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDeviceSpecificProperty * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDeviceSpecificProperty * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDeviceSpecificProperty * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( 
+            IDeviceSpecificProperty * This,
+            /* [out] */ 
+            __deref_out  VARTYPE *pVType);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetValue )( 
+            IDeviceSpecificProperty * This,
+            /* [out] */ 
+            __out  void *pvValue,
+            /* [out][in] */ 
+            __inout  DWORD *pcbValue);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetValue )( 
+            IDeviceSpecificProperty * This,
+            /* [in] */ 
+            __in  void *pvValue,
+            /* [in] */ DWORD cbValue,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Get4BRange )( 
+            IDeviceSpecificProperty * This,
+            /* [out] */ 
+            __deref_out  LONG *plMin,
+            /* [out] */ 
+            __deref_out  LONG *plMax,
+            /* [out] */ 
+            __deref_out  LONG *plStepping);
+        
+        END_INTERFACE
+    } IDeviceSpecificPropertyVtbl;
+
+    interface IDeviceSpecificProperty
+    {
+        CONST_VTBL struct IDeviceSpecificPropertyVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDeviceSpecificProperty_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDeviceSpecificProperty_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDeviceSpecificProperty_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDeviceSpecificProperty_GetType(This,pVType)	\
+    ( (This)->lpVtbl -> GetType(This,pVType) ) 
+
+#define IDeviceSpecificProperty_GetValue(This,pvValue,pcbValue)	\
+    ( (This)->lpVtbl -> GetValue(This,pvValue,pcbValue) ) 
+
+#define IDeviceSpecificProperty_SetValue(This,pvValue,cbValue,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetValue(This,pvValue,cbValue,pguidEventContext) ) 
+
+#define IDeviceSpecificProperty_Get4BRange(This,plMin,plMax,plStepping)	\
+    ( (This)->lpVtbl -> Get4BRange(This,plMin,plMax,plStepping) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDeviceSpecificProperty_INTERFACE_DEFINED__ */
+
+
+#ifndef __IKsFormatSupport_INTERFACE_DEFINED__
+#define __IKsFormatSupport_INTERFACE_DEFINED__
+
+/* interface IKsFormatSupport */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IKsFormatSupport;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("3CB4A69D-BB6F-4D2B-95B7-452D2C155DB5")
+    IKsFormatSupport : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsFormatSupported( 
+            /* [size_is][in] */ PKSDATAFORMAT pKsFormat,
+            /* [in] */ 
+            __in  DWORD cbFormat,
+            /* [out] */ 
+            __out  BOOL *pbSupported) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevicePreferredFormat( 
+            /* [out] */ PKSDATAFORMAT *ppKsFormat) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IKsFormatSupportVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IKsFormatSupport * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IKsFormatSupport * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IKsFormatSupport * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( 
+            IKsFormatSupport * This,
+            /* [size_is][in] */ PKSDATAFORMAT pKsFormat,
+            /* [in] */ 
+            __in  DWORD cbFormat,
+            /* [out] */ 
+            __out  BOOL *pbSupported);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevicePreferredFormat )( 
+            IKsFormatSupport * This,
+            /* [out] */ PKSDATAFORMAT *ppKsFormat);
+        
+        END_INTERFACE
+    } IKsFormatSupportVtbl;
+
+    interface IKsFormatSupport
+    {
+        CONST_VTBL struct IKsFormatSupportVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IKsFormatSupport_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IKsFormatSupport_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IKsFormatSupport_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IKsFormatSupport_IsFormatSupported(This,pKsFormat,cbFormat,pbSupported)	\
+    ( (This)->lpVtbl -> IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) ) 
+
+#define IKsFormatSupport_GetDevicePreferredFormat(This,ppKsFormat)	\
+    ( (This)->lpVtbl -> GetDevicePreferredFormat(This,ppKsFormat) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IKsFormatSupport_INTERFACE_DEFINED__ */
+
+
+#ifndef __IKsJackDescription_INTERFACE_DEFINED__
+#define __IKsJackDescription_INTERFACE_DEFINED__
+
+/* interface IKsJackDescription */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IKsJackDescription;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("4509F757-2D46-4637-8E62-CE7DB944F57B")
+    IKsJackDescription : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackCount( 
+            /* [out] */ 
+            __out  UINT *pcJacks) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackDescription( 
+            /* [in] */ UINT nJack,
+            /* [out] */ 
+            __out  KSJACK_DESCRIPTION *pDescription) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IKsJackDescriptionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IKsJackDescription * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IKsJackDescription * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IKsJackDescription * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackCount )( 
+            IKsJackDescription * This,
+            /* [out] */ 
+            __out  UINT *pcJacks);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackDescription )( 
+            IKsJackDescription * This,
+            /* [in] */ UINT nJack,
+            /* [out] */ 
+            __out  KSJACK_DESCRIPTION *pDescription);
+        
+        END_INTERFACE
+    } IKsJackDescriptionVtbl;
+
+    interface IKsJackDescription
+    {
+        CONST_VTBL struct IKsJackDescriptionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IKsJackDescription_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IKsJackDescription_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IKsJackDescription_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IKsJackDescription_GetJackCount(This,pcJacks)	\
+    ( (This)->lpVtbl -> GetJackCount(This,pcJacks) ) 
+
+#define IKsJackDescription_GetJackDescription(This,nJack,pDescription)	\
+    ( (This)->lpVtbl -> GetJackDescription(This,nJack,pDescription) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IKsJackDescription_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPartsList_INTERFACE_DEFINED__
+#define __IPartsList_INTERFACE_DEFINED__
+
+/* interface IPartsList */
+/* [object][unique][helpstring][uuid][local] */ 
+
+
+EXTERN_C const IID IID_IPartsList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("6DAA848C-5EB0-45CC-AEA5-998A2CDA1FFB")
+    IPartsList : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( 
+            /* [out] */ 
+            __out  UINT *pCount) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPart( 
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __out  IPart **ppPart) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPartsListVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPartsList * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPartsList * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPartsList * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IPartsList * This,
+            /* [out] */ 
+            __out  UINT *pCount);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPart )( 
+            IPartsList * This,
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __out  IPart **ppPart);
+        
+        END_INTERFACE
+    } IPartsListVtbl;
+
+    interface IPartsList
+    {
+        CONST_VTBL struct IPartsListVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPartsList_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPartsList_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPartsList_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPartsList_GetCount(This,pCount)	\
+    ( (This)->lpVtbl -> GetCount(This,pCount) ) 
+
+#define IPartsList_GetPart(This,nIndex,ppPart)	\
+    ( (This)->lpVtbl -> GetPart(This,nIndex,ppPart) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPartsList_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPart_INTERFACE_DEFINED__
+#define __IPart_INTERFACE_DEFINED__
+
+/* interface IPart */
+/* [object][unique][helpstring][uuid][local] */ 
+
+
+EXTERN_C const IID IID_IPart;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9")
+    IPart : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrName) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLocalId( 
+            /* [out] */ 
+            __out  UINT *pnId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetGlobalId( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrGlobalId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartType( 
+            /* [out] */ 
+            __out  PartType *pPartType) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubType( 
+            /* [out] */ GUID *pSubType) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterfaceCount( 
+            /* [out] */ 
+            __out  UINT *pCount) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterface( 
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __out  IControlInterface **ppInterfaceDesc) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsIncoming( 
+            /* [out] */ 
+            __out  IPartsList **ppParts) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsOutgoing( 
+            /* [out] */ 
+            __out  IPartsList **ppParts) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetTopologyObject( 
+            /* [out] */ 
+            __out  IDeviceTopology **ppTopology) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( 
+            /* [in] */ 
+            __in  DWORD dwClsContext,
+            /* [in] */ 
+            __in  REFIID refiid,
+            /* [iid_is][out] */ 
+            __out_opt  void **ppvObject) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeCallback( 
+            /* [in] */ 
+            __in  REFGUID riid,
+            /* [in] */ 
+            __in  IControlChangeNotify *pNotify) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeCallback( 
+            /* [in] */ 
+            __in  IControlChangeNotify *pNotify) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPartVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPart * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPart * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPart * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( 
+            IPart * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrName);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLocalId )( 
+            IPart * This,
+            /* [out] */ 
+            __out  UINT *pnId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetGlobalId )( 
+            IPart * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrGlobalId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartType )( 
+            IPart * This,
+            /* [out] */ 
+            __out  PartType *pPartType);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubType )( 
+            IPart * This,
+            /* [out] */ GUID *pSubType);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterfaceCount )( 
+            IPart * This,
+            /* [out] */ 
+            __out  UINT *pCount);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterface )( 
+            IPart * This,
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __out  IControlInterface **ppInterfaceDesc);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsIncoming )( 
+            IPart * This,
+            /* [out] */ 
+            __out  IPartsList **ppParts);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsOutgoing )( 
+            IPart * This,
+            /* [out] */ 
+            __out  IPartsList **ppParts);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetTopologyObject )( 
+            IPart * This,
+            /* [out] */ 
+            __out  IDeviceTopology **ppTopology);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( 
+            IPart * This,
+            /* [in] */ 
+            __in  DWORD dwClsContext,
+            /* [in] */ 
+            __in  REFIID refiid,
+            /* [iid_is][out] */ 
+            __out_opt  void **ppvObject);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeCallback )( 
+            IPart * This,
+            /* [in] */ 
+            __in  REFGUID riid,
+            /* [in] */ 
+            __in  IControlChangeNotify *pNotify);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeCallback )( 
+            IPart * This,
+            /* [in] */ 
+            __in  IControlChangeNotify *pNotify);
+        
+        END_INTERFACE
+    } IPartVtbl;
+
+    interface IPart
+    {
+        CONST_VTBL struct IPartVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPart_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPart_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPart_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPart_GetName(This,ppwstrName)	\
+    ( (This)->lpVtbl -> GetName(This,ppwstrName) ) 
+
+#define IPart_GetLocalId(This,pnId)	\
+    ( (This)->lpVtbl -> GetLocalId(This,pnId) ) 
+
+#define IPart_GetGlobalId(This,ppwstrGlobalId)	\
+    ( (This)->lpVtbl -> GetGlobalId(This,ppwstrGlobalId) ) 
+
+#define IPart_GetPartType(This,pPartType)	\
+    ( (This)->lpVtbl -> GetPartType(This,pPartType) ) 
+
+#define IPart_GetSubType(This,pSubType)	\
+    ( (This)->lpVtbl -> GetSubType(This,pSubType) ) 
+
+#define IPart_GetControlInterfaceCount(This,pCount)	\
+    ( (This)->lpVtbl -> GetControlInterfaceCount(This,pCount) ) 
+
+#define IPart_GetControlInterface(This,nIndex,ppInterfaceDesc)	\
+    ( (This)->lpVtbl -> GetControlInterface(This,nIndex,ppInterfaceDesc) ) 
+
+#define IPart_EnumPartsIncoming(This,ppParts)	\
+    ( (This)->lpVtbl -> EnumPartsIncoming(This,ppParts) ) 
+
+#define IPart_EnumPartsOutgoing(This,ppParts)	\
+    ( (This)->lpVtbl -> EnumPartsOutgoing(This,ppParts) ) 
+
+#define IPart_GetTopologyObject(This,ppTopology)	\
+    ( (This)->lpVtbl -> GetTopologyObject(This,ppTopology) ) 
+
+#define IPart_Activate(This,dwClsContext,refiid,ppvObject)	\
+    ( (This)->lpVtbl -> Activate(This,dwClsContext,refiid,ppvObject) ) 
+
+#define IPart_RegisterControlChangeCallback(This,riid,pNotify)	\
+    ( (This)->lpVtbl -> RegisterControlChangeCallback(This,riid,pNotify) ) 
+
+#define IPart_UnregisterControlChangeCallback(This,pNotify)	\
+    ( (This)->lpVtbl -> UnregisterControlChangeCallback(This,pNotify) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPart_INTERFACE_DEFINED__ */
+
+
+#ifndef __IConnector_INTERFACE_DEFINED__
+#define __IConnector_INTERFACE_DEFINED__
+
+/* interface IConnector */
+/* [object][unique][helpstring][uuid][local] */ 
+
+
+EXTERN_C const IID IID_IConnector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("9c2c4058-23f5-41de-877a-df3af236a09e")
+    IConnector : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( 
+            /* [out] */ 
+            __out  ConnectorType *pType) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( 
+            /* [out] */ 
+            __out  DataFlow *pFlow) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectTo( 
+            /* [in] */ 
+            __in  IConnector *pConnectTo) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Disconnect( void) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsConnected( 
+            /* [out] */ 
+            __out  BOOL *pbConnected) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectedTo( 
+            /* [out] */ 
+            __out  IConnector **ppConTo) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorIdConnectedTo( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrConnectorId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceIdConnectedTo( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrDeviceId) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IConnectorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IConnector * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IConnector * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IConnector * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( 
+            IConnector * This,
+            /* [out] */ 
+            __out  ConnectorType *pType);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( 
+            IConnector * This,
+            /* [out] */ 
+            __out  DataFlow *pFlow);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectTo )( 
+            IConnector * This,
+            /* [in] */ 
+            __in  IConnector *pConnectTo);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Disconnect )( 
+            IConnector * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsConnected )( 
+            IConnector * This,
+            /* [out] */ 
+            __out  BOOL *pbConnected);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectedTo )( 
+            IConnector * This,
+            /* [out] */ 
+            __out  IConnector **ppConTo);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorIdConnectedTo )( 
+            IConnector * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrConnectorId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceIdConnectedTo )( 
+            IConnector * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrDeviceId);
+        
+        END_INTERFACE
+    } IConnectorVtbl;
+
+    interface IConnector
+    {
+        CONST_VTBL struct IConnectorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IConnector_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IConnector_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IConnector_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IConnector_GetType(This,pType)	\
+    ( (This)->lpVtbl -> GetType(This,pType) ) 
+
+#define IConnector_GetDataFlow(This,pFlow)	\
+    ( (This)->lpVtbl -> GetDataFlow(This,pFlow) ) 
+
+#define IConnector_ConnectTo(This,pConnectTo)	\
+    ( (This)->lpVtbl -> ConnectTo(This,pConnectTo) ) 
+
+#define IConnector_Disconnect(This)	\
+    ( (This)->lpVtbl -> Disconnect(This) ) 
+
+#define IConnector_IsConnected(This,pbConnected)	\
+    ( (This)->lpVtbl -> IsConnected(This,pbConnected) ) 
+
+#define IConnector_GetConnectedTo(This,ppConTo)	\
+    ( (This)->lpVtbl -> GetConnectedTo(This,ppConTo) ) 
+
+#define IConnector_GetConnectorIdConnectedTo(This,ppwstrConnectorId)	\
+    ( (This)->lpVtbl -> GetConnectorIdConnectedTo(This,ppwstrConnectorId) ) 
+
+#define IConnector_GetDeviceIdConnectedTo(This,ppwstrDeviceId)	\
+    ( (This)->lpVtbl -> GetDeviceIdConnectedTo(This,ppwstrDeviceId) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IConnector_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISubunit_INTERFACE_DEFINED__
+#define __ISubunit_INTERFACE_DEFINED__
+
+/* interface ISubunit */
+/* [object][unique][helpstring][uuid][local] */ 
+
+
+EXTERN_C const IID IID_ISubunit;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("82149A85-DBA6-4487-86BB-EA8F7FEFCC71")
+    ISubunit : public IUnknown
+    {
+    public:
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct ISubunitVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ISubunit * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ISubunit * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ISubunit * This);
+        
+        END_INTERFACE
+    } ISubunitVtbl;
+
+    interface ISubunit
+    {
+        CONST_VTBL struct ISubunitVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ISubunit_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ISubunit_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ISubunit_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ISubunit_INTERFACE_DEFINED__ */
+
+
+#ifndef __IControlInterface_INTERFACE_DEFINED__
+#define __IControlInterface_INTERFACE_DEFINED__
+
+/* interface IControlInterface */
+/* [object][unique][helpstring][uuid][local] */ 
+
+
+EXTERN_C const IID IID_IControlInterface;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("45d37c3f-5140-444a-ae24-400789f3cbf3")
+    IControlInterface : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrName) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetIID( 
+            /* [out] */ 
+            __out  GUID *pIID) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IControlInterfaceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IControlInterface * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IControlInterface * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IControlInterface * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( 
+            IControlInterface * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrName);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetIID )( 
+            IControlInterface * This,
+            /* [out] */ 
+            __out  GUID *pIID);
+        
+        END_INTERFACE
+    } IControlInterfaceVtbl;
+
+    interface IControlInterface
+    {
+        CONST_VTBL struct IControlInterfaceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IControlInterface_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IControlInterface_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IControlInterface_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IControlInterface_GetName(This,ppwstrName)	\
+    ( (This)->lpVtbl -> GetName(This,ppwstrName) ) 
+
+#define IControlInterface_GetIID(This,pIID)	\
+    ( (This)->lpVtbl -> GetIID(This,pIID) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IControlInterface_INTERFACE_DEFINED__ */
+
+
+#ifndef __IControlChangeNotify_INTERFACE_DEFINED__
+#define __IControlChangeNotify_INTERFACE_DEFINED__
+
+/* interface IControlChangeNotify */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IControlChangeNotify;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("A09513ED-C709-4d21-BD7B-5F34C47F3947")
+    IControlChangeNotify : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNotify( 
+            /* [in] */ 
+            __in  DWORD dwSenderProcessId,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IControlChangeNotifyVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IControlChangeNotify * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IControlChangeNotify * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IControlChangeNotify * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnNotify )( 
+            IControlChangeNotify * This,
+            /* [in] */ 
+            __in  DWORD dwSenderProcessId,
+            /* [unique][in] */ 
+            __in_opt  LPCGUID pguidEventContext);
+        
+        END_INTERFACE
+    } IControlChangeNotifyVtbl;
+
+    interface IControlChangeNotify
+    {
+        CONST_VTBL struct IControlChangeNotifyVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IControlChangeNotify_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IControlChangeNotify_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IControlChangeNotify_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IControlChangeNotify_OnNotify(This,dwSenderProcessId,pguidEventContext)	\
+    ( (This)->lpVtbl -> OnNotify(This,dwSenderProcessId,pguidEventContext) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IControlChangeNotify_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDeviceTopology_INTERFACE_DEFINED__
+#define __IDeviceTopology_INTERFACE_DEFINED__
+
+/* interface IDeviceTopology */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IDeviceTopology;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("2A07407E-6497-4A18-9787-32F79BD0D98F")
+    IDeviceTopology : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorCount( 
+            /* [out] */ 
+            __out  UINT *pCount) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnector( 
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __out  IConnector **ppConnector) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunitCount( 
+            /* [out] */ 
+            __out  UINT *pCount) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunit( 
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __deref_out  ISubunit **ppSubunit) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartById( 
+            /* [in] */ 
+            __in  UINT nId,
+            /* [out] */ 
+            __deref_out  IPart **ppPart) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceId( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrDeviceId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSignalPath( 
+            /* [in] */ 
+            __in  IPart *pIPartFrom,
+            /* [in] */ 
+            __in  IPart *pIPartTo,
+            /* [in] */ 
+            __in  BOOL bRejectMixedPaths,
+            /* [out] */ 
+            __deref_out  IPartsList **ppParts) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IDeviceTopologyVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDeviceTopology * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDeviceTopology * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDeviceTopology * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorCount )( 
+            IDeviceTopology * This,
+            /* [out] */ 
+            __out  UINT *pCount);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnector )( 
+            IDeviceTopology * This,
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __out  IConnector **ppConnector);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunitCount )( 
+            IDeviceTopology * This,
+            /* [out] */ 
+            __out  UINT *pCount);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunit )( 
+            IDeviceTopology * This,
+            /* [in] */ 
+            __in  UINT nIndex,
+            /* [out] */ 
+            __deref_out  ISubunit **ppSubunit);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartById )( 
+            IDeviceTopology * This,
+            /* [in] */ 
+            __in  UINT nId,
+            /* [out] */ 
+            __deref_out  IPart **ppPart);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceId )( 
+            IDeviceTopology * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppwstrDeviceId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSignalPath )( 
+            IDeviceTopology * This,
+            /* [in] */ 
+            __in  IPart *pIPartFrom,
+            /* [in] */ 
+            __in  IPart *pIPartTo,
+            /* [in] */ 
+            __in  BOOL bRejectMixedPaths,
+            /* [out] */ 
+            __deref_out  IPartsList **ppParts);
+        
+        END_INTERFACE
+    } IDeviceTopologyVtbl;
+
+    interface IDeviceTopology
+    {
+        CONST_VTBL struct IDeviceTopologyVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDeviceTopology_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDeviceTopology_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDeviceTopology_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDeviceTopology_GetConnectorCount(This,pCount)	\
+    ( (This)->lpVtbl -> GetConnectorCount(This,pCount) ) 
+
+#define IDeviceTopology_GetConnector(This,nIndex,ppConnector)	\
+    ( (This)->lpVtbl -> GetConnector(This,nIndex,ppConnector) ) 
+
+#define IDeviceTopology_GetSubunitCount(This,pCount)	\
+    ( (This)->lpVtbl -> GetSubunitCount(This,pCount) ) 
+
+#define IDeviceTopology_GetSubunit(This,nIndex,ppSubunit)	\
+    ( (This)->lpVtbl -> GetSubunit(This,nIndex,ppSubunit) ) 
+
+#define IDeviceTopology_GetPartById(This,nId,ppPart)	\
+    ( (This)->lpVtbl -> GetPartById(This,nId,ppPart) ) 
+
+#define IDeviceTopology_GetDeviceId(This,ppwstrDeviceId)	\
+    ( (This)->lpVtbl -> GetDeviceId(This,ppwstrDeviceId) ) 
+
+#define IDeviceTopology_GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts)	\
+    ( (This)->lpVtbl -> GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDeviceTopology_INTERFACE_DEFINED__ */
+
+
+
+#ifndef __DevTopologyLib_LIBRARY_DEFINED__
+#define __DevTopologyLib_LIBRARY_DEFINED__
+
+/* library DevTopologyLib */
+/* [helpstring][version][uuid] */ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+EXTERN_C const IID LIBID_DevTopologyLib;
+
+EXTERN_C const CLSID CLSID_DeviceTopology;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("1DF639D0-5EC1-47AA-9379-828DC1AA8C59")
+DeviceTopology;
+#endif
+#endif /* __DevTopologyLib_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/endpointvolume.h b/portaudio/src/hostapi/wasapi/mingw-include/endpointvolume.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/endpointvolume.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/endpointvolume.h
@@ -1,620 +1,620 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for endpointvolume.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 500
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __endpointvolume_h__
-#define __endpointvolume_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IAudioEndpointVolumeCallback_FWD_DEFINED__
-#define __IAudioEndpointVolumeCallback_FWD_DEFINED__
-typedef interface IAudioEndpointVolumeCallback IAudioEndpointVolumeCallback;
-#endif 	/* __IAudioEndpointVolumeCallback_FWD_DEFINED__ */
-
-
-#ifndef __IAudioEndpointVolume_FWD_DEFINED__
-#define __IAudioEndpointVolume_FWD_DEFINED__
-typedef interface IAudioEndpointVolume IAudioEndpointVolume;
-#endif 	/* __IAudioEndpointVolume_FWD_DEFINED__ */
-
-
-#ifndef __IAudioMeterInformation_FWD_DEFINED__
-#define __IAudioMeterInformation_FWD_DEFINED__
-typedef interface IAudioMeterInformation IAudioMeterInformation;
-#endif 	/* __IAudioMeterInformation_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "unknwn.h"
-#include "devicetopology.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_endpointvolume_0000_0000 */
-/* [local] */ 
-
-typedef struct AUDIO_VOLUME_NOTIFICATION_DATA
-    {
-    GUID guidEventContext;
-    BOOL bMuted;
-    float fMasterVolume;
-    UINT nChannels;
-    float afChannelVolumes[ 1 ];
-    } 	AUDIO_VOLUME_NOTIFICATION_DATA;
-
-typedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;
-
-#define   ENDPOINT_HARDWARE_SUPPORT_VOLUME    0x00000001
-#define   ENDPOINT_HARDWARE_SUPPORT_MUTE      0x00000002
-#define   ENDPOINT_HARDWARE_SUPPORT_METER     0x00000004
-
-
-extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__
-#define __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__
-
-/* interface IAudioEndpointVolumeCallback */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioEndpointVolumeCallback;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("657804FA-D6AD-4496-8A60-352752AF4F89")
-    IAudioEndpointVolumeCallback : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE OnNotify( 
-            PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioEndpointVolumeCallbackVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioEndpointVolumeCallback * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioEndpointVolumeCallback * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioEndpointVolumeCallback * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *OnNotify )( 
-            IAudioEndpointVolumeCallback * This,
-            PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
-        
-        END_INTERFACE
-    } IAudioEndpointVolumeCallbackVtbl;
-
-    interface IAudioEndpointVolumeCallback
-    {
-        CONST_VTBL struct IAudioEndpointVolumeCallbackVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioEndpointVolumeCallback_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioEndpointVolumeCallback_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioEndpointVolumeCallback_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioEndpointVolumeCallback_OnNotify(This,pNotify)	\
-    ( (This)->lpVtbl -> OnNotify(This,pNotify) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioEndpointVolume_INTERFACE_DEFINED__
-#define __IAudioEndpointVolume_INTERFACE_DEFINED__
-
-/* interface IAudioEndpointVolume */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioEndpointVolume;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("5CDF2C82-841E-4546-9722-0CF74078229A")
-    IAudioEndpointVolume : public IUnknown
-    {
-    public:
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify( 
-            /* [in] */ 
-            __in  IAudioEndpointVolumeCallback *pNotify) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify( 
-            /* [in] */ 
-            __in  IAudioEndpointVolumeCallback *pNotify) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount( 
-            /* [out] */ 
-            __out  UINT *pnChannelCount) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel( 
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar( 
-            /* [in] */ 
-            __in  float fLevel,
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel( 
-            /* [out] */ 
-            __out  float *pfLevelDB) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar( 
-            /* [out] */ 
-            __out  float *pfLevel) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevel( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            float fLevelDB,
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevelScalar( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            float fLevel,
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevel( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevelScalar( 
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevel) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMute( 
-            /* [in] */ 
-            __in  BOOL bMute,
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMute( 
-            /* [out] */ 
-            __out  BOOL *pbMute) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeStepInfo( 
-            /* [out] */ 
-            __out  UINT *pnStep,
-            /* [out] */ 
-            __out  UINT *pnStepCount) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepUp( 
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepDown( 
-            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( 
-            /* [out] */ 
-            __out  DWORD *pdwHardwareSupportMask) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeRange( 
-            /* [out] */ 
-            __out  float *pflVolumeMindB,
-            /* [out] */ 
-            __out  float *pflVolumeMaxdB,
-            /* [out] */ 
-            __out  float *pflVolumeIncrementdB) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioEndpointVolumeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioEndpointVolume * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioEndpointVolume * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeNotify )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  IAudioEndpointVolumeCallback *pNotify);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeNotify )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  IAudioEndpointVolumeCallback *pNotify);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  UINT *pnChannelCount);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevel )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  float fLevelDB,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevelScalar )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  float fLevel,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevel )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevelScalar )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  float *pfLevel);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevel )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            float fLevelDB,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevelScalar )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            float fLevel,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevel )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevelDB);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevelScalar )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  UINT nChannel,
-            /* [out] */ 
-            __out  float *pfLevel);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( 
-            IAudioEndpointVolume * This,
-            /* [in] */ 
-            __in  BOOL bMute,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  BOOL *pbMute);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeStepInfo )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  UINT *pnStep,
-            /* [out] */ 
-            __out  UINT *pnStepCount);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepUp )( 
-            IAudioEndpointVolume * This,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepDown )( 
-            IAudioEndpointVolume * This,
-            /* [unique][in] */ LPCGUID pguidEventContext);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  DWORD *pdwHardwareSupportMask);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeRange )( 
-            IAudioEndpointVolume * This,
-            /* [out] */ 
-            __out  float *pflVolumeMindB,
-            /* [out] */ 
-            __out  float *pflVolumeMaxdB,
-            /* [out] */ 
-            __out  float *pflVolumeIncrementdB);
-        
-        END_INTERFACE
-    } IAudioEndpointVolumeVtbl;
-
-    interface IAudioEndpointVolume
-    {
-        CONST_VTBL struct IAudioEndpointVolumeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioEndpointVolume_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioEndpointVolume_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioEndpointVolume_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioEndpointVolume_RegisterControlChangeNotify(This,pNotify)	\
-    ( (This)->lpVtbl -> RegisterControlChangeNotify(This,pNotify) ) 
-
-#define IAudioEndpointVolume_UnregisterControlChangeNotify(This,pNotify)	\
-    ( (This)->lpVtbl -> UnregisterControlChangeNotify(This,pNotify) ) 
-
-#define IAudioEndpointVolume_GetChannelCount(This,pnChannelCount)	\
-    ( (This)->lpVtbl -> GetChannelCount(This,pnChannelCount) ) 
-
-#define IAudioEndpointVolume_SetMasterVolumeLevel(This,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_GetMasterVolumeLevel(This,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetMasterVolumeLevel(This,pfLevelDB) ) 
-
-#define IAudioEndpointVolume_GetMasterVolumeLevelScalar(This,pfLevel)	\
-    ( (This)->lpVtbl -> GetMasterVolumeLevelScalar(This,pfLevel) ) 
-
-#define IAudioEndpointVolume_SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_GetChannelVolumeLevel(This,nChannel,pfLevelDB)	\
-    ( (This)->lpVtbl -> GetChannelVolumeLevel(This,nChannel,pfLevelDB) ) 
-
-#define IAudioEndpointVolume_GetChannelVolumeLevelScalar(This,nChannel,pfLevel)	\
-    ( (This)->lpVtbl -> GetChannelVolumeLevelScalar(This,nChannel,pfLevel) ) 
-
-#define IAudioEndpointVolume_SetMute(This,bMute,pguidEventContext)	\
-    ( (This)->lpVtbl -> SetMute(This,bMute,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_GetMute(This,pbMute)	\
-    ( (This)->lpVtbl -> GetMute(This,pbMute) ) 
-
-#define IAudioEndpointVolume_GetVolumeStepInfo(This,pnStep,pnStepCount)	\
-    ( (This)->lpVtbl -> GetVolumeStepInfo(This,pnStep,pnStepCount) ) 
-
-#define IAudioEndpointVolume_VolumeStepUp(This,pguidEventContext)	\
-    ( (This)->lpVtbl -> VolumeStepUp(This,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_VolumeStepDown(This,pguidEventContext)	\
-    ( (This)->lpVtbl -> VolumeStepDown(This,pguidEventContext) ) 
-
-#define IAudioEndpointVolume_QueryHardwareSupport(This,pdwHardwareSupportMask)	\
-    ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) 
-
-#define IAudioEndpointVolume_GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB)	\
-    ( (This)->lpVtbl -> GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioEndpointVolume_INTERFACE_DEFINED__ */
-
-
-#ifndef __IAudioMeterInformation_INTERFACE_DEFINED__
-#define __IAudioMeterInformation_INTERFACE_DEFINED__
-
-/* interface IAudioMeterInformation */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IAudioMeterInformation;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("C02216F6-8C67-4B5B-9D00-D008E73E0064")
-    IAudioMeterInformation : public IUnknown
-    {
-    public:
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPeakValue( 
-            /* [out] */ float *pfPeak) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMeteringChannelCount( 
-            /* [out] */ 
-            __out  UINT *pnChannelCount) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelsPeakValues( 
-            /* [in] */ UINT32 u32ChannelCount,
-            /* [size_is][out] */ float *afPeakValues) = 0;
-        
-        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( 
-            /* [out] */ 
-            __out  DWORD *pdwHardwareSupportMask) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IAudioMeterInformationVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IAudioMeterInformation * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IAudioMeterInformation * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IAudioMeterInformation * This);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPeakValue )( 
-            IAudioMeterInformation * This,
-            /* [out] */ float *pfPeak);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMeteringChannelCount )( 
-            IAudioMeterInformation * This,
-            /* [out] */ 
-            __out  UINT *pnChannelCount);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelsPeakValues )( 
-            IAudioMeterInformation * This,
-            /* [in] */ UINT32 u32ChannelCount,
-            /* [size_is][out] */ float *afPeakValues);
-        
-        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( 
-            IAudioMeterInformation * This,
-            /* [out] */ 
-            __out  DWORD *pdwHardwareSupportMask);
-        
-        END_INTERFACE
-    } IAudioMeterInformationVtbl;
-
-    interface IAudioMeterInformation
-    {
-        CONST_VTBL struct IAudioMeterInformationVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IAudioMeterInformation_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IAudioMeterInformation_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IAudioMeterInformation_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IAudioMeterInformation_GetPeakValue(This,pfPeak)	\
-    ( (This)->lpVtbl -> GetPeakValue(This,pfPeak) ) 
-
-#define IAudioMeterInformation_GetMeteringChannelCount(This,pnChannelCount)	\
-    ( (This)->lpVtbl -> GetMeteringChannelCount(This,pnChannelCount) ) 
-
-#define IAudioMeterInformation_GetChannelsPeakValues(This,u32ChannelCount,afPeakValues)	\
-    ( (This)->lpVtbl -> GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) ) 
-
-#define IAudioMeterInformation_QueryHardwareSupport(This,pdwHardwareSupportMask)	\
-    ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IAudioMeterInformation_INTERFACE_DEFINED__ */
-
-
-/* Additional Prototypes for ALL interfaces */
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for endpointvolume.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __endpointvolume_h__
+#define __endpointvolume_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IAudioEndpointVolumeCallback_FWD_DEFINED__
+#define __IAudioEndpointVolumeCallback_FWD_DEFINED__
+typedef interface IAudioEndpointVolumeCallback IAudioEndpointVolumeCallback;
+#endif 	/* __IAudioEndpointVolumeCallback_FWD_DEFINED__ */
+
+
+#ifndef __IAudioEndpointVolume_FWD_DEFINED__
+#define __IAudioEndpointVolume_FWD_DEFINED__
+typedef interface IAudioEndpointVolume IAudioEndpointVolume;
+#endif 	/* __IAudioEndpointVolume_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMeterInformation_FWD_DEFINED__
+#define __IAudioMeterInformation_FWD_DEFINED__
+typedef interface IAudioMeterInformation IAudioMeterInformation;
+#endif 	/* __IAudioMeterInformation_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "unknwn.h"
+#include "devicetopology.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_endpointvolume_0000_0000 */
+/* [local] */ 
+
+typedef struct AUDIO_VOLUME_NOTIFICATION_DATA
+    {
+    GUID guidEventContext;
+    BOOL bMuted;
+    float fMasterVolume;
+    UINT nChannels;
+    float afChannelVolumes[ 1 ];
+    } 	AUDIO_VOLUME_NOTIFICATION_DATA;
+
+typedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;
+
+#define   ENDPOINT_HARDWARE_SUPPORT_VOLUME    0x00000001
+#define   ENDPOINT_HARDWARE_SUPPORT_MUTE      0x00000002
+#define   ENDPOINT_HARDWARE_SUPPORT_METER     0x00000004
+
+
+extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__
+#define __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__
+
+/* interface IAudioEndpointVolumeCallback */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioEndpointVolumeCallback;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("657804FA-D6AD-4496-8A60-352752AF4F89")
+    IAudioEndpointVolumeCallback : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE OnNotify( 
+            PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioEndpointVolumeCallbackVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioEndpointVolumeCallback * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioEndpointVolumeCallback * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioEndpointVolumeCallback * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *OnNotify )( 
+            IAudioEndpointVolumeCallback * This,
+            PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
+        
+        END_INTERFACE
+    } IAudioEndpointVolumeCallbackVtbl;
+
+    interface IAudioEndpointVolumeCallback
+    {
+        CONST_VTBL struct IAudioEndpointVolumeCallbackVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioEndpointVolumeCallback_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioEndpointVolumeCallback_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioEndpointVolumeCallback_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioEndpointVolumeCallback_OnNotify(This,pNotify)	\
+    ( (This)->lpVtbl -> OnNotify(This,pNotify) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioEndpointVolume_INTERFACE_DEFINED__
+#define __IAudioEndpointVolume_INTERFACE_DEFINED__
+
+/* interface IAudioEndpointVolume */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioEndpointVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("5CDF2C82-841E-4546-9722-0CF74078229A")
+    IAudioEndpointVolume : public IUnknown
+    {
+    public:
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify( 
+            /* [in] */ 
+            __in  IAudioEndpointVolumeCallback *pNotify) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify( 
+            /* [in] */ 
+            __in  IAudioEndpointVolumeCallback *pNotify) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount( 
+            /* [out] */ 
+            __out  UINT *pnChannelCount) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel( 
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar( 
+            /* [in] */ 
+            __in  float fLevel,
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel( 
+            /* [out] */ 
+            __out  float *pfLevelDB) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar( 
+            /* [out] */ 
+            __out  float *pfLevel) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevel( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            float fLevelDB,
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevelScalar( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            float fLevel,
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevel( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevelScalar( 
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevel) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMute( 
+            /* [in] */ 
+            __in  BOOL bMute,
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMute( 
+            /* [out] */ 
+            __out  BOOL *pbMute) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeStepInfo( 
+            /* [out] */ 
+            __out  UINT *pnStep,
+            /* [out] */ 
+            __out  UINT *pnStepCount) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepUp( 
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepDown( 
+            /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( 
+            /* [out] */ 
+            __out  DWORD *pdwHardwareSupportMask) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeRange( 
+            /* [out] */ 
+            __out  float *pflVolumeMindB,
+            /* [out] */ 
+            __out  float *pflVolumeMaxdB,
+            /* [out] */ 
+            __out  float *pflVolumeIncrementdB) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioEndpointVolumeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioEndpointVolume * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioEndpointVolume * This);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeNotify )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  IAudioEndpointVolumeCallback *pNotify);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeNotify )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  IAudioEndpointVolumeCallback *pNotify);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  UINT *pnChannelCount);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevel )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  float fLevelDB,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevelScalar )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  float fLevel,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevel )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevelScalar )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  float *pfLevel);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevel )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            float fLevelDB,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevelScalar )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            float fLevel,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevel )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevelDB);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevelScalar )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  UINT nChannel,
+            /* [out] */ 
+            __out  float *pfLevel);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( 
+            IAudioEndpointVolume * This,
+            /* [in] */ 
+            __in  BOOL bMute,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  BOOL *pbMute);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeStepInfo )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  UINT *pnStep,
+            /* [out] */ 
+            __out  UINT *pnStepCount);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepUp )( 
+            IAudioEndpointVolume * This,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepDown )( 
+            IAudioEndpointVolume * This,
+            /* [unique][in] */ LPCGUID pguidEventContext);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  DWORD *pdwHardwareSupportMask);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeRange )( 
+            IAudioEndpointVolume * This,
+            /* [out] */ 
+            __out  float *pflVolumeMindB,
+            /* [out] */ 
+            __out  float *pflVolumeMaxdB,
+            /* [out] */ 
+            __out  float *pflVolumeIncrementdB);
+        
+        END_INTERFACE
+    } IAudioEndpointVolumeVtbl;
+
+    interface IAudioEndpointVolume
+    {
+        CONST_VTBL struct IAudioEndpointVolumeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioEndpointVolume_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioEndpointVolume_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioEndpointVolume_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioEndpointVolume_RegisterControlChangeNotify(This,pNotify)	\
+    ( (This)->lpVtbl -> RegisterControlChangeNotify(This,pNotify) ) 
+
+#define IAudioEndpointVolume_UnregisterControlChangeNotify(This,pNotify)	\
+    ( (This)->lpVtbl -> UnregisterControlChangeNotify(This,pNotify) ) 
+
+#define IAudioEndpointVolume_GetChannelCount(This,pnChannelCount)	\
+    ( (This)->lpVtbl -> GetChannelCount(This,pnChannelCount) ) 
+
+#define IAudioEndpointVolume_SetMasterVolumeLevel(This,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_GetMasterVolumeLevel(This,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetMasterVolumeLevel(This,pfLevelDB) ) 
+
+#define IAudioEndpointVolume_GetMasterVolumeLevelScalar(This,pfLevel)	\
+    ( (This)->lpVtbl -> GetMasterVolumeLevelScalar(This,pfLevel) ) 
+
+#define IAudioEndpointVolume_SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_GetChannelVolumeLevel(This,nChannel,pfLevelDB)	\
+    ( (This)->lpVtbl -> GetChannelVolumeLevel(This,nChannel,pfLevelDB) ) 
+
+#define IAudioEndpointVolume_GetChannelVolumeLevelScalar(This,nChannel,pfLevel)	\
+    ( (This)->lpVtbl -> GetChannelVolumeLevelScalar(This,nChannel,pfLevel) ) 
+
+#define IAudioEndpointVolume_SetMute(This,bMute,pguidEventContext)	\
+    ( (This)->lpVtbl -> SetMute(This,bMute,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_GetMute(This,pbMute)	\
+    ( (This)->lpVtbl -> GetMute(This,pbMute) ) 
+
+#define IAudioEndpointVolume_GetVolumeStepInfo(This,pnStep,pnStepCount)	\
+    ( (This)->lpVtbl -> GetVolumeStepInfo(This,pnStep,pnStepCount) ) 
+
+#define IAudioEndpointVolume_VolumeStepUp(This,pguidEventContext)	\
+    ( (This)->lpVtbl -> VolumeStepUp(This,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_VolumeStepDown(This,pguidEventContext)	\
+    ( (This)->lpVtbl -> VolumeStepDown(This,pguidEventContext) ) 
+
+#define IAudioEndpointVolume_QueryHardwareSupport(This,pdwHardwareSupportMask)	\
+    ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) 
+
+#define IAudioEndpointVolume_GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB)	\
+    ( (This)->lpVtbl -> GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioEndpointVolume_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioMeterInformation_INTERFACE_DEFINED__
+#define __IAudioMeterInformation_INTERFACE_DEFINED__
+
+/* interface IAudioMeterInformation */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IAudioMeterInformation;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("C02216F6-8C67-4B5B-9D00-D008E73E0064")
+    IAudioMeterInformation : public IUnknown
+    {
+    public:
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPeakValue( 
+            /* [out] */ float *pfPeak) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMeteringChannelCount( 
+            /* [out] */ 
+            __out  UINT *pnChannelCount) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelsPeakValues( 
+            /* [in] */ UINT32 u32ChannelCount,
+            /* [size_is][out] */ float *afPeakValues) = 0;
+        
+        virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( 
+            /* [out] */ 
+            __out  DWORD *pdwHardwareSupportMask) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IAudioMeterInformationVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IAudioMeterInformation * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IAudioMeterInformation * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IAudioMeterInformation * This);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPeakValue )( 
+            IAudioMeterInformation * This,
+            /* [out] */ float *pfPeak);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMeteringChannelCount )( 
+            IAudioMeterInformation * This,
+            /* [out] */ 
+            __out  UINT *pnChannelCount);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelsPeakValues )( 
+            IAudioMeterInformation * This,
+            /* [in] */ UINT32 u32ChannelCount,
+            /* [size_is][out] */ float *afPeakValues);
+        
+        /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( 
+            IAudioMeterInformation * This,
+            /* [out] */ 
+            __out  DWORD *pdwHardwareSupportMask);
+        
+        END_INTERFACE
+    } IAudioMeterInformationVtbl;
+
+    interface IAudioMeterInformation
+    {
+        CONST_VTBL struct IAudioMeterInformationVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IAudioMeterInformation_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IAudioMeterInformation_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IAudioMeterInformation_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IAudioMeterInformation_GetPeakValue(This,pfPeak)	\
+    ( (This)->lpVtbl -> GetPeakValue(This,pfPeak) ) 
+
+#define IAudioMeterInformation_GetMeteringChannelCount(This,pnChannelCount)	\
+    ( (This)->lpVtbl -> GetMeteringChannelCount(This,pnChannelCount) ) 
+
+#define IAudioMeterInformation_GetChannelsPeakValues(This,u32ChannelCount,afPeakValues)	\
+    ( (This)->lpVtbl -> GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) ) 
+
+#define IAudioMeterInformation_QueryHardwareSupport(This,pdwHardwareSupportMask)	\
+    ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IAudioMeterInformation_INTERFACE_DEFINED__ */
+
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/functiondiscoverykeys.h b/portaudio/src/hostapi/wasapi/mingw-include/functiondiscoverykeys.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/functiondiscoverykeys.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/functiondiscoverykeys.h
@@ -1,255 +1,255 @@
-#pragma once
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DEFINE_API_PKEY
-#include <propkey.h>
-#endif
-
-#include <FunctionDiscoveryKeys_devpkey.h>
-
-// FMTID_FD = {904b03a2-471d-423c-a584-f3483238a146}
-DEFINE_GUID(FMTID_FD, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46);
-DEFINE_API_PKEY(PKEY_FD_Visibility, VisibilityFlags, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000001); //    VT_UINT
-#define FD_Visibility_Default   0
-#define FD_Visibility_Hidden    1
-
-// FMTID_Device = {78C34FC8-104A-4aca-9EA4-524D52996E57}
-DEFINE_GUID(FMTID_Device, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);
-
-DEFINE_API_PKEY(PKEY_Device_NotPresent,     DeviceNotPresent   , 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000002); //    VT_UINT
-DEFINE_API_PKEY(PKEY_Device_QueueSize,      DeviceQueueSize    , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000024); //    VT_UI4
-DEFINE_API_PKEY(PKEY_Device_Status,         DeviceStatus       , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000025); //    VT_LPWSTR
-DEFINE_API_PKEY(PKEY_Device_Comment,        DeviceComment      , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000026); //    VT_LPWSTR
-DEFINE_API_PKEY(PKEY_Device_Model,          DeviceModel        , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000027); //    VT_LPWSTR
-
-//  Name:     System.Device.BIOSVersion -- PKEY_Device_BIOSVersion
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_BSTR.
-//  FormatID: EAEE7F1D-6A33-44D1-9441-5F46DEF23198, 9
-DEFINE_PROPERTYKEY(PKEY_Device_BIOSVersion, 0xEAEE7F1D, 0x6A33, 0x44D1, 0x94, 0x41, 0x5F, 0x46, 0xDE, 0xF2, 0x31, 0x98, 9);
-
-DEFINE_API_PKEY(PKEY_Write_Time,            WriteTime          , 0xf53b7e1c, 0x77e0, 0x4450, 0x8c, 0x5f, 0xa7, 0x6c, 0xc7, 0xfd, 0xe0, 0x58, 0x00000100); //    VT_FILETIME
-
-#ifdef FD_XP
-DEFINE_API_PKEY(PKEY_Device_InstanceId, DeviceInstanceId   , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000100); //    VT_LPWSTR
-#endif
-DEFINE_API_PKEY(PKEY_Device_Interface,  DeviceInterface    , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000101); //    VT_CLSID
-
-DEFINE_API_PKEY(PKEY_ExposedIIDs,           ExposedIIDs       , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003002); //  VT_VECTOR | VT_CLSID
-DEFINE_API_PKEY(PKEY_ExposedCLSIDs,         ExposedCLSIDs     , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003003); //  VT_VECTOR | VT_CLSID
-DEFINE_API_PKEY(PKEY_InstanceValidatorClsid,InstanceValidator , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003004); // VT_CLSID
-
-// FMTID_WSD = {92506491-FF95-4724-A05A-5B81885A7C92}
-DEFINE_GUID(FMTID_WSD, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92);
-
-DEFINE_API_PKEY(PKEY_WSD_AddressURI, WSD_AddressURI, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001000);   // VT_LPWSTR
-DEFINE_API_PKEY(PKEY_WSD_Types, WSD_Types, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001001); // VT_LPWSTR
-DEFINE_API_PKEY(PKEY_WSD_Scopes, WSD_Scopes, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001002);   // VT_LPWSTR
-DEFINE_API_PKEY(PKEY_WSD_MetadataVersion, WSD_MetadataVersion, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001003); //VT_UI8
-DEFINE_API_PKEY(PKEY_WSD_AppSeqInstanceID, WSD_AppSeqInstanceID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001004);   // VT_UI8
-DEFINE_API_PKEY(PKEY_WSD_AppSeqSessionID, WSD_AppSeqSessionID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001005); // VT_LPWSTR
-DEFINE_API_PKEY(PKEY_WSD_AppSeqMessageNumber, WSD_AppSeqMessageNumber, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001006); // VT_UI8
-DEFINE_API_PKEY(PKEY_WSD_XAddrs, WSD_XAddrs, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00002000); // VT_LPWSTR or VT_VECTOR | VT_LPWSTR
-
-DEFINE_API_PKEY(PKEY_WSD_MetadataClean, WSD_MetadataClean, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000001);   // VT_BOOL
-DEFINE_API_PKEY(PKEY_WSD_ServiceInfo, WSD_ServiceInfo, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000002);   // VT_VECTOR|VT_VARIANT (variants are VT_UNKNOWN)
-
-DEFINE_API_PKEY(PKEY_PUBSVCS_TYPE, PUBSVCS_TYPE, 0xF1B88AD3, 0x109C, 0x4FD2, 0xBA, 0x3F, 0x53, 0x5A, 0x76, 0x5F, 0x82, 0xF4, 0x00005001); // VT_LPWSTR
-DEFINE_API_PKEY(PKEY_PUBSVCS_SCOPE, PUBSVCS_SCOPE, 0x2AE2B567, 0xEECB, 0x4A3E, 0xB7, 0x53, 0x54, 0xC7, 0x25, 0x49, 0x43, 0x66, 0x00005002);   // VT_LPWSTR | VT_VECTOR
-DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA, PUBSVCS_METADATA, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005003); // VT_LPWSTR
-DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA_VERSION, PUBSVCS_METADATA_VERSION, 0xC0C96C15, 0x1823, 0x4E5B, 0x93, 0x48, 0xE8, 0x25, 0x19, 0x92, 0x3F, 0x04, 0x00005004); // VT_UI8
-DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_ALLOWED, PUBSVCS_NETWORK_PROFILES_ALLOWED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005005); // VT_VECTOR | VT_LPWSTR
-DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DENIED, PUBSVCS_NETWORK_PROFILES_DENIED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005006); // VT_VECTOR | VT_LPWSTR
-DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DEFAULT, PUBSVCS_NETWORK_PROFILES_DEFAULT, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005007); // VT_BOOL
-
-// FMTID_PNPX = {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}
-DEFINE_GUID(FMTID_PNPX, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD);
-        // from Discovery messages
-DEFINE_PROPERTYKEY(PKEY_PNPX_GlobalIdentity, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001000);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_Types, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001001);   // VT_LPWSTR | VT_VECTOR
-DEFINE_PROPERTYKEY(PKEY_PNPX_Scopes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001002);   // VT_LPWSTR | VT_VECTOR
-DEFINE_PROPERTYKEY(PKEY_PNPX_XAddrs, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001003);   // VT_LPWSTR | VT_VECTOR
-DEFINE_PROPERTYKEY(PKEY_PNPX_MetadataVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001004);   // VT_UI8
-DEFINE_PROPERTYKEY(PKEY_PNPX_ID, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001005);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_RootProxy, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006);   // VT_BOOL
-
-        // for Directed Discovery
-DEFINE_PROPERTYKEY(PKEY_PNPX_RemoteAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006);   // VT_LPWSTR
-
-        // from ThisModel metadata
-DEFINE_PROPERTYKEY(PKEY_PNPX_Manufacturer, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002000);   // VT_LPWSTR (localizable)
-DEFINE_PROPERTYKEY(PKEY_PNPX_ManufacturerUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002001);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_ModelName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002002);   // VT_LPWSTR (localizable)
-DEFINE_PROPERTYKEY(PKEY_PNPX_ModelNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002003);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_ModelUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002004);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_Upc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002005);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_PresentationUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002006);   // VT_LPWSTR
-        // from ThisDevice metadata
-DEFINE_PROPERTYKEY(PKEY_PNPX_FriendlyName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003000);   // VT_LPWSTR (localizable)
-DEFINE_PROPERTYKEY(PKEY_PNPX_FirmwareVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003001);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_SerialNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003002);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003004);   // VT_LPWSTR | VT_VECTOR
-        // DeviceCategory values
-#define PNPX_DEVICECATEGORY_COMPUTER                            L"Computers"
-#define PNPX_DEVICECATEGORY_INPUTDEVICE                         L"Input"
-#define PNPX_DEVICECATEGORY_PRINTER                             L"Printers"
-#define PNPX_DEVICECATEGORY_SCANNER                             L"Scanners"
-#define PNPX_DEVICECATEGORY_FAX                                 L"FAX"
-#define PNPX_DEVICECATEGORY_MFP                                 L"MFP"
-#define PNPX_DEVICECATEGORY_CAMERA                              L"Cameras"
-#define PNPX_DEVICECATEGORY_STORAGE                             L"Storage"
-#define PNPX_DEVICECATEGORY_NETWORK_INFRASTRUCTURE              L"NetworkInfrastructure"
-#define PNPX_DEVICECATEGORY_DISPLAYS                            L"Displays"
-#define PNPX_DEVICECATEGORY_MULTIMEDIA_DEVICE                   L"MediaDevices"
-#define PNPX_DEVICECATEGORY_GAMING_DEVICE                       L"Gaming"
-#define PNPX_DEVICECATEGORY_TELEPHONE                           L"Phones"
-#define PNPX_DEVICECATEGORY_HOME_AUTOMATION_SYSTEM              L"HomeAutomation"
-#define PNPX_DEVICECATEGORY_HOME_SECURITY_SYSTEM                L"HomeSecurity"
-#define PNPX_DEVICECATEGORY_OTHER                               L"Other"
-DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory_Desc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003005);   // VT_LPWSTR | VT_VECTOR
-
-DEFINE_PROPERTYKEY(PKEY_PNPX_PhysicalAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003006);   // VT_UI1 | VT_VECTOR
-DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceLuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003007);   // VT_UI8
-DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceGuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003008);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_IpAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003009);   // VT_LPWSTR | VT_VECTOR
-        // from Relationship metadata
-DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004000);   // VT_LPWSTR | VT_VECTOR
-DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004001);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceTypes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004002);   // VT_LPWSTR | VT_VECTOR
-        // Association DB PKEYs
-DEFINE_API_PKEY(PKEY_PNPX_Devnode, PnPXDevNode, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000001); // VT_BOOL
-DEFINE_API_PKEY(PKEY_PNPX_AssociationState, AssociationState, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000002); // VT_UINT
-DEFINE_API_PKEY(PKEY_PNPX_AssociatedInstanceId, AssociatedInstanceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000003); // VT_LPWSTR
-        // for Computer Discovery
-DEFINE_PROPERTYKEY(PKEY_PNPX_DomainName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005000);   // VT_LPWSTR
-// Use PKEY_ComputerName (propkey.h) DEFINE_PROPERTYKEY(PKEY_PNPX_MachineName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005001);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_PNPX_ShareName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005002);   // VT_LPWSTR
-
-    // SSDP Provider custom properties
-DEFINE_PROPERTYKEY(PKEY_SSDP_AltLocationInfo, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006000);   // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_SSDP_DevLifeTime, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006001);   // VT_UI4
-DEFINE_PROPERTYKEY(PKEY_SSDP_NetworkInterface, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006002);   // VT_BOOL
-
-// FMTID_PNPXDynamicProperty = {4FC5077E-B686-44BE-93E3-86CAFE368CCD}
-DEFINE_GUID(FMTID_PNPXDynamicProperty, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD);
-
-DEFINE_PROPERTYKEY(PKEY_PNPX_Installable, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000001); // VT_BOOL
-DEFINE_PROPERTYKEY(PKEY_PNPX_Associated, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000002); // VT_BOOL
-// PKEY_PNPX_Installed to be deprecated in Longhorn Server timeframe
-// this PKEY really represents Associated state
-#define PKEY_PNPX_Installed PKEY_PNPX_Associated    // Deprecated! Please use PKEY_PNPX_Associated
-DEFINE_PROPERTYKEY(PKEY_PNPX_CompatibleTypes, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000003); // VT_LPWSTR | VT_VECTOR
-
-    // WNET Provider properties
-DEFINE_PROPERTYKEY(PKEY_WNET_Scope, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000001); // VT_UINT
-DEFINE_PROPERTYKEY(PKEY_WNET_Type, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000002); // VT_UINT
-DEFINE_PROPERTYKEY(PKEY_WNET_DisplayType, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000003); // VT_UINT
-DEFINE_PROPERTYKEY(PKEY_WNET_Usage, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000004); // VT_UINT
-DEFINE_PROPERTYKEY(PKEY_WNET_LocalName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000005); // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_WNET_RemoteName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000006); // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_WNET_Comment, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000007); // VT_LPWSTR
-DEFINE_PROPERTYKEY(PKEY_WNET_Provider, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000008); // VT_LPWSTR
-
-
-    // WCN Provider properties
-
-DEFINE_PROPERTYKEY(PKEY_WCN_Version, 0x88190b80, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000001); // VT_UI1
-DEFINE_PROPERTYKEY(PKEY_WCN_RequestType, 0x88190b81, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000002); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_AuthType, 0x88190b82, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000003); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_EncryptType, 0x88190b83, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000004); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_ConnType, 0x88190b84, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000005); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_ConfigMethods, 0x88190b85, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000006); // VT_INT
-// map WCN DeviceType to PKEY_PNPX_DeviceCategory
-//DEFINE_PROPERTYKEY(PKEY_WCN_DeviceType, 0x88190b86, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000007); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_RfBand, 0x88190b87, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000008); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_AssocState, 0x88190b88, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000009); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_ConfigError, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000a); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_ConfigState, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000b); // VT_UI1
-DEFINE_PROPERTYKEY(PKEY_WCN_DevicePasswordId, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000c); // VT_INT
-DEFINE_PROPERTYKEY(PKEY_WCN_OSVersion, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000d); // VT_UINT
-DEFINE_PROPERTYKEY(PKEY_WCN_VendorExtension, 0x88190b8a, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000e); // VT_UI1 | VT_VECTOR
-DEFINE_PROPERTYKEY(PKEY_WCN_RegistrarType, 0x88190b8b, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000f); // VT_INT
-
-//-----------------------------------------------------------------------------
-// DriverPackage properties
-
-#define PKEY_DriverPackage_Model                PKEY_DrvPkg_Model
-#define PKEY_DriverPackage_VendorWebSite        PKEY_DrvPkg_VendorWebSite
-#define PKEY_DriverPackage_DetailedDescription  PKEY_DrvPkg_DetailedDescription
-#define PKEY_DriverPackage_DocumentationLink    PKEY_DrvPkg_DocumentationLink
-#define PKEY_DriverPackage_Icon                 PKEY_DrvPkg_Icon
-#define PKEY_DriverPackage_BrandingIcon         PKEY_DrvPkg_BrandingIcon
-
-//-----------------------------------------------------------------------------
-// Hardware properties
-
-DEFINE_PROPERTYKEY(PKEY_Hardware_Devinst, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4097);
-
-//  Name:     System.Hardware.DisplayAttribute -- PKEY_Hardware_DisplayAttribute
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 5
-DEFINE_PROPERTYKEY(PKEY_Hardware_DisplayAttribute, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 5);
-
-//  Name:     System.Hardware.DriverDate -- PKEY_Hardware_DriverDate
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 11
-DEFINE_PROPERTYKEY(PKEY_Hardware_DriverDate, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 11);
-
-//  Name:     System.Hardware.DriverProvider -- PKEY_Hardware_DriverProvider
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 10
-DEFINE_PROPERTYKEY(PKEY_Hardware_DriverProvider, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 10);
-
-//  Name:     System.Hardware.DriverVersion -- PKEY_Hardware_DriverVersion
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 9
-DEFINE_PROPERTYKEY(PKEY_Hardware_DriverVersion, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 9);
-
-//  Name:     System.Hardware.Function -- PKEY_Hardware_Function
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4099
-DEFINE_PROPERTYKEY(PKEY_Hardware_Function, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4099);
-
-//  Name:     System.Hardware.Icon -- PKEY_Hardware_Icon
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 3
-DEFINE_PROPERTYKEY(PKEY_Hardware_Icon, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 3);
-
-//  Name:     System.Hardware.Image -- PKEY_Hardware_Image
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4098
-DEFINE_PROPERTYKEY(PKEY_Hardware_Image, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4098);
-
-//  Name:     System.Hardware.Manufacturer -- PKEY_Hardware_Manufacturer
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 6
-DEFINE_PROPERTYKEY(PKEY_Hardware_Manufacturer, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 6);
-
-//  Name:     System.Hardware.Model -- PKEY_Hardware_Model
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 7
-DEFINE_PROPERTYKEY(PKEY_Hardware_Model, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 7);
-
-//  Name:     System.Hardware.Name -- PKEY_Hardware_Name
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 2
-DEFINE_PROPERTYKEY(PKEY_Hardware_Name, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 2);
-
-//  Name:     System.Hardware.SerialNumber -- PKEY_Hardware_SerialNumber
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 8
-DEFINE_PROPERTYKEY(PKEY_Hardware_SerialNumber, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 8);
-
-//  Name:     System.Hardware.ShellAttributes -- PKEY_Hardware_ShellAttributes
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4100
-DEFINE_PROPERTYKEY(PKEY_Hardware_ShellAttributes, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4100);
-
-//  Name:     System.Hardware.Status -- PKEY_Hardware_Status
-//  Type:     Unspecified -- VT_NULL
-//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4096
-DEFINE_PROPERTYKEY(PKEY_Hardware_Status, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4096);
-
-
+#pragma once
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#ifndef DEFINE_API_PKEY
+#include <propkey.h>
+#endif
+
+#include <FunctionDiscoveryKeys_devpkey.h>
+
+// FMTID_FD = {904b03a2-471d-423c-a584-f3483238a146}
+DEFINE_GUID(FMTID_FD, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46);
+DEFINE_API_PKEY(PKEY_FD_Visibility, VisibilityFlags, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000001); //    VT_UINT
+#define FD_Visibility_Default   0
+#define FD_Visibility_Hidden    1
+
+// FMTID_Device = {78C34FC8-104A-4aca-9EA4-524D52996E57}
+DEFINE_GUID(FMTID_Device, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);
+
+DEFINE_API_PKEY(PKEY_Device_NotPresent,     DeviceNotPresent   , 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000002); //    VT_UINT
+DEFINE_API_PKEY(PKEY_Device_QueueSize,      DeviceQueueSize    , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000024); //    VT_UI4
+DEFINE_API_PKEY(PKEY_Device_Status,         DeviceStatus       , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000025); //    VT_LPWSTR
+DEFINE_API_PKEY(PKEY_Device_Comment,        DeviceComment      , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000026); //    VT_LPWSTR
+DEFINE_API_PKEY(PKEY_Device_Model,          DeviceModel        , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000027); //    VT_LPWSTR
+
+//  Name:     System.Device.BIOSVersion -- PKEY_Device_BIOSVersion
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_BSTR.
+//  FormatID: EAEE7F1D-6A33-44D1-9441-5F46DEF23198, 9
+DEFINE_PROPERTYKEY(PKEY_Device_BIOSVersion, 0xEAEE7F1D, 0x6A33, 0x44D1, 0x94, 0x41, 0x5F, 0x46, 0xDE, 0xF2, 0x31, 0x98, 9);
+
+DEFINE_API_PKEY(PKEY_Write_Time,            WriteTime          , 0xf53b7e1c, 0x77e0, 0x4450, 0x8c, 0x5f, 0xa7, 0x6c, 0xc7, 0xfd, 0xe0, 0x58, 0x00000100); //    VT_FILETIME
+
+#ifdef FD_XP
+DEFINE_API_PKEY(PKEY_Device_InstanceId, DeviceInstanceId   , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000100); //    VT_LPWSTR
+#endif
+DEFINE_API_PKEY(PKEY_Device_Interface,  DeviceInterface    , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000101); //    VT_CLSID
+
+DEFINE_API_PKEY(PKEY_ExposedIIDs,           ExposedIIDs       , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003002); //  VT_VECTOR | VT_CLSID
+DEFINE_API_PKEY(PKEY_ExposedCLSIDs,         ExposedCLSIDs     , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003003); //  VT_VECTOR | VT_CLSID
+DEFINE_API_PKEY(PKEY_InstanceValidatorClsid,InstanceValidator , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003004); // VT_CLSID
+
+// FMTID_WSD = {92506491-FF95-4724-A05A-5B81885A7C92}
+DEFINE_GUID(FMTID_WSD, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92);
+
+DEFINE_API_PKEY(PKEY_WSD_AddressURI, WSD_AddressURI, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001000);   // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_Types, WSD_Types, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001001); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_Scopes, WSD_Scopes, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001002);   // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_MetadataVersion, WSD_MetadataVersion, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001003); //VT_UI8
+DEFINE_API_PKEY(PKEY_WSD_AppSeqInstanceID, WSD_AppSeqInstanceID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001004);   // VT_UI8
+DEFINE_API_PKEY(PKEY_WSD_AppSeqSessionID, WSD_AppSeqSessionID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001005); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_AppSeqMessageNumber, WSD_AppSeqMessageNumber, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001006); // VT_UI8
+DEFINE_API_PKEY(PKEY_WSD_XAddrs, WSD_XAddrs, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00002000); // VT_LPWSTR or VT_VECTOR | VT_LPWSTR
+
+DEFINE_API_PKEY(PKEY_WSD_MetadataClean, WSD_MetadataClean, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000001);   // VT_BOOL
+DEFINE_API_PKEY(PKEY_WSD_ServiceInfo, WSD_ServiceInfo, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000002);   // VT_VECTOR|VT_VARIANT (variants are VT_UNKNOWN)
+
+DEFINE_API_PKEY(PKEY_PUBSVCS_TYPE, PUBSVCS_TYPE, 0xF1B88AD3, 0x109C, 0x4FD2, 0xBA, 0x3F, 0x53, 0x5A, 0x76, 0x5F, 0x82, 0xF4, 0x00005001); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_SCOPE, PUBSVCS_SCOPE, 0x2AE2B567, 0xEECB, 0x4A3E, 0xB7, 0x53, 0x54, 0xC7, 0x25, 0x49, 0x43, 0x66, 0x00005002);   // VT_LPWSTR | VT_VECTOR
+DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA, PUBSVCS_METADATA, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005003); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA_VERSION, PUBSVCS_METADATA_VERSION, 0xC0C96C15, 0x1823, 0x4E5B, 0x93, 0x48, 0xE8, 0x25, 0x19, 0x92, 0x3F, 0x04, 0x00005004); // VT_UI8
+DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_ALLOWED, PUBSVCS_NETWORK_PROFILES_ALLOWED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005005); // VT_VECTOR | VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DENIED, PUBSVCS_NETWORK_PROFILES_DENIED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005006); // VT_VECTOR | VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DEFAULT, PUBSVCS_NETWORK_PROFILES_DEFAULT, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005007); // VT_BOOL
+
+// FMTID_PNPX = {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}
+DEFINE_GUID(FMTID_PNPX, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD);
+        // from Discovery messages
+DEFINE_PROPERTYKEY(PKEY_PNPX_GlobalIdentity, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001000);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_Types, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001001);   // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_Scopes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001002);   // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_XAddrs, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001003);   // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_MetadataVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001004);   // VT_UI8
+DEFINE_PROPERTYKEY(PKEY_PNPX_ID, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001005);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_RootProxy, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006);   // VT_BOOL
+
+        // for Directed Discovery
+DEFINE_PROPERTYKEY(PKEY_PNPX_RemoteAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006);   // VT_LPWSTR
+
+        // from ThisModel metadata
+DEFINE_PROPERTYKEY(PKEY_PNPX_Manufacturer, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002000);   // VT_LPWSTR (localizable)
+DEFINE_PROPERTYKEY(PKEY_PNPX_ManufacturerUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002001);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ModelName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002002);   // VT_LPWSTR (localizable)
+DEFINE_PROPERTYKEY(PKEY_PNPX_ModelNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002003);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ModelUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002004);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_Upc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002005);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_PresentationUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002006);   // VT_LPWSTR
+        // from ThisDevice metadata
+DEFINE_PROPERTYKEY(PKEY_PNPX_FriendlyName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003000);   // VT_LPWSTR (localizable)
+DEFINE_PROPERTYKEY(PKEY_PNPX_FirmwareVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003001);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_SerialNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003002);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003004);   // VT_LPWSTR | VT_VECTOR
+        // DeviceCategory values
+#define PNPX_DEVICECATEGORY_COMPUTER                            L"Computers"
+#define PNPX_DEVICECATEGORY_INPUTDEVICE                         L"Input"
+#define PNPX_DEVICECATEGORY_PRINTER                             L"Printers"
+#define PNPX_DEVICECATEGORY_SCANNER                             L"Scanners"
+#define PNPX_DEVICECATEGORY_FAX                                 L"FAX"
+#define PNPX_DEVICECATEGORY_MFP                                 L"MFP"
+#define PNPX_DEVICECATEGORY_CAMERA                              L"Cameras"
+#define PNPX_DEVICECATEGORY_STORAGE                             L"Storage"
+#define PNPX_DEVICECATEGORY_NETWORK_INFRASTRUCTURE              L"NetworkInfrastructure"
+#define PNPX_DEVICECATEGORY_DISPLAYS                            L"Displays"
+#define PNPX_DEVICECATEGORY_MULTIMEDIA_DEVICE                   L"MediaDevices"
+#define PNPX_DEVICECATEGORY_GAMING_DEVICE                       L"Gaming"
+#define PNPX_DEVICECATEGORY_TELEPHONE                           L"Phones"
+#define PNPX_DEVICECATEGORY_HOME_AUTOMATION_SYSTEM              L"HomeAutomation"
+#define PNPX_DEVICECATEGORY_HOME_SECURITY_SYSTEM                L"HomeSecurity"
+#define PNPX_DEVICECATEGORY_OTHER                               L"Other"
+DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory_Desc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003005);   // VT_LPWSTR | VT_VECTOR
+
+DEFINE_PROPERTYKEY(PKEY_PNPX_PhysicalAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003006);   // VT_UI1 | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceLuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003007);   // VT_UI8
+DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceGuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003008);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_IpAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003009);   // VT_LPWSTR | VT_VECTOR
+        // from Relationship metadata
+DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004000);   // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004001);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceTypes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004002);   // VT_LPWSTR | VT_VECTOR
+        // Association DB PKEYs
+DEFINE_API_PKEY(PKEY_PNPX_Devnode, PnPXDevNode, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000001); // VT_BOOL
+DEFINE_API_PKEY(PKEY_PNPX_AssociationState, AssociationState, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000002); // VT_UINT
+DEFINE_API_PKEY(PKEY_PNPX_AssociatedInstanceId, AssociatedInstanceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000003); // VT_LPWSTR
+        // for Computer Discovery
+DEFINE_PROPERTYKEY(PKEY_PNPX_DomainName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005000);   // VT_LPWSTR
+// Use PKEY_ComputerName (propkey.h) DEFINE_PROPERTYKEY(PKEY_PNPX_MachineName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005001);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ShareName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005002);   // VT_LPWSTR
+
+    // SSDP Provider custom properties
+DEFINE_PROPERTYKEY(PKEY_SSDP_AltLocationInfo, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006000);   // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_SSDP_DevLifeTime, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006001);   // VT_UI4
+DEFINE_PROPERTYKEY(PKEY_SSDP_NetworkInterface, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006002);   // VT_BOOL
+
+// FMTID_PNPXDynamicProperty = {4FC5077E-B686-44BE-93E3-86CAFE368CCD}
+DEFINE_GUID(FMTID_PNPXDynamicProperty, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD);
+
+DEFINE_PROPERTYKEY(PKEY_PNPX_Installable, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000001); // VT_BOOL
+DEFINE_PROPERTYKEY(PKEY_PNPX_Associated, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000002); // VT_BOOL
+// PKEY_PNPX_Installed to be deprecated in Longhorn Server timeframe
+// this PKEY really represents Associated state
+#define PKEY_PNPX_Installed PKEY_PNPX_Associated    // Deprecated! Please use PKEY_PNPX_Associated
+DEFINE_PROPERTYKEY(PKEY_PNPX_CompatibleTypes, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000003); // VT_LPWSTR | VT_VECTOR
+
+    // WNET Provider properties
+DEFINE_PROPERTYKEY(PKEY_WNET_Scope, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000001); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_Type, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000002); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_DisplayType, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000003); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_Usage, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000004); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_LocalName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000005); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_WNET_RemoteName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000006); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_WNET_Comment, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000007); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_WNET_Provider, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000008); // VT_LPWSTR
+
+
+    // WCN Provider properties
+
+DEFINE_PROPERTYKEY(PKEY_WCN_Version, 0x88190b80, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000001); // VT_UI1
+DEFINE_PROPERTYKEY(PKEY_WCN_RequestType, 0x88190b81, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000002); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_AuthType, 0x88190b82, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000003); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_EncryptType, 0x88190b83, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000004); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConnType, 0x88190b84, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000005); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConfigMethods, 0x88190b85, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000006); // VT_INT
+// map WCN DeviceType to PKEY_PNPX_DeviceCategory
+//DEFINE_PROPERTYKEY(PKEY_WCN_DeviceType, 0x88190b86, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000007); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_RfBand, 0x88190b87, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000008); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_AssocState, 0x88190b88, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000009); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConfigError, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000a); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConfigState, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000b); // VT_UI1
+DEFINE_PROPERTYKEY(PKEY_WCN_DevicePasswordId, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000c); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_OSVersion, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000d); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WCN_VendorExtension, 0x88190b8a, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000e); // VT_UI1 | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_WCN_RegistrarType, 0x88190b8b, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000f); // VT_INT
+
+//-----------------------------------------------------------------------------
+// DriverPackage properties
+
+#define PKEY_DriverPackage_Model                PKEY_DrvPkg_Model
+#define PKEY_DriverPackage_VendorWebSite        PKEY_DrvPkg_VendorWebSite
+#define PKEY_DriverPackage_DetailedDescription  PKEY_DrvPkg_DetailedDescription
+#define PKEY_DriverPackage_DocumentationLink    PKEY_DrvPkg_DocumentationLink
+#define PKEY_DriverPackage_Icon                 PKEY_DrvPkg_Icon
+#define PKEY_DriverPackage_BrandingIcon         PKEY_DrvPkg_BrandingIcon
+
+//-----------------------------------------------------------------------------
+// Hardware properties
+
+DEFINE_PROPERTYKEY(PKEY_Hardware_Devinst, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4097);
+
+//  Name:     System.Hardware.DisplayAttribute -- PKEY_Hardware_DisplayAttribute
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 5
+DEFINE_PROPERTYKEY(PKEY_Hardware_DisplayAttribute, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 5);
+
+//  Name:     System.Hardware.DriverDate -- PKEY_Hardware_DriverDate
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 11
+DEFINE_PROPERTYKEY(PKEY_Hardware_DriverDate, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 11);
+
+//  Name:     System.Hardware.DriverProvider -- PKEY_Hardware_DriverProvider
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 10
+DEFINE_PROPERTYKEY(PKEY_Hardware_DriverProvider, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 10);
+
+//  Name:     System.Hardware.DriverVersion -- PKEY_Hardware_DriverVersion
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 9
+DEFINE_PROPERTYKEY(PKEY_Hardware_DriverVersion, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 9);
+
+//  Name:     System.Hardware.Function -- PKEY_Hardware_Function
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4099
+DEFINE_PROPERTYKEY(PKEY_Hardware_Function, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4099);
+
+//  Name:     System.Hardware.Icon -- PKEY_Hardware_Icon
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 3
+DEFINE_PROPERTYKEY(PKEY_Hardware_Icon, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 3);
+
+//  Name:     System.Hardware.Image -- PKEY_Hardware_Image
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4098
+DEFINE_PROPERTYKEY(PKEY_Hardware_Image, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4098);
+
+//  Name:     System.Hardware.Manufacturer -- PKEY_Hardware_Manufacturer
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 6
+DEFINE_PROPERTYKEY(PKEY_Hardware_Manufacturer, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 6);
+
+//  Name:     System.Hardware.Model -- PKEY_Hardware_Model
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 7
+DEFINE_PROPERTYKEY(PKEY_Hardware_Model, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 7);
+
+//  Name:     System.Hardware.Name -- PKEY_Hardware_Name
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 2
+DEFINE_PROPERTYKEY(PKEY_Hardware_Name, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 2);
+
+//  Name:     System.Hardware.SerialNumber -- PKEY_Hardware_SerialNumber
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 8
+DEFINE_PROPERTYKEY(PKEY_Hardware_SerialNumber, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 8);
+
+//  Name:     System.Hardware.ShellAttributes -- PKEY_Hardware_ShellAttributes
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4100
+DEFINE_PROPERTYKEY(PKEY_Hardware_ShellAttributes, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4100);
+
+//  Name:     System.Hardware.Status -- PKEY_Hardware_Status
+//  Type:     Unspecified -- VT_NULL
+//  FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4096
+DEFINE_PROPERTYKEY(PKEY_Hardware_Status, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4096);
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/ksmedia.h b/portaudio/src/hostapi/wasapi/mingw-include/ksmedia.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/ksmedia.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/ksmedia.h
@@ -417,11 +417,11 @@
 DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196",KSCATEGORY_VIDEO);
 #define KSCATEGORY_VIDEO DEFINE_GUIDNAMED(KSCATEGORY_VIDEO)
 
-/* Added for Vista and later */
-#define STATIC_KSCATEGORY_REALTIME \
-    0xEB115FFCL, 0x10C8, 0x4964, 0x83, 0x1D, 0x6D, 0xCB, 0x02, 0xE6, 0xF2, 0x3F
-DEFINE_GUIDSTRUCT("EB115FFC-10C8-4964-831D-6DCB02E6F23F", KSCATEGORY_REALTIME);
-#define KSCATEGORY_REALTIME DEFINE_GUIDNAMED(KSCATEGORY_REALTIME)
+/* Added for Vista and later */
+#define STATIC_KSCATEGORY_REALTIME \
+    0xEB115FFCL, 0x10C8, 0x4964, 0x83, 0x1D, 0x6D, 0xCB, 0x02, 0xE6, 0xF2, 0x3F
+DEFINE_GUIDSTRUCT("EB115FFC-10C8-4964-831D-6DCB02E6F23F", KSCATEGORY_REALTIME);
+#define KSCATEGORY_REALTIME DEFINE_GUIDNAMED(KSCATEGORY_REALTIME)
 
 #define STATIC_KSCATEGORY_TEXT						\
 	0x6994AD06L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/mmdeviceapi.h b/portaudio/src/hostapi/wasapi/mingw-include/mmdeviceapi.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/mmdeviceapi.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/mmdeviceapi.h
@@ -1,929 +1,929 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for mmdeviceapi.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 500
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __mmdeviceapi_h__
-#define __mmdeviceapi_h__
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IMMNotificationClient_FWD_DEFINED__
-#define __IMMNotificationClient_FWD_DEFINED__
-typedef interface IMMNotificationClient IMMNotificationClient;
-#endif 	/* __IMMNotificationClient_FWD_DEFINED__ */
-
-
-#ifndef __IMMDevice_FWD_DEFINED__
-#define __IMMDevice_FWD_DEFINED__
-typedef interface IMMDevice IMMDevice;
-#endif 	/* __IMMDevice_FWD_DEFINED__ */
-
-
-#ifndef __IMMDeviceCollection_FWD_DEFINED__
-#define __IMMDeviceCollection_FWD_DEFINED__
-typedef interface IMMDeviceCollection IMMDeviceCollection;
-#endif 	/* __IMMDeviceCollection_FWD_DEFINED__ */
-
-
-#ifndef __IMMEndpoint_FWD_DEFINED__
-#define __IMMEndpoint_FWD_DEFINED__
-typedef interface IMMEndpoint IMMEndpoint;
-#endif 	/* __IMMEndpoint_FWD_DEFINED__ */
-
-
-#ifndef __IMMDeviceEnumerator_FWD_DEFINED__
-#define __IMMDeviceEnumerator_FWD_DEFINED__
-typedef interface IMMDeviceEnumerator IMMDeviceEnumerator;
-#endif 	/* __IMMDeviceEnumerator_FWD_DEFINED__ */
-
-
-#ifndef __IMMDeviceActivator_FWD_DEFINED__
-#define __IMMDeviceActivator_FWD_DEFINED__
-typedef interface IMMDeviceActivator IMMDeviceActivator;
-#endif 	/* __IMMDeviceActivator_FWD_DEFINED__ */
-
-
-#ifndef __MMDeviceEnumerator_FWD_DEFINED__
-#define __MMDeviceEnumerator_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class MMDeviceEnumerator MMDeviceEnumerator;
-#else
-typedef struct MMDeviceEnumerator MMDeviceEnumerator;
-#endif /* __cplusplus */
-
-#endif 	/* __MMDeviceEnumerator_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "unknwn.h"
-#include "propsys.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_mmdeviceapi_0000_0000 */
-/* [local] */ 
-
-#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
-#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)
-#define DEVICE_STATE_ACTIVE      0x00000001
-#define DEVICE_STATE_DISABLED    0x00000002
-#define DEVICE_STATE_NOTPRESENT  0x00000004
-#define DEVICE_STATE_UNPLUGGED   0x00000008
-#define DEVICE_STATEMASK_ALL     0x0000000f
-#ifdef DEFINE_PROPERTYKEY
-#undef DEFINE_PROPERTYKEY
-#endif
-#ifdef INITGUID
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
-#else
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
-#endif // INITGUID
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0); 
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1); 
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2);
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3);
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4);
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5);
-#define ENDPOINT_SYSFX_ENABLED          0x00000000  // System Effects are enabled.
-#define ENDPOINT_SYSFX_DISABLED         0x00000001  // System Effects are disabled.
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6);
-DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat, 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0); 
-typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS
-    {
-    DWORD cbDirectXAudioActivationParams;
-    GUID guidAudioSession;
-    DWORD dwAudioStreamFlags;
-    } 	DIRECTX_AUDIO_ACTIVATION_PARAMS;
-
-typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS *PDIRECTX_AUDIO_ACTIVATION_PARAMS;
-
-typedef /* [public][public][public][public][public] */ 
-enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001
-    {	eRender	= 0,
-	eCapture	= ( eRender + 1 ) ,
-	eAll	= ( eCapture + 1 ) ,
-	EDataFlow_enum_count	= ( eAll + 1 ) 
-    } 	EDataFlow;
-
-typedef /* [public][public][public] */ 
-enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002
-    {	eConsole	= 0,
-	eMultimedia	= ( eConsole + 1 ) ,
-	eCommunications	= ( eMultimedia + 1 ) ,
-	ERole_enum_count	= ( eCommunications + 1 ) 
-    } 	ERole;
-
-typedef /* [public] */ 
-enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0003
-    {	RemoteNetworkDevice	= 0,
-	Speakers	= ( RemoteNetworkDevice + 1 ) ,
-	LineLevel	= ( Speakers + 1 ) ,
-	Headphones	= ( LineLevel + 1 ) ,
-	Microphone	= ( Headphones + 1 ) ,
-	Headset	= ( Microphone + 1 ) ,
-	Handset	= ( Headset + 1 ) ,
-	UnknownDigitalPassthrough	= ( Handset + 1 ) ,
-	SPDIF	= ( UnknownDigitalPassthrough + 1 ) ,
-	HDMI	= ( SPDIF + 1 ) ,
-	UnknownFormFactor	= ( HDMI + 1 ) 
-    } 	EndpointFormFactor;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IMMNotificationClient_INTERFACE_DEFINED__
-#define __IMMNotificationClient_INTERFACE_DEFINED__
-
-/* interface IMMNotificationClient */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IMMNotificationClient;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("7991EEC9-7E89-4D85-8390-6C703CEC60C0")
-    IMMNotificationClient : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceStateChanged( 
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId,
-            /* [in] */ 
-            __in  DWORD dwNewState) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceAdded( 
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceRemoved( 
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged( 
-            /* [in] */ 
-            __in  EDataFlow flow,
-            /* [in] */ 
-            __in  ERole role,
-            /* [in] */ 
-            __in  LPCWSTR pwstrDefaultDeviceId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnPropertyValueChanged( 
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId,
-            /* [in] */ 
-            __in  const PROPERTYKEY key) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMMNotificationClientVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMMNotificationClient * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMMNotificationClient * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMMNotificationClient * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceStateChanged )( 
-            IMMNotificationClient * This,
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId,
-            /* [in] */ 
-            __in  DWORD dwNewState);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceAdded )( 
-            IMMNotificationClient * This,
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceRemoved )( 
-            IMMNotificationClient * This,
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDefaultDeviceChanged )( 
-            IMMNotificationClient * This,
-            /* [in] */ 
-            __in  EDataFlow flow,
-            /* [in] */ 
-            __in  ERole role,
-            /* [in] */ 
-            __in  LPCWSTR pwstrDefaultDeviceId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnPropertyValueChanged )( 
-            IMMNotificationClient * This,
-            /* [in] */ 
-            __in  LPCWSTR pwstrDeviceId,
-            /* [in] */ 
-            __in  const PROPERTYKEY key);
-        
-        END_INTERFACE
-    } IMMNotificationClientVtbl;
-
-    interface IMMNotificationClient
-    {
-        CONST_VTBL struct IMMNotificationClientVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMMNotificationClient_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMMNotificationClient_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMMNotificationClient_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMMNotificationClient_OnDeviceStateChanged(This,pwstrDeviceId,dwNewState)	\
-    ( (This)->lpVtbl -> OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) ) 
-
-#define IMMNotificationClient_OnDeviceAdded(This,pwstrDeviceId)	\
-    ( (This)->lpVtbl -> OnDeviceAdded(This,pwstrDeviceId) ) 
-
-#define IMMNotificationClient_OnDeviceRemoved(This,pwstrDeviceId)	\
-    ( (This)->lpVtbl -> OnDeviceRemoved(This,pwstrDeviceId) ) 
-
-#define IMMNotificationClient_OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId)	\
-    ( (This)->lpVtbl -> OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) ) 
-
-#define IMMNotificationClient_OnPropertyValueChanged(This,pwstrDeviceId,key)	\
-    ( (This)->lpVtbl -> OnPropertyValueChanged(This,pwstrDeviceId,key) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMMNotificationClient_INTERFACE_DEFINED__ */
-
-
-#ifndef __IMMDevice_INTERFACE_DEFINED__
-#define __IMMDevice_INTERFACE_DEFINED__
-
-/* interface IMMDevice */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IMMDevice;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("D666063F-1587-4E43-81F1-B948E807363F")
-    IMMDevice : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( 
-            /* [in] */ 
-            __in  REFIID iid,
-            /* [in] */ 
-            __in  DWORD dwClsCtx,
-            /* [unique][in] */ 
-            __in_opt  PROPVARIANT *pActivationParams,
-            /* [iid_is][out] */ 
-            __out  void **ppInterface) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OpenPropertyStore( 
-            /* [in] */ 
-            __in  DWORD stgmAccess,
-            /* [out] */ 
-            __out  IPropertyStore **ppProperties) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetId( 
-            /* [out] */ 
-            __deref_out  LPWSTR *ppstrId) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetState( 
-            /* [out] */ 
-            __out  DWORD *pdwState) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMMDeviceVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMMDevice * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMMDevice * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMMDevice * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( 
-            IMMDevice * This,
-            /* [in] */ 
-            __in  REFIID iid,
-            /* [in] */ 
-            __in  DWORD dwClsCtx,
-            /* [unique][in] */ 
-            __in_opt  PROPVARIANT *pActivationParams,
-            /* [iid_is][out] */ 
-            __out  void **ppInterface);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OpenPropertyStore )( 
-            IMMDevice * This,
-            /* [in] */ 
-            __in  DWORD stgmAccess,
-            /* [out] */ 
-            __out  IPropertyStore **ppProperties);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetId )( 
-            IMMDevice * This,
-            /* [out] */ 
-            __deref_out  LPWSTR *ppstrId);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetState )( 
-            IMMDevice * This,
-            /* [out] */ 
-            __out  DWORD *pdwState);
-        
-        END_INTERFACE
-    } IMMDeviceVtbl;
-
-    interface IMMDevice
-    {
-        CONST_VTBL struct IMMDeviceVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMMDevice_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMMDevice_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMMDevice_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppInterface)	\
-    ( (This)->lpVtbl -> Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) ) 
-
-#define IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties)	\
-    ( (This)->lpVtbl -> OpenPropertyStore(This,stgmAccess,ppProperties) ) 
-
-#define IMMDevice_GetId(This,ppstrId)	\
-    ( (This)->lpVtbl -> GetId(This,ppstrId) ) 
-
-#define IMMDevice_GetState(This,pdwState)	\
-    ( (This)->lpVtbl -> GetState(This,pdwState) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMMDevice_INTERFACE_DEFINED__ */
-
-
-#ifndef __IMMDeviceCollection_INTERFACE_DEFINED__
-#define __IMMDeviceCollection_INTERFACE_DEFINED__
-
-/* interface IMMDeviceCollection */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IMMDeviceCollection;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("0BD7A1BE-7A1A-44DB-8397-CC5392387B5E")
-    IMMDeviceCollection : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( 
-            /* [out] */ 
-            __out  UINT *pcDevices) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( 
-            /* [in] */ 
-            __in  UINT nDevice,
-            /* [out] */ 
-            __out  IMMDevice **ppDevice) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMMDeviceCollectionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMMDeviceCollection * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMMDeviceCollection * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMMDeviceCollection * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IMMDeviceCollection * This,
-            /* [out] */ 
-            __out  UINT *pcDevices);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( 
-            IMMDeviceCollection * This,
-            /* [in] */ 
-            __in  UINT nDevice,
-            /* [out] */ 
-            __out  IMMDevice **ppDevice);
-        
-        END_INTERFACE
-    } IMMDeviceCollectionVtbl;
-
-    interface IMMDeviceCollection
-    {
-        CONST_VTBL struct IMMDeviceCollectionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMMDeviceCollection_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMMDeviceCollection_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMMDeviceCollection_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMMDeviceCollection_GetCount(This,pcDevices)	\
-    ( (This)->lpVtbl -> GetCount(This,pcDevices) ) 
-
-#define IMMDeviceCollection_Item(This,nDevice,ppDevice)	\
-    ( (This)->lpVtbl -> Item(This,nDevice,ppDevice) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMMDeviceCollection_INTERFACE_DEFINED__ */
-
-
-#ifndef __IMMEndpoint_INTERFACE_DEFINED__
-#define __IMMEndpoint_INTERFACE_DEFINED__
-
-/* interface IMMEndpoint */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IMMEndpoint;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("1BE09788-6894-4089-8586-9A2A6C265AC5")
-    IMMEndpoint : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( 
-            /* [out] */ 
-            __out  EDataFlow *pDataFlow) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMMEndpointVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMMEndpoint * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMMEndpoint * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMMEndpoint * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( 
-            IMMEndpoint * This,
-            /* [out] */ 
-            __out  EDataFlow *pDataFlow);
-        
-        END_INTERFACE
-    } IMMEndpointVtbl;
-
-    interface IMMEndpoint
-    {
-        CONST_VTBL struct IMMEndpointVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMMEndpoint_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMMEndpoint_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMMEndpoint_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMMEndpoint_GetDataFlow(This,pDataFlow)	\
-    ( (This)->lpVtbl -> GetDataFlow(This,pDataFlow) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMMEndpoint_INTERFACE_DEFINED__ */
-
-
-#ifndef __IMMDeviceEnumerator_INTERFACE_DEFINED__
-#define __IMMDeviceEnumerator_INTERFACE_DEFINED__
-
-/* interface IMMDeviceEnumerator */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IMMDeviceEnumerator;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A95664D2-9614-4F35-A746-DE8DB63617E6")
-    IMMDeviceEnumerator : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumAudioEndpoints( 
-            /* [in] */ 
-            __in  EDataFlow dataFlow,
-            /* [in] */ 
-            __in  DWORD dwStateMask,
-            /* [out] */ 
-            __out  IMMDeviceCollection **ppDevices) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDefaultAudioEndpoint( 
-            /* [in] */ 
-            __in  EDataFlow dataFlow,
-            /* [in] */ 
-            __in  ERole role,
-            /* [out] */ 
-            __out  IMMDevice **ppEndpoint) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevice( 
-            /*  */ 
-            __in  LPCWSTR pwstrId,
-            /* [out] */ 
-            __out  IMMDevice **ppDevice) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterEndpointNotificationCallback( 
-            /* [in] */ 
-            __in  IMMNotificationClient *pClient) = 0;
-        
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterEndpointNotificationCallback( 
-            /* [in] */ 
-            __in  IMMNotificationClient *pClient) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMMDeviceEnumeratorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMMDeviceEnumerator * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMMDeviceEnumerator * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMMDeviceEnumerator * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumAudioEndpoints )( 
-            IMMDeviceEnumerator * This,
-            /* [in] */ 
-            __in  EDataFlow dataFlow,
-            /* [in] */ 
-            __in  DWORD dwStateMask,
-            /* [out] */ 
-            __out  IMMDeviceCollection **ppDevices);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioEndpoint )( 
-            IMMDeviceEnumerator * This,
-            /* [in] */ 
-            __in  EDataFlow dataFlow,
-            /* [in] */ 
-            __in  ERole role,
-            /* [out] */ 
-            __out  IMMDevice **ppEndpoint);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
-            IMMDeviceEnumerator * This,
-            /*  */ 
-            __in  LPCWSTR pwstrId,
-            /* [out] */ 
-            __out  IMMDevice **ppDevice);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterEndpointNotificationCallback )( 
-            IMMDeviceEnumerator * This,
-            /* [in] */ 
-            __in  IMMNotificationClient *pClient);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterEndpointNotificationCallback )( 
-            IMMDeviceEnumerator * This,
-            /* [in] */ 
-            __in  IMMNotificationClient *pClient);
-        
-        END_INTERFACE
-    } IMMDeviceEnumeratorVtbl;
-
-    interface IMMDeviceEnumerator
-    {
-        CONST_VTBL struct IMMDeviceEnumeratorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMMDeviceEnumerator_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMMDeviceEnumerator_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMMDeviceEnumerator_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices)	\
-    ( (This)->lpVtbl -> EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) ) 
-
-#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint)	\
-    ( (This)->lpVtbl -> GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) ) 
-
-#define IMMDeviceEnumerator_GetDevice(This,pwstrId,ppDevice)	\
-    ( (This)->lpVtbl -> GetDevice(This,pwstrId,ppDevice) ) 
-
-#define IMMDeviceEnumerator_RegisterEndpointNotificationCallback(This,pClient)	\
-    ( (This)->lpVtbl -> RegisterEndpointNotificationCallback(This,pClient) ) 
-
-#define IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(This,pClient)	\
-    ( (This)->lpVtbl -> UnregisterEndpointNotificationCallback(This,pClient) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMMDeviceEnumerator_INTERFACE_DEFINED__ */
-
-
-#ifndef __IMMDeviceActivator_INTERFACE_DEFINED__
-#define __IMMDeviceActivator_INTERFACE_DEFINED__
-
-/* interface IMMDeviceActivator */
-/* [unique][helpstring][nonextensible][uuid][local][object] */ 
-
-
-EXTERN_C const IID IID_IMMDeviceActivator;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3B0D0EA4-D0A9-4B0E-935B-09516746FAC0")
-    IMMDeviceActivator : public IUnknown
-    {
-    public:
-        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( 
-            /* [in] */ 
-            __in  REFIID iid,
-            /* [in] */ 
-            __in  IMMDevice *pDevice,
-            /* [in] */ 
-            __in_opt  PROPVARIANT *pActivationParams,
-            /* [iid_is][out] */ 
-            __out  void **ppInterface) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMMDeviceActivatorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMMDeviceActivator * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMMDeviceActivator * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMMDeviceActivator * This);
-        
-        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( 
-            IMMDeviceActivator * This,
-            /* [in] */ 
-            __in  REFIID iid,
-            /* [in] */ 
-            __in  IMMDevice *pDevice,
-            /* [in] */ 
-            __in_opt  PROPVARIANT *pActivationParams,
-            /* [iid_is][out] */ 
-            __out  void **ppInterface);
-        
-        END_INTERFACE
-    } IMMDeviceActivatorVtbl;
-
-    interface IMMDeviceActivator
-    {
-        CONST_VTBL struct IMMDeviceActivatorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMMDeviceActivator_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMMDeviceActivator_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMMDeviceActivator_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMMDeviceActivator_Activate(This,iid,pDevice,pActivationParams,ppInterface)	\
-    ( (This)->lpVtbl -> Activate(This,iid,pDevice,pActivationParams,ppInterface) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMMDeviceActivator_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_mmdeviceapi_0000_0006 */
-/* [local] */ 
-
-typedef /* [public] */ struct __MIDL___MIDL_itf_mmdeviceapi_0000_0006_0001
-    {
-    LPARAM AddPageParam;
-    IMMDevice *pEndpoint;
-    IMMDevice *pPnpInterface;
-    IMMDevice *pPnpDevnode;
-    } 	AudioExtensionParams;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_s_ifspec;
-
-
-#ifndef __MMDeviceAPILib_LIBRARY_DEFINED__
-#define __MMDeviceAPILib_LIBRARY_DEFINED__
-
-/* library MMDeviceAPILib */
-/* [helpstring][version][uuid] */ 
-
-
-EXTERN_C const IID LIBID_MMDeviceAPILib;
-
-EXTERN_C const CLSID CLSID_MMDeviceEnumerator;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("BCDE0395-E52F-467C-8E3D-C4579291692E")
-MMDeviceEnumerator;
-#endif
-#endif /* __MMDeviceAPILib_LIBRARY_DEFINED__ */
-
-/* Additional Prototypes for ALL interfaces */
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for mmdeviceapi.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __mmdeviceapi_h__
+#define __mmdeviceapi_h__
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IMMNotificationClient_FWD_DEFINED__
+#define __IMMNotificationClient_FWD_DEFINED__
+typedef interface IMMNotificationClient IMMNotificationClient;
+#endif 	/* __IMMNotificationClient_FWD_DEFINED__ */
+
+
+#ifndef __IMMDevice_FWD_DEFINED__
+#define __IMMDevice_FWD_DEFINED__
+typedef interface IMMDevice IMMDevice;
+#endif 	/* __IMMDevice_FWD_DEFINED__ */
+
+
+#ifndef __IMMDeviceCollection_FWD_DEFINED__
+#define __IMMDeviceCollection_FWD_DEFINED__
+typedef interface IMMDeviceCollection IMMDeviceCollection;
+#endif 	/* __IMMDeviceCollection_FWD_DEFINED__ */
+
+
+#ifndef __IMMEndpoint_FWD_DEFINED__
+#define __IMMEndpoint_FWD_DEFINED__
+typedef interface IMMEndpoint IMMEndpoint;
+#endif 	/* __IMMEndpoint_FWD_DEFINED__ */
+
+
+#ifndef __IMMDeviceEnumerator_FWD_DEFINED__
+#define __IMMDeviceEnumerator_FWD_DEFINED__
+typedef interface IMMDeviceEnumerator IMMDeviceEnumerator;
+#endif 	/* __IMMDeviceEnumerator_FWD_DEFINED__ */
+
+
+#ifndef __IMMDeviceActivator_FWD_DEFINED__
+#define __IMMDeviceActivator_FWD_DEFINED__
+typedef interface IMMDeviceActivator IMMDeviceActivator;
+#endif 	/* __IMMDeviceActivator_FWD_DEFINED__ */
+
+
+#ifndef __MMDeviceEnumerator_FWD_DEFINED__
+#define __MMDeviceEnumerator_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class MMDeviceEnumerator MMDeviceEnumerator;
+#else
+typedef struct MMDeviceEnumerator MMDeviceEnumerator;
+#endif /* __cplusplus */
+
+#endif 	/* __MMDeviceEnumerator_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "unknwn.h"
+#include "propsys.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_mmdeviceapi_0000_0000 */
+/* [local] */ 
+
+#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
+#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)
+#define DEVICE_STATE_ACTIVE      0x00000001
+#define DEVICE_STATE_DISABLED    0x00000002
+#define DEVICE_STATE_NOTPRESENT  0x00000004
+#define DEVICE_STATE_UNPLUGGED   0x00000008
+#define DEVICE_STATEMASK_ALL     0x0000000f
+#ifdef DEFINE_PROPERTYKEY
+#undef DEFINE_PROPERTYKEY
+#endif
+#ifdef INITGUID
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
+#else
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
+#endif // INITGUID
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0); 
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1); 
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5);
+#define ENDPOINT_SYSFX_ENABLED          0x00000000  // System Effects are enabled.
+#define ENDPOINT_SYSFX_DISABLED         0x00000001  // System Effects are disabled.
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6);
+DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat, 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0); 
+typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS
+    {
+    DWORD cbDirectXAudioActivationParams;
+    GUID guidAudioSession;
+    DWORD dwAudioStreamFlags;
+    } 	DIRECTX_AUDIO_ACTIVATION_PARAMS;
+
+typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS *PDIRECTX_AUDIO_ACTIVATION_PARAMS;
+
+typedef /* [public][public][public][public][public] */ 
+enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001
+    {	eRender	= 0,
+	eCapture	= ( eRender + 1 ) ,
+	eAll	= ( eCapture + 1 ) ,
+	EDataFlow_enum_count	= ( eAll + 1 ) 
+    } 	EDataFlow;
+
+typedef /* [public][public][public] */ 
+enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002
+    {	eConsole	= 0,
+	eMultimedia	= ( eConsole + 1 ) ,
+	eCommunications	= ( eMultimedia + 1 ) ,
+	ERole_enum_count	= ( eCommunications + 1 ) 
+    } 	ERole;
+
+typedef /* [public] */ 
+enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0003
+    {	RemoteNetworkDevice	= 0,
+	Speakers	= ( RemoteNetworkDevice + 1 ) ,
+	LineLevel	= ( Speakers + 1 ) ,
+	Headphones	= ( LineLevel + 1 ) ,
+	Microphone	= ( Headphones + 1 ) ,
+	Headset	= ( Microphone + 1 ) ,
+	Handset	= ( Headset + 1 ) ,
+	UnknownDigitalPassthrough	= ( Handset + 1 ) ,
+	SPDIF	= ( UnknownDigitalPassthrough + 1 ) ,
+	HDMI	= ( SPDIF + 1 ) ,
+	UnknownFormFactor	= ( HDMI + 1 ) 
+    } 	EndpointFormFactor;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IMMNotificationClient_INTERFACE_DEFINED__
+#define __IMMNotificationClient_INTERFACE_DEFINED__
+
+/* interface IMMNotificationClient */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IMMNotificationClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("7991EEC9-7E89-4D85-8390-6C703CEC60C0")
+    IMMNotificationClient : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceStateChanged( 
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId,
+            /* [in] */ 
+            __in  DWORD dwNewState) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceAdded( 
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceRemoved( 
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged( 
+            /* [in] */ 
+            __in  EDataFlow flow,
+            /* [in] */ 
+            __in  ERole role,
+            /* [in] */ 
+            __in  LPCWSTR pwstrDefaultDeviceId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnPropertyValueChanged( 
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId,
+            /* [in] */ 
+            __in  const PROPERTYKEY key) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMMNotificationClientVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMMNotificationClient * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMMNotificationClient * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMMNotificationClient * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceStateChanged )( 
+            IMMNotificationClient * This,
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId,
+            /* [in] */ 
+            __in  DWORD dwNewState);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceAdded )( 
+            IMMNotificationClient * This,
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceRemoved )( 
+            IMMNotificationClient * This,
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDefaultDeviceChanged )( 
+            IMMNotificationClient * This,
+            /* [in] */ 
+            __in  EDataFlow flow,
+            /* [in] */ 
+            __in  ERole role,
+            /* [in] */ 
+            __in  LPCWSTR pwstrDefaultDeviceId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnPropertyValueChanged )( 
+            IMMNotificationClient * This,
+            /* [in] */ 
+            __in  LPCWSTR pwstrDeviceId,
+            /* [in] */ 
+            __in  const PROPERTYKEY key);
+        
+        END_INTERFACE
+    } IMMNotificationClientVtbl;
+
+    interface IMMNotificationClient
+    {
+        CONST_VTBL struct IMMNotificationClientVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMMNotificationClient_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMMNotificationClient_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMMNotificationClient_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMMNotificationClient_OnDeviceStateChanged(This,pwstrDeviceId,dwNewState)	\
+    ( (This)->lpVtbl -> OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) ) 
+
+#define IMMNotificationClient_OnDeviceAdded(This,pwstrDeviceId)	\
+    ( (This)->lpVtbl -> OnDeviceAdded(This,pwstrDeviceId) ) 
+
+#define IMMNotificationClient_OnDeviceRemoved(This,pwstrDeviceId)	\
+    ( (This)->lpVtbl -> OnDeviceRemoved(This,pwstrDeviceId) ) 
+
+#define IMMNotificationClient_OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId)	\
+    ( (This)->lpVtbl -> OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) ) 
+
+#define IMMNotificationClient_OnPropertyValueChanged(This,pwstrDeviceId,key)	\
+    ( (This)->lpVtbl -> OnPropertyValueChanged(This,pwstrDeviceId,key) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMMNotificationClient_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDevice_INTERFACE_DEFINED__
+#define __IMMDevice_INTERFACE_DEFINED__
+
+/* interface IMMDevice */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IMMDevice;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("D666063F-1587-4E43-81F1-B948E807363F")
+    IMMDevice : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( 
+            /* [in] */ 
+            __in  REFIID iid,
+            /* [in] */ 
+            __in  DWORD dwClsCtx,
+            /* [unique][in] */ 
+            __in_opt  PROPVARIANT *pActivationParams,
+            /* [iid_is][out] */ 
+            __out  void **ppInterface) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OpenPropertyStore( 
+            /* [in] */ 
+            __in  DWORD stgmAccess,
+            /* [out] */ 
+            __out  IPropertyStore **ppProperties) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetId( 
+            /* [out] */ 
+            __deref_out  LPWSTR *ppstrId) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetState( 
+            /* [out] */ 
+            __out  DWORD *pdwState) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMMDeviceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMMDevice * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMMDevice * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMMDevice * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( 
+            IMMDevice * This,
+            /* [in] */ 
+            __in  REFIID iid,
+            /* [in] */ 
+            __in  DWORD dwClsCtx,
+            /* [unique][in] */ 
+            __in_opt  PROPVARIANT *pActivationParams,
+            /* [iid_is][out] */ 
+            __out  void **ppInterface);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OpenPropertyStore )( 
+            IMMDevice * This,
+            /* [in] */ 
+            __in  DWORD stgmAccess,
+            /* [out] */ 
+            __out  IPropertyStore **ppProperties);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetId )( 
+            IMMDevice * This,
+            /* [out] */ 
+            __deref_out  LPWSTR *ppstrId);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetState )( 
+            IMMDevice * This,
+            /* [out] */ 
+            __out  DWORD *pdwState);
+        
+        END_INTERFACE
+    } IMMDeviceVtbl;
+
+    interface IMMDevice
+    {
+        CONST_VTBL struct IMMDeviceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMMDevice_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMMDevice_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMMDevice_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppInterface)	\
+    ( (This)->lpVtbl -> Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) ) 
+
+#define IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties)	\
+    ( (This)->lpVtbl -> OpenPropertyStore(This,stgmAccess,ppProperties) ) 
+
+#define IMMDevice_GetId(This,ppstrId)	\
+    ( (This)->lpVtbl -> GetId(This,ppstrId) ) 
+
+#define IMMDevice_GetState(This,pdwState)	\
+    ( (This)->lpVtbl -> GetState(This,pdwState) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMMDevice_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDeviceCollection_INTERFACE_DEFINED__
+#define __IMMDeviceCollection_INTERFACE_DEFINED__
+
+/* interface IMMDeviceCollection */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IMMDeviceCollection;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("0BD7A1BE-7A1A-44DB-8397-CC5392387B5E")
+    IMMDeviceCollection : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( 
+            /* [out] */ 
+            __out  UINT *pcDevices) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( 
+            /* [in] */ 
+            __in  UINT nDevice,
+            /* [out] */ 
+            __out  IMMDevice **ppDevice) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMMDeviceCollectionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMMDeviceCollection * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMMDeviceCollection * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMMDeviceCollection * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IMMDeviceCollection * This,
+            /* [out] */ 
+            __out  UINT *pcDevices);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( 
+            IMMDeviceCollection * This,
+            /* [in] */ 
+            __in  UINT nDevice,
+            /* [out] */ 
+            __out  IMMDevice **ppDevice);
+        
+        END_INTERFACE
+    } IMMDeviceCollectionVtbl;
+
+    interface IMMDeviceCollection
+    {
+        CONST_VTBL struct IMMDeviceCollectionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMMDeviceCollection_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMMDeviceCollection_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMMDeviceCollection_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMMDeviceCollection_GetCount(This,pcDevices)	\
+    ( (This)->lpVtbl -> GetCount(This,pcDevices) ) 
+
+#define IMMDeviceCollection_Item(This,nDevice,ppDevice)	\
+    ( (This)->lpVtbl -> Item(This,nDevice,ppDevice) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMMDeviceCollection_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMEndpoint_INTERFACE_DEFINED__
+#define __IMMEndpoint_INTERFACE_DEFINED__
+
+/* interface IMMEndpoint */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IMMEndpoint;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("1BE09788-6894-4089-8586-9A2A6C265AC5")
+    IMMEndpoint : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( 
+            /* [out] */ 
+            __out  EDataFlow *pDataFlow) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMMEndpointVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMMEndpoint * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMMEndpoint * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMMEndpoint * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( 
+            IMMEndpoint * This,
+            /* [out] */ 
+            __out  EDataFlow *pDataFlow);
+        
+        END_INTERFACE
+    } IMMEndpointVtbl;
+
+    interface IMMEndpoint
+    {
+        CONST_VTBL struct IMMEndpointVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMMEndpoint_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMMEndpoint_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMMEndpoint_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMMEndpoint_GetDataFlow(This,pDataFlow)	\
+    ( (This)->lpVtbl -> GetDataFlow(This,pDataFlow) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMMEndpoint_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDeviceEnumerator_INTERFACE_DEFINED__
+#define __IMMDeviceEnumerator_INTERFACE_DEFINED__
+
+/* interface IMMDeviceEnumerator */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IMMDeviceEnumerator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("A95664D2-9614-4F35-A746-DE8DB63617E6")
+    IMMDeviceEnumerator : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumAudioEndpoints( 
+            /* [in] */ 
+            __in  EDataFlow dataFlow,
+            /* [in] */ 
+            __in  DWORD dwStateMask,
+            /* [out] */ 
+            __out  IMMDeviceCollection **ppDevices) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDefaultAudioEndpoint( 
+            /* [in] */ 
+            __in  EDataFlow dataFlow,
+            /* [in] */ 
+            __in  ERole role,
+            /* [out] */ 
+            __out  IMMDevice **ppEndpoint) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevice( 
+            /*  */ 
+            __in  LPCWSTR pwstrId,
+            /* [out] */ 
+            __out  IMMDevice **ppDevice) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterEndpointNotificationCallback( 
+            /* [in] */ 
+            __in  IMMNotificationClient *pClient) = 0;
+        
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterEndpointNotificationCallback( 
+            /* [in] */ 
+            __in  IMMNotificationClient *pClient) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMMDeviceEnumeratorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMMDeviceEnumerator * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMMDeviceEnumerator * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMMDeviceEnumerator * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumAudioEndpoints )( 
+            IMMDeviceEnumerator * This,
+            /* [in] */ 
+            __in  EDataFlow dataFlow,
+            /* [in] */ 
+            __in  DWORD dwStateMask,
+            /* [out] */ 
+            __out  IMMDeviceCollection **ppDevices);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioEndpoint )( 
+            IMMDeviceEnumerator * This,
+            /* [in] */ 
+            __in  EDataFlow dataFlow,
+            /* [in] */ 
+            __in  ERole role,
+            /* [out] */ 
+            __out  IMMDevice **ppEndpoint);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            IMMDeviceEnumerator * This,
+            /*  */ 
+            __in  LPCWSTR pwstrId,
+            /* [out] */ 
+            __out  IMMDevice **ppDevice);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterEndpointNotificationCallback )( 
+            IMMDeviceEnumerator * This,
+            /* [in] */ 
+            __in  IMMNotificationClient *pClient);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterEndpointNotificationCallback )( 
+            IMMDeviceEnumerator * This,
+            /* [in] */ 
+            __in  IMMNotificationClient *pClient);
+        
+        END_INTERFACE
+    } IMMDeviceEnumeratorVtbl;
+
+    interface IMMDeviceEnumerator
+    {
+        CONST_VTBL struct IMMDeviceEnumeratorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMMDeviceEnumerator_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMMDeviceEnumerator_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMMDeviceEnumerator_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices)	\
+    ( (This)->lpVtbl -> EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) ) 
+
+#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint)	\
+    ( (This)->lpVtbl -> GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) ) 
+
+#define IMMDeviceEnumerator_GetDevice(This,pwstrId,ppDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,pwstrId,ppDevice) ) 
+
+#define IMMDeviceEnumerator_RegisterEndpointNotificationCallback(This,pClient)	\
+    ( (This)->lpVtbl -> RegisterEndpointNotificationCallback(This,pClient) ) 
+
+#define IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(This,pClient)	\
+    ( (This)->lpVtbl -> UnregisterEndpointNotificationCallback(This,pClient) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMMDeviceEnumerator_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDeviceActivator_INTERFACE_DEFINED__
+#define __IMMDeviceActivator_INTERFACE_DEFINED__
+
+/* interface IMMDeviceActivator */
+/* [unique][helpstring][nonextensible][uuid][local][object] */ 
+
+
+EXTERN_C const IID IID_IMMDeviceActivator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("3B0D0EA4-D0A9-4B0E-935B-09516746FAC0")
+    IMMDeviceActivator : public IUnknown
+    {
+    public:
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( 
+            /* [in] */ 
+            __in  REFIID iid,
+            /* [in] */ 
+            __in  IMMDevice *pDevice,
+            /* [in] */ 
+            __in_opt  PROPVARIANT *pActivationParams,
+            /* [iid_is][out] */ 
+            __out  void **ppInterface) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMMDeviceActivatorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMMDeviceActivator * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMMDeviceActivator * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMMDeviceActivator * This);
+        
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( 
+            IMMDeviceActivator * This,
+            /* [in] */ 
+            __in  REFIID iid,
+            /* [in] */ 
+            __in  IMMDevice *pDevice,
+            /* [in] */ 
+            __in_opt  PROPVARIANT *pActivationParams,
+            /* [iid_is][out] */ 
+            __out  void **ppInterface);
+        
+        END_INTERFACE
+    } IMMDeviceActivatorVtbl;
+
+    interface IMMDeviceActivator
+    {
+        CONST_VTBL struct IMMDeviceActivatorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMMDeviceActivator_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMMDeviceActivator_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMMDeviceActivator_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMMDeviceActivator_Activate(This,iid,pDevice,pActivationParams,ppInterface)	\
+    ( (This)->lpVtbl -> Activate(This,iid,pDevice,pActivationParams,ppInterface) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMMDeviceActivator_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_mmdeviceapi_0000_0006 */
+/* [local] */ 
+
+typedef /* [public] */ struct __MIDL___MIDL_itf_mmdeviceapi_0000_0006_0001
+    {
+    LPARAM AddPageParam;
+    IMMDevice *pEndpoint;
+    IMMDevice *pPnpInterface;
+    IMMDevice *pPnpDevnode;
+    } 	AudioExtensionParams;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_s_ifspec;
+
+
+#ifndef __MMDeviceAPILib_LIBRARY_DEFINED__
+#define __MMDeviceAPILib_LIBRARY_DEFINED__
+
+/* library MMDeviceAPILib */
+/* [helpstring][version][uuid] */ 
+
+
+EXTERN_C const IID LIBID_MMDeviceAPILib;
+
+EXTERN_C const CLSID CLSID_MMDeviceEnumerator;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("BCDE0395-E52F-467C-8E3D-C4579291692E")
+MMDeviceEnumerator;
+#endif
+#endif /* __MMDeviceAPILib_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/propidl.h b/portaudio/src/hostapi/wasapi/mingw-include/propidl.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/propidl.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/propidl.h
@@ -1,1275 +1,1275 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for propidl.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data
-    VC __declspec() decoration level:
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 500
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __propidl_h__
-#define __propidl_h__
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define interface struct
-#include "sal.h"
-#include "rpcsal.h"
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */
-
-#ifndef __IPropertyStorage_FWD_DEFINED__
-#define __IPropertyStorage_FWD_DEFINED__
-typedef interface IPropertyStorage IPropertyStorage;
-#endif 	/* __IPropertyStorage_FWD_DEFINED__ */
-
-
-#ifndef __IPropertySetStorage_FWD_DEFINED__
-#define __IPropertySetStorage_FWD_DEFINED__
-typedef interface IPropertySetStorage IPropertySetStorage;
-#endif 	/* __IPropertySetStorage_FWD_DEFINED__ */
-
-
-#ifndef __IEnumSTATPROPSTG_FWD_DEFINED__
-#define __IEnumSTATPROPSTG_FWD_DEFINED__
-typedef interface IEnumSTATPROPSTG IEnumSTATPROPSTG;
-#endif 	/* __IEnumSTATPROPSTG_FWD_DEFINED__ */
-
-
-#ifndef __IEnumSTATPROPSETSTG_FWD_DEFINED__
-#define __IEnumSTATPROPSETSTG_FWD_DEFINED__
-typedef interface IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG;
-#endif 	/* __IEnumSTATPROPSETSTG_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "objidl.h"
-#include "oaidl.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-
-/* interface __MIDL_itf_propidl_0000_0000 */
-/* [local] */
-
-//+-------------------------------------------------------------------------
-//
-//  Microsoft Windows
-//  Copyright (c) Microsoft Corporation. All rights reserved.
-//
-//--------------------------------------------------------------------------
-#if ( _MSC_VER >= 800 )
-#if _MSC_VER >= 1200
-#pragma warning(push)
-#endif
-#pragma warning(disable:4201)    /* Nameless struct/union */
-#pragma warning(disable:4237)    /* obsolete member named 'bool' */
-#endif
-#if ( _MSC_VER >= 1020 )
-#pragma once
-#endif
-
-
-
-typedef struct tagVersionedStream
-    {
-    GUID guidVersion;
-    IStream *pStream;
-    } 	VERSIONEDSTREAM;
-
-typedef struct tagVersionedStream *LPVERSIONEDSTREAM;
-
-
-// Flags for IPropertySetStorage::Create
-#define	PROPSETFLAG_DEFAULT	( 0 )
-
-#define	PROPSETFLAG_NONSIMPLE	( 1 )
-
-#define	PROPSETFLAG_ANSI	( 2 )
-
-//   (This flag is only supported on StgCreatePropStg & StgOpenPropStg
-#define	PROPSETFLAG_UNBUFFERED	( 4 )
-
-//   (This flag causes a version-1 property set to be created
-#define	PROPSETFLAG_CASE_SENSITIVE	( 8 )
-
-
-// Flags for the reservied PID_BEHAVIOR property
-#define	PROPSET_BEHAVIOR_CASE_SENSITIVE	( 1 )
-
-#ifdef MIDL_PASS
-// This is the PROPVARIANT definition for marshaling.
-typedef struct tag_inner_PROPVARIANT PROPVARIANT;
-
-#else
-// This is the standard C layout of the PROPVARIANT.
-typedef struct tagPROPVARIANT PROPVARIANT;
-#endif
-typedef struct tagCAC
-    {
-    ULONG cElems;
-    CHAR *pElems;
-    } 	CAC;
-#ifdef WIN64
-typedef struct tagCAUB
-    {
-    ULONG cElems;
-    UCHAR *pElems;
-    } 	CAUB;
-
-typedef struct tagCAI
-    {
-    ULONG cElems;
-    SHORT *pElems;
-    } 	CAI;
-
-typedef struct tagCAUI
-    {
-    ULONG cElems;
-    USHORT *pElems;
-    } 	CAUI;
-
-typedef struct tagCAL
-    {
-    ULONG cElems;
-    LONG *pElems;
-    } 	CAL;
-
-typedef struct tagCAUL
-    {
-    ULONG cElems;
-    ULONG *pElems;
-    } 	CAUL;
-
-typedef struct tagCAFLT
-    {
-    ULONG cElems;
-    FLOAT *pElems;
-    } 	CAFLT;
-
-typedef struct tagCADBL
-    {
-    ULONG cElems;
-    DOUBLE *pElems;
-    } 	CADBL;
-
-typedef struct tagCACY
-    {
-    ULONG cElems;
-    CY *pElems;
-    } 	CACY;
-
-typedef struct tagCADATE
-    {
-    ULONG cElems;
-    DATE *pElems;
-    } 	CADATE;
-
-typedef struct tagCABSTR
-    {
-    ULONG cElems;
-    BSTR *pElems;
-    } 	CABSTR;
-
-typedef struct tagCABSTRBLOB
-    {
-    ULONG cElems;
-    BSTRBLOB *pElems;
-    } 	CABSTRBLOB;
-
-typedef struct tagCABOOL
-    {
-    ULONG cElems;
-    VARIANT_BOOL *pElems;
-    } 	CABOOL;
-
-typedef struct tagCASCODE
-    {
-    ULONG cElems;
-    SCODE *pElems;
-    } 	CASCODE;
-
-typedef struct tagCAPROPVARIANT
-    {
-    ULONG cElems;
-    PROPVARIANT *pElems;
-    } 	CAPROPVARIANT;
-
-typedef struct tagCAH
-    {
-    ULONG cElems;
-    LARGE_INTEGER *pElems;
-    } 	CAH;
-
-typedef struct tagCAUH
-    {
-    ULONG cElems;
-    ULARGE_INTEGER *pElems;
-    } 	CAUH;
-
-typedef struct tagCALPSTR
-    {
-    ULONG cElems;
-    LPSTR *pElems;
-    } 	CALPSTR;
-
-typedef struct tagCALPWSTR
-    {
-    ULONG cElems;
-    LPWSTR *pElems;
-    } 	CALPWSTR;
-
-typedef struct tagCAFILETIME
-    {
-    ULONG cElems;
-    FILETIME *pElems;
-    } 	CAFILETIME;
-
-typedef struct tagCACLIPDATA
-    {
-    ULONG cElems;
-    CLIPDATA *pElems;
-    } 	CACLIPDATA;
-
-typedef struct tagCACLSID
-    {
-    ULONG cElems;
-    CLSID *pElems;
-    } 	CACLSID;
-#endif
-#ifdef MIDL_PASS
-// This is the PROPVARIANT padding layout for marshaling.
-typedef BYTE PROPVAR_PAD1;
-
-typedef BYTE PROPVAR_PAD2;
-
-typedef ULONG PROPVAR_PAD3;
-
-#else
-// This is the standard C layout of the structure.
-typedef WORD PROPVAR_PAD1;
-typedef WORD PROPVAR_PAD2;
-typedef WORD PROPVAR_PAD3;
-#define tag_inner_PROPVARIANT
-#endif
-#ifdef WIN64
-#ifndef MIDL_PASS
-struct tagPROPVARIANT {
-  union {
-#endif
-struct tag_inner_PROPVARIANT
-    {
-    VARTYPE vt;
-    PROPVAR_PAD1 wReserved1;
-    PROPVAR_PAD2 wReserved2;
-    PROPVAR_PAD3 wReserved3;
-    /* [switch_type] */ union
-        {
-         /* Empty union arm */
-        CHAR cVal;
-        UCHAR bVal;
-        SHORT iVal;
-        USHORT uiVal;
-        LONG lVal;
-        ULONG ulVal;
-        INT intVal;
-        UINT uintVal;
-        LARGE_INTEGER hVal;
-        ULARGE_INTEGER uhVal;
-        FLOAT fltVal;
-        DOUBLE dblVal;
-        VARIANT_BOOL boolVal;
-        //_VARIANT_BOOL bool;
-        SCODE scode;
-        CY cyVal;
-        DATE date;
-        FILETIME filetime;
-        CLSID *puuid;
-        CLIPDATA *pclipdata;
-        BSTR bstrVal;
-        BSTRBLOB bstrblobVal;
-        BLOB blob;
-        LPSTR pszVal;
-        LPWSTR pwszVal;
-        IUnknown *punkVal;
-        IDispatch *pdispVal;
-        IStream *pStream;
-        IStorage *pStorage;
-        LPVERSIONEDSTREAM pVersionedStream;
-        LPSAFEARRAY parray;
-        CAC cac;
-        CAUB caub;
-        CAI cai;
-        CAUI caui;
-        CAL cal;
-        CAUL caul;
-        CAH cah;
-        CAUH cauh;
-        CAFLT caflt;
-        CADBL cadbl;
-        CABOOL cabool;
-        CASCODE cascode;
-        CACY cacy;
-        CADATE cadate;
-        CAFILETIME cafiletime;
-        CACLSID cauuid;
-        CACLIPDATA caclipdata;
-        CABSTR cabstr;
-        CABSTRBLOB cabstrblob;
-        CALPSTR calpstr;
-        CALPWSTR calpwstr;
-        CAPROPVARIANT capropvar;
-        CHAR *pcVal;
-        UCHAR *pbVal;
-        SHORT *piVal;
-        USHORT *puiVal;
-        LONG *plVal;
-        ULONG *pulVal;
-        INT *pintVal;
-        UINT *puintVal;
-        FLOAT *pfltVal;
-        DOUBLE *pdblVal;
-        VARIANT_BOOL *pboolVal;
-        DECIMAL *pdecVal;
-        SCODE *pscode;
-        CY *pcyVal;
-        DATE *pdate;
-        BSTR *pbstrVal;
-        IUnknown **ppunkVal;
-        IDispatch **ppdispVal;
-        LPSAFEARRAY *pparray;
-        PROPVARIANT *pvarVal;
-        } 	;
-    } ;
-#ifndef MIDL_PASS
-    DECIMAL decVal;
-  };
-};
-#endif
-#endif
-#ifdef MIDL_PASS
-// This is the LPPROPVARIANT definition for marshaling.
-typedef struct tag_inner_PROPVARIANT *LPPROPVARIANT;
-
-typedef const PROPVARIANT *REFPROPVARIANT;
-
-#else
-
-// This is the standard C layout of the PROPVARIANT.
-#ifdef WIN64
-typedef struct tagPROPVARIANT * LPPROPVARIANT;
-#endif
-
-#ifndef _REFPROPVARIANT_DEFINED
-#define _REFPROPVARIANT_DEFINED
-#ifdef __cplusplus
-#define REFPROPVARIANT const PROPVARIANT &
-#else
-#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST
-#endif
-#endif
-
-#endif // MIDL_PASS
-
-// Reserved global Property IDs
-#define	PID_DICTIONARY	( 0 )
-
-#define	PID_CODEPAGE	( 0x1 )
-
-#define	PID_FIRST_USABLE	( 0x2 )
-
-#define	PID_FIRST_NAME_DEFAULT	( 0xfff )
-
-#define	PID_LOCALE	( 0x80000000 )
-
-#define	PID_MODIFY_TIME	( 0x80000001 )
-
-#define	PID_SECURITY	( 0x80000002 )
-
-#define	PID_BEHAVIOR	( 0x80000003 )
-
-#define	PID_ILLEGAL	( 0xffffffff )
-
-// Range which is read-only to downlevel implementations
-#define	PID_MIN_READONLY	( 0x80000000 )
-
-#define	PID_MAX_READONLY	( 0xbfffffff )
-
-// Property IDs for the DiscardableInformation Property Set
-
-#define PIDDI_THUMBNAIL          0x00000002L // VT_BLOB
-
-// Property IDs for the SummaryInformation Property Set
-
-#define PIDSI_TITLE               0x00000002L  // VT_LPSTR
-#define PIDSI_SUBJECT             0x00000003L  // VT_LPSTR
-#define PIDSI_AUTHOR              0x00000004L  // VT_LPSTR
-#define PIDSI_KEYWORDS            0x00000005L  // VT_LPSTR
-#define PIDSI_COMMENTS            0x00000006L  // VT_LPSTR
-#define PIDSI_TEMPLATE            0x00000007L  // VT_LPSTR
-#define PIDSI_LASTAUTHOR          0x00000008L  // VT_LPSTR
-#define PIDSI_REVNUMBER           0x00000009L  // VT_LPSTR
-#define PIDSI_EDITTIME            0x0000000aL  // VT_FILETIME (UTC)
-#define PIDSI_LASTPRINTED         0x0000000bL  // VT_FILETIME (UTC)
-#define PIDSI_CREATE_DTM          0x0000000cL  // VT_FILETIME (UTC)
-#define PIDSI_LASTSAVE_DTM        0x0000000dL  // VT_FILETIME (UTC)
-#define PIDSI_PAGECOUNT           0x0000000eL  // VT_I4
-#define PIDSI_WORDCOUNT           0x0000000fL  // VT_I4
-#define PIDSI_CHARCOUNT           0x00000010L  // VT_I4
-#define PIDSI_THUMBNAIL           0x00000011L  // VT_CF
-#define PIDSI_APPNAME             0x00000012L  // VT_LPSTR
-#define PIDSI_DOC_SECURITY        0x00000013L  // VT_I4
-
-// Property IDs for the DocSummaryInformation Property Set
-
-#define PIDDSI_CATEGORY          0x00000002 // VT_LPSTR
-#define PIDDSI_PRESFORMAT        0x00000003 // VT_LPSTR
-#define PIDDSI_BYTECOUNT         0x00000004 // VT_I4
-#define PIDDSI_LINECOUNT         0x00000005 // VT_I4
-#define PIDDSI_PARCOUNT          0x00000006 // VT_I4
-#define PIDDSI_SLIDECOUNT        0x00000007 // VT_I4
-#define PIDDSI_NOTECOUNT         0x00000008 // VT_I4
-#define PIDDSI_HIDDENCOUNT       0x00000009 // VT_I4
-#define PIDDSI_MMCLIPCOUNT       0x0000000A // VT_I4
-#define PIDDSI_SCALE             0x0000000B // VT_BOOL
-#define PIDDSI_HEADINGPAIR       0x0000000C // VT_VARIANT | VT_VECTOR
-#define PIDDSI_DOCPARTS          0x0000000D // VT_LPSTR | VT_VECTOR
-#define PIDDSI_MANAGER           0x0000000E // VT_LPSTR
-#define PIDDSI_COMPANY           0x0000000F // VT_LPSTR
-#define PIDDSI_LINKSDIRTY        0x00000010 // VT_BOOL
-
-
-//  FMTID_MediaFileSummaryInfo - Property IDs
-
-#define PIDMSI_EDITOR                   0x00000002L  // VT_LPWSTR
-#define PIDMSI_SUPPLIER                 0x00000003L  // VT_LPWSTR
-#define PIDMSI_SOURCE                   0x00000004L  // VT_LPWSTR
-#define PIDMSI_SEQUENCE_NO              0x00000005L  // VT_LPWSTR
-#define PIDMSI_PROJECT                  0x00000006L  // VT_LPWSTR
-#define PIDMSI_STATUS                   0x00000007L  // VT_UI4
-#define PIDMSI_OWNER                    0x00000008L  // VT_LPWSTR
-#define PIDMSI_RATING                   0x00000009L  // VT_LPWSTR
-#define PIDMSI_PRODUCTION               0x0000000AL  // VT_FILETIME (UTC)
-#define PIDMSI_COPYRIGHT                0x0000000BL  // VT_LPWSTR
-
-//  PIDMSI_STATUS value definitions
-
-enum PIDMSI_STATUS_VALUE
-    {	PIDMSI_STATUS_NORMAL	= 0,
-	PIDMSI_STATUS_NEW	= ( PIDMSI_STATUS_NORMAL + 1 ) ,
-	PIDMSI_STATUS_PRELIM	= ( PIDMSI_STATUS_NEW + 1 ) ,
-	PIDMSI_STATUS_DRAFT	= ( PIDMSI_STATUS_PRELIM + 1 ) ,
-	PIDMSI_STATUS_INPROGRESS	= ( PIDMSI_STATUS_DRAFT + 1 ) ,
-	PIDMSI_STATUS_EDIT	= ( PIDMSI_STATUS_INPROGRESS + 1 ) ,
-	PIDMSI_STATUS_REVIEW	= ( PIDMSI_STATUS_EDIT + 1 ) ,
-	PIDMSI_STATUS_PROOF	= ( PIDMSI_STATUS_REVIEW + 1 ) ,
-	PIDMSI_STATUS_FINAL	= ( PIDMSI_STATUS_PROOF + 1 ) ,
-	PIDMSI_STATUS_OTHER	= 0x7fff
-    } ;
-#define	PRSPEC_INVALID	( 0xffffffff )
-
-#define	PRSPEC_LPWSTR	( 0 )
-
-#define	PRSPEC_PROPID	( 1 )
-
-#ifdef WIN64
-typedef struct tagPROPSPEC
-    {
-    ULONG ulKind;
-    /* [switch_type] */ union
-        {
-        PROPID propid;
-        LPOLESTR lpwstr;
-         /* Empty union arm */
-        } 	;
-    } 	PROPSPEC;
-
-typedef struct tagSTATPROPSTG
-    {
-    LPOLESTR lpwstrName;
-    PROPID propid;
-    VARTYPE vt;
-    } 	STATPROPSTG;
-#endif
-
-// Macros for parsing the OS Version of the Property Set Header
-#define PROPSETHDR_OSVER_KIND(dwOSVer)      HIWORD( (dwOSVer) )
-#define PROPSETHDR_OSVER_MAJOR(dwOSVer)     LOBYTE(LOWORD( (dwOSVer) ))
-#define PROPSETHDR_OSVER_MINOR(dwOSVer)     HIBYTE(LOWORD( (dwOSVer) ))
-#define PROPSETHDR_OSVERSION_UNKNOWN        0xFFFFFFFF
-#ifdef WIN64
-typedef struct tagSTATPROPSETSTG
-    {
-    FMTID fmtid;
-    CLSID clsid;
-    DWORD grfFlags;
-    FILETIME mtime;
-    FILETIME ctime;
-    FILETIME atime;
-    DWORD dwOSVersion;
-    } 	STATPROPSETSTG;
-#endif
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IPropertyStorage_INTERFACE_DEFINED__
-#define __IPropertyStorage_INTERFACE_DEFINED__
-
-/* interface IPropertyStorage */
-/* [unique][uuid][object] */
-
-
-EXTERN_C const IID IID_IPropertyStorage;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-
-    MIDL_INTERFACE("00000138-0000-0000-C000-000000000046")
-    IPropertyStorage : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ReadMultiple(
-            /* [in] */ ULONG cpspec,
-            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
-            /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[  ]) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE WriteMultiple(
-            /* [in] */ ULONG cpspec,
-            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
-            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[  ],
-            /* [in] */ PROPID propidNameFirst) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE DeleteMultiple(
-            /* [in] */ ULONG cpspec,
-            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ]) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE ReadPropertyNames(
-            /* [in] */ ULONG cpropid,
-            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
-            /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[  ]) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE WritePropertyNames(
-            /* [in] */ ULONG cpropid,
-            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
-            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[  ]) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE DeletePropertyNames(
-            /* [in] */ ULONG cpropid,
-            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ]) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Commit(
-            /* [in] */ DWORD grfCommitFlags) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Revert( void) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Enum(
-            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE SetTimes(
-            /* [in] */ __RPC__in const FILETIME *pctime,
-            /* [in] */ __RPC__in const FILETIME *patime,
-            /* [in] */ __RPC__in const FILETIME *pmtime) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE SetClass(
-            /* [in] */ __RPC__in REFCLSID clsid) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Stat(
-            /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg) = 0;
-
-    };
-
-#else 	/* C style interface */
-
-//    typedef struct IPropertyStorageVtbl
-//    {
-//        BEGIN_INTERFACE
-//
-//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
-//            IPropertyStorage * This,
-//            /* [in] */ __RPC__in REFIID riid,
-//            /* [iid_is][out] */
-//            __RPC__deref_out  void **ppvObject);
-//
-//        ULONG ( STDMETHODCALLTYPE *AddRef )(
-//            IPropertyStorage * This);
-//
-//        ULONG ( STDMETHODCALLTYPE *Release )(
-//            IPropertyStorage * This);
-//
-//        HRESULT ( STDMETHODCALLTYPE *ReadMultiple )(
-//            IPropertyStorage * This,
-//            /* [in] */ ULONG cpspec,
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
-//            /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[  ]);
-//
-//        HRESULT ( STDMETHODCALLTYPE *WriteMultiple )(
-//            IPropertyStorage * This,
-//            /* [in] */ ULONG cpspec,
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[  ],
-//            /* [in] */ PROPID propidNameFirst);
-//
-//        HRESULT ( STDMETHODCALLTYPE *DeleteMultiple )(
-//            IPropertyStorage * This,
-//            /* [in] */ ULONG cpspec,
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ]);
-//
-//        HRESULT ( STDMETHODCALLTYPE *ReadPropertyNames )(
-//            IPropertyStorage * This,
-//            /* [in] */ ULONG cpropid,
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
-//            /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[  ]);
-//
-//        HRESULT ( STDMETHODCALLTYPE *WritePropertyNames )(
-//            IPropertyStorage * This,
-//            /* [in] */ ULONG cpropid,
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[  ]);
-//
-//        HRESULT ( STDMETHODCALLTYPE *DeletePropertyNames )(
-//            IPropertyStorage * This,
-//            /* [in] */ ULONG cpropid,
-//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ]);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Commit )(
-//            IPropertyStorage * This,
-//            /* [in] */ DWORD grfCommitFlags);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Revert )(
-//            IPropertyStorage * This);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Enum )(
-//            IPropertyStorage * This,
-//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);
-//
-//        HRESULT ( STDMETHODCALLTYPE *SetTimes )(
-//            IPropertyStorage * This,
-//            /* [in] */ __RPC__in const FILETIME *pctime,
-//            /* [in] */ __RPC__in const FILETIME *patime,
-//            /* [in] */ __RPC__in const FILETIME *pmtime);
-//
-//        HRESULT ( STDMETHODCALLTYPE *SetClass )(
-//            IPropertyStorage * This,
-//            /* [in] */ __RPC__in REFCLSID clsid);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Stat )(
-//            IPropertyStorage * This,
-//            /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg);
-//
-//        END_INTERFACE
-//    } IPropertyStorageVtbl;
-//
-//    interface IPropertyStorage
-//    {
-//        CONST_VTBL struct IPropertyStorageVtbl *lpVtbl;
-//    };
-
-
-
-#ifdef COBJMACROS
-
-
-#define IPropertyStorage_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-
-#define IPropertyStorage_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) )
-
-#define IPropertyStorage_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) )
-
-
-#define IPropertyStorage_ReadMultiple(This,cpspec,rgpspec,rgpropvar)	\
-    ( (This)->lpVtbl -> ReadMultiple(This,cpspec,rgpspec,rgpropvar) )
-
-#define IPropertyStorage_WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst)	\
-    ( (This)->lpVtbl -> WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) )
-
-#define IPropertyStorage_DeleteMultiple(This,cpspec,rgpspec)	\
-    ( (This)->lpVtbl -> DeleteMultiple(This,cpspec,rgpspec) )
-
-#define IPropertyStorage_ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName)	\
-    ( (This)->lpVtbl -> ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) )
-
-#define IPropertyStorage_WritePropertyNames(This,cpropid,rgpropid,rglpwstrName)	\
-    ( (This)->lpVtbl -> WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) )
-
-#define IPropertyStorage_DeletePropertyNames(This,cpropid,rgpropid)	\
-    ( (This)->lpVtbl -> DeletePropertyNames(This,cpropid,rgpropid) )
-
-#define IPropertyStorage_Commit(This,grfCommitFlags)	\
-    ( (This)->lpVtbl -> Commit(This,grfCommitFlags) )
-
-#define IPropertyStorage_Revert(This)	\
-    ( (This)->lpVtbl -> Revert(This) )
-
-#define IPropertyStorage_Enum(This,ppenum)	\
-    ( (This)->lpVtbl -> Enum(This,ppenum) )
-
-#define IPropertyStorage_SetTimes(This,pctime,patime,pmtime)	\
-    ( (This)->lpVtbl -> SetTimes(This,pctime,patime,pmtime) )
-
-#define IPropertyStorage_SetClass(This,clsid)	\
-    ( (This)->lpVtbl -> SetClass(This,clsid) )
-
-#define IPropertyStorage_Stat(This,pstatpsstg)	\
-    ( (This)->lpVtbl -> Stat(This,pstatpsstg) )
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyStorage_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertySetStorage_INTERFACE_DEFINED__
-#define __IPropertySetStorage_INTERFACE_DEFINED__
-
-/* interface IPropertySetStorage */
-/* [unique][uuid][object] */
-
-typedef /* [unique] */  __RPC_unique_pointer IPropertySetStorage *LPPROPERTYSETSTORAGE;
-
-
-EXTERN_C const IID IID_IPropertySetStorage;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-
-    MIDL_INTERFACE("0000013A-0000-0000-C000-000000000046")
-    IPropertySetStorage : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Create(
-            /* [in] */ __RPC__in REFFMTID rfmtid,
-            /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,
-            /* [in] */ DWORD grfFlags,
-            /* [in] */ DWORD grfMode,
-            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Open(
-            /* [in] */ __RPC__in REFFMTID rfmtid,
-            /* [in] */ DWORD grfMode,
-            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Delete(
-            /* [in] */ __RPC__in REFFMTID rfmtid) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Enum(
-            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;
-
-    };
-
-#else 	/* C style interface */
-
-//    typedef struct IPropertySetStorageVtbl
-//    {
-//        BEGIN_INTERFACE
-//
-//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
-//            IPropertySetStorage * This,
-//            /* [in] */ __RPC__in REFIID riid,
-//            /* [iid_is][out] */
-//            __RPC__deref_out  void **ppvObject);
-//
-//        ULONG ( STDMETHODCALLTYPE *AddRef )(
-//            IPropertySetStorage * This);
-//
-//        ULONG ( STDMETHODCALLTYPE *Release )(
-//            IPropertySetStorage * This);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Create )(
-//            IPropertySetStorage * This,
-//            /* [in] */ __RPC__in REFFMTID rfmtid,
-//            /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,
-//            /* [in] */ DWORD grfFlags,
-//            /* [in] */ DWORD grfMode,
-//            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Open )(
-//            IPropertySetStorage * This,
-//            /* [in] */ __RPC__in REFFMTID rfmtid,
-//            /* [in] */ DWORD grfMode,
-//            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Delete )(
-//            IPropertySetStorage * This,
-//            /* [in] */ __RPC__in REFFMTID rfmtid);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Enum )(
-//            IPropertySetStorage * This,
-//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);
-//
-//        END_INTERFACE
-//    } IPropertySetStorageVtbl;
-//
-//    interface IPropertySetStorage
-//    {
-//        CONST_VTBL struct IPropertySetStorageVtbl *lpVtbl;
-//    };
-
-
-
-#ifdef COBJMACROS
-
-
-#define IPropertySetStorage_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-
-#define IPropertySetStorage_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) )
-
-#define IPropertySetStorage_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) )
-
-
-#define IPropertySetStorage_Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg)	\
-    ( (This)->lpVtbl -> Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg) )
-
-#define IPropertySetStorage_Open(This,rfmtid,grfMode,ppprstg)	\
-    ( (This)->lpVtbl -> Open(This,rfmtid,grfMode,ppprstg) )
-
-#define IPropertySetStorage_Delete(This,rfmtid)	\
-    ( (This)->lpVtbl -> Delete(This,rfmtid) )
-
-#define IPropertySetStorage_Enum(This,ppenum)	\
-    ( (This)->lpVtbl -> Enum(This,ppenum) )
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertySetStorage_INTERFACE_DEFINED__ */
-
-
-#ifndef __IEnumSTATPROPSTG_INTERFACE_DEFINED__
-#define __IEnumSTATPROPSTG_INTERFACE_DEFINED__
-
-/* interface IEnumSTATPROPSTG */
-/* [unique][uuid][object] */
-
-//typedef /* [unique] */  __RPC_unique_pointer IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
-
-
-EXTERN_C const IID IID_IEnumSTATPROPSTG;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-
-    MIDL_INTERFACE("00000139-0000-0000-C000-000000000046")
-    IEnumSTATPROPSTG : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
-            /* [in] */ ULONG celt,
-            /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
-            /* [out] */ ULONG *pceltFetched) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Skip(
-            /* [in] */ ULONG celt) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Clone(
-            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;
-
-    };
-
-#else 	/* C style interface */
-
-//    typedef struct IEnumSTATPROPSTGVtbl
-//    {
-//        BEGIN_INTERFACE
-//
-//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
-//            IEnumSTATPROPSTG * This,
-//            /* [in] */ __RPC__in REFIID riid,
-//            /* [iid_is][out] */
-//            __RPC__deref_out  void **ppvObject);
-//
-//        ULONG ( STDMETHODCALLTYPE *AddRef )(
-//            IEnumSTATPROPSTG * This);
-//
-//        ULONG ( STDMETHODCALLTYPE *Release )(
-//            IEnumSTATPROPSTG * This);
-//
-//        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
-//            IEnumSTATPROPSTG * This,
-//            /* [in] */ ULONG celt,
-//            /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
-//            /* [out] */ ULONG *pceltFetched);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Skip )(
-//            IEnumSTATPROPSTG * This,
-//            /* [in] */ ULONG celt);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Reset )(
-//            IEnumSTATPROPSTG * This);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Clone )(
-//            IEnumSTATPROPSTG * This,
-//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);
-//
-//        END_INTERFACE
-//    } IEnumSTATPROPSTGVtbl;
-//
-//    interface IEnumSTATPROPSTG
-//    {
-//        CONST_VTBL struct IEnumSTATPROPSTGVtbl *lpVtbl;
-//    };
-
-
-
-#ifdef COBJMACROS
-
-
-#define IEnumSTATPROPSTG_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-
-#define IEnumSTATPROPSTG_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) )
-
-#define IEnumSTATPROPSTG_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) )
-
-
-#define IEnumSTATPROPSTG_Next(This,celt,rgelt,pceltFetched)	\
-    ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
-
-#define IEnumSTATPROPSTG_Skip(This,celt)	\
-    ( (This)->lpVtbl -> Skip(This,celt) )
-
-#define IEnumSTATPROPSTG_Reset(This)	\
-    ( (This)->lpVtbl -> Reset(This) )
-
-#define IEnumSTATPROPSTG_Clone(This,ppenum)	\
-    ( (This)->lpVtbl -> Clone(This,ppenum) )
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_RemoteNext_Proxy(
-    IEnumSTATPROPSTG * This,
-    /* [in] */ ULONG celt,
-    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,
-    /* [out] */ __RPC__out ULONG *pceltFetched);
-
-
-void __RPC_STUB IEnumSTATPROPSTG_RemoteNext_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-
-#endif 	/* __IEnumSTATPROPSTG_INTERFACE_DEFINED__ */
-
-
-#ifndef __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__
-#define __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__
-
-/* interface IEnumSTATPROPSETSTG */
-/* [unique][uuid][object] */
-
-typedef /* [unique] */  __RPC_unique_pointer IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
-
-
-EXTERN_C const IID IID_IEnumSTATPROPSETSTG;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-
-    MIDL_INTERFACE("0000013B-0000-0000-C000-000000000046")
-    IEnumSTATPROPSETSTG : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
-            /* [in] */ ULONG celt,
-            /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
-            /* [out] */ ULONG *pceltFetched) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Skip(
-            /* [in] */ ULONG celt) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
-
-        virtual HRESULT STDMETHODCALLTYPE Clone(
-            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;
-
-    };
-
-#else 	/* C style interface */
-
-//    typedef struct IEnumSTATPROPSETSTGVtbl
-//    {
-//        BEGIN_INTERFACE
-//
-//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
-//            IEnumSTATPROPSETSTG * This,
-//            /* [in] */ __RPC__in REFIID riid,
-//            /* [iid_is][out] */
-//            __RPC__deref_out  void **ppvObject);
-//
-//        ULONG ( STDMETHODCALLTYPE *AddRef )(
-//            IEnumSTATPROPSETSTG * This);
-//
-//        ULONG ( STDMETHODCALLTYPE *Release )(
-//            IEnumSTATPROPSETSTG * This);
-//
-//        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
-//            IEnumSTATPROPSETSTG * This,
-//            /* [in] */ ULONG celt,
-//            /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
-//            /* [out] */ ULONG *pceltFetched);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Skip )(
-//            IEnumSTATPROPSETSTG * This,
-//            /* [in] */ ULONG celt);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Reset )(
-//            IEnumSTATPROPSETSTG * This);
-//
-//        HRESULT ( STDMETHODCALLTYPE *Clone )(
-//            IEnumSTATPROPSETSTG * This,
-//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);
-//
-//        END_INTERFACE
-//    } IEnumSTATPROPSETSTGVtbl;
-//
-//    interface IEnumSTATPROPSETSTG
-//    {
-//        CONST_VTBL struct IEnumSTATPROPSETSTGVtbl *lpVtbl;
-//    };
-
-
-
-#ifdef COBJMACROS
-
-
-#define IEnumSTATPROPSETSTG_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-
-#define IEnumSTATPROPSETSTG_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) )
-
-#define IEnumSTATPROPSETSTG_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) )
-
-
-#define IEnumSTATPROPSETSTG_Next(This,celt,rgelt,pceltFetched)	\
-    ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
-
-#define IEnumSTATPROPSETSTG_Skip(This,celt)	\
-    ( (This)->lpVtbl -> Skip(This,celt) )
-
-#define IEnumSTATPROPSETSTG_Reset(This)	\
-    ( (This)->lpVtbl -> Reset(This) )
-
-#define IEnumSTATPROPSETSTG_Clone(This,ppenum)	\
-    ( (This)->lpVtbl -> Clone(This,ppenum) )
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_RemoteNext_Proxy(
-    IEnumSTATPROPSETSTG * This,
-    /* [in] */ ULONG celt,
-    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,
-    /* [out] */ __RPC__out ULONG *pceltFetched);
-
-
-void __RPC_STUB IEnumSTATPROPSETSTG_RemoteNext_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-
-#endif 	/* __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propidl_0000_0004 */
-/* [local] */
-
-typedef /* [unique] */  __RPC_unique_pointer IPropertyStorage *LPPROPERTYSTORAGE;
-
-WINOLEAPI PropVariantCopy ( PROPVARIANT * pvarDest, const PROPVARIANT * pvarSrc );
-WINOLEAPI PropVariantClear ( PROPVARIANT * pvar );
-WINOLEAPI FreePropVariantArray ( ULONG cVariants, PROPVARIANT * rgvars );
-
-#define _PROPVARIANTINIT_DEFINED_
-#   ifdef __cplusplus
-inline void PropVariantInit ( PROPVARIANT * pvar )
-{
-    memset ( pvar, 0, sizeof(PROPVARIANT) );
-}
-#   else
-#   define PropVariantInit(pvar) memset ( (pvar), 0, sizeof(PROPVARIANT) )
-#   endif
-
-
-#ifndef _STGCREATEPROPSTG_DEFINED_
-WINOLEAPI StgCreatePropStg( IUnknown* pUnk, REFFMTID fmtid, const CLSID *pclsid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );
-WINOLEAPI StgOpenPropStg( IUnknown* pUnk, REFFMTID fmtid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );
-WINOLEAPI StgCreatePropSetStg( IStorage *pStorage, DWORD dwReserved, IPropertySetStorage **ppPropSetStg);
-
-#define CCH_MAX_PROPSTG_NAME    31
-__checkReturn WINOLEAPI FmtIdToPropStgName( const FMTID *pfmtid, __out_ecount(CCH_MAX_PROPSTG_NAME+1) LPOLESTR oszName );
-WINOLEAPI PropStgNameToFmtId( __in __nullterminated const LPOLESTR oszName, FMTID *pfmtid );
-#endif
-#ifndef _SERIALIZEDPROPERTYVALUE_DEFINED_
-#define _SERIALIZEDPROPERTYVALUE_DEFINED_
-typedef struct tagSERIALIZEDPROPERTYVALUE		// prop
-{
-    DWORD	dwType;
-    BYTE	rgb[1];
-} SERIALIZEDPROPERTYVALUE;
-#endif
-
-EXTERN_C SERIALIZEDPROPERTYVALUE* __stdcall
-StgConvertVariantToProperty(
-            __in const PROPVARIANT* pvar,
-            USHORT CodePage,
-            __out_bcount_opt(*pcb) SERIALIZEDPROPERTYVALUE* pprop,
-            __inout ULONG* pcb,
-            PROPID pid,
-            __reserved BOOLEAN fReserved,
-            __out_opt ULONG* pcIndirect);
-
-#ifdef __cplusplus
-class PMemoryAllocator;
-
-EXTERN_C BOOLEAN __stdcall
-StgConvertPropertyToVariant(
-            __in const SERIALIZEDPROPERTYVALUE* pprop,
-            USHORT CodePage,
-            __out PROPVARIANT* pvar,
-            __in PMemoryAllocator* pma);
-#endif
-#if _MSC_VER >= 1200
-#pragma warning(pop)
-#else
-#pragma warning(default:4201)    /* Nameless struct/union */
-#pragma warning(default:4237)    /* keywords bool, true, false, etc.. */
-#endif
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_s_ifspec;
-
-/* Additional Prototypes for ALL interfaces */
-
-unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * );
-unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * );
-unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
-void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * );
-
-unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * );
-unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * );
-unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );
-void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * );
-
-unsigned long             __RPC_USER  BSTR_UserSize64(     unsigned long *, unsigned long            , BSTR * );
-unsigned char * __RPC_USER  BSTR_UserMarshal64(  unsigned long *, unsigned char *, BSTR * );
-unsigned char * __RPC_USER  BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * );
-void                      __RPC_USER  BSTR_UserFree64(     unsigned long *, BSTR * );
-
-unsigned long             __RPC_USER  LPSAFEARRAY_UserSize64(     unsigned long *, unsigned long            , LPSAFEARRAY * );
-unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal64(  unsigned long *, unsigned char *, LPSAFEARRAY * );
-unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * );
-void                      __RPC_USER  LPSAFEARRAY_UserFree64(     unsigned long *, LPSAFEARRAY * );
-
-/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Proxy(
-    IEnumSTATPROPSTG * This,
-    /* [in] */ ULONG celt,
-    /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
-    /* [out] */ ULONG *pceltFetched);
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Stub(
-    IEnumSTATPROPSTG * This,
-    /* [in] */ ULONG celt,
-    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,
-    /* [out] */ __RPC__out ULONG *pceltFetched);
-
-/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Proxy(
-    IEnumSTATPROPSETSTG * This,
-    /* [in] */ ULONG celt,
-    /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
-    /* [out] */ ULONG *pceltFetched);
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Stub(
-    IEnumSTATPROPSETSTG * This,
-    /* [in] */ ULONG celt,
-    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,
-    /* [out] */ __RPC__out ULONG *pceltFetched);
-
-
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for propidl.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __propidl_h__
+#define __propidl_h__
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#define interface struct
+#include "sal.h"
+#include "rpcsal.h"
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IPropertyStorage_FWD_DEFINED__
+#define __IPropertyStorage_FWD_DEFINED__
+typedef interface IPropertyStorage IPropertyStorage;
+#endif 	/* __IPropertyStorage_FWD_DEFINED__ */
+
+
+#ifndef __IPropertySetStorage_FWD_DEFINED__
+#define __IPropertySetStorage_FWD_DEFINED__
+typedef interface IPropertySetStorage IPropertySetStorage;
+#endif 	/* __IPropertySetStorage_FWD_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSTG_FWD_DEFINED__
+#define __IEnumSTATPROPSTG_FWD_DEFINED__
+typedef interface IEnumSTATPROPSTG IEnumSTATPROPSTG;
+#endif 	/* __IEnumSTATPROPSTG_FWD_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSETSTG_FWD_DEFINED__
+#define __IEnumSTATPROPSETSTG_FWD_DEFINED__
+typedef interface IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG;
+#endif 	/* __IEnumSTATPROPSETSTG_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "objidl.h"
+#include "oaidl.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_propidl_0000_0000 */
+/* [local] */
+
+//+-------------------------------------------------------------------------
+//
+//  Microsoft Windows
+//  Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//--------------------------------------------------------------------------
+#if ( _MSC_VER >= 800 )
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning(disable:4201)    /* Nameless struct/union */
+#pragma warning(disable:4237)    /* obsolete member named 'bool' */
+#endif
+#if ( _MSC_VER >= 1020 )
+#pragma once
+#endif
+
+
+
+typedef struct tagVersionedStream
+    {
+    GUID guidVersion;
+    IStream *pStream;
+    } 	VERSIONEDSTREAM;
+
+typedef struct tagVersionedStream *LPVERSIONEDSTREAM;
+
+
+// Flags for IPropertySetStorage::Create
+#define	PROPSETFLAG_DEFAULT	( 0 )
+
+#define	PROPSETFLAG_NONSIMPLE	( 1 )
+
+#define	PROPSETFLAG_ANSI	( 2 )
+
+//   (This flag is only supported on StgCreatePropStg & StgOpenPropStg
+#define	PROPSETFLAG_UNBUFFERED	( 4 )
+
+//   (This flag causes a version-1 property set to be created
+#define	PROPSETFLAG_CASE_SENSITIVE	( 8 )
+
+
+// Flags for the reservied PID_BEHAVIOR property
+#define	PROPSET_BEHAVIOR_CASE_SENSITIVE	( 1 )
+
+#ifdef MIDL_PASS
+// This is the PROPVARIANT definition for marshaling.
+typedef struct tag_inner_PROPVARIANT PROPVARIANT;
+
+#else
+// This is the standard C layout of the PROPVARIANT.
+typedef struct tagPROPVARIANT PROPVARIANT;
+#endif
+typedef struct tagCAC
+    {
+    ULONG cElems;
+    CHAR *pElems;
+    } 	CAC;
+#ifdef WIN64
+typedef struct tagCAUB
+    {
+    ULONG cElems;
+    UCHAR *pElems;
+    } 	CAUB;
+
+typedef struct tagCAI
+    {
+    ULONG cElems;
+    SHORT *pElems;
+    } 	CAI;
+
+typedef struct tagCAUI
+    {
+    ULONG cElems;
+    USHORT *pElems;
+    } 	CAUI;
+
+typedef struct tagCAL
+    {
+    ULONG cElems;
+    LONG *pElems;
+    } 	CAL;
+
+typedef struct tagCAUL
+    {
+    ULONG cElems;
+    ULONG *pElems;
+    } 	CAUL;
+
+typedef struct tagCAFLT
+    {
+    ULONG cElems;
+    FLOAT *pElems;
+    } 	CAFLT;
+
+typedef struct tagCADBL
+    {
+    ULONG cElems;
+    DOUBLE *pElems;
+    } 	CADBL;
+
+typedef struct tagCACY
+    {
+    ULONG cElems;
+    CY *pElems;
+    } 	CACY;
+
+typedef struct tagCADATE
+    {
+    ULONG cElems;
+    DATE *pElems;
+    } 	CADATE;
+
+typedef struct tagCABSTR
+    {
+    ULONG cElems;
+    BSTR *pElems;
+    } 	CABSTR;
+
+typedef struct tagCABSTRBLOB
+    {
+    ULONG cElems;
+    BSTRBLOB *pElems;
+    } 	CABSTRBLOB;
+
+typedef struct tagCABOOL
+    {
+    ULONG cElems;
+    VARIANT_BOOL *pElems;
+    } 	CABOOL;
+
+typedef struct tagCASCODE
+    {
+    ULONG cElems;
+    SCODE *pElems;
+    } 	CASCODE;
+
+typedef struct tagCAPROPVARIANT
+    {
+    ULONG cElems;
+    PROPVARIANT *pElems;
+    } 	CAPROPVARIANT;
+
+typedef struct tagCAH
+    {
+    ULONG cElems;
+    LARGE_INTEGER *pElems;
+    } 	CAH;
+
+typedef struct tagCAUH
+    {
+    ULONG cElems;
+    ULARGE_INTEGER *pElems;
+    } 	CAUH;
+
+typedef struct tagCALPSTR
+    {
+    ULONG cElems;
+    LPSTR *pElems;
+    } 	CALPSTR;
+
+typedef struct tagCALPWSTR
+    {
+    ULONG cElems;
+    LPWSTR *pElems;
+    } 	CALPWSTR;
+
+typedef struct tagCAFILETIME
+    {
+    ULONG cElems;
+    FILETIME *pElems;
+    } 	CAFILETIME;
+
+typedef struct tagCACLIPDATA
+    {
+    ULONG cElems;
+    CLIPDATA *pElems;
+    } 	CACLIPDATA;
+
+typedef struct tagCACLSID
+    {
+    ULONG cElems;
+    CLSID *pElems;
+    } 	CACLSID;
+#endif
+#ifdef MIDL_PASS
+// This is the PROPVARIANT padding layout for marshaling.
+typedef BYTE PROPVAR_PAD1;
+
+typedef BYTE PROPVAR_PAD2;
+
+typedef ULONG PROPVAR_PAD3;
+
+#else
+// This is the standard C layout of the structure.
+typedef WORD PROPVAR_PAD1;
+typedef WORD PROPVAR_PAD2;
+typedef WORD PROPVAR_PAD3;
+#define tag_inner_PROPVARIANT
+#endif
+#ifdef WIN64
+#ifndef MIDL_PASS
+struct tagPROPVARIANT {
+  union {
+#endif
+struct tag_inner_PROPVARIANT
+    {
+    VARTYPE vt;
+    PROPVAR_PAD1 wReserved1;
+    PROPVAR_PAD2 wReserved2;
+    PROPVAR_PAD3 wReserved3;
+    /* [switch_type] */ union
+        {
+         /* Empty union arm */
+        CHAR cVal;
+        UCHAR bVal;
+        SHORT iVal;
+        USHORT uiVal;
+        LONG lVal;
+        ULONG ulVal;
+        INT intVal;
+        UINT uintVal;
+        LARGE_INTEGER hVal;
+        ULARGE_INTEGER uhVal;
+        FLOAT fltVal;
+        DOUBLE dblVal;
+        VARIANT_BOOL boolVal;
+        //_VARIANT_BOOL bool;
+        SCODE scode;
+        CY cyVal;
+        DATE date;
+        FILETIME filetime;
+        CLSID *puuid;
+        CLIPDATA *pclipdata;
+        BSTR bstrVal;
+        BSTRBLOB bstrblobVal;
+        BLOB blob;
+        LPSTR pszVal;
+        LPWSTR pwszVal;
+        IUnknown *punkVal;
+        IDispatch *pdispVal;
+        IStream *pStream;
+        IStorage *pStorage;
+        LPVERSIONEDSTREAM pVersionedStream;
+        LPSAFEARRAY parray;
+        CAC cac;
+        CAUB caub;
+        CAI cai;
+        CAUI caui;
+        CAL cal;
+        CAUL caul;
+        CAH cah;
+        CAUH cauh;
+        CAFLT caflt;
+        CADBL cadbl;
+        CABOOL cabool;
+        CASCODE cascode;
+        CACY cacy;
+        CADATE cadate;
+        CAFILETIME cafiletime;
+        CACLSID cauuid;
+        CACLIPDATA caclipdata;
+        CABSTR cabstr;
+        CABSTRBLOB cabstrblob;
+        CALPSTR calpstr;
+        CALPWSTR calpwstr;
+        CAPROPVARIANT capropvar;
+        CHAR *pcVal;
+        UCHAR *pbVal;
+        SHORT *piVal;
+        USHORT *puiVal;
+        LONG *plVal;
+        ULONG *pulVal;
+        INT *pintVal;
+        UINT *puintVal;
+        FLOAT *pfltVal;
+        DOUBLE *pdblVal;
+        VARIANT_BOOL *pboolVal;
+        DECIMAL *pdecVal;
+        SCODE *pscode;
+        CY *pcyVal;
+        DATE *pdate;
+        BSTR *pbstrVal;
+        IUnknown **ppunkVal;
+        IDispatch **ppdispVal;
+        LPSAFEARRAY *pparray;
+        PROPVARIANT *pvarVal;
+        } 	;
+    } ;
+#ifndef MIDL_PASS
+    DECIMAL decVal;
+  };
+};
+#endif
+#endif
+#ifdef MIDL_PASS
+// This is the LPPROPVARIANT definition for marshaling.
+typedef struct tag_inner_PROPVARIANT *LPPROPVARIANT;
+
+typedef const PROPVARIANT *REFPROPVARIANT;
+
+#else
+
+// This is the standard C layout of the PROPVARIANT.
+#ifdef WIN64
+typedef struct tagPROPVARIANT * LPPROPVARIANT;
+#endif
+
+#ifndef _REFPROPVARIANT_DEFINED
+#define _REFPROPVARIANT_DEFINED
+#ifdef __cplusplus
+#define REFPROPVARIANT const PROPVARIANT &
+#else
+#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST
+#endif
+#endif
+
+#endif // MIDL_PASS
+
+// Reserved global Property IDs
+#define	PID_DICTIONARY	( 0 )
+
+#define	PID_CODEPAGE	( 0x1 )
+
+#define	PID_FIRST_USABLE	( 0x2 )
+
+#define	PID_FIRST_NAME_DEFAULT	( 0xfff )
+
+#define	PID_LOCALE	( 0x80000000 )
+
+#define	PID_MODIFY_TIME	( 0x80000001 )
+
+#define	PID_SECURITY	( 0x80000002 )
+
+#define	PID_BEHAVIOR	( 0x80000003 )
+
+#define	PID_ILLEGAL	( 0xffffffff )
+
+// Range which is read-only to downlevel implementations
+#define	PID_MIN_READONLY	( 0x80000000 )
+
+#define	PID_MAX_READONLY	( 0xbfffffff )
+
+// Property IDs for the DiscardableInformation Property Set
+
+#define PIDDI_THUMBNAIL          0x00000002L // VT_BLOB
+
+// Property IDs for the SummaryInformation Property Set
+
+#define PIDSI_TITLE               0x00000002L  // VT_LPSTR
+#define PIDSI_SUBJECT             0x00000003L  // VT_LPSTR
+#define PIDSI_AUTHOR              0x00000004L  // VT_LPSTR
+#define PIDSI_KEYWORDS            0x00000005L  // VT_LPSTR
+#define PIDSI_COMMENTS            0x00000006L  // VT_LPSTR
+#define PIDSI_TEMPLATE            0x00000007L  // VT_LPSTR
+#define PIDSI_LASTAUTHOR          0x00000008L  // VT_LPSTR
+#define PIDSI_REVNUMBER           0x00000009L  // VT_LPSTR
+#define PIDSI_EDITTIME            0x0000000aL  // VT_FILETIME (UTC)
+#define PIDSI_LASTPRINTED         0x0000000bL  // VT_FILETIME (UTC)
+#define PIDSI_CREATE_DTM          0x0000000cL  // VT_FILETIME (UTC)
+#define PIDSI_LASTSAVE_DTM        0x0000000dL  // VT_FILETIME (UTC)
+#define PIDSI_PAGECOUNT           0x0000000eL  // VT_I4
+#define PIDSI_WORDCOUNT           0x0000000fL  // VT_I4
+#define PIDSI_CHARCOUNT           0x00000010L  // VT_I4
+#define PIDSI_THUMBNAIL           0x00000011L  // VT_CF
+#define PIDSI_APPNAME             0x00000012L  // VT_LPSTR
+#define PIDSI_DOC_SECURITY        0x00000013L  // VT_I4
+
+// Property IDs for the DocSummaryInformation Property Set
+
+#define PIDDSI_CATEGORY          0x00000002 // VT_LPSTR
+#define PIDDSI_PRESFORMAT        0x00000003 // VT_LPSTR
+#define PIDDSI_BYTECOUNT         0x00000004 // VT_I4
+#define PIDDSI_LINECOUNT         0x00000005 // VT_I4
+#define PIDDSI_PARCOUNT          0x00000006 // VT_I4
+#define PIDDSI_SLIDECOUNT        0x00000007 // VT_I4
+#define PIDDSI_NOTECOUNT         0x00000008 // VT_I4
+#define PIDDSI_HIDDENCOUNT       0x00000009 // VT_I4
+#define PIDDSI_MMCLIPCOUNT       0x0000000A // VT_I4
+#define PIDDSI_SCALE             0x0000000B // VT_BOOL
+#define PIDDSI_HEADINGPAIR       0x0000000C // VT_VARIANT | VT_VECTOR
+#define PIDDSI_DOCPARTS          0x0000000D // VT_LPSTR | VT_VECTOR
+#define PIDDSI_MANAGER           0x0000000E // VT_LPSTR
+#define PIDDSI_COMPANY           0x0000000F // VT_LPSTR
+#define PIDDSI_LINKSDIRTY        0x00000010 // VT_BOOL
+
+
+//  FMTID_MediaFileSummaryInfo - Property IDs
+
+#define PIDMSI_EDITOR                   0x00000002L  // VT_LPWSTR
+#define PIDMSI_SUPPLIER                 0x00000003L  // VT_LPWSTR
+#define PIDMSI_SOURCE                   0x00000004L  // VT_LPWSTR
+#define PIDMSI_SEQUENCE_NO              0x00000005L  // VT_LPWSTR
+#define PIDMSI_PROJECT                  0x00000006L  // VT_LPWSTR
+#define PIDMSI_STATUS                   0x00000007L  // VT_UI4
+#define PIDMSI_OWNER                    0x00000008L  // VT_LPWSTR
+#define PIDMSI_RATING                   0x00000009L  // VT_LPWSTR
+#define PIDMSI_PRODUCTION               0x0000000AL  // VT_FILETIME (UTC)
+#define PIDMSI_COPYRIGHT                0x0000000BL  // VT_LPWSTR
+
+//  PIDMSI_STATUS value definitions
+
+enum PIDMSI_STATUS_VALUE
+    {	PIDMSI_STATUS_NORMAL	= 0,
+	PIDMSI_STATUS_NEW	= ( PIDMSI_STATUS_NORMAL + 1 ) ,
+	PIDMSI_STATUS_PRELIM	= ( PIDMSI_STATUS_NEW + 1 ) ,
+	PIDMSI_STATUS_DRAFT	= ( PIDMSI_STATUS_PRELIM + 1 ) ,
+	PIDMSI_STATUS_INPROGRESS	= ( PIDMSI_STATUS_DRAFT + 1 ) ,
+	PIDMSI_STATUS_EDIT	= ( PIDMSI_STATUS_INPROGRESS + 1 ) ,
+	PIDMSI_STATUS_REVIEW	= ( PIDMSI_STATUS_EDIT + 1 ) ,
+	PIDMSI_STATUS_PROOF	= ( PIDMSI_STATUS_REVIEW + 1 ) ,
+	PIDMSI_STATUS_FINAL	= ( PIDMSI_STATUS_PROOF + 1 ) ,
+	PIDMSI_STATUS_OTHER	= 0x7fff
+    } ;
+#define	PRSPEC_INVALID	( 0xffffffff )
+
+#define	PRSPEC_LPWSTR	( 0 )
+
+#define	PRSPEC_PROPID	( 1 )
+
+#ifdef WIN64
+typedef struct tagPROPSPEC
+    {
+    ULONG ulKind;
+    /* [switch_type] */ union
+        {
+        PROPID propid;
+        LPOLESTR lpwstr;
+         /* Empty union arm */
+        } 	;
+    } 	PROPSPEC;
+
+typedef struct tagSTATPROPSTG
+    {
+    LPOLESTR lpwstrName;
+    PROPID propid;
+    VARTYPE vt;
+    } 	STATPROPSTG;
+#endif
+
+// Macros for parsing the OS Version of the Property Set Header
+#define PROPSETHDR_OSVER_KIND(dwOSVer)      HIWORD( (dwOSVer) )
+#define PROPSETHDR_OSVER_MAJOR(dwOSVer)     LOBYTE(LOWORD( (dwOSVer) ))
+#define PROPSETHDR_OSVER_MINOR(dwOSVer)     HIBYTE(LOWORD( (dwOSVer) ))
+#define PROPSETHDR_OSVERSION_UNKNOWN        0xFFFFFFFF
+#ifdef WIN64
+typedef struct tagSTATPROPSETSTG
+    {
+    FMTID fmtid;
+    CLSID clsid;
+    DWORD grfFlags;
+    FILETIME mtime;
+    FILETIME ctime;
+    FILETIME atime;
+    DWORD dwOSVersion;
+    } 	STATPROPSETSTG;
+#endif
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IPropertyStorage_INTERFACE_DEFINED__
+#define __IPropertyStorage_INTERFACE_DEFINED__
+
+/* interface IPropertyStorage */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IPropertyStorage;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+    MIDL_INTERFACE("00000138-0000-0000-C000-000000000046")
+    IPropertyStorage : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE ReadMultiple(
+            /* [in] */ ULONG cpspec,
+            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
+            /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[  ]) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE WriteMultiple(
+            /* [in] */ ULONG cpspec,
+            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
+            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[  ],
+            /* [in] */ PROPID propidNameFirst) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE DeleteMultiple(
+            /* [in] */ ULONG cpspec,
+            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ]) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE ReadPropertyNames(
+            /* [in] */ ULONG cpropid,
+            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
+            /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[  ]) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE WritePropertyNames(
+            /* [in] */ ULONG cpropid,
+            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
+            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[  ]) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE DeletePropertyNames(
+            /* [in] */ ULONG cpropid,
+            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ]) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Commit(
+            /* [in] */ DWORD grfCommitFlags) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Revert( void) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Enum(
+            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE SetTimes(
+            /* [in] */ __RPC__in const FILETIME *pctime,
+            /* [in] */ __RPC__in const FILETIME *patime,
+            /* [in] */ __RPC__in const FILETIME *pmtime) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE SetClass(
+            /* [in] */ __RPC__in REFCLSID clsid) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Stat(
+            /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg) = 0;
+
+    };
+
+#else 	/* C style interface */
+
+//    typedef struct IPropertyStorageVtbl
+//    {
+//        BEGIN_INTERFACE
+//
+//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+//            IPropertyStorage * This,
+//            /* [in] */ __RPC__in REFIID riid,
+//            /* [iid_is][out] */
+//            __RPC__deref_out  void **ppvObject);
+//
+//        ULONG ( STDMETHODCALLTYPE *AddRef )(
+//            IPropertyStorage * This);
+//
+//        ULONG ( STDMETHODCALLTYPE *Release )(
+//            IPropertyStorage * This);
+//
+//        HRESULT ( STDMETHODCALLTYPE *ReadMultiple )(
+//            IPropertyStorage * This,
+//            /* [in] */ ULONG cpspec,
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
+//            /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[  ]);
+//
+//        HRESULT ( STDMETHODCALLTYPE *WriteMultiple )(
+//            IPropertyStorage * This,
+//            /* [in] */ ULONG cpspec,
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ],
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[  ],
+//            /* [in] */ PROPID propidNameFirst);
+//
+//        HRESULT ( STDMETHODCALLTYPE *DeleteMultiple )(
+//            IPropertyStorage * This,
+//            /* [in] */ ULONG cpspec,
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[  ]);
+//
+//        HRESULT ( STDMETHODCALLTYPE *ReadPropertyNames )(
+//            IPropertyStorage * This,
+//            /* [in] */ ULONG cpropid,
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
+//            /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[  ]);
+//
+//        HRESULT ( STDMETHODCALLTYPE *WritePropertyNames )(
+//            IPropertyStorage * This,
+//            /* [in] */ ULONG cpropid,
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ],
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[  ]);
+//
+//        HRESULT ( STDMETHODCALLTYPE *DeletePropertyNames )(
+//            IPropertyStorage * This,
+//            /* [in] */ ULONG cpropid,
+//            /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[  ]);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Commit )(
+//            IPropertyStorage * This,
+//            /* [in] */ DWORD grfCommitFlags);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Revert )(
+//            IPropertyStorage * This);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Enum )(
+//            IPropertyStorage * This,
+//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);
+//
+//        HRESULT ( STDMETHODCALLTYPE *SetTimes )(
+//            IPropertyStorage * This,
+//            /* [in] */ __RPC__in const FILETIME *pctime,
+//            /* [in] */ __RPC__in const FILETIME *patime,
+//            /* [in] */ __RPC__in const FILETIME *pmtime);
+//
+//        HRESULT ( STDMETHODCALLTYPE *SetClass )(
+//            IPropertyStorage * This,
+//            /* [in] */ __RPC__in REFCLSID clsid);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Stat )(
+//            IPropertyStorage * This,
+//            /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg);
+//
+//        END_INTERFACE
+//    } IPropertyStorageVtbl;
+//
+//    interface IPropertyStorage
+//    {
+//        CONST_VTBL struct IPropertyStorageVtbl *lpVtbl;
+//    };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStorage_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyStorage_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyStorage_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyStorage_ReadMultiple(This,cpspec,rgpspec,rgpropvar)	\
+    ( (This)->lpVtbl -> ReadMultiple(This,cpspec,rgpspec,rgpropvar) )
+
+#define IPropertyStorage_WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst)	\
+    ( (This)->lpVtbl -> WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) )
+
+#define IPropertyStorage_DeleteMultiple(This,cpspec,rgpspec)	\
+    ( (This)->lpVtbl -> DeleteMultiple(This,cpspec,rgpspec) )
+
+#define IPropertyStorage_ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName)	\
+    ( (This)->lpVtbl -> ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) )
+
+#define IPropertyStorage_WritePropertyNames(This,cpropid,rgpropid,rglpwstrName)	\
+    ( (This)->lpVtbl -> WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) )
+
+#define IPropertyStorage_DeletePropertyNames(This,cpropid,rgpropid)	\
+    ( (This)->lpVtbl -> DeletePropertyNames(This,cpropid,rgpropid) )
+
+#define IPropertyStorage_Commit(This,grfCommitFlags)	\
+    ( (This)->lpVtbl -> Commit(This,grfCommitFlags) )
+
+#define IPropertyStorage_Revert(This)	\
+    ( (This)->lpVtbl -> Revert(This) )
+
+#define IPropertyStorage_Enum(This,ppenum)	\
+    ( (This)->lpVtbl -> Enum(This,ppenum) )
+
+#define IPropertyStorage_SetTimes(This,pctime,patime,pmtime)	\
+    ( (This)->lpVtbl -> SetTimes(This,pctime,patime,pmtime) )
+
+#define IPropertyStorage_SetClass(This,clsid)	\
+    ( (This)->lpVtbl -> SetClass(This,clsid) )
+
+#define IPropertyStorage_Stat(This,pstatpsstg)	\
+    ( (This)->lpVtbl -> Stat(This,pstatpsstg) )
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyStorage_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertySetStorage_INTERFACE_DEFINED__
+#define __IPropertySetStorage_INTERFACE_DEFINED__
+
+/* interface IPropertySetStorage */
+/* [unique][uuid][object] */
+
+typedef /* [unique] */  __RPC_unique_pointer IPropertySetStorage *LPPROPERTYSETSTORAGE;
+
+
+EXTERN_C const IID IID_IPropertySetStorage;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+    MIDL_INTERFACE("0000013A-0000-0000-C000-000000000046")
+    IPropertySetStorage : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Create(
+            /* [in] */ __RPC__in REFFMTID rfmtid,
+            /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,
+            /* [in] */ DWORD grfFlags,
+            /* [in] */ DWORD grfMode,
+            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Open(
+            /* [in] */ __RPC__in REFFMTID rfmtid,
+            /* [in] */ DWORD grfMode,
+            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Delete(
+            /* [in] */ __RPC__in REFFMTID rfmtid) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Enum(
+            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;
+
+    };
+
+#else 	/* C style interface */
+
+//    typedef struct IPropertySetStorageVtbl
+//    {
+//        BEGIN_INTERFACE
+//
+//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+//            IPropertySetStorage * This,
+//            /* [in] */ __RPC__in REFIID riid,
+//            /* [iid_is][out] */
+//            __RPC__deref_out  void **ppvObject);
+//
+//        ULONG ( STDMETHODCALLTYPE *AddRef )(
+//            IPropertySetStorage * This);
+//
+//        ULONG ( STDMETHODCALLTYPE *Release )(
+//            IPropertySetStorage * This);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Create )(
+//            IPropertySetStorage * This,
+//            /* [in] */ __RPC__in REFFMTID rfmtid,
+//            /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,
+//            /* [in] */ DWORD grfFlags,
+//            /* [in] */ DWORD grfMode,
+//            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Open )(
+//            IPropertySetStorage * This,
+//            /* [in] */ __RPC__in REFFMTID rfmtid,
+//            /* [in] */ DWORD grfMode,
+//            /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Delete )(
+//            IPropertySetStorage * This,
+//            /* [in] */ __RPC__in REFFMTID rfmtid);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Enum )(
+//            IPropertySetStorage * This,
+//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);
+//
+//        END_INTERFACE
+//    } IPropertySetStorageVtbl;
+//
+//    interface IPropertySetStorage
+//    {
+//        CONST_VTBL struct IPropertySetStorageVtbl *lpVtbl;
+//    };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertySetStorage_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertySetStorage_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertySetStorage_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertySetStorage_Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg)	\
+    ( (This)->lpVtbl -> Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg) )
+
+#define IPropertySetStorage_Open(This,rfmtid,grfMode,ppprstg)	\
+    ( (This)->lpVtbl -> Open(This,rfmtid,grfMode,ppprstg) )
+
+#define IPropertySetStorage_Delete(This,rfmtid)	\
+    ( (This)->lpVtbl -> Delete(This,rfmtid) )
+
+#define IPropertySetStorage_Enum(This,ppenum)	\
+    ( (This)->lpVtbl -> Enum(This,ppenum) )
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertySetStorage_INTERFACE_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSTG_INTERFACE_DEFINED__
+#define __IEnumSTATPROPSTG_INTERFACE_DEFINED__
+
+/* interface IEnumSTATPROPSTG */
+/* [unique][uuid][object] */
+
+//typedef /* [unique] */  __RPC_unique_pointer IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
+
+
+EXTERN_C const IID IID_IEnumSTATPROPSTG;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+    MIDL_INTERFACE("00000139-0000-0000-C000-000000000046")
+    IEnumSTATPROPSTG : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
+            /* [in] */ ULONG celt,
+            /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
+            /* [out] */ ULONG *pceltFetched) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Skip(
+            /* [in] */ ULONG celt) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Clone(
+            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;
+
+    };
+
+#else 	/* C style interface */
+
+//    typedef struct IEnumSTATPROPSTGVtbl
+//    {
+//        BEGIN_INTERFACE
+//
+//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+//            IEnumSTATPROPSTG * This,
+//            /* [in] */ __RPC__in REFIID riid,
+//            /* [iid_is][out] */
+//            __RPC__deref_out  void **ppvObject);
+//
+//        ULONG ( STDMETHODCALLTYPE *AddRef )(
+//            IEnumSTATPROPSTG * This);
+//
+//        ULONG ( STDMETHODCALLTYPE *Release )(
+//            IEnumSTATPROPSTG * This);
+//
+//        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
+//            IEnumSTATPROPSTG * This,
+//            /* [in] */ ULONG celt,
+//            /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
+//            /* [out] */ ULONG *pceltFetched);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Skip )(
+//            IEnumSTATPROPSTG * This,
+//            /* [in] */ ULONG celt);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Reset )(
+//            IEnumSTATPROPSTG * This);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Clone )(
+//            IEnumSTATPROPSTG * This,
+//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);
+//
+//        END_INTERFACE
+//    } IEnumSTATPROPSTGVtbl;
+//
+//    interface IEnumSTATPROPSTG
+//    {
+//        CONST_VTBL struct IEnumSTATPROPSTGVtbl *lpVtbl;
+//    };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IEnumSTATPROPSTG_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IEnumSTATPROPSTG_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) )
+
+#define IEnumSTATPROPSTG_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) )
+
+
+#define IEnumSTATPROPSTG_Next(This,celt,rgelt,pceltFetched)	\
+    ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
+
+#define IEnumSTATPROPSTG_Skip(This,celt)	\
+    ( (This)->lpVtbl -> Skip(This,celt) )
+
+#define IEnumSTATPROPSTG_Reset(This)	\
+    ( (This)->lpVtbl -> Reset(This) )
+
+#define IEnumSTATPROPSTG_Clone(This,ppenum)	\
+    ( (This)->lpVtbl -> Clone(This,ppenum) )
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_RemoteNext_Proxy(
+    IEnumSTATPROPSTG * This,
+    /* [in] */ ULONG celt,
+    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,
+    /* [out] */ __RPC__out ULONG *pceltFetched);
+
+
+void __RPC_STUB IEnumSTATPROPSTG_RemoteNext_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase);
+
+
+
+#endif 	/* __IEnumSTATPROPSTG_INTERFACE_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__
+#define __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__
+
+/* interface IEnumSTATPROPSETSTG */
+/* [unique][uuid][object] */
+
+typedef /* [unique] */  __RPC_unique_pointer IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
+
+
+EXTERN_C const IID IID_IEnumSTATPROPSETSTG;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+    MIDL_INTERFACE("0000013B-0000-0000-C000-000000000046")
+    IEnumSTATPROPSETSTG : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
+            /* [in] */ ULONG celt,
+            /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
+            /* [out] */ ULONG *pceltFetched) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Skip(
+            /* [in] */ ULONG celt) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+
+        virtual HRESULT STDMETHODCALLTYPE Clone(
+            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;
+
+    };
+
+#else 	/* C style interface */
+
+//    typedef struct IEnumSTATPROPSETSTGVtbl
+//    {
+//        BEGIN_INTERFACE
+//
+//        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+//            IEnumSTATPROPSETSTG * This,
+//            /* [in] */ __RPC__in REFIID riid,
+//            /* [iid_is][out] */
+//            __RPC__deref_out  void **ppvObject);
+//
+//        ULONG ( STDMETHODCALLTYPE *AddRef )(
+//            IEnumSTATPROPSETSTG * This);
+//
+//        ULONG ( STDMETHODCALLTYPE *Release )(
+//            IEnumSTATPROPSETSTG * This);
+//
+//        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
+//            IEnumSTATPROPSETSTG * This,
+//            /* [in] */ ULONG celt,
+//            /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
+//            /* [out] */ ULONG *pceltFetched);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Skip )(
+//            IEnumSTATPROPSETSTG * This,
+//            /* [in] */ ULONG celt);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Reset )(
+//            IEnumSTATPROPSETSTG * This);
+//
+//        HRESULT ( STDMETHODCALLTYPE *Clone )(
+//            IEnumSTATPROPSETSTG * This,
+//            /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);
+//
+//        END_INTERFACE
+//    } IEnumSTATPROPSETSTGVtbl;
+//
+//    interface IEnumSTATPROPSETSTG
+//    {
+//        CONST_VTBL struct IEnumSTATPROPSETSTGVtbl *lpVtbl;
+//    };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IEnumSTATPROPSETSTG_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IEnumSTATPROPSETSTG_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) )
+
+#define IEnumSTATPROPSETSTG_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) )
+
+
+#define IEnumSTATPROPSETSTG_Next(This,celt,rgelt,pceltFetched)	\
+    ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
+
+#define IEnumSTATPROPSETSTG_Skip(This,celt)	\
+    ( (This)->lpVtbl -> Skip(This,celt) )
+
+#define IEnumSTATPROPSETSTG_Reset(This)	\
+    ( (This)->lpVtbl -> Reset(This) )
+
+#define IEnumSTATPROPSETSTG_Clone(This,ppenum)	\
+    ( (This)->lpVtbl -> Clone(This,ppenum) )
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_RemoteNext_Proxy(
+    IEnumSTATPROPSETSTG * This,
+    /* [in] */ ULONG celt,
+    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,
+    /* [out] */ __RPC__out ULONG *pceltFetched);
+
+
+void __RPC_STUB IEnumSTATPROPSETSTG_RemoteNext_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase);
+
+
+
+#endif 	/* __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propidl_0000_0004 */
+/* [local] */
+
+typedef /* [unique] */  __RPC_unique_pointer IPropertyStorage *LPPROPERTYSTORAGE;
+
+WINOLEAPI PropVariantCopy ( PROPVARIANT * pvarDest, const PROPVARIANT * pvarSrc );
+WINOLEAPI PropVariantClear ( PROPVARIANT * pvar );
+WINOLEAPI FreePropVariantArray ( ULONG cVariants, PROPVARIANT * rgvars );
+
+#define _PROPVARIANTINIT_DEFINED_
+#   ifdef __cplusplus
+inline void PropVariantInit ( PROPVARIANT * pvar )
+{
+    memset ( pvar, 0, sizeof(PROPVARIANT) );
+}
+#   else
+#   define PropVariantInit(pvar) memset ( (pvar), 0, sizeof(PROPVARIANT) )
+#   endif
+
+
+#ifndef _STGCREATEPROPSTG_DEFINED_
+WINOLEAPI StgCreatePropStg( IUnknown* pUnk, REFFMTID fmtid, const CLSID *pclsid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );
+WINOLEAPI StgOpenPropStg( IUnknown* pUnk, REFFMTID fmtid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );
+WINOLEAPI StgCreatePropSetStg( IStorage *pStorage, DWORD dwReserved, IPropertySetStorage **ppPropSetStg);
+
+#define CCH_MAX_PROPSTG_NAME    31
+__checkReturn WINOLEAPI FmtIdToPropStgName( const FMTID *pfmtid, __out_ecount(CCH_MAX_PROPSTG_NAME+1) LPOLESTR oszName );
+WINOLEAPI PropStgNameToFmtId( __in __nullterminated const LPOLESTR oszName, FMTID *pfmtid );
+#endif
+#ifndef _SERIALIZEDPROPERTYVALUE_DEFINED_
+#define _SERIALIZEDPROPERTYVALUE_DEFINED_
+typedef struct tagSERIALIZEDPROPERTYVALUE		// prop
+{
+    DWORD	dwType;
+    BYTE	rgb[1];
+} SERIALIZEDPROPERTYVALUE;
+#endif
+
+EXTERN_C SERIALIZEDPROPERTYVALUE* __stdcall
+StgConvertVariantToProperty(
+            __in const PROPVARIANT* pvar,
+            USHORT CodePage,
+            __out_bcount_opt(*pcb) SERIALIZEDPROPERTYVALUE* pprop,
+            __inout ULONG* pcb,
+            PROPID pid,
+            __reserved BOOLEAN fReserved,
+            __out_opt ULONG* pcIndirect);
+
+#ifdef __cplusplus
+class PMemoryAllocator;
+
+EXTERN_C BOOLEAN __stdcall
+StgConvertPropertyToVariant(
+            __in const SERIALIZEDPROPERTYVALUE* pprop,
+            USHORT CodePage,
+            __out PROPVARIANT* pvar,
+            __in PMemoryAllocator* pma);
+#endif
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#else
+#pragma warning(default:4201)    /* Nameless struct/union */
+#pragma warning(default:4237)    /* keywords bool, true, false, etc.. */
+#endif
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * );
+unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
+void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * );
+
+unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * );
+unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * );
+
+unsigned long             __RPC_USER  BSTR_UserSize64(     unsigned long *, unsigned long            , BSTR * );
+unsigned char * __RPC_USER  BSTR_UserMarshal64(  unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER  BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * );
+void                      __RPC_USER  BSTR_UserFree64(     unsigned long *, BSTR * );
+
+unsigned long             __RPC_USER  LPSAFEARRAY_UserSize64(     unsigned long *, unsigned long            , LPSAFEARRAY * );
+unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal64(  unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void                      __RPC_USER  LPSAFEARRAY_UserFree64(     unsigned long *, LPSAFEARRAY * );
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Proxy(
+    IEnumSTATPROPSTG * This,
+    /* [in] */ ULONG celt,
+    /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
+    /* [out] */ ULONG *pceltFetched);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Stub(
+    IEnumSTATPROPSTG * This,
+    /* [in] */ ULONG celt,
+    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,
+    /* [out] */ __RPC__out ULONG *pceltFetched);
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Proxy(
+    IEnumSTATPROPSETSTG * This,
+    /* [in] */ ULONG celt,
+    /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
+    /* [out] */ ULONG *pceltFetched);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Stub(
+    IEnumSTATPROPSETSTG * This,
+    /* [in] */ ULONG celt,
+    /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,
+    /* [out] */ __RPC__out ULONG *pceltFetched);
+
+
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/propkey.h b/portaudio/src/hostapi/wasapi/mingw-include/propkey.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/propkey.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/propkey.h
@@ -1,4274 +1,4274 @@
-//===========================================================================
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//
-//===========================================================================
-
-
-#ifndef _INC_PROPKEY
-#define _INC_PROPKEY
-
-#ifndef DEFINE_API_PKEY
-#define DEFINE_API_PKEY(name, managed_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
-        DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid)
-#endif
-
-#include <propkeydef.h>
-
-#ifndef _WIN32_IE
-#define _WIN32_IE 0x0501
-#else
-#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
-#error _WIN32_IE setting conflicts with _WIN32_WINNT setting
-#endif
-#endif
-
- 
-//-----------------------------------------------------------------------------
-// Audio properties
-
-//  Name:     System.Audio.ChannelCount -- PKEY_Audio_ChannelCount
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 7 (PIDASI_CHANNEL_COUNT)
-//
-//  Indicates the channel count for the audio file.  Values: 1 (mono), 2 (stereo).
-DEFINE_PROPERTYKEY(PKEY_Audio_ChannelCount, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);
-
-// Possible discrete values for PKEY_Audio_ChannelCount are:
-#define AUDIO_CHANNELCOUNT_MONO             1ul
-#define AUDIO_CHANNELCOUNT_STEREO           2ul
-
-//  Name:     System.Audio.Compression -- PKEY_Audio_Compression
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 10 (PIDASI_COMPRESSION)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Audio_Compression, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);
-
-//  Name:     System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 4 (PIDASI_AVG_DATA_RATE)
-//
-//  Indicates the average data rate in Hz for the audio file in "bits per second".
-DEFINE_PROPERTYKEY(PKEY_Audio_EncodingBitrate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
-
-//  Name:     System.Audio.Format -- PKEY_Audio_Format
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_BSTR.
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 2 (PIDASI_FORMAT)
-//
-//  Indicates the format of the audio file.
-DEFINE_PROPERTYKEY(PKEY_Audio_Format, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);
-
-//  Name:     System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C, 100
-DEFINE_PROPERTYKEY(PKEY_Audio_IsVariableBitRate, 0xE6822FEE, 0x8C17, 0x4D62, 0x82, 0x3C, 0x8E, 0x9C, 0xFC, 0xBD, 0x1D, 0x5C, 100);
-
-//  Name:     System.Audio.PeakValue -- PKEY_Audio_PeakValue
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E, 100
-DEFINE_PROPERTYKEY(PKEY_Audio_PeakValue, 0x2579E5D0, 0x1116, 0x4084, 0xBD, 0x9A, 0x9B, 0x4F, 0x7C, 0xB4, 0xDF, 0x5E, 100);
-
-//  Name:     System.Audio.SampleRate -- PKEY_Audio_SampleRate
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 5 (PIDASI_SAMPLE_RATE)
-//
-//  Indicates the audio sample rate for the audio file in "samples per second".
-DEFINE_PROPERTYKEY(PKEY_Audio_SampleRate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);
-
-//  Name:     System.Audio.SampleSize -- PKEY_Audio_SampleSize
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 6 (PIDASI_SAMPLE_SIZE)
-//
-//  Indicates the audio sample size for the audio file in "bits per sample".
-DEFINE_PROPERTYKEY(PKEY_Audio_SampleSize, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
-
-//  Name:     System.Audio.StreamName -- PKEY_Audio_StreamName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 9 (PIDASI_STREAM_NAME)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Audio_StreamName, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
-
-//  Name:     System.Audio.StreamNumber -- PKEY_Audio_StreamNumber
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 8 (PIDASI_STREAM_NUMBER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Audio_StreamNumber, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);
-
- 
- 
-//-----------------------------------------------------------------------------
-// Calendar properties
-
-//  Name:     System.Calendar.Duration -- PKEY_Calendar_Duration
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 293CA35A-09AA-4DD2-B180-1FE245728A52, 100
-//
-//  The duration as specified in a string.
-DEFINE_PROPERTYKEY(PKEY_Calendar_Duration, 0x293CA35A, 0x09AA, 0x4DD2, 0xB1, 0x80, 0x1F, 0xE2, 0x45, 0x72, 0x8A, 0x52, 100);
-
-//  Name:     System.Calendar.IsOnline -- PKEY_Calendar_IsOnline
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: BFEE9149-E3E2-49A7-A862-C05988145CEC, 100
-//
-//  Identifies if the event is an online event.
-DEFINE_PROPERTYKEY(PKEY_Calendar_IsOnline, 0xBFEE9149, 0xE3E2, 0x49A7, 0xA8, 0x62, 0xC0, 0x59, 0x88, 0x14, 0x5C, 0xEC, 100);
-
-//  Name:     System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 315B9C8D-80A9-4EF9-AE16-8E746DA51D70, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_IsRecurring, 0x315B9C8D, 0x80A9, 0x4EF9, 0xAE, 0x16, 0x8E, 0x74, 0x6D, 0xA5, 0x1D, 0x70, 100);
-
-//  Name:     System.Calendar.Location -- PKEY_Calendar_Location
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F6272D18-CECC-40B1-B26A-3911717AA7BD, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_Location, 0xF6272D18, 0xCECC, 0x40B1, 0xB2, 0x6A, 0x39, 0x11, 0x71, 0x7A, 0xA7, 0xBD, 100);
-
-//  Name:     System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D55BAE5A-3892-417A-A649-C6AC5AAAEAB3, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeAddresses, 0xD55BAE5A, 0x3892, 0x417A, 0xA6, 0x49, 0xC6, 0xAC, 0x5A, 0xAA, 0xEA, 0xB3, 100);
-
-//  Name:     System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 09429607-582D-437F-84C3-DE93A2B24C3C, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeNames, 0x09429607, 0x582D, 0x437F, 0x84, 0xC3, 0xDE, 0x93, 0xA2, 0xB2, 0x4C, 0x3C, 100);
-
-//  Name:     System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 744C8242-4DF5-456C-AB9E-014EFB9021E3, 100
-//
-//  Address of the organizer organizing the event.
-DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerAddress, 0x744C8242, 0x4DF5, 0x456C, 0xAB, 0x9E, 0x01, 0x4E, 0xFB, 0x90, 0x21, 0xE3, 100);
-
-//  Name:     System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: AAA660F9-9865-458E-B484-01BC7FE3973E, 100
-//
-//  Name of the organizer organizing the event.
-DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerName, 0xAAA660F9, 0x9865, 0x458E, 0xB4, 0x84, 0x01, 0xBC, 0x7F, 0xE3, 0x97, 0x3E, 100);
-
-//  Name:     System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 72FC5BA4-24F9-4011-9F3F-ADD27AFAD818, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_ReminderTime, 0x72FC5BA4, 0x24F9, 0x4011, 0x9F, 0x3F, 0xAD, 0xD2, 0x7A, 0xFA, 0xD8, 0x18, 100);
-
-//  Name:     System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 0BA7D6C3-568D-4159-AB91-781A91FB71E5, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeAddresses, 0x0BA7D6C3, 0x568D, 0x4159, 0xAB, 0x91, 0x78, 0x1A, 0x91, 0xFB, 0x71, 0xE5, 100);
-
-//  Name:     System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: B33AF30B-F552-4584-936C-CB93E5CDA29F, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeNames, 0xB33AF30B, 0xF552, 0x4584, 0x93, 0x6C, 0xCB, 0x93, 0xE5, 0xCD, 0xA2, 0x9F, 100);
-
-//  Name:     System.Calendar.Resources -- PKEY_Calendar_Resources
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 00F58A38-C54B-4C40-8696-97235980EAE1, 100
-DEFINE_PROPERTYKEY(PKEY_Calendar_Resources, 0x00F58A38, 0xC54B, 0x4C40, 0x86, 0x96, 0x97, 0x23, 0x59, 0x80, 0xEA, 0xE1, 100);
-
-//  Name:     System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: 5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E, 100
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAs, 0x5BF396D4, 0x5EB2, 0x466F, 0xBD, 0xE9, 0x2F, 0xB3, 0xF2, 0x36, 0x1D, 0x6E, 100);
-
-// Possible discrete values for PKEY_Calendar_ShowTimeAs are:
-#define CALENDAR_SHOWTIMEAS_FREE            0u
-#define CALENDAR_SHOWTIMEAS_TENTATIVE       1u
-#define CALENDAR_SHOWTIMEAS_BUSY            2u
-#define CALENDAR_SHOWTIMEAS_OOF             3u
-
-//  Name:     System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 53DA57CF-62C0-45C4-81DE-7610BCEFD7F5, 100
-//  
-//  This is the user-friendly form of System.Calendar.ShowTimeAs.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAsText, 0x53DA57CF, 0x62C0, 0x45C4, 0x81, 0xDE, 0x76, 0x10, 0xBC, 0xEF, 0xD7, 0xF5, 100);
- 
-//-----------------------------------------------------------------------------
-// Communication properties
-
-
-
-//  Name:     System.Communication.AccountName -- PKEY_Communication_AccountName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 9
-//
-//  Account Name
-DEFINE_PROPERTYKEY(PKEY_Communication_AccountName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 9);
-
-//  Name:     System.Communication.Suffix -- PKEY_Communication_Suffix
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 807B653A-9E91-43EF-8F97-11CE04EE20C5, 100
-DEFINE_PROPERTYKEY(PKEY_Communication_Suffix, 0x807B653A, 0x9E91, 0x43EF, 0x8F, 0x97, 0x11, 0xCE, 0x04, 0xEE, 0x20, 0xC5, 100);
-
-//  Name:     System.Communication.TaskStatus -- PKEY_Communication_TaskStatus
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999, 100
-DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatus, 0xBE1A72C6, 0x9A1D, 0x46B7, 0xAF, 0xE7, 0xAF, 0xAF, 0x8C, 0xEF, 0x49, 0x99, 100);
-
-// Possible discrete values for PKEY_Communication_TaskStatus are:
-#define TASKSTATUS_NOTSTARTED               0u
-#define TASKSTATUS_INPROGRESS               1u
-#define TASKSTATUS_COMPLETE                 2u
-#define TASKSTATUS_WAITING                  3u
-#define TASKSTATUS_DEFERRED                 4u
-
-//  Name:     System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A6744477-C237-475B-A075-54F34498292A, 100
-//  
-//  This is the user-friendly form of System.Communication.TaskStatus.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatusText, 0xA6744477, 0xC237, 0x475B, 0xA0, 0x75, 0x54, 0xF3, 0x44, 0x98, 0x29, 0x2A, 100);
- 
-//-----------------------------------------------------------------------------
-// Computer properties
-
-
-
-//  Name:     System.Computer.DecoratedFreeSpace -- PKEY_Computer_DecoratedFreeSpace
-//  Type:     Multivalue UInt64 -- VT_VECTOR | VT_UI8  (For variants: VT_ARRAY | VT_UI8)
-//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 7  (Filesystem Volume Properties)
-//
-//  Free space and total space: "%s free of %s"
-DEFINE_PROPERTYKEY(PKEY_Computer_DecoratedFreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 7);
- 
-//-----------------------------------------------------------------------------
-// Contact properties
-
-
-
-//  Name:     System.Contact.Anniversary -- PKEY_Contact_Anniversary
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 9AD5BADB-CEA7-4470-A03D-B84E51B9949E, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Anniversary, 0x9AD5BADB, 0xCEA7, 0x4470, 0xA0, 0x3D, 0xB8, 0x4E, 0x51, 0xB9, 0x94, 0x9E, 100);
-
-//  Name:     System.Contact.AssistantName -- PKEY_Contact_AssistantName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CD102C9C-5540-4A88-A6F6-64E4981C8CD1, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_AssistantName, 0xCD102C9C, 0x5540, 0x4A88, 0xA6, 0xF6, 0x64, 0xE4, 0x98, 0x1C, 0x8C, 0xD1, 100);
-
-//  Name:     System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_AssistantTelephone, 0x9A93244D, 0xA7AD, 0x4FF8, 0x9B, 0x99, 0x45, 0xEE, 0x4C, 0xC0, 0x9A, 0xF6, 100);
-
-//  Name:     System.Contact.Birthday -- PKEY_Contact_Birthday
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 47
-DEFINE_PROPERTYKEY(PKEY_Contact_Birthday, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 47);
-
-//  Name:     System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 730FB6DD-CF7C-426B-A03F-BD166CC9EE24, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddress, 0x730FB6DD, 0xCF7C, 0x426B, 0xA0, 0x3F, 0xBD, 0x16, 0x6C, 0xC9, 0xEE, 0x24, 100);
-
-//  Name:     System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 402B5934-EC5A-48C3-93E6-85E86A2D934E, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCity, 0x402B5934, 0xEC5A, 0x48C3, 0x93, 0xE6, 0x85, 0xE8, 0x6A, 0x2D, 0x93, 0x4E, 100);
-
-//  Name:     System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCountry, 0xB0B87314, 0xFCF6, 0x4FEB, 0x8D, 0xFF, 0xA5, 0x0D, 0xA6, 0xAF, 0x56, 0x1C, 100);
-
-//  Name:     System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostalCode, 0xE1D4A09E, 0xD758, 0x4CD1, 0xB6, 0xEC, 0x34, 0xA8, 0xB5, 0xA7, 0x3F, 0x80, 100);
-
-//  Name:     System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: BC4E71CE-17F9-48D5-BEE9-021DF0EA5409, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostOfficeBox, 0xBC4E71CE, 0x17F9, 0x48D5, 0xBE, 0xE9, 0x02, 0x1D, 0xF0, 0xEA, 0x54, 0x09, 100);
-
-//  Name:     System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 446F787F-10C4-41CB-A6C4-4D0343551597, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressState, 0x446F787F, 0x10C4, 0x41CB, 0xA6, 0xC4, 0x4D, 0x03, 0x43, 0x55, 0x15, 0x97, 100);
-
-//  Name:     System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DDD1460F-C0BF-4553-8CE4-10433C908FB0, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressStreet, 0xDDD1460F, 0xC0BF, 0x4553, 0x8C, 0xE4, 0x10, 0x43, 0x3C, 0x90, 0x8F, 0xB0, 100);
-
-//  Name:     System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 91EFF6F3-2E27-42CA-933E-7C999FBE310B, 100
-//
-//  Business fax number of the contact.
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessFaxNumber, 0x91EFF6F3, 0x2E27, 0x42CA, 0x93, 0x3E, 0x7C, 0x99, 0x9F, 0xBE, 0x31, 0x0B, 100);
-
-//  Name:     System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 56310920-2491-4919-99CE-EADB06FAFDB2, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessHomePage, 0x56310920, 0x2491, 0x4919, 0x99, 0xCE, 0xEA, 0xDB, 0x06, 0xFA, 0xFD, 0xB2, 100);
-
-//  Name:     System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessTelephone, 0x6A15E5A0, 0x0A1E, 0x4CD7, 0xBB, 0x8C, 0xD2, 0xF1, 0xB0, 0xC9, 0x29, 0xBC, 100);
-
-//  Name:     System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: BF53D1C3-49E0-4F7F-8567-5A821D8AC542, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_CallbackTelephone, 0xBF53D1C3, 0x49E0, 0x4F7F, 0x85, 0x67, 0x5A, 0x82, 0x1D, 0x8A, 0xC5, 0x42, 100);
-
-//  Name:     System.Contact.CarTelephone -- PKEY_Contact_CarTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 8FDC6DEA-B929-412B-BA90-397A257465FE, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_CarTelephone, 0x8FDC6DEA, 0xB929, 0x412B, 0xBA, 0x90, 0x39, 0x7A, 0x25, 0x74, 0x65, 0xFE, 100);
-
-//  Name:     System.Contact.Children -- PKEY_Contact_Children
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D4729704-8EF1-43EF-9024-2BD381187FD5, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Children, 0xD4729704, 0x8EF1, 0x43EF, 0x90, 0x24, 0x2B, 0xD3, 0x81, 0x18, 0x7F, 0xD5, 100);
-
-//  Name:     System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 8589E481-6040-473D-B171-7FA89C2708ED, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_CompanyMainTelephone, 0x8589E481, 0x6040, 0x473D, 0xB1, 0x71, 0x7F, 0xA8, 0x9C, 0x27, 0x08, 0xED, 100);
-
-//  Name:     System.Contact.Department -- PKEY_Contact_Department
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Department, 0xFC9F7306, 0xFF8F, 0x4D49, 0x9F, 0xB6, 0x3F, 0xFE, 0x5C, 0x09, 0x51, 0xEC, 100);
-
-//  Name:     System.Contact.EmailAddress -- PKEY_Contact_EmailAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress, 0xF8FA7FA3, 0xD12B, 0x4785, 0x8A, 0x4E, 0x69, 0x1A, 0x94, 0xF7, 0xA3, 0xE7, 100);
-
-//  Name:     System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 38965063-EDC8-4268-8491-B7723172CF29, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress2, 0x38965063, 0xEDC8, 0x4268, 0x84, 0x91, 0xB7, 0x72, 0x31, 0x72, 0xCF, 0x29, 100);
-
-//  Name:     System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 644D37B4-E1B3-4BAD-B099-7E7C04966ACA, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress3, 0x644D37B4, 0xE1B3, 0x4BAD, 0xB0, 0x99, 0x7E, 0x7C, 0x04, 0x96, 0x6A, 0xCA, 100);
-
-//  Name:     System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 84D8F337-981D-44B3-9615-C7596DBA17E3, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddresses, 0x84D8F337, 0x981D, 0x44B3, 0x96, 0x15, 0xC7, 0x59, 0x6D, 0xBA, 0x17, 0xE3, 100);
-
-//  Name:     System.Contact.EmailName -- PKEY_Contact_EmailName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CC6F4F24-6083-4BD4-8754-674D0DE87AB8, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailName, 0xCC6F4F24, 0x6083, 0x4BD4, 0x87, 0x54, 0x67, 0x4D, 0x0D, 0xE8, 0x7A, 0xB8, 100);
-
-//  Name:     System.Contact.FileAsName -- PKEY_Contact_FileAsName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_FileAsName, 0xF1A24AA7, 0x9CA7, 0x40F6, 0x89, 0xEC, 0x97, 0xDE, 0xF9, 0xFF, 0xE8, 0xDB, 100);
-
-//  Name:     System.Contact.FirstName -- PKEY_Contact_FirstName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 14977844-6B49-4AAD-A714-A4513BF60460, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_FirstName, 0x14977844, 0x6B49, 0x4AAD, 0xA7, 0x14, 0xA4, 0x51, 0x3B, 0xF6, 0x04, 0x60, 100);
-
-//  Name:     System.Contact.FullName -- PKEY_Contact_FullName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 635E9051-50A5-4BA2-B9DB-4ED056C77296, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_FullName, 0x635E9051, 0x50A5, 0x4BA2, 0xB9, 0xDB, 0x4E, 0xD0, 0x56, 0xC7, 0x72, 0x96, 100);
-
-//  Name:     System.Contact.Gender -- PKEY_Contact_Gender
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Gender, 0x3C8CEE58, 0xD4F0, 0x4CF9, 0xB7, 0x56, 0x4E, 0x5D, 0x24, 0x44, 0x7B, 0xCD, 100);
-
-//  Name:     System.Contact.Hobbies -- PKEY_Contact_Hobbies
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 5DC2253F-5E11-4ADF-9CFE-910DD01E3E70, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Hobbies, 0x5DC2253F, 0x5E11, 0x4ADF, 0x9C, 0xFE, 0x91, 0x0D, 0xD0, 0x1E, 0x3E, 0x70, 100);
-
-//  Name:     System.Contact.HomeAddress -- PKEY_Contact_HomeAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 98F98354-617A-46B8-8560-5B1B64BF1F89, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddress, 0x98F98354, 0x617A, 0x46B8, 0x85, 0x60, 0x5B, 0x1B, 0x64, 0xBF, 0x1F, 0x89, 100);
-
-//  Name:     System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 65
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCity, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 65);
-
-//  Name:     System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCountry, 0x08A65AA1, 0xF4C9, 0x43DD, 0x9D, 0xDF, 0xA3, 0x3D, 0x8E, 0x7E, 0xAD, 0x85, 100);
-
-//  Name:     System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 8AFCC170-8A46-4B53-9EEE-90BAE7151E62, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostalCode, 0x8AFCC170, 0x8A46, 0x4B53, 0x9E, 0xEE, 0x90, 0xBA, 0xE7, 0x15, 0x1E, 0x62, 100);
-
-//  Name:     System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7B9F6399-0A3F-4B12-89BD-4ADC51C918AF, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostOfficeBox, 0x7B9F6399, 0x0A3F, 0x4B12, 0x89, 0xBD, 0x4A, 0xDC, 0x51, 0xC9, 0x18, 0xAF, 100);
-
-//  Name:     System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C89A23D0-7D6D-4EB8-87D4-776A82D493E5, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressState, 0xC89A23D0, 0x7D6D, 0x4EB8, 0x87, 0xD4, 0x77, 0x6A, 0x82, 0xD4, 0x93, 0xE5, 100);
-
-//  Name:     System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 0ADEF160-DB3F-4308-9A21-06237B16FA2A, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressStreet, 0x0ADEF160, 0xDB3F, 0x4308, 0x9A, 0x21, 0x06, 0x23, 0x7B, 0x16, 0xFA, 0x2A, 100);
-
-//  Name:     System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 660E04D6-81AB-4977-A09F-82313113AB26, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeFaxNumber, 0x660E04D6, 0x81AB, 0x4977, 0xA0, 0x9F, 0x82, 0x31, 0x31, 0x13, 0xAB, 0x26, 100);
-
-//  Name:     System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 20
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 20);
-
-//  Name:     System.Contact.IMAddress -- PKEY_Contact_IMAddress
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D68DBD8A-3374-4B81-9972-3EC30682DB3D, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_IMAddress, 0xD68DBD8A, 0x3374, 0x4B81, 0x99, 0x72, 0x3E, 0xC3, 0x06, 0x82, 0xDB, 0x3D, 100);
-
-//  Name:     System.Contact.Initials -- PKEY_Contact_Initials
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F3D8F40D-50CB-44A2-9718-40CB9119495D, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Initials, 0xF3D8F40D, 0x50CB, 0x44A2, 0x97, 0x18, 0x40, 0xCB, 0x91, 0x19, 0x49, 0x5D, 100);
-
-//  Name:     System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 2
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Contact_JA_CompanyNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 2);
-
-//  Name:     System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 3
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Contact_JA_FirstNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 3);
-
-//  Name:     System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 4
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Contact_JA_LastNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 4);
-
-//  Name:     System.Contact.JobTitle -- PKEY_Contact_JobTitle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 6
-DEFINE_PROPERTYKEY(PKEY_Contact_JobTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 6);
-
-//  Name:     System.Contact.Label -- PKEY_Contact_Label
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 97B0AD89-DF49-49CC-834E-660974FD755B, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Label, 0x97B0AD89, 0xDF49, 0x49CC, 0x83, 0x4E, 0x66, 0x09, 0x74, 0xFD, 0x75, 0x5B, 100);
-
-//  Name:     System.Contact.LastName -- PKEY_Contact_LastName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 8F367200-C270-457C-B1D4-E07C5BCD90C7, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_LastName, 0x8F367200, 0xC270, 0x457C, 0xB1, 0xD4, 0xE0, 0x7C, 0x5B, 0xCD, 0x90, 0xC7, 100);
-
-//  Name:     System.Contact.MailingAddress -- PKEY_Contact_MailingAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C0AC206A-827E-4650-95AE-77E2BB74FCC9, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_MailingAddress, 0xC0AC206A, 0x827E, 0x4650, 0x95, 0xAE, 0x77, 0xE2, 0xBB, 0x74, 0xFC, 0xC9, 100);
-
-//  Name:     System.Contact.MiddleName -- PKEY_Contact_MiddleName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 71
-DEFINE_PROPERTYKEY(PKEY_Contact_MiddleName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 71);
-
-//  Name:     System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 35
-DEFINE_PROPERTYKEY(PKEY_Contact_MobileTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 35);
-
-//  Name:     System.Contact.NickName -- PKEY_Contact_NickName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 74
-DEFINE_PROPERTYKEY(PKEY_Contact_NickName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 74);
-
-//  Name:     System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 7
-DEFINE_PROPERTYKEY(PKEY_Contact_OfficeLocation, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 7);
-
-//  Name:     System.Contact.OtherAddress -- PKEY_Contact_OtherAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 508161FA-313B-43D5-83A1-C1ACCF68622C, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddress, 0x508161FA, 0x313B, 0x43D5, 0x83, 0xA1, 0xC1, 0xAC, 0xCF, 0x68, 0x62, 0x2C, 100);
-
-//  Name:     System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6E682923-7F7B-4F0C-A337-CFCA296687BF, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCity, 0x6E682923, 0x7F7B, 0x4F0C, 0xA3, 0x37, 0xCF, 0xCA, 0x29, 0x66, 0x87, 0xBF, 100);
-
-//  Name:     System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 8F167568-0AAE-4322-8ED9-6055B7B0E398, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCountry, 0x8F167568, 0x0AAE, 0x4322, 0x8E, 0xD9, 0x60, 0x55, 0xB7, 0xB0, 0xE3, 0x98, 100);
-
-//  Name:     System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 95C656C1-2ABF-4148-9ED3-9EC602E3B7CD, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostalCode, 0x95C656C1, 0x2ABF, 0x4148, 0x9E, 0xD3, 0x9E, 0xC6, 0x02, 0xE3, 0xB7, 0xCD, 100);
-
-//  Name:     System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 8B26EA41-058F-43F6-AECC-4035681CE977, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostOfficeBox, 0x8B26EA41, 0x058F, 0x43F6, 0xAE, 0xCC, 0x40, 0x35, 0x68, 0x1C, 0xE9, 0x77, 100);
-
-//  Name:     System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 71B377D6-E570-425F-A170-809FAE73E54E, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressState, 0x71B377D6, 0xE570, 0x425F, 0xA1, 0x70, 0x80, 0x9F, 0xAE, 0x73, 0xE5, 0x4E, 100);
-
-//  Name:     System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: FF962609-B7D6-4999-862D-95180D529AEA, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressStreet, 0xFF962609, 0xB7D6, 0x4999, 0x86, 0x2D, 0x95, 0x18, 0x0D, 0x52, 0x9A, 0xEA, 100);
-
-//  Name:     System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: D6304E01-F8F5-4F45-8B15-D024A6296789, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PagerTelephone, 0xD6304E01, 0xF8F5, 0x4F45, 0x8B, 0x15, 0xD0, 0x24, 0xA6, 0x29, 0x67, 0x89, 100);
-
-//  Name:     System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 69
-DEFINE_PROPERTYKEY(PKEY_Contact_PersonalTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 69);
-
-//  Name:     System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C8EA94F0-A9E3-4969-A94B-9C62A95324E0, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCity, 0xC8EA94F0, 0xA9E3, 0x4969, 0xA9, 0x4B, 0x9C, 0x62, 0xA9, 0x53, 0x24, 0xE0, 100);
-
-//  Name:     System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E53D799D-0F3F-466E-B2FF-74634A3CB7A4, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCountry, 0xE53D799D, 0x0F3F, 0x466E, 0xB2, 0xFF, 0x74, 0x63, 0x4A, 0x3C, 0xB7, 0xA4, 100);
-
-//  Name:     System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 18BBD425-ECFD-46EF-B612-7B4A6034EDA0, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostalCode, 0x18BBD425, 0xECFD, 0x46EF, 0xB6, 0x12, 0x7B, 0x4A, 0x60, 0x34, 0xED, 0xA0, 100);
-
-//  Name:     System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DE5EF3C7-46E1-484E-9999-62C5308394C1, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostOfficeBox, 0xDE5EF3C7, 0x46E1, 0x484E, 0x99, 0x99, 0x62, 0xC5, 0x30, 0x83, 0x94, 0xC1, 100);
-
-//  Name:     System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F1176DFE-7138-4640-8B4C-AE375DC70A6D, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressState, 0xF1176DFE, 0x7138, 0x4640, 0x8B, 0x4C, 0xAE, 0x37, 0x5D, 0xC7, 0x0A, 0x6D, 100);
-
-//  Name:     System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 63C25B20-96BE-488F-8788-C09C407AD812, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressStreet, 0x63C25B20, 0x96BE, 0x488F, 0x87, 0x88, 0xC0, 0x9C, 0x40, 0x7A, 0xD8, 0x12, 100);
-
-//  Name:     System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 48
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryEmailAddress, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 48);
-
-//  Name:     System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 25
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 25);
-
-//  Name:     System.Contact.Profession -- PKEY_Contact_Profession
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_Profession, 0x7268AF55, 0x1CE4, 0x4F6E, 0xA4, 0x1F, 0xB6, 0xE4, 0xEF, 0x10, 0xE4, 0xA9, 100);
-
-//  Name:     System.Contact.SpouseName -- PKEY_Contact_SpouseName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 9D2408B6-3167-422B-82B0-F583B7A7CFE3, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_SpouseName, 0x9D2408B6, 0x3167, 0x422B, 0x82, 0xB0, 0xF5, 0x83, 0xB7, 0xA7, 0xCF, 0xE3, 100);
-
-//  Name:     System.Contact.Suffix -- PKEY_Contact_Suffix
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 73
-DEFINE_PROPERTYKEY(PKEY_Contact_Suffix, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 73);
-
-//  Name:     System.Contact.TelexNumber -- PKEY_Contact_TelexNumber
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C554493C-C1F7-40C1-A76C-EF8C0614003E, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_TelexNumber, 0xC554493C, 0xC1F7, 0x40C1, 0xA7, 0x6C, 0xEF, 0x8C, 0x06, 0x14, 0x00, 0x3E, 100);
-
-//  Name:     System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: AAF16BAC-2B55-45E6-9F6D-415EB94910DF, 100
-DEFINE_PROPERTYKEY(PKEY_Contact_TTYTDDTelephone, 0xAAF16BAC, 0x2B55, 0x45E6, 0x9F, 0x6D, 0x41, 0x5E, 0xB9, 0x49, 0x10, 0xDF, 100);
-
-//  Name:     System.Contact.WebPage -- PKEY_Contact_WebPage
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 18
-DEFINE_PROPERTYKEY(PKEY_Contact_WebPage, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 18);
- 
-//-----------------------------------------------------------------------------
-// Core properties
-
-
-
-//  Name:     System.AcquisitionID -- PKEY_AcquisitionID
-//  Type:     Int32 -- VT_I4
-//  FormatID: 65A98875-3C80-40AB-ABBC-EFDAF77DBEE2, 100
-//
-//  Hash to determine acquisition session.
-DEFINE_PROPERTYKEY(PKEY_AcquisitionID, 0x65A98875, 0x3C80, 0x40AB, 0xAB, 0xBC, 0xEF, 0xDA, 0xF7, 0x7D, 0xBE, 0xE2, 100);
-
-//  Name:     System.ApplicationName -- PKEY_ApplicationName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_LPSTR.
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 18 (PIDSI_APPNAME)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_ApplicationName, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 18);
-
-//  Name:     System.Author -- PKEY_Author
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)  Legacy code may treat this as VT_LPSTR.
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 4 (PIDSI_AUTHOR)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Author, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 4);
-
-//  Name:     System.Capacity -- PKEY_Capacity
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 3 (PID_VOLUME_CAPACITY)  (Filesystem Volume Properties)
-//
-//  The amount of total space in bytes.
-DEFINE_PROPERTYKEY(PKEY_Capacity, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 3);
-
-//  Name:     System.Category -- PKEY_Category
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 2 (PIDDSI_CATEGORY)
-//
-//  Legacy code treats this as VT_LPSTR.
-DEFINE_PROPERTYKEY(PKEY_Category, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 2);
-
-//  Name:     System.Comment -- PKEY_Comment
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_LPSTR.
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 6 (PIDSI_COMMENTS)
-//
-//  Comments.
-DEFINE_PROPERTYKEY(PKEY_Comment, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 6);
-
-//  Name:     System.Company -- PKEY_Company
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 15 (PIDDSI_COMPANY)
-//
-//  The company or publisher.
-DEFINE_PROPERTYKEY(PKEY_Company, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 15);
-
-//  Name:     System.ComputerName -- PKEY_ComputerName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 5 (PID_COMPUTERNAME)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_ComputerName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 5);
-
-//  Name:     System.ContainedItems -- PKEY_ContainedItems
-//  Type:     Multivalue Guid -- VT_VECTOR | VT_CLSID  (For variants: VT_ARRAY | VT_CLSID)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 29
-//  
-//  The list of type of items, this item contains. For example, this item contains urls, attachments etc.
-//  This is represented as a vector array of GUIDs where each GUID represents certain type.
-DEFINE_PROPERTYKEY(PKEY_ContainedItems, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 29);
-
-//  Name:     System.ContentStatus -- PKEY_ContentStatus
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 27
-DEFINE_PROPERTYKEY(PKEY_ContentStatus, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 27);
-
-//  Name:     System.ContentType -- PKEY_ContentType
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 26
-DEFINE_PROPERTYKEY(PKEY_ContentType, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 26);
-
-//  Name:     System.Copyright -- PKEY_Copyright
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 11 (PIDMSI_COPYRIGHT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Copyright, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);
-
-//  Name:     System.DateAccessed -- PKEY_DateAccessed
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 16 (PID_STG_ACCESSTIME)
-//
-//  The time of the last access to the item.  The Indexing Service friendly name is 'access'.
-DEFINE_PROPERTYKEY(PKEY_DateAccessed, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 16);
-
-//  Name:     System.DateAcquired -- PKEY_DateAcquired
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 2CBAA8F5-D81F-47CA-B17A-F8D822300131, 100
-//  
-//  The time the file entered the system via acquisition.  This is not the same as System.DateImported.
-//  Examples are when pictures are acquired from a camera, or when music is purchased online.
-DEFINE_PROPERTYKEY(PKEY_DateAcquired, 0x2CBAA8F5, 0xD81F, 0x47CA, 0xB1, 0x7A, 0xF8, 0xD8, 0x22, 0x30, 0x01, 0x31, 100);
-
-//  Name:     System.DateArchived -- PKEY_DateArchived
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 43F8D7B7-A444-4F87-9383-52271C9B915C, 100
-DEFINE_PROPERTYKEY(PKEY_DateArchived, 0x43F8D7B7, 0xA444, 0x4F87, 0x93, 0x83, 0x52, 0x27, 0x1C, 0x9B, 0x91, 0x5C, 100);
-
-//  Name:     System.DateCompleted -- PKEY_DateCompleted
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 72FAB781-ACDA-43E5-B155-B2434F85E678, 100
-DEFINE_PROPERTYKEY(PKEY_DateCompleted, 0x72FAB781, 0xACDA, 0x43E5, 0xB1, 0x55, 0xB2, 0x43, 0x4F, 0x85, 0xE6, 0x78, 100);
-
-//  Name:     System.DateCreated -- PKEY_DateCreated
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 15 (PID_STG_CREATETIME)
-//
-//  The date and time the item was created. The Indexing Service friendly name is 'create'.
-DEFINE_PROPERTYKEY(PKEY_DateCreated, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 15);
-
-//  Name:     System.DateImported -- PKEY_DateImported
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18258
-//
-//  The time the file is imported into a separate database.  This is not the same as System.DateAcquired.  (Eg, 2003:05:22 13:55:04)
-DEFINE_PROPERTYKEY(PKEY_DateImported, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18258);
-
-//  Name:     System.DateModified -- PKEY_DateModified
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 14 (PID_STG_WRITETIME)
-//
-//  The date and time of the last write to the item. The Indexing Service friendly name is 'write'.
-DEFINE_PROPERTYKEY(PKEY_DateModified, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 14);
-
-//  Name:     System.DueDate -- PKEY_DueDate
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE, 100
-DEFINE_PROPERTYKEY(PKEY_DueDate, 0x3F8472B5, 0xE0AF, 0x4DB2, 0x80, 0x71, 0xC5, 0x3F, 0xE7, 0x6A, 0xE7, 0xCE, 100);
-
-//  Name:     System.EndDate -- PKEY_EndDate
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: C75FAA05-96FD-49E7-9CB4-9F601082D553, 100
-DEFINE_PROPERTYKEY(PKEY_EndDate, 0xC75FAA05, 0x96FD, 0x49E7, 0x9C, 0xB4, 0x9F, 0x60, 0x10, 0x82, 0xD5, 0x53, 100);
-
-//  Name:     System.FileAllocationSize -- PKEY_FileAllocationSize
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 18 (PID_STG_ALLOCSIZE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_FileAllocationSize, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 18);
-
-//  Name:     System.FileAttributes -- PKEY_FileAttributes
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 13 (PID_STG_ATTRIBUTES)
-//  
-//  This is the WIN32_FIND_DATA dwFileAttributes for the file-based item.
-DEFINE_PROPERTYKEY(PKEY_FileAttributes, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 13);
-
-//  Name:     System.FileCount -- PKEY_FileCount
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 12
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_FileCount, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 12);
-
-//  Name:     System.FileDescription -- PKEY_FileDescription
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 3 (PIDVSI_FileDescription)
-//  
-//  This is a user-friendly description of the file.
-DEFINE_PROPERTYKEY(PKEY_FileDescription, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 3);
-
-//  Name:     System.FileExtension -- PKEY_FileExtension
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E4F10A3C-49E6-405D-8288-A23BD4EEAA6C, 100
-//  
-//  This is the file extension of the file based item, including the leading period.  
-//  
-//  If System.FileName is VT_EMPTY, then this property should be too.  Otherwise, it should be derived
-//  appropriately by the data source from System.FileName.  If System.FileName does not have a file 
-//  extension, this value should be VT_EMPTY.
-//  
-//  To obtain the type of any item (including an item that is not a file), use System.ItemType.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                ".txt"
-//      "\\server\share\mydir\goodnews.doc"   ".doc"
-//      "\\server\share\numbers.xls"          ".xls"
-//      "\\server\share\folder"               VT_EMPTY
-//      "c:\foo\MyFolder"                     VT_EMPTY
-//      [desktop]                             VT_EMPTY
-DEFINE_PROPERTYKEY(PKEY_FileExtension, 0xE4F10A3C, 0x49E6, 0x405D, 0x82, 0x88, 0xA2, 0x3B, 0xD4, 0xEE, 0xAA, 0x6C, 100);
-
-//  Name:     System.FileFRN -- PKEY_FileFRN
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 21 (PID_STG_FRN)
-//  
-//  This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value
-//  as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx().
-DEFINE_PROPERTYKEY(PKEY_FileFRN, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 21);
-
-//  Name:     System.FileName -- PKEY_FileName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 41CF5AE0-F75A-4806-BD87-59C7D9248EB9, 100
-//  
-//  This is the file name (including extension) of the file.
-//  
-//  It is possible that the item might not exist on a filesystem (ie, it may not be opened 
-//  using CreateFile).  Nonetheless, if the item is represented as a file from the logical sense 
-//  (and its name follows standard Win32 file-naming syntax), then the data source should emit this property.
-//  
-//  If an item is not a file, then the value for this property is VT_EMPTY.  See 
-//  System.ItemNameDisplay.
-//  
-//  This has the same value as System.ParsingName for items that are provided by the Shell's file folder.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "hello.txt"
-//      "\\server\share\mydir\goodnews.doc"   "goodnews.doc"
-//      "\\server\share\numbers.xls"          "numbers.xls"
-//      "c:\foo\MyFolder"                     "MyFolder"
-//      (email message)                       VT_EMPTY
-//      (song on portable device)             "song.wma"
-DEFINE_PROPERTYKEY(PKEY_FileName, 0x41CF5AE0, 0xF75A, 0x4806, 0xBD, 0x87, 0x59, 0xC7, 0xD9, 0x24, 0x8E, 0xB9, 100);
-
-//  Name:     System.FileOwner -- PKEY_FileOwner
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Misc) 9B174B34-40FF-11D2-A27E-00C04FC30871, 4 (PID_MISC_OWNER)
-//  
-//  This is the owner of the file, according to the file system.
-DEFINE_PROPERTYKEY(PKEY_FileOwner, 0x9B174B34, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);
-
-//  Name:     System.FileVersion -- PKEY_FileVersion
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 4 (PIDVSI_FileVersion)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_FileVersion, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 4);
-
-//  Name:     System.FindData -- PKEY_FindData
-//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 0 (PID_FINDDATA)
-//
-//  WIN32_FIND_DATAW in buffer of bytes.
-DEFINE_PROPERTYKEY(PKEY_FindData, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 0);
-
-//  Name:     System.FlagColor -- PKEY_FlagColor
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: 67DF94DE-0CA7-4D6F-B792-053A3E4F03CF, 100
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_FlagColor, 0x67DF94DE, 0x0CA7, 0x4D6F, 0xB7, 0x92, 0x05, 0x3A, 0x3E, 0x4F, 0x03, 0xCF, 100);
-
-// Possible discrete values for PKEY_FlagColor are:
-#define FLAGCOLOR_PURPLE                    1u
-#define FLAGCOLOR_ORANGE                    2u
-#define FLAGCOLOR_GREEN                     3u
-#define FLAGCOLOR_YELLOW                    4u
-#define FLAGCOLOR_BLUE                      5u
-#define FLAGCOLOR_RED                       6u
-
-//  Name:     System.FlagColorText -- PKEY_FlagColorText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 45EAE747-8E2A-40AE-8CBF-CA52ABA6152A, 100
-//  
-//  This is the user-friendly form of System.FlagColor.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_FlagColorText, 0x45EAE747, 0x8E2A, 0x40AE, 0x8C, 0xBF, 0xCA, 0x52, 0xAB, 0xA6, 0x15, 0x2A, 100);
-
-//  Name:     System.FlagStatus -- PKEY_FlagStatus
-//  Type:     Int32 -- VT_I4
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 12
-//
-//  Status of Flag.  Values: (0=none 1=white 2=Red).  cdoPR_FLAG_STATUS
-DEFINE_PROPERTYKEY(PKEY_FlagStatus, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 12);
-
-// Possible discrete values for PKEY_FlagStatus are:
-#define FLAGSTATUS_NOTFLAGGED               0l
-#define FLAGSTATUS_COMPLETED                1l
-#define FLAGSTATUS_FOLLOWUP                 2l
-
-//  Name:     System.FlagStatusText -- PKEY_FlagStatusText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DC54FD2E-189D-4871-AA01-08C2F57A4ABC, 100
-//  
-//  This is the user-friendly form of System.FlagStatus.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_FlagStatusText, 0xDC54FD2E, 0x189D, 0x4871, 0xAA, 0x01, 0x08, 0xC2, 0xF5, 0x7A, 0x4A, 0xBC, 100);
-
-//  Name:     System.FreeSpace -- PKEY_FreeSpace
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 2 (PID_VOLUME_FREE)  (Filesystem Volume Properties)
-//
-//  The amount of free space in bytes.
-DEFINE_PROPERTYKEY(PKEY_FreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 2);
-
-//  Name:     System.Identity -- PKEY_Identity
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A26F4AFC-7346-4299-BE47-EB1AE613139F, 100
-DEFINE_PROPERTYKEY(PKEY_Identity, 0xA26F4AFC, 0x7346, 0x4299, 0xBE, 0x47, 0xEB, 0x1A, 0xE6, 0x13, 0x13, 0x9F, 100);
-
-//  Name:     System.Importance -- PKEY_Importance
-//  Type:     Int32 -- VT_I4
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 11
-DEFINE_PROPERTYKEY(PKEY_Importance, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 11);
-
-// Possible range of values for PKEY_Importance are:
-#define IMPORTANCE_LOW_MIN                  0l
-#define IMPORTANCE_LOW_SET                  1l
-#define IMPORTANCE_LOW_MAX                  1l
-
-#define IMPORTANCE_NORMAL_MIN               2l
-#define IMPORTANCE_NORMAL_SET               3l
-#define IMPORTANCE_NORMAL_MAX               4l
-
-#define IMPORTANCE_HIGH_MIN                 5l
-#define IMPORTANCE_HIGH_SET                 5l
-#define IMPORTANCE_HIGH_MAX                 5l
-
-
-//  Name:     System.ImportanceText -- PKEY_ImportanceText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A3B29791-7713-4E1D-BB40-17DB85F01831, 100
-//  
-//  This is the user-friendly form of System.Importance.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_ImportanceText, 0xA3B29791, 0x7713, 0x4E1D, 0xBB, 0x40, 0x17, 0xDB, 0x85, 0xF0, 0x18, 0x31, 100);
-
-//  Name:     System.IsAttachment -- PKEY_IsAttachment
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: F23F425C-71A1-4FA8-922F-678EA4A60408, 100
-//
-//  Identifies if this item is an attachment.
-DEFINE_PROPERTYKEY(PKEY_IsAttachment, 0xF23F425C, 0x71A1, 0x4FA8, 0x92, 0x2F, 0x67, 0x8E, 0xA4, 0xA6, 0x04, 0x08, 100);
-
-//  Name:     System.IsDeleted -- PKEY_IsDeleted
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D, 100
-DEFINE_PROPERTYKEY(PKEY_IsDeleted, 0x5CDA5FC8, 0x33EE, 0x4FF3, 0x90, 0x94, 0xAE, 0x7B, 0xD8, 0x86, 0x8C, 0x4D, 100);
-
-//  Name:     System.IsFlagged -- PKEY_IsFlagged
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 5DA84765-E3FF-4278-86B0-A27967FBDD03, 100
-DEFINE_PROPERTYKEY(PKEY_IsFlagged, 0x5DA84765, 0xE3FF, 0x4278, 0x86, 0xB0, 0xA2, 0x79, 0x67, 0xFB, 0xDD, 0x03, 100);
-
-//  Name:     System.IsFlaggedComplete -- PKEY_IsFlaggedComplete
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: A6F360D2-55F9-48DE-B909-620E090A647C, 100
-DEFINE_PROPERTYKEY(PKEY_IsFlaggedComplete, 0xA6F360D2, 0x55F9, 0x48DE, 0xB9, 0x09, 0x62, 0x0E, 0x09, 0x0A, 0x64, 0x7C, 100);
-
-//  Name:     System.IsIncomplete -- PKEY_IsIncomplete
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 346C8BD1-2E6A-4C45-89A4-61B78E8E700F, 100
-//
-//  Identifies if the message was not completely received for some error condition.
-DEFINE_PROPERTYKEY(PKEY_IsIncomplete, 0x346C8BD1, 0x2E6A, 0x4C45, 0x89, 0xA4, 0x61, 0xB7, 0x8E, 0x8E, 0x70, 0x0F, 100);
-
-//  Name:     System.IsRead -- PKEY_IsRead
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 10
-//
-//  Has the item been read?
-DEFINE_PROPERTYKEY(PKEY_IsRead, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 10);
-
-//  Name:     System.IsSendToTarget -- PKEY_IsSendToTarget
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 33
-//
-//  Provided by certain shell folders. Return TRUE if the folder is a valid Send To target.
-DEFINE_PROPERTYKEY(PKEY_IsSendToTarget, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 33);
-
-//  Name:     System.IsShared -- PKEY_IsShared
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 100
-//
-//  Is this item shared?
-DEFINE_PROPERTYKEY(PKEY_IsShared, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 100);
-
-//  Name:     System.ItemAuthors -- PKEY_ItemAuthors
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D0A04F0A-462A-48A4-BB2F-3706E88DBD7D, 100
-//  
-//  This is the generic list of authors associated with an item. 
-//  
-//  For example, the artist name for a track is the item author.
-DEFINE_PROPERTYKEY(PKEY_ItemAuthors, 0xD0A04F0A, 0x462A, 0x48A4, 0xBB, 0x2F, 0x37, 0x06, 0xE8, 0x8D, 0xBD, 0x7D, 100);
-
-//  Name:     System.ItemDate -- PKEY_ItemDate
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: F7DB74B4-4287-4103-AFBA-F1B13DCD75CF, 100
-//  
-//  This is the main date for an item. The date of interest. 
-//  
-//  For example, for photos this maps to System.Photo.DateTaken.
-DEFINE_PROPERTYKEY(PKEY_ItemDate, 0xF7DB74B4, 0x4287, 0x4103, 0xAF, 0xBA, 0xF1, 0xB1, 0x3D, 0xCD, 0x75, 0xCF, 100);
-
-//  Name:     System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 2 (PID_STG_DIRECTORY)
-//  
-//  This is the user-friendly display name of the parent folder of an item.
-//  
-//  If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too.  Otherwise, it 
-//  should be derived appropriately by the data source from System.ItemFolderPathDisplay.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "bar"
-//      "\\server\share\mydir\goodnews.doc"   "mydir"
-//      "\\server\share\numbers.xls"          "share"
-//      "c:\foo\MyFolder"                     "foo"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox"
-DEFINE_PROPERTYKEY(PKEY_ItemFolderNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 2);
-
-//  Name:     System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 6
-//  
-//  This is the user-friendly display path of the parent folder of an item.
-//  
-//  If System.ItemPathDisplay is VT_EMPTY, then this property should be too.  Otherwise, it should 
-//  be derived appropriately by the data source from System.ItemPathDisplay.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "c:\foo\bar"
-//      "\\server\share\mydir\goodnews.doc"   "\\server\share\mydir"
-//      "\\server\share\numbers.xls"          "\\server\share"
-//      "c:\foo\MyFolder"                     "c:\foo"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox"
-DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 6);
-
-//  Name:     System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DABD30ED-0043-4789-A7F8-D013A4736622, 100
-//  
-//  This is the user-friendly display path of the parent folder of an item.  The format of the string
-//  should be tailored such that the folder name comes first, to optimize for a narrow viewing column.
-//  
-//  If the folder is a file folder, the value includes localized names if they are present.
-//  
-//  If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too.  Otherwise, it should
-//  be derived appropriately by the data source from System.ItemFolderPathDisplay.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "bar (c:\foo)"
-//      "\\server\share\mydir\goodnews.doc"   "mydir (\\server\share)"
-//      "\\server\share\numbers.xls"          "share (\\server)"
-//      "c:\foo\MyFolder"                     "foo (c:\)"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)"
-DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplayNarrow, 0xDABD30ED, 0x0043, 0x4789, 0xA7, 0xF8, 0xD0, 0x13, 0xA4, 0x73, 0x66, 0x22, 100);
-
-//  Name:     System.ItemName -- PKEY_ItemName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F, 100
-//  
-//  This is the base-name of the System.ItemNameDisplay.
-//  
-//  If the item is a file this property
-//  includes the extension in all cases, and will be localized if a localized name is available.
-//  
-//  If the item is a message, then the value of this property does not include the forwarding or
-//  reply prefixes (see System.ItemNamePrefix).
-DEFINE_PROPERTYKEY(PKEY_ItemName, 0x6B8DA074, 0x3B5C, 0x43BC, 0x88, 0x6F, 0x0A, 0x2C, 0xDC, 0xE0, 0x0B, 0x6F, 100);
-
-//  Name:     System.ItemNameDisplay -- PKEY_ItemNameDisplay
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 10 (PID_STG_NAME)
-//  
-//  This is the display name in "most complete" form.  This is the best effort unique representation
-//  of the name of an item that makes sense for end users to read.  It is the concatentation of
-//  System.ItemNamePrefix and System.ItemName.
-//  
-//  If the item is a file this property
-//  includes the extension in all cases, and will be localized if a localized name is available.
-//  
-//  There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property 
-//  is completely different.  Email messages are a key example.  If the item is an email message, 
-//  the item name is likely the subject.  In that case, the value must be the concatenation of the
-//  System.ItemNamePrefix and System.ItemName.  Since the value of System.ItemNamePrefix excludes
-//  any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay.
-//  
-//  Note that this property is not guaranteed to be unique, but the idea is to promote the most likely
-//  candidate that can be unique and also makes sense for end users. For example, for documents, you
-//  might think about using System.Title as the System.ItemNameDisplay, but in practice the title of
-//  the documents may not be useful or unique enough to be of value as the sole System.ItemNameDisplay.  
-//  Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a better
-//  candidate.  In Windows Mail, the emails are stored in the file system as .eml files and the 
-//  System.FileName for those files are not human-friendly as they contain GUIDs. In this example, 
-//  promoting System.Subject as System.ItemNameDisplay makes more sense.
-//  
-//  Compatibility notes:
-//  
-//  Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when
-//  you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use
-//  another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property store or
-//  ISF2::GetDetailsEx in order to get the value of the name.
-//  
-//  Shell folder implementations on XP: the first column needs to be the name column, and Explorer
-//  will call ISF::GetDisplayNameOf to get the value of the name.  The PKEY/SCID does not matter.
-//  
-//  Example values:
-//  
-//      File:          "hello.txt"
-//      Message:       "Re: Let's talk about Tom's argyle socks!"
-//      Device folder: "song.wma"
-//      Folder:        "Documents"
-DEFINE_PROPERTYKEY(PKEY_ItemNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 10);
-
-//  Name:     System.ItemNamePrefix -- PKEY_ItemNamePrefix
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: D7313FF1-A77A-401C-8C99-3DBDD68ADD36, 100
-//  
-//  This is the prefix of an item, used for email messages.
-//  where the subject begins with "Re:" which is the prefix.
-//  
-//  If the item is a file, then the value of this property is VT_EMPTY.
-//  
-//  If the item is a message, then the value of this property is the forwarding or reply 
-//  prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix.
-//  
-//  Example values:
-//  
-//  System.ItemNamePrefix    System.ItemName      System.ItemNameDisplay
-//  ---------------------    -------------------  ----------------------
-//  VT_EMPTY                 "Great day"          "Great day"
-//  "Re:"                    "Great day"          "Re: Great day"
-//  "Fwd: "                  "Monthly budget"     "Fwd: Monthly budget"
-//  VT_EMPTY                 "accounts.xls"       "accounts.xls"
-DEFINE_PROPERTYKEY(PKEY_ItemNamePrefix, 0xD7313FF1, 0xA77A, 0x401C, 0x8C, 0x99, 0x3D, 0xBD, 0xD6, 0x8A, 0xDD, 0x36, 100);
-
-//  Name:     System.ItemParticipants -- PKEY_ItemParticipants
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D4D0AA16-9948-41A4-AA85-D97FF9646993, 100
-//  
-//  This is the generic list of people associated with an item and who contributed 
-//  to the item. 
-//  
-//  For example, this is the combination of people in the To list, Cc list and 
-//  sender of an email message.
-DEFINE_PROPERTYKEY(PKEY_ItemParticipants, 0xD4D0AA16, 0x9948, 0x41A4, 0xAA, 0x85, 0xD9, 0x7F, 0xF9, 0x64, 0x69, 0x93, 100);
-
-//  Name:     System.ItemPathDisplay -- PKEY_ItemPathDisplay
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 7
-//  
-//  This is the user-friendly display path to the item.
-//  
-//  If the item is a file or folder this property
-//  includes the extension in all cases, and will be localized if a localized name is available.
-//  
-//  For other items,this is the user-friendly equivalent, assuming the item exists in hierarchical storage.
-//  
-//  Unlike System.ItemUrl, this property value does not include the URL scheme.
-//  
-//  To parse an item path, use System.ItemUrl or System.ParsingPath.  To reference shell 
-//  namespace items using shell APIs, use System.ParsingPath.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "c:\foo\bar\hello.txt"
-//      "\\server\share\mydir\goodnews.doc"   "\\server\share\mydir\goodnews.doc"
-//      "\\server\share\numbers.xls"          "\\server\share\numbers.xls"
-//      "c:\foo\MyFolder"                     "c:\foo\MyFolder"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox/'Re: Hello!'"
-DEFINE_PROPERTYKEY(PKEY_ItemPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 7);
-
-//  Name:     System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 8
-//  
-//  This is the user-friendly display path to the item. The format of the string should be 
-//  tailored such that the name comes first, to optimize for a narrow viewing column.
-//  
-//  If the item is a file, the value excludes the file extension, and includes localized names if they are present.
-//  If the item is a message, the value includes the System.ItemNamePrefix.
-//  
-//  To parse an item path, use System.ItemUrl or System.ParsingPath.
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "hello (c:\foo\bar)"
-//      "\\server\share\mydir\goodnews.doc"   "goodnews (\\server\share\mydir)"
-//      "\\server\share\folder"               "folder (\\server\share)"
-//      "c:\foo\MyFolder"                     "MyFolder (c:\foo)"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)"
-DEFINE_PROPERTYKEY(PKEY_ItemPathDisplayNarrow, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 8);
-
-//  Name:     System.ItemType -- PKEY_ItemType
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 11
-//  
-//  This is the canonical type of the item and is intended to be programmatically
-//  parsed.
-//  
-//  If there is no canonical type, the value is VT_EMPTY.
-//  
-//  If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as
-//  System.FileExtension.
-//  
-//  Use System.ItemTypeText when you want to display the type to end users in a view.  (If
-//   the item is a file, passing the System.ItemType value to PSFormatForDisplay will
-//   result in the same value as System.ItemTypeText.)
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                ".txt"
-//      "\\server\share\mydir\goodnews.doc"   ".doc"
-//      "\\server\share\folder"               "Directory"
-//      "c:\foo\MyFolder"                     "Directory"
-//      [desktop]                             "Folder"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message"
-DEFINE_PROPERTYKEY(PKEY_ItemType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 11);
-
-//  Name:     System.ItemTypeText -- PKEY_ItemTypeText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 4 (PID_STG_STORAGETYPE)
-//  
-//  This is the user friendly type name of the item.  This is not intended to be
-//  programmatically parsed.
-//  
-//  If System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY.
-//  
-//  If the item is a file, the value of this property is the same as if you passed the 
-//  file's System.ItemType value to PSFormatForDisplay.
-//  
-//  This property should not be confused with System.Kind, where System.Kind is a high-level
-//  user friendly kind name. For example, for a document, System.Kind = "Document" and 
-//  System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document"
-//  
-//  Example values:
-//  
-//      If the path is...                     The property value is...
-//      -----------------                     ------------------------
-//      "c:\foo\bar\hello.txt"                "Text File"
-//      "\\server\share\mydir\goodnews.doc"   "Microsoft Word Document"
-//      "\\server\share\folder"               "File Folder"
-//      "c:\foo\MyFolder"                     "File Folder"
-//      "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message"
-DEFINE_PROPERTYKEY(PKEY_ItemTypeText, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 4);
-
-//  Name:     System.ItemUrl -- PKEY_ItemUrl
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 9 (PROPID_QUERY_VIRTUALPATH)
-//  
-//  This always represents a well formed URL that points to the item.  
-//  
-//  To reference shell namespace items using shell APIs, use System.ParsingPath.
-//  
-//  Example values:
-//  
-//      Files:    "file:///c:/foo/bar/hello.txt"
-//                "csc://{GUID}/..."
-//      Messages: "mapi://..."
-DEFINE_PROPERTYKEY(PKEY_ItemUrl, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 9);
-
-//  Name:     System.Keywords -- PKEY_Keywords
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)  Legacy code may treat this as VT_LPSTR.
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 5 (PIDSI_KEYWORDS)
-//
-//  The keywords for the item.  Also referred to as tags.
-DEFINE_PROPERTYKEY(PKEY_Keywords, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 5);
-
-//  Name:     System.Kind -- PKEY_Kind
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 1E3EE840-BC2B-476C-8237-2ACD1A839B22, 3
-//  
-//  System.Kind is used to map extensions to various .Search folders.
-//  Extensions are mapped to Kinds at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap
-//  The list of kinds is not extensible.
-DEFINE_PROPERTYKEY(PKEY_Kind, 0x1E3EE840, 0xBC2B, 0x476C, 0x82, 0x37, 0x2A, 0xCD, 0x1A, 0x83, 0x9B, 0x22, 3);
-
-// Possible discrete values for PKEY_Kind are:
-#define KIND_CALENDAR                       L"calendar"
-#define KIND_COMMUNICATION                  L"communication"
-#define KIND_CONTACT                        L"contact"
-#define KIND_DOCUMENT                       L"document"
-#define KIND_EMAIL                          L"email"
-#define KIND_FEED                           L"feed"
-#define KIND_FOLDER                         L"folder"
-#define KIND_GAME                           L"game"
-#define KIND_INSTANTMESSAGE                 L"instantmessage"
-#define KIND_JOURNAL                        L"journal"
-#define KIND_LINK                           L"link"
-#define KIND_MOVIE                          L"movie"
-#define KIND_MUSIC                          L"music"
-#define KIND_NOTE                           L"note"
-#define KIND_PICTURE                        L"picture"
-#define KIND_PROGRAM                        L"program"
-#define KIND_RECORDEDTV                     L"recordedtv"
-#define KIND_SEARCHFOLDER                   L"searchfolder"
-#define KIND_TASK                           L"task"
-#define KIND_VIDEO                          L"video"
-#define KIND_WEBHISTORY                     L"webhistory"
-
-//  Name:     System.KindText -- PKEY_KindText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F04BEF95-C585-4197-A2B7-DF46FDC9EE6D, 100
-//  
-//  This is the user-friendly form of System.Kind.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_KindText, 0xF04BEF95, 0xC585, 0x4197, 0xA2, 0xB7, 0xDF, 0x46, 0xFD, 0xC9, 0xEE, 0x6D, 100);
-
-//  Name:     System.Language -- PKEY_Language
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 28
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Language, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 28);
-
-//  Name:     System.MileageInformation -- PKEY_MileageInformation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: FDF84370-031A-4ADD-9E91-0D775F1C6605, 100
-DEFINE_PROPERTYKEY(PKEY_MileageInformation, 0xFDF84370, 0x031A, 0x4ADD, 0x9E, 0x91, 0x0D, 0x77, 0x5F, 0x1C, 0x66, 0x05, 100);
-
-//  Name:     System.MIMEType -- PKEY_MIMEType
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 5
-//
-//  The MIME type.  Eg, for EML files: 'message/rfc822'.
-DEFINE_PROPERTYKEY(PKEY_MIMEType, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 5);
-
-//  Name:     System.Null -- PKEY_Null
-//  Type:     Null -- VT_NULL
-//  FormatID: 00000000-0000-0000-0000-000000000000, 0
-DEFINE_PROPERTYKEY(PKEY_Null, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0);
-
-//  Name:     System.OfflineAvailability -- PKEY_OfflineAvailability
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: A94688B6-7D9F-4570-A648-E3DFC0AB2B3F, 100
-DEFINE_PROPERTYKEY(PKEY_OfflineAvailability, 0xA94688B6, 0x7D9F, 0x4570, 0xA6, 0x48, 0xE3, 0xDF, 0xC0, 0xAB, 0x2B, 0x3F, 100);
-
-// Possible discrete values for PKEY_OfflineAvailability are:
-#define OFFLINEAVAILABILITY_NOT_AVAILABLE   0ul
-#define OFFLINEAVAILABILITY_AVAILABLE       1ul
-#define OFFLINEAVAILABILITY_ALWAYS_AVAILABLE 2ul
-
-//  Name:     System.OfflineStatus -- PKEY_OfflineStatus
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 6D24888F-4718-4BDA-AFED-EA0FB4386CD8, 100
-DEFINE_PROPERTYKEY(PKEY_OfflineStatus, 0x6D24888F, 0x4718, 0x4BDA, 0xAF, 0xED, 0xEA, 0x0F, 0xB4, 0x38, 0x6C, 0xD8, 100);
-
-// Possible discrete values for PKEY_OfflineStatus are:
-#define OFFLINESTATUS_ONLINE                0ul
-#define OFFLINESTATUS_OFFLINE               1ul
-#define OFFLINESTATUS_OFFLINE_FORCED        2ul
-#define OFFLINESTATUS_OFFLINE_SLOW          3ul
-#define OFFLINESTATUS_OFFLINE_ERROR         4ul
-#define OFFLINESTATUS_OFFLINE_ITEM_VERSION_CONFLICT 5ul
-#define OFFLINESTATUS_OFFLINE_SUSPENDED     6ul
-
-//  Name:     System.OriginalFileName -- PKEY_OriginalFileName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 6
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_OriginalFileName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 6);
-
-//  Name:     System.ParentalRating -- PKEY_ParentalRating
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 21 (PIDMSI_PARENTAL_RATING)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_ParentalRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 21);
-
-//  Name:     System.ParentalRatingReason -- PKEY_ParentalRatingReason
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 10984E0A-F9F2-4321-B7EF-BAF195AF4319, 100
-DEFINE_PROPERTYKEY(PKEY_ParentalRatingReason, 0x10984E0A, 0xF9F2, 0x4321, 0xB7, 0xEF, 0xBA, 0xF1, 0x95, 0xAF, 0x43, 0x19, 100);
-
-//  Name:     System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A7FE0840-1344-46F0-8D37-52ED712A4BF9, 100
-DEFINE_PROPERTYKEY(PKEY_ParentalRatingsOrganization, 0xA7FE0840, 0x1344, 0x46F0, 0x8D, 0x37, 0x52, 0xED, 0x71, 0x2A, 0x4B, 0xF9, 100);
-
-//  Name:     System.ParsingBindContext -- PKEY_ParsingBindContext
-//  Type:     Any -- VT_NULL  Legacy code may treat this as VT_UNKNOWN.
-//  FormatID: DFB9A04D-362F-4CA3-B30B-0254B17B5B84, 100
-//  
-//  used to get the IBindCtx for an item for parsing
-DEFINE_PROPERTYKEY(PKEY_ParsingBindContext, 0xDFB9A04D, 0x362F, 0x4CA3, 0xB3, 0x0B, 0x02, 0x54, 0xB1, 0x7B, 0x5B, 0x84, 100);
-
-//  Name:     System.ParsingName -- PKEY_ParsingName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 24
-//  
-//  The shell namespace name of an item relative to a parent folder.  This name may be passed to 
-//  IShellFolder::ParseDisplayName() of the parent shell folder.
-DEFINE_PROPERTYKEY(PKEY_ParsingName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 24);
-
-//  Name:     System.ParsingPath -- PKEY_ParsingPath
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 30
-//  
-//  This is the shell namespace path to the item.  This path may be passed to 
-//  SHParseDisplayName to parse the path to the correct shell folder.
-//  
-//  If the item is a file, the value is identical to System.ItemPathDisplay.
-//  
-//  If the item cannot be accessed through the shell namespace, this value is VT_EMPTY.
-DEFINE_PROPERTYKEY(PKEY_ParsingPath, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 30);
-
-//  Name:     System.PerceivedType -- PKEY_PerceivedType
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 9
-//
-//  The perceived type of a shell item, based upon its canonical type.
-DEFINE_PROPERTYKEY(PKEY_PerceivedType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 9);
-
-// For the enumerated values of PKEY_PerceivedType, see the PERCEIVED_TYPE_* values in shtypes.idl.
-
-//  Name:     System.PercentFull -- PKEY_PercentFull
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 5  (Filesystem Volume Properties)
-//
-//  The amount filled as a percentage, multiplied by 100 (ie, the valid range is 0 through 100).
-DEFINE_PROPERTYKEY(PKEY_PercentFull, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 5);
-
-//  Name:     System.Priority -- PKEY_Priority
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 5
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Priority, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 5);
-
-// Possible discrete values for PKEY_Priority are:
-#define PRIORITY_PROP_LOW                   0u
-#define PRIORITY_PROP_NORMAL                1u
-#define PRIORITY_PROP_HIGH                  2u
-
-//  Name:     System.PriorityText -- PKEY_PriorityText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: D98BE98B-B86B-4095-BF52-9D23B2E0A752, 100
-//  
-//  This is the user-friendly form of System.Priority.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_PriorityText, 0xD98BE98B, 0xB86B, 0x4095, 0xBF, 0x52, 0x9D, 0x23, 0xB2, 0xE0, 0xA7, 0x52, 100);
-
-//  Name:     System.Project -- PKEY_Project
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 39A7F922-477C-48DE-8BC8-B28441E342E3, 100
-DEFINE_PROPERTYKEY(PKEY_Project, 0x39A7F922, 0x477C, 0x48DE, 0x8B, 0xC8, 0xB2, 0x84, 0x41, 0xE3, 0x42, 0xE3, 100);
-
-//  Name:     System.ProviderItemID -- PKEY_ProviderItemID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F21D9941-81F0-471A-ADEE-4E74B49217ED, 100
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_ProviderItemID, 0xF21D9941, 0x81F0, 0x471A, 0xAD, 0xEE, 0x4E, 0x74, 0xB4, 0x92, 0x17, 0xED, 100);
-
-//  Name:     System.Rating -- PKEY_Rating
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 9 (PIDMSI_RATING)
-//  
-//  Indicates the users preference rating of an item on a scale of 0-99 (0 = unrated, 1-12 = One Star, 
-//  13-37 = Two Stars, 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars).
-DEFINE_PROPERTYKEY(PKEY_Rating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
-
-// Use the following constants to convert between visual stars and the ratings value:
-#define RATING_UNRATED_MIN                  0ul
-#define RATING_UNRATED_SET                  0ul
-#define RATING_UNRATED_MAX                  0ul
-
-#define RATING_ONE_STAR_MIN                 1ul
-#define RATING_ONE_STAR_SET                 1ul
-#define RATING_ONE_STAR_MAX                 12ul
-
-#define RATING_TWO_STARS_MIN                13ul
-#define RATING_TWO_STARS_SET                25ul
-#define RATING_TWO_STARS_MAX                37ul
-
-#define RATING_THREE_STARS_MIN              38ul
-#define RATING_THREE_STARS_SET              50ul
-#define RATING_THREE_STARS_MAX              62ul
-
-#define RATING_FOUR_STARS_MIN               63ul
-#define RATING_FOUR_STARS_SET               75ul
-#define RATING_FOUR_STARS_MAX               87ul
-
-#define RATING_FIVE_STARS_MIN               88ul
-#define RATING_FIVE_STARS_SET               99ul
-#define RATING_FIVE_STARS_MAX               99ul
-
-
-//  Name:     System.RatingText -- PKEY_RatingText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 90197CA7-FD8F-4E8C-9DA3-B57E1E609295, 100
-//  
-//  This is the user-friendly form of System.Rating.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_RatingText, 0x90197CA7, 0xFD8F, 0x4E8C, 0x9D, 0xA3, 0xB5, 0x7E, 0x1E, 0x60, 0x92, 0x95, 100);
-
-//  Name:     System.Sensitivity -- PKEY_Sensitivity
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: F8D3F6AC-4874-42CB-BE59-AB454B30716A, 100
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Sensitivity, 0xF8D3F6AC, 0x4874, 0x42CB, 0xBE, 0x59, 0xAB, 0x45, 0x4B, 0x30, 0x71, 0x6A, 100);
-
-// Possible discrete values for PKEY_Sensitivity are:
-#define SENSITIVITY_PROP_NORMAL             0u
-#define SENSITIVITY_PROP_PERSONAL           1u
-#define SENSITIVITY_PROP_PRIVATE            2u
-#define SENSITIVITY_PROP_CONFIDENTIAL       3u
-
-//  Name:     System.SensitivityText -- PKEY_SensitivityText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: D0C7F054-3F72-4725-8527-129A577CB269, 100
-//  
-//  This is the user-friendly form of System.Sensitivity.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_SensitivityText, 0xD0C7F054, 0x3F72, 0x4725, 0x85, 0x27, 0x12, 0x9A, 0x57, 0x7C, 0xB2, 0x69, 100);
-
-//  Name:     System.SFGAOFlags -- PKEY_SFGAOFlags
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 25
-//
-//  IShellFolder::GetAttributesOf flags, with SFGAO_PKEYSFGAOMASK attributes masked out.
-DEFINE_PROPERTYKEY(PKEY_SFGAOFlags, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 25);
-
-//  Name:     System.SharedWith -- PKEY_SharedWith
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 200
-//
-//  Who is the item shared with?
-DEFINE_PROPERTYKEY(PKEY_SharedWith, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 200);
-
-//  Name:     System.ShareUserRating -- PKEY_ShareUserRating
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 12 (PIDMSI_SHARE_USER_RATING)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_ShareUserRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);
-
-//  Name:     System.Shell.OmitFromView -- PKEY_Shell_OmitFromView
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DE35258C-C695-4CBC-B982-38B0AD24CED0, 2
-//  
-//  Set this to a string value of 'True' to omit this item from shell views
-DEFINE_PROPERTYKEY(PKEY_Shell_OmitFromView, 0xDE35258C, 0xC695, 0x4CBC, 0xB9, 0x82, 0x38, 0xB0, 0xAD, 0x24, 0xCE, 0xD0, 2);
-
-//  Name:     System.SimpleRating -- PKEY_SimpleRating
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: A09F084E-AD41-489F-8076-AA5BE3082BCA, 100
-//  
-//  Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three Stars,
-//  4=Four Stars, 5=Five Stars)
-DEFINE_PROPERTYKEY(PKEY_SimpleRating, 0xA09F084E, 0xAD41, 0x489F, 0x80, 0x76, 0xAA, 0x5B, 0xE3, 0x08, 0x2B, 0xCA, 100);
-
-//  Name:     System.Size -- PKEY_Size
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 12 (PID_STG_SIZE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
-
-//  Name:     System.SoftwareUsed -- PKEY_SoftwareUsed
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 305
-//
-//  PropertyTagSoftwareUsed
-DEFINE_PROPERTYKEY(PKEY_SoftwareUsed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 305);
-
-//  Name:     System.SourceItem -- PKEY_SourceItem
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 668CDFA5-7A1B-4323-AE4B-E527393A1D81, 100
-DEFINE_PROPERTYKEY(PKEY_SourceItem, 0x668CDFA5, 0x7A1B, 0x4323, 0xAE, 0x4B, 0xE5, 0x27, 0x39, 0x3A, 0x1D, 0x81, 100);
-
-//  Name:     System.StartDate -- PKEY_StartDate
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE, 100
-DEFINE_PROPERTYKEY(PKEY_StartDate, 0x48FD6EC8, 0x8A12, 0x4CDF, 0xA0, 0x3E, 0x4E, 0xC5, 0xA5, 0x11, 0xED, 0xDE, 100);
-
-//  Name:     System.Status -- PKEY_Status
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_IntSite) 000214A1-0000-0000-C000-000000000046, 9
-DEFINE_PROPERTYKEY(PKEY_Status, 0x000214A1, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 9);
-
-//  Name:     System.Subject -- PKEY_Subject
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 3 (PIDSI_SUBJECT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Subject, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 3);
-
-//  Name:     System.Thumbnail -- PKEY_Thumbnail
-//  Type:     Clipboard -- VT_CF
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 17 (PIDSI_THUMBNAIL)
-//
-//  A data that represents the thumbnail in VT_CF format.
-DEFINE_PROPERTYKEY(PKEY_Thumbnail, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 17);
-
-//  Name:     System.ThumbnailCacheId -- PKEY_ThumbnailCacheId
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: 446D16B1-8DAD-4870-A748-402EA43D788C, 100
-//  
-//  Unique value that can be used as a key to cache thumbnails. The value changes when the name, volume, or data modified 
-//  of an item changes.
-DEFINE_PROPERTYKEY(PKEY_ThumbnailCacheId, 0x446D16B1, 0x8DAD, 0x4870, 0xA7, 0x48, 0x40, 0x2E, 0xA4, 0x3D, 0x78, 0x8C, 100);
-
-//  Name:     System.ThumbnailStream -- PKEY_ThumbnailStream
-//  Type:     Stream -- VT_STREAM
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 27
-//
-//  Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc).
-DEFINE_PROPERTYKEY(PKEY_ThumbnailStream, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 27);
-
-//  Name:     System.Title -- PKEY_Title
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_LPSTR.
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 2 (PIDSI_TITLE)
-//
-//  Title of item.
-DEFINE_PROPERTYKEY(PKEY_Title, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 2);
-
-//  Name:     System.TotalFileSize -- PKEY_TotalFileSize
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 14
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_TotalFileSize, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 14);
-
-//  Name:     System.Trademarks -- PKEY_Trademarks
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 9 (PIDVSI_Trademarks)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Trademarks, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 9);
- 
-//-----------------------------------------------------------------------------
-// Document properties
-
-
-
-//  Name:     System.Document.ByteCount -- PKEY_Document_ByteCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 4 (PIDDSI_BYTECOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_ByteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 4);
-
-//  Name:     System.Document.CharacterCount -- PKEY_Document_CharacterCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 16 (PIDSI_CHARCOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_CharacterCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 16);
-
-//  Name:     System.Document.ClientID -- PKEY_Document_ClientID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 276D7BB0-5B34-4FB0-AA4B-158ED12A1809, 100
-DEFINE_PROPERTYKEY(PKEY_Document_ClientID, 0x276D7BB0, 0x5B34, 0x4FB0, 0xAA, 0x4B, 0x15, 0x8E, 0xD1, 0x2A, 0x18, 0x09, 100);
-
-//  Name:     System.Document.Contributor -- PKEY_Document_Contributor
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: F334115E-DA1B-4509-9B3D-119504DC7ABB, 100
-DEFINE_PROPERTYKEY(PKEY_Document_Contributor, 0xF334115E, 0xDA1B, 0x4509, 0x9B, 0x3D, 0x11, 0x95, 0x04, 0xDC, 0x7A, 0xBB, 100);
-
-//  Name:     System.Document.DateCreated -- PKEY_Document_DateCreated
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 12 (PIDSI_CREATE_DTM)
-//  
-//  This property is stored in the document, not obtained from the file system.
-DEFINE_PROPERTYKEY(PKEY_Document_DateCreated, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 12);
-
-//  Name:     System.Document.DatePrinted -- PKEY_Document_DatePrinted
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 11 (PIDSI_LASTPRINTED)
-//
-//  Legacy name: "DocLastPrinted".
-DEFINE_PROPERTYKEY(PKEY_Document_DatePrinted, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 11);
-
-//  Name:     System.Document.DateSaved -- PKEY_Document_DateSaved
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 13 (PIDSI_LASTSAVE_DTM)
-//
-//  Legacy name: "DocLastSavedTm".
-DEFINE_PROPERTYKEY(PKEY_Document_DateSaved, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 13);
-
-//  Name:     System.Document.Division -- PKEY_Document_Division
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 1E005EE6-BF27-428B-B01C-79676ACD2870, 100
-DEFINE_PROPERTYKEY(PKEY_Document_Division, 0x1E005EE6, 0xBF27, 0x428B, 0xB0, 0x1C, 0x79, 0x67, 0x6A, 0xCD, 0x28, 0x70, 100);
-
-//  Name:     System.Document.DocumentID -- PKEY_Document_DocumentID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E08805C8-E395-40DF-80D2-54F0D6C43154, 100
-DEFINE_PROPERTYKEY(PKEY_Document_DocumentID, 0xE08805C8, 0xE395, 0x40DF, 0x80, 0xD2, 0x54, 0xF0, 0xD6, 0xC4, 0x31, 0x54, 100);
-
-//  Name:     System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 9 (PIDDSI_HIDDENCOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_HiddenSlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 9);
-
-//  Name:     System.Document.LastAuthor -- PKEY_Document_LastAuthor
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 8 (PIDSI_LASTAUTHOR)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_LastAuthor, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 8);
-
-//  Name:     System.Document.LineCount -- PKEY_Document_LineCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 5 (PIDDSI_LINECOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_LineCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 5);
-
-//  Name:     System.Document.Manager -- PKEY_Document_Manager
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 14 (PIDDSI_MANAGER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_Manager, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 14);
-
-//  Name:     System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 10 (PIDDSI_MMCLIPCOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_MultimediaClipCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 10);
-
-//  Name:     System.Document.NoteCount -- PKEY_Document_NoteCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 8 (PIDDSI_NOTECOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_NoteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 8);
-
-//  Name:     System.Document.PageCount -- PKEY_Document_PageCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 14 (PIDSI_PAGECOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_PageCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 14);
-
-//  Name:     System.Document.ParagraphCount -- PKEY_Document_ParagraphCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 6 (PIDDSI_PARCOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_ParagraphCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 6);
-
-//  Name:     System.Document.PresentationFormat -- PKEY_Document_PresentationFormat
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 3 (PIDDSI_PRESFORMAT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_PresentationFormat, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 3);
-
-//  Name:     System.Document.RevisionNumber -- PKEY_Document_RevisionNumber
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 9 (PIDSI_REVNUMBER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_RevisionNumber, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 9);
-
-//  Name:     System.Document.Security -- PKEY_Document_Security
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 19
-//
-//  Access control information, from SummaryInfo propset
-DEFINE_PROPERTYKEY(PKEY_Document_Security, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 19);
-
-//  Name:     System.Document.SlideCount -- PKEY_Document_SlideCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 7 (PIDDSI_SLIDECOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_SlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 7);
-
-//  Name:     System.Document.Template -- PKEY_Document_Template
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 7 (PIDSI_TEMPLATE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_Template, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 7);
-
-//  Name:     System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 10 (PIDSI_EDITTIME)
-//
-//  100ns units, not milliseconds. VT_FILETIME for IPropertySetStorage handlers (legacy)
-DEFINE_PROPERTYKEY(PKEY_Document_TotalEditingTime, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 10);
-
-//  Name:     System.Document.Version -- PKEY_Document_Version
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 29
-DEFINE_PROPERTYKEY(PKEY_Document_Version, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 29);
-
-//  Name:     System.Document.WordCount -- PKEY_Document_WordCount
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 15 (PIDSI_WORDCOUNT)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Document_WordCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 15);
-
- 
- 
-//-----------------------------------------------------------------------------
-// DRM properties
-
-//  Name:     System.DRM.DatePlayExpires -- PKEY_DRM_DatePlayExpires
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 6 (PIDDRSI_PLAYEXPIRES)
-//
-//  Indicates when play expires for digital rights management.
-DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayExpires, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 6);
-
-//  Name:     System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 5 (PIDDRSI_PLAYSTARTS)
-//
-//  Indicates when play starts for digital rights management.
-DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayStarts, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 5);
-
-//  Name:     System.DRM.Description -- PKEY_DRM_Description
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 3 (PIDDRSI_DESCRIPTION)
-//
-//  Displays the description for digital rights management.
-DEFINE_PROPERTYKEY(PKEY_DRM_Description, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 3);
-
-//  Name:     System.DRM.IsProtected -- PKEY_DRM_IsProtected
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 2 (PIDDRSI_PROTECTED)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_DRM_IsProtected, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 2);
-
-//  Name:     System.DRM.PlayCount -- PKEY_DRM_PlayCount
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 4 (PIDDRSI_PLAYCOUNT)
-//
-//  Indicates the play count for digital rights management.
-DEFINE_PROPERTYKEY(PKEY_DRM_PlayCount, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 4);
- 
-//-----------------------------------------------------------------------------
-// GPS properties
-
-//  Name:     System.GPS.Altitude -- PKEY_GPS_Altitude
-//  Type:     Double -- VT_R8
-//  FormatID: 827EDB4F-5B73-44A7-891D-FDFFABEA35CA, 100
-//  
-//  Indicates the altitude based on the reference in PKEY_GPS_AltitudeRef.  Calculated from PKEY_GPS_AltitudeNumerator and 
-//  PKEY_GPS_AltitudeDenominator
-DEFINE_PROPERTYKEY(PKEY_GPS_Altitude, 0x827EDB4F, 0x5B73, 0x44A7, 0x89, 0x1D, 0xFD, 0xFF, 0xAB, 0xEA, 0x35, 0xCA, 100);
-
-//  Name:     System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 78342DCB-E358-4145-AE9A-6BFE4E0F9F51, 100
-//
-//  Denominator of PKEY_GPS_Altitude
-DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeDenominator, 0x78342DCB, 0xE358, 0x4145, 0xAE, 0x9A, 0x6B, 0xFE, 0x4E, 0x0F, 0x9F, 0x51, 100);
-
-//  Name:     System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE, 100
-//
-//  Numerator of PKEY_GPS_Altitude
-DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeNumerator, 0x2DAD1EB7, 0x816D, 0x40D3, 0x9E, 0xC3, 0xC9, 0x77, 0x3B, 0xE2, 0xAA, 0xDE, 100);
-
-//  Name:     System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef
-//  Type:     Byte -- VT_UI1
-//  FormatID: 46AC629D-75EA-4515-867F-6DC4321C5844, 100
-//
-//  Indicates the reference for the altitude property. (eg: above sea level, below sea level, absolute value)
-DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeRef, 0x46AC629D, 0x75EA, 0x4515, 0x86, 0x7F, 0x6D, 0xC4, 0x32, 0x1C, 0x58, 0x44, 100);
-
-//  Name:     System.GPS.AreaInformation -- PKEY_GPS_AreaInformation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 972E333E-AC7E-49F1-8ADF-A70D07A9BCAB, 100
-//
-//  Represents the name of the GPS area
-DEFINE_PROPERTYKEY(PKEY_GPS_AreaInformation, 0x972E333E, 0xAC7E, 0x49F1, 0x8A, 0xDF, 0xA7, 0x0D, 0x07, 0xA9, 0xBC, 0xAB, 100);
-
-//  Name:     System.GPS.Date -- PKEY_GPS_Date
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 3602C812-0F3B-45F0-85AD-603468D69423, 100
-//
-//  Date and time of the GPS record
-DEFINE_PROPERTYKEY(PKEY_GPS_Date, 0x3602C812, 0x0F3B, 0x45F0, 0x85, 0xAD, 0x60, 0x34, 0x68, 0xD6, 0x94, 0x23, 100);
-
-//  Name:     System.GPS.DestBearing -- PKEY_GPS_DestBearing
-//  Type:     Double -- VT_R8
-//  FormatID: C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA, 100
-//  
-//  Indicates the bearing to the destination point.  Calculated from PKEY_GPS_DestBearingNumerator and 
-//  PKEY_GPS_DestBearingDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearing, 0xC66D4B3C, 0xE888, 0x47CC, 0xB9, 0x9F, 0x9D, 0xCA, 0x3E, 0xE3, 0x4D, 0xEA, 100);
-
-//  Name:     System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5, 100
-//
-//  Denominator of PKEY_GPS_DestBearing
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingDenominator, 0x7ABCF4F8, 0x7C3F, 0x4988, 0xAC, 0x91, 0x8D, 0x2C, 0x2E, 0x97, 0xEC, 0xA5, 100);
-
-//  Name:     System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF, 100
-//
-//  Numerator of PKEY_GPS_DestBearing
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingNumerator, 0xBA3B1DA9, 0x86EE, 0x4B5D, 0xA2, 0xA4, 0xA2, 0x71, 0xA4, 0x29, 0xF0, 0xCF, 100);
-
-//  Name:     System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 9AB84393-2A0F-4B75-BB22-7279786977CB, 100
-//
-//  Indicates the reference used for the giving the bearing to the destination point.  (eg: true direction, magnetic direction)
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingRef, 0x9AB84393, 0x2A0F, 0x4B75, 0xBB, 0x22, 0x72, 0x79, 0x78, 0x69, 0x77, 0xCB, 100);
-
-//  Name:     System.GPS.DestDistance -- PKEY_GPS_DestDistance
-//  Type:     Double -- VT_R8
-//  FormatID: A93EAE04-6804-4F24-AC81-09B266452118, 100
-//  
-//  Indicates the distance to the destination point.  Calculated from PKEY_GPS_DestDistanceNumerator and 
-//  PKEY_GPS_DestDistanceDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistance, 0xA93EAE04, 0x6804, 0x4F24, 0xAC, 0x81, 0x09, 0xB2, 0x66, 0x45, 0x21, 0x18, 100);
-
-//  Name:     System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7, 100
-//
-//  Denominator of PKEY_GPS_DestDistance
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceDenominator, 0x9BC2C99B, 0xAC71, 0x4127, 0x9D, 0x1C, 0x25, 0x96, 0xD0, 0xD7, 0xDC, 0xB7, 100);
-
-//  Name:     System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0, 100
-//
-//  Numerator of PKEY_GPS_DestDistance
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceNumerator, 0x2BDA47DA, 0x08C6, 0x4FE1, 0x80, 0xBC, 0xA7, 0x2F, 0xC5, 0x17, 0xC5, 0xD0, 100);
-
-//  Name:     System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: ED4DF2D3-8695-450B-856F-F5C1C53ACB66, 100
-//
-//  Indicates the unit used to express the distance to the destination.  (eg: kilometers, miles, knots)
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceRef, 0xED4DF2D3, 0x8695, 0x450B, 0x85, 0x6F, 0xF5, 0xC1, 0xC5, 0x3A, 0xCB, 0x66, 100);
-
-//  Name:     System.GPS.DestLatitude -- PKEY_GPS_DestLatitude
-//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
-//  FormatID: 9D1D7CC5-5C39-451C-86B3-928E2D18CC47, 100
-//  
-//  Indicates the latitude of the destination point.  This is an array of three values.  Index 0 is the degrees, index 1 
-//  is the minutes, index 2 is the seconds.  Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and 
-//  PKEY_GPS_DestLatitudeDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitude, 0x9D1D7CC5, 0x5C39, 0x451C, 0x86, 0xB3, 0x92, 0x8E, 0x2D, 0x18, 0xCC, 0x47, 100);
-
-//  Name:     System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: 3A372292-7FCA-49A7-99D5-E47BB2D4E7AB, 100
-//
-//  Denominator of PKEY_GPS_DestLatitude
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeDenominator, 0x3A372292, 0x7FCA, 0x49A7, 0x99, 0xD5, 0xE4, 0x7B, 0xB2, 0xD4, 0xE7, 0xAB, 100);
-
-//  Name:     System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: ECF4B6F6-D5A6-433C-BB92-4076650FC890, 100
-//
-//  Numerator of PKEY_GPS_DestLatitude
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeNumerator, 0xECF4B6F6, 0xD5A6, 0x433C, 0xBB, 0x92, 0x40, 0x76, 0x65, 0x0F, 0xC8, 0x90, 100);
-
-//  Name:     System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CEA820B9-CE61-4885-A128-005D9087C192, 100
-//
-//  Indicates whether the latitude destination point is north or south latitude
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeRef, 0xCEA820B9, 0xCE61, 0x4885, 0xA1, 0x28, 0x00, 0x5D, 0x90, 0x87, 0xC1, 0x92, 100);
-
-//  Name:     System.GPS.DestLongitude -- PKEY_GPS_DestLongitude
-//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
-//  FormatID: 47A96261-CB4C-4807-8AD3-40B9D9DBC6BC, 100
-//  
-//  Indicates the latitude of the destination point.  This is an array of three values.  Index 0 is the degrees, index 1 
-//  is the minutes, index 2 is the seconds.  Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and 
-//  PKEY_GPS_DestLongitudeDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitude, 0x47A96261, 0xCB4C, 0x4807, 0x8A, 0xD3, 0x40, 0xB9, 0xD9, 0xDB, 0xC6, 0xBC, 100);
-
-//  Name:     System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: 425D69E5-48AD-4900-8D80-6EB6B8D0AC86, 100
-//
-//  Denominator of PKEY_GPS_DestLongitude
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeDenominator, 0x425D69E5, 0x48AD, 0x4900, 0x8D, 0x80, 0x6E, 0xB6, 0xB8, 0xD0, 0xAC, 0x86, 100);
-
-//  Name:     System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: A3250282-FB6D-48D5-9A89-DBCACE75CCCF, 100
-//
-//  Numerator of PKEY_GPS_DestLongitude
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeNumerator, 0xA3250282, 0xFB6D, 0x48D5, 0x9A, 0x89, 0xDB, 0xCA, 0xCE, 0x75, 0xCC, 0xCF, 100);
-
-//  Name:     System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128, 100
-//
-//  Indicates whether the longitude destination point is east or west longitude
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeRef, 0x182C1EA6, 0x7C1C, 0x4083, 0xAB, 0x4B, 0xAC, 0x6C, 0x9F, 0x4E, 0xD1, 0x28, 100);
-
-//  Name:     System.GPS.Differential -- PKEY_GPS_Differential
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D, 100
-//
-//  Indicates whether differential correction was applied to the GPS receiver
-DEFINE_PROPERTYKEY(PKEY_GPS_Differential, 0xAAF4EE25, 0xBD3B, 0x4DD7, 0xBF, 0xC4, 0x47, 0xF7, 0x7B, 0xB0, 0x0F, 0x6D, 100);
-
-//  Name:     System.GPS.DOP -- PKEY_GPS_DOP
-//  Type:     Double -- VT_R8
-//  FormatID: 0CF8FB02-1837-42F1-A697-A7017AA289B9, 100
-//
-//  Indicates the GPS DOP (data degree of precision).  Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator
-DEFINE_PROPERTYKEY(PKEY_GPS_DOP, 0x0CF8FB02, 0x1837, 0x42F1, 0xA6, 0x97, 0xA7, 0x01, 0x7A, 0xA2, 0x89, 0xB9, 100);
-
-//  Name:     System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: A0BE94C5-50BA-487B-BD35-0654BE8881ED, 100
-//
-//  Denominator of PKEY_GPS_DOP
-DEFINE_PROPERTYKEY(PKEY_GPS_DOPDenominator, 0xA0BE94C5, 0x50BA, 0x487B, 0xBD, 0x35, 0x06, 0x54, 0xBE, 0x88, 0x81, 0xED, 100);
-
-//  Name:     System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 47166B16-364F-4AA0-9F31-E2AB3DF449C3, 100
-//
-//  Numerator of PKEY_GPS_DOP
-DEFINE_PROPERTYKEY(PKEY_GPS_DOPNumerator, 0x47166B16, 0x364F, 0x4AA0, 0x9F, 0x31, 0xE2, 0xAB, 0x3D, 0xF4, 0x49, 0xC3, 100);
-
-//  Name:     System.GPS.ImgDirection -- PKEY_GPS_ImgDirection
-//  Type:     Double -- VT_R8
-//  FormatID: 16473C91-D017-4ED9-BA4D-B6BAA55DBCF8, 100
-//  
-//  Indicates direction of the image when it was captured.  Calculated from PKEY_GPS_ImgDirectionNumerator and 
-//  PKEY_GPS_ImgDirectionDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirection, 0x16473C91, 0xD017, 0x4ED9, 0xBA, 0x4D, 0xB6, 0xBA, 0xA5, 0x5D, 0xBC, 0xF8, 100);
-
-//  Name:     System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 10B24595-41A2-4E20-93C2-5761C1395F32, 100
-//
-//  Denominator of PKEY_GPS_ImgDirection
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionDenominator, 0x10B24595, 0x41A2, 0x4E20, 0x93, 0xC2, 0x57, 0x61, 0xC1, 0x39, 0x5F, 0x32, 100);
-
-//  Name:     System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: DC5877C7-225F-45F7-BAC7-E81334B6130A, 100
-//
-//  Numerator of PKEY_GPS_ImgDirection
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionNumerator, 0xDC5877C7, 0x225F, 0x45F7, 0xBA, 0xC7, 0xE8, 0x13, 0x34, 0xB6, 0x13, 0x0A, 100);
-
-//  Name:     System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5, 100
-//
-//  Indicates reference for giving the direction of the image when it was captured.  (eg: true direction, magnetic direction)
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionRef, 0xA4AAA5B7, 0x1AD0, 0x445F, 0x81, 0x1A, 0x0F, 0x8F, 0x6E, 0x67, 0xF6, 0xB5, 100);
-
-//  Name:     System.GPS.Latitude -- PKEY_GPS_Latitude
-//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
-//  FormatID: 8727CFFF-4868-4EC6-AD5B-81B98521D1AB, 100
-//  
-//  Indicates the latitude.  This is an array of three values.  Index 0 is the degrees, index 1 is the minutes, index 2 
-//  is the seconds.  Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_Latitude, 0x8727CFFF, 0x4868, 0x4EC6, 0xAD, 0x5B, 0x81, 0xB9, 0x85, 0x21, 0xD1, 0xAB, 100);
-
-//  Name:     System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: 16E634EE-2BFF-497B-BD8A-4341AD39EEB9, 100
-//
-//  Denominator of PKEY_GPS_Latitude
-DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeDenominator, 0x16E634EE, 0x2BFF, 0x497B, 0xBD, 0x8A, 0x43, 0x41, 0xAD, 0x39, 0xEE, 0xB9, 100);
-
-//  Name:     System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: 7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2, 100
-//
-//  Numerator of PKEY_GPS_Latitude
-DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeNumerator, 0x7DDAAAD1, 0xCCC8, 0x41AE, 0xB7, 0x50, 0xB2, 0xCB, 0x80, 0x31, 0xAE, 0xA2, 100);
-
-//  Name:     System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 029C0252-5B86-46C7-ACA0-2769FFC8E3D4, 100
-//
-//  Indicates whether latitude is north or south latitude 
-DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeRef, 0x029C0252, 0x5B86, 0x46C7, 0xAC, 0xA0, 0x27, 0x69, 0xFF, 0xC8, 0xE3, 0xD4, 100);
-
-//  Name:     System.GPS.Longitude -- PKEY_GPS_Longitude
-//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
-//  FormatID: C4C4DBB2-B593-466B-BBDA-D03D27D5E43A, 100
-//  
-//  Indicates the longitude.  This is an array of three values.  Index 0 is the degrees, index 1 is the minutes, index 2 
-//  is the seconds.  Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_Longitude, 0xC4C4DBB2, 0xB593, 0x466B, 0xBB, 0xDA, 0xD0, 0x3D, 0x27, 0xD5, 0xE4, 0x3A, 100);
-
-//  Name:     System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: BE6E176C-4534-4D2C-ACE5-31DEDAC1606B, 100
-//
-//  Denominator of PKEY_GPS_Longitude
-DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeDenominator, 0xBE6E176C, 0x4534, 0x4D2C, 0xAC, 0xE5, 0x31, 0xDE, 0xDA, 0xC1, 0x60, 0x6B, 100);
-
-//  Name:     System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator
-//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
-//  FormatID: 02B0F689-A914-4E45-821D-1DDA452ED2C4, 100
-//
-//  Numerator of PKEY_GPS_Longitude
-DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeNumerator, 0x02B0F689, 0xA914, 0x4E45, 0x82, 0x1D, 0x1D, 0xDA, 0x45, 0x2E, 0xD2, 0xC4, 100);
-
-//  Name:     System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 33DCF22B-28D5-464C-8035-1EE9EFD25278, 100
-//
-//  Indicates whether longitude is east or west longitude
-DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeRef, 0x33DCF22B, 0x28D5, 0x464C, 0x80, 0x35, 0x1E, 0xE9, 0xEF, 0xD2, 0x52, 0x78, 100);
-
-//  Name:     System.GPS.MapDatum -- PKEY_GPS_MapDatum
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 2CA2DAE6-EDDC-407D-BEF1-773942ABFA95, 100
-//
-//  Indicates the geodetic survey data used by the GPS receiver
-DEFINE_PROPERTYKEY(PKEY_GPS_MapDatum, 0x2CA2DAE6, 0xEDDC, 0x407D, 0xBE, 0xF1, 0x77, 0x39, 0x42, 0xAB, 0xFA, 0x95, 100);
-
-//  Name:     System.GPS.MeasureMode -- PKEY_GPS_MeasureMode
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A015ED5D-AAEA-4D58-8A86-3C586920EA0B, 100
-//
-//  Indicates the GPS measurement mode.  (eg: 2-dimensional, 3-dimensional)
-DEFINE_PROPERTYKEY(PKEY_GPS_MeasureMode, 0xA015ED5D, 0xAAEA, 0x4D58, 0x8A, 0x86, 0x3C, 0x58, 0x69, 0x20, 0xEA, 0x0B, 100);
-
-//  Name:     System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 59D49E61-840F-4AA9-A939-E2099B7F6399, 100
-//
-//  Indicates the name of the method used for location finding
-DEFINE_PROPERTYKEY(PKEY_GPS_ProcessingMethod, 0x59D49E61, 0x840F, 0x4AA9, 0xA9, 0x39, 0xE2, 0x09, 0x9B, 0x7F, 0x63, 0x99, 100);
-
-//  Name:     System.GPS.Satellites -- PKEY_GPS_Satellites
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 467EE575-1F25-4557-AD4E-B8B58B0D9C15, 100
-//
-//  Indicates the GPS satellites used for measurements
-DEFINE_PROPERTYKEY(PKEY_GPS_Satellites, 0x467EE575, 0x1F25, 0x4557, 0xAD, 0x4E, 0xB8, 0xB5, 0x8B, 0x0D, 0x9C, 0x15, 100);
-
-//  Name:     System.GPS.Speed -- PKEY_GPS_Speed
-//  Type:     Double -- VT_R8
-//  FormatID: DA5D0862-6E76-4E1B-BABD-70021BD25494, 100
-//  
-//  Indicates the speed of the GPS receiver movement.  Calculated from PKEY_GPS_SpeedNumerator and 
-//  PKEY_GPS_SpeedDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_Speed, 0xDA5D0862, 0x6E76, 0x4E1B, 0xBA, 0xBD, 0x70, 0x02, 0x1B, 0xD2, 0x54, 0x94, 100);
-
-//  Name:     System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 7D122D5A-AE5E-4335-8841-D71E7CE72F53, 100
-//
-//  Denominator of PKEY_GPS_Speed
-DEFINE_PROPERTYKEY(PKEY_GPS_SpeedDenominator, 0x7D122D5A, 0xAE5E, 0x4335, 0x88, 0x41, 0xD7, 0x1E, 0x7C, 0xE7, 0x2F, 0x53, 100);
-
-//  Name:     System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: ACC9CE3D-C213-4942-8B48-6D0820F21C6D, 100
-//
-//  Numerator of PKEY_GPS_Speed
-DEFINE_PROPERTYKEY(PKEY_GPS_SpeedNumerator, 0xACC9CE3D, 0xC213, 0x4942, 0x8B, 0x48, 0x6D, 0x08, 0x20, 0xF2, 0x1C, 0x6D, 100);
-
-//  Name:     System.GPS.SpeedRef -- PKEY_GPS_SpeedRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453, 100
-//  
-//  Indicates the unit used to express the speed of the GPS receiver movement.  (eg: kilometers per hour, 
-//  miles per hour, knots).
-DEFINE_PROPERTYKEY(PKEY_GPS_SpeedRef, 0xECF7F4C9, 0x544F, 0x4D6D, 0x9D, 0x98, 0x8A, 0xD7, 0x9A, 0xDA, 0xF4, 0x53, 100);
-
-//  Name:     System.GPS.Status -- PKEY_GPS_Status
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 125491F4-818F-46B2-91B5-D537753617B2, 100
-//  
-//  Indicates the status of the GPS receiver when the image was recorded.  (eg: measurement in progress, 
-//  measurement interoperability).
-DEFINE_PROPERTYKEY(PKEY_GPS_Status, 0x125491F4, 0x818F, 0x46B2, 0x91, 0xB5, 0xD5, 0x37, 0x75, 0x36, 0x17, 0xB2, 100);
-
-//  Name:     System.GPS.Track -- PKEY_GPS_Track
-//  Type:     Double -- VT_R8
-//  FormatID: 76C09943-7C33-49E3-9E7E-CDBA872CFADA, 100
-//  
-//  Indicates the direction of the GPS receiver movement.  Calculated from PKEY_GPS_TrackNumerator and 
-//  PKEY_GPS_TrackDenominator.
-DEFINE_PROPERTYKEY(PKEY_GPS_Track, 0x76C09943, 0x7C33, 0x49E3, 0x9E, 0x7E, 0xCD, 0xBA, 0x87, 0x2C, 0xFA, 0xDA, 100);
-
-//  Name:     System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: C8D1920C-01F6-40C0-AC86-2F3A4AD00770, 100
-//
-//  Denominator of PKEY_GPS_Track
-DEFINE_PROPERTYKEY(PKEY_GPS_TrackDenominator, 0xC8D1920C, 0x01F6, 0x40C0, 0xAC, 0x86, 0x2F, 0x3A, 0x4A, 0xD0, 0x07, 0x70, 100);
-
-//  Name:     System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 702926F4-44A6-43E1-AE71-45627116893B, 100
-//
-//  Numerator of PKEY_GPS_Track
-DEFINE_PROPERTYKEY(PKEY_GPS_TrackNumerator, 0x702926F4, 0x44A6, 0x43E1, 0xAE, 0x71, 0x45, 0x62, 0x71, 0x16, 0x89, 0x3B, 100);
-
-//  Name:     System.GPS.TrackRef -- PKEY_GPS_TrackRef
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 35DBE6FE-44C3-4400-AAAE-D2C799C407E8, 100
-//
-//  Indicates reference for the direction of the GPS receiver movement.  (eg: true direction, magnetic direction)
-DEFINE_PROPERTYKEY(PKEY_GPS_TrackRef, 0x35DBE6FE, 0x44C3, 0x4400, 0xAA, 0xAE, 0xD2, 0xC7, 0x99, 0xC4, 0x07, 0xE8, 100);
-
-//  Name:     System.GPS.VersionID -- PKEY_GPS_VersionID
-//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
-//  FormatID: 22704DA4-C6B2-4A99-8E56-F16DF8C92599, 100
-//
-//  Indicates the version of the GPS information
-DEFINE_PROPERTYKEY(PKEY_GPS_VersionID, 0x22704DA4, 0xC6B2, 0x4A99, 0x8E, 0x56, 0xF1, 0x6D, 0xF8, 0xC9, 0x25, 0x99, 100);
- 
-//-----------------------------------------------------------------------------
-// Image properties
-
-
-
-//  Name:     System.Image.BitDepth -- PKEY_Image_BitDepth
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 7 (PIDISI_BITDEPTH)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Image_BitDepth, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);
-
-//  Name:     System.Image.ColorSpace -- PKEY_Image_ColorSpace
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 40961
-//
-//  PropertyTagExifColorSpace
-DEFINE_PROPERTYKEY(PKEY_Image_ColorSpace, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 40961);
-
-// Possible discrete values for PKEY_Image_ColorSpace are:
-#define IMAGE_COLORSPACE_SRGB               1u
-#define IMAGE_COLORSPACE_UNCALIBRATED       0xFFFFu
-
-//  Name:     System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel
-//  Type:     Double -- VT_R8
-//  FormatID: 364B6FA9-37AB-482A-BE2B-AE02F60D4318, 100
-//
-//  Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator.
-DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixel, 0x364B6FA9, 0x37AB, 0x482A, 0xBE, 0x2B, 0xAE, 0x02, 0xF6, 0x0D, 0x43, 0x18, 100);
-
-//  Name:     System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 1F8844E1-24AD-4508-9DFD-5326A415CE02, 100
-//
-//  Denominator of PKEY_Image_CompressedBitsPerPixel.
-DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelDenominator, 0x1F8844E1, 0x24AD, 0x4508, 0x9D, 0xFD, 0x53, 0x26, 0xA4, 0x15, 0xCE, 0x02, 100);
-
-//  Name:     System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: D21A7148-D32C-4624-8900-277210F79C0F, 100
-//
-//  Numerator of PKEY_Image_CompressedBitsPerPixel.
-DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelNumerator, 0xD21A7148, 0xD32C, 0x4624, 0x89, 0x00, 0x27, 0x72, 0x10, 0xF7, 0x9C, 0x0F, 100);
-
-//  Name:     System.Image.Compression -- PKEY_Image_Compression
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 259
-//
-//  Indicates the image compression level.  PropertyTagCompression.
-DEFINE_PROPERTYKEY(PKEY_Image_Compression, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 259);
-
-// Possible discrete values for PKEY_Image_Compression are:
-#define IMAGE_COMPRESSION_UNCOMPRESSED      1u
-#define IMAGE_COMPRESSION_CCITT_T3          2u
-#define IMAGE_COMPRESSION_CCITT_T4          3u
-#define IMAGE_COMPRESSION_CCITT_T6          4u
-#define IMAGE_COMPRESSION_LZW               5u
-#define IMAGE_COMPRESSION_JPEG              6u
-#define IMAGE_COMPRESSION_PACKBITS          32773u
-
-//  Name:     System.Image.CompressionText -- PKEY_Image_CompressionText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 3F08E66F-2F44-4BB9-A682-AC35D2562322, 100
-//  
-//  This is the user-friendly form of System.Image.Compression.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Image_CompressionText, 0x3F08E66F, 0x2F44, 0x4BB9, 0xA6, 0x82, 0xAC, 0x35, 0xD2, 0x56, 0x23, 0x22, 100);
-
-//  Name:     System.Image.Dimensions -- PKEY_Image_Dimensions
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 13 (PIDISI_DIMENSIONS)
-//
-//  Indicates the dimensions of the image.
-DEFINE_PROPERTYKEY(PKEY_Image_Dimensions, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);
-
-//  Name:     System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution
-//  Type:     Double -- VT_R8
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 5 (PIDISI_RESOLUTIONX)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Image_HorizontalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);
-
-//  Name:     System.Image.HorizontalSize -- PKEY_Image_HorizontalSize
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 3 (PIDISI_CX)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Image_HorizontalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
-
-//  Name:     System.Image.ImageID -- PKEY_Image_ImageID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 10DABE05-32AA-4C29-BF1A-63E2D220587F, 100
-DEFINE_PROPERTYKEY(PKEY_Image_ImageID, 0x10DABE05, 0x32AA, 0x4C29, 0xBF, 0x1A, 0x63, 0xE2, 0xD2, 0x20, 0x58, 0x7F, 100);
-
-//  Name:     System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit
-//  Type:     Int16 -- VT_I2
-//  FormatID: 19B51FA6-1F92-4A5C-AB48-7DF0ABD67444, 100
-DEFINE_PROPERTYKEY(PKEY_Image_ResolutionUnit, 0x19B51FA6, 0x1F92, 0x4A5C, 0xAB, 0x48, 0x7D, 0xF0, 0xAB, 0xD6, 0x74, 0x44, 100);
-
-//  Name:     System.Image.VerticalResolution -- PKEY_Image_VerticalResolution
-//  Type:     Double -- VT_R8
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 6 (PIDISI_RESOLUTIONY)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Image_VerticalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
-
-//  Name:     System.Image.VerticalSize -- PKEY_Image_VerticalSize
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 4 (PIDISI_CY)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Image_VerticalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
-
- 
- 
-//-----------------------------------------------------------------------------
-// Journal properties
-
-//  Name:     System.Journal.Contacts -- PKEY_Journal_Contacts
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1, 100
-DEFINE_PROPERTYKEY(PKEY_Journal_Contacts, 0xDEA7C82C, 0x1D89, 0x4A66, 0x94, 0x27, 0xA4, 0xE3, 0xDE, 0xBA, 0xBC, 0xB1, 100);
-
-//  Name:     System.Journal.EntryType -- PKEY_Journal_EntryType
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 95BEB1FC-326D-4644-B396-CD3ED90E6DDF, 100
-DEFINE_PROPERTYKEY(PKEY_Journal_EntryType, 0x95BEB1FC, 0x326D, 0x4644, 0xB3, 0x96, 0xCD, 0x3E, 0xD9, 0x0E, 0x6D, 0xDF, 100);
- 
-//-----------------------------------------------------------------------------
-// Link properties
-
-
-
-//  Name:     System.Link.Comment -- PKEY_Link_Comment
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 5
-DEFINE_PROPERTYKEY(PKEY_Link_Comment, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 5);
-
-//  Name:     System.Link.DateVisited -- PKEY_Link_DateVisited
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 23  (PKEYs relating to URLs.  Used by IE History.)
-DEFINE_PROPERTYKEY(PKEY_Link_DateVisited, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 23);
-
-//  Name:     System.Link.Description -- PKEY_Link_Description
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 21  (PKEYs relating to URLs.  Used by IE History.)
-DEFINE_PROPERTYKEY(PKEY_Link_Description, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 21);
-
-//  Name:     System.Link.Status -- PKEY_Link_Status
-//  Type:     Int32 -- VT_I4
-//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 3 (PID_LINK_TARGET_TYPE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Link_Status, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 3);
-
-// Possible discrete values for PKEY_Link_Status are:
-#define LINK_STATUS_RESOLVED                1l
-#define LINK_STATUS_BROKEN                  2l
-
-//  Name:     System.Link.TargetExtension -- PKEY_Link_TargetExtension
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: 7A7D76F4-B630-4BD7-95FF-37CC51A975C9, 2
-//
-//  The file extension of the link target.  See System.File.Extension
-DEFINE_PROPERTYKEY(PKEY_Link_TargetExtension, 0x7A7D76F4, 0xB630, 0x4BD7, 0x95, 0xFF, 0x37, 0xCC, 0x51, 0xA9, 0x75, 0xC9, 2);
-
-//  Name:     System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 2 (PID_LINK_TARGET)
-//  
-//  This is the shell namespace path to the target of the link item.  This path may be passed to 
-//  SHParseDisplayName to parse the path to the correct shell folder.
-//  
-//  If the target item is a file, the value is identical to System.ItemPathDisplay.
-//  
-//  If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY.
-DEFINE_PROPERTYKEY(PKEY_Link_TargetParsingPath, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 2);
-
-//  Name:     System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 8
-//  
-//  IShellFolder::GetAttributesOf flags for the target of a link, with SFGAO_PKEYSFGAOMASK 
-//  attributes masked out.
-DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlags, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 8);
- 
-//-----------------------------------------------------------------------------
-// Media properties
-
-
-
-//  Name:     System.Media.AuthorUrl -- PKEY_Media_AuthorUrl
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 32 (PIDMSI_AUTHOR_URL)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_AuthorUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 32);
-
-//  Name:     System.Media.AverageLevel -- PKEY_Media_AverageLevel
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 09EDD5B6-B301-43C5-9990-D00302EFFD46, 100
-DEFINE_PROPERTYKEY(PKEY_Media_AverageLevel, 0x09EDD5B6, 0xB301, 0x43C5, 0x99, 0x90, 0xD0, 0x03, 0x02, 0xEF, 0xFD, 0x46, 100);
-
-//  Name:     System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 13 (PIDMSI_CLASS_PRIMARY_ID)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_ClassPrimaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);
-
-//  Name:     System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 14 (PIDMSI_CLASS_SECONDARY_ID)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_ClassSecondaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 14);
-
-//  Name:     System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 24 (PIDMSI_COLLECTION_GROUP_ID)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_CollectionGroupID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 24);
-
-//  Name:     System.Media.CollectionID -- PKEY_Media_CollectionID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 25 (PIDMSI_COLLECTION_ID)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_CollectionID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 25);
-
-//  Name:     System.Media.ContentDistributor -- PKEY_Media_ContentDistributor
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 18 (PIDMSI_CONTENTDISTRIBUTOR)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_ContentDistributor, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 18);
-
-//  Name:     System.Media.ContentID -- PKEY_Media_ContentID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 26 (PIDMSI_CONTENT_ID)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_ContentID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 26);
-
-//  Name:     System.Media.CreatorApplication -- PKEY_Media_CreatorApplication
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 27 (PIDMSI_TOOL_NAME)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplication, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 27);
-
-//  Name:     System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 28 (PIDMSI_TOOL_VERSION)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplicationVersion, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 28);
-
-//  Name:     System.Media.DateEncoded -- PKEY_Media_DateEncoded
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 2E4B640D-5019-46D8-8881-55414CC5CAA0, 100
-//
-//  DateTime is in UTC (in the doc, not file system).
-DEFINE_PROPERTYKEY(PKEY_Media_DateEncoded, 0x2E4B640D, 0x5019, 0x46D8, 0x88, 0x81, 0x55, 0x41, 0x4C, 0xC5, 0xCA, 0xA0, 100);
-
-//  Name:     System.Media.DateReleased -- PKEY_Media_DateReleased
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DE41CC29-6971-4290-B472-F59F2E2F31E2, 100
-DEFINE_PROPERTYKEY(PKEY_Media_DateReleased, 0xDE41CC29, 0x6971, 0x4290, 0xB4, 0x72, 0xF5, 0x9F, 0x2E, 0x2F, 0x31, 0xE2, 100);
-
-//  Name:     System.Media.Duration -- PKEY_Media_Duration
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 3 (PIDASI_TIMELENGTH)
-//
-//  100ns units, not milliseconds
-DEFINE_PROPERTYKEY(PKEY_Media_Duration, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
-
-//  Name:     System.Media.DVDID -- PKEY_Media_DVDID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 15 (PIDMSI_DVDID)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_DVDID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 15);
-
-//  Name:     System.Media.EncodedBy -- PKEY_Media_EncodedBy
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 36 (PIDMSI_ENCODED_BY)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_EncodedBy, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 36);
-
-//  Name:     System.Media.EncodingSettings -- PKEY_Media_EncodingSettings
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 37 (PIDMSI_ENCODING_SETTINGS)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_EncodingSettings, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 37);
-
-//  Name:     System.Media.FrameCount -- PKEY_Media_FrameCount
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 12 (PIDISI_FRAMECOUNT)
-//
-//  Indicates the frame count for the image.
-DEFINE_PROPERTYKEY(PKEY_Media_FrameCount, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);
-
-//  Name:     System.Media.MCDI -- PKEY_Media_MCDI
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 16 (PIDMSI_MCDI)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_MCDI, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 16);
-
-//  Name:     System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 17 (PIDMSI_PROVIDER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_MetadataContentProvider, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 17);
-
-//  Name:     System.Media.Producer -- PKEY_Media_Producer
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 22 (PIDMSI_PRODUCER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_Producer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 22);
-
-//  Name:     System.Media.PromotionUrl -- PKEY_Media_PromotionUrl
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 33 (PIDMSI_PROMOTION_URL)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_PromotionUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 33);
-
-//  Name:     System.Media.ProtectionType -- PKEY_Media_ProtectionType
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 38
-//  
-//  If media is protected, how is it protected?
-DEFINE_PROPERTYKEY(PKEY_Media_ProtectionType, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 38);
-
-//  Name:     System.Media.ProviderRating -- PKEY_Media_ProviderRating
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 39
-//  
-//  Rating (0 - 99) supplied by metadata provider
-DEFINE_PROPERTYKEY(PKEY_Media_ProviderRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 39);
-
-//  Name:     System.Media.ProviderStyle -- PKEY_Media_ProviderStyle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 40
-//  
-//  Style of music or video, supplied by metadata provider
-DEFINE_PROPERTYKEY(PKEY_Media_ProviderStyle, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 40);
-
-//  Name:     System.Media.Publisher -- PKEY_Media_Publisher
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 30 (PIDMSI_PUBLISHER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_Publisher, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 30);
-
-//  Name:     System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 9AEBAE7A-9644-487D-A92C-657585ED751A, 100
-DEFINE_PROPERTYKEY(PKEY_Media_SubscriptionContentId, 0x9AEBAE7A, 0x9644, 0x487D, 0xA9, 0x2C, 0x65, 0x75, 0x85, 0xED, 0x75, 0x1A, 100);
-
-//  Name:     System.Media.SubTitle -- PKEY_Media_SubTitle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 38 (PIDSI_MUSIC_SUB_TITLE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_SubTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 38);
-
-//  Name:     System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_UniqueFileIdentifier, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 35);
-
-//  Name:     System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 41
-//  
-//  If true, do NOT alter this file's metadata. Set by user.
-DEFINE_PROPERTYKEY(PKEY_Media_UserNoAutoInfo, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 41);
-
-//  Name:     System.Media.UserWebUrl -- PKEY_Media_UserWebUrl
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 34 (PIDMSI_USER_WEB_URL)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_UserWebUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 34);
-
-//  Name:     System.Media.Writer -- PKEY_Media_Writer
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 23 (PIDMSI_WRITER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_Writer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 23);
-
-//  Name:     System.Media.Year -- PKEY_Media_Year
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 5 (PIDSI_MUSIC_YEAR)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Media_Year, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 5);
- 
-//-----------------------------------------------------------------------------
-// Message properties
-
-
-
-//  Name:     System.Message.AttachmentContents -- PKEY_Message_AttachmentContents
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 3143BF7C-80A8-4854-8880-E2E40189BDD0, 100
-DEFINE_PROPERTYKEY(PKEY_Message_AttachmentContents, 0x3143BF7C, 0x80A8, 0x4854, 0x88, 0x80, 0xE2, 0xE4, 0x01, 0x89, 0xBD, 0xD0, 100);
-
-//  Name:     System.Message.AttachmentNames -- PKEY_Message_AttachmentNames
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 21
-//
-//  The names of the attachments in a message
-DEFINE_PROPERTYKEY(PKEY_Message_AttachmentNames, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 21);
-
-//  Name:     System.Message.BccAddress -- PKEY_Message_BccAddress
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 2
-//
-//  Addresses in Bcc: field
-DEFINE_PROPERTYKEY(PKEY_Message_BccAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 2);
-
-//  Name:     System.Message.BccName -- PKEY_Message_BccName
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 3
-//
-//  person names in Bcc: field
-DEFINE_PROPERTYKEY(PKEY_Message_BccName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 3);
-
-//  Name:     System.Message.CcAddress -- PKEY_Message_CcAddress
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 4
-//
-//  Addresses in Cc: field
-DEFINE_PROPERTYKEY(PKEY_Message_CcAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 4);
-
-//  Name:     System.Message.CcName -- PKEY_Message_CcName
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 5
-//
-//  person names in Cc: field
-DEFINE_PROPERTYKEY(PKEY_Message_CcName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 5);
-
-//  Name:     System.Message.ConversationID -- PKEY_Message_ConversationID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 100
-DEFINE_PROPERTYKEY(PKEY_Message_ConversationID, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 100);
-
-//  Name:     System.Message.ConversationIndex -- PKEY_Message_ConversationIndex
-//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
-//  FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 101
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Message_ConversationIndex, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 101);
-
-//  Name:     System.Message.DateReceived -- PKEY_Message_DateReceived
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 20
-//
-//  Date and Time communication was received
-DEFINE_PROPERTYKEY(PKEY_Message_DateReceived, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 20);
-
-//  Name:     System.Message.DateSent -- PKEY_Message_DateSent
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 19
-//
-//  Date and Time communication was sent
-DEFINE_PROPERTYKEY(PKEY_Message_DateSent, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 19);
-
-//  Name:     System.Message.FromAddress -- PKEY_Message_FromAddress
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 13
-DEFINE_PROPERTYKEY(PKEY_Message_FromAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 13);
-
-//  Name:     System.Message.FromName -- PKEY_Message_FromName
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 14
-//
-//  Address in from field as person name
-DEFINE_PROPERTYKEY(PKEY_Message_FromName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 14);
-
-//  Name:     System.Message.HasAttachments -- PKEY_Message_HasAttachments
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 8
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Message_HasAttachments, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 8);
-
-//  Name:     System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply
-//  Type:     Int32 -- VT_I4
-//  FormatID: 9A9BC088-4F6D-469E-9919-E705412040F9, 100
-DEFINE_PROPERTYKEY(PKEY_Message_IsFwdOrReply, 0x9A9BC088, 0x4F6D, 0x469E, 0x99, 0x19, 0xE7, 0x05, 0x41, 0x20, 0x40, 0xF9, 100);
-
-//  Name:     System.Message.MessageClass -- PKEY_Message_MessageClass
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CD9ED458-08CE-418F-A70E-F912C7BB9C5C, 103
-//  
-//  What type of outlook msg this is (meeting, task, mail, etc.)
-DEFINE_PROPERTYKEY(PKEY_Message_MessageClass, 0xCD9ED458, 0x08CE, 0x418F, 0xA7, 0x0E, 0xF9, 0x12, 0xC7, 0xBB, 0x9C, 0x5C, 103);
-
-//  Name:     System.Message.SenderAddress -- PKEY_Message_SenderAddress
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 0BE1C8E7-1981-4676-AE14-FDD78F05A6E7, 100
-DEFINE_PROPERTYKEY(PKEY_Message_SenderAddress, 0x0BE1C8E7, 0x1981, 0x4676, 0xAE, 0x14, 0xFD, 0xD7, 0x8F, 0x05, 0xA6, 0xE7, 100);
-
-//  Name:     System.Message.SenderName -- PKEY_Message_SenderName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 0DA41CFA-D224-4A18-AE2F-596158DB4B3A, 100
-DEFINE_PROPERTYKEY(PKEY_Message_SenderName, 0x0DA41CFA, 0xD224, 0x4A18, 0xAE, 0x2F, 0x59, 0x61, 0x58, 0xDB, 0x4B, 0x3A, 100);
-
-//  Name:     System.Message.Store -- PKEY_Message_Store
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 15
-//
-//  The store (aka protocol handler) FILE, MAIL, OUTLOOKEXPRESS
-DEFINE_PROPERTYKEY(PKEY_Message_Store, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 15);
-
-//  Name:     System.Message.ToAddress -- PKEY_Message_ToAddress
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 16
-//
-//  Addresses in To: field
-DEFINE_PROPERTYKEY(PKEY_Message_ToAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 16);
-
-//  Name:     System.Message.ToDoTitle -- PKEY_Message_ToDoTitle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7, 100
-DEFINE_PROPERTYKEY(PKEY_Message_ToDoTitle, 0xBCCC8A3C, 0x8CEF, 0x42E5, 0x9B, 0x1C, 0xC6, 0x90, 0x79, 0x39, 0x8B, 0xC7, 100);
-
-//  Name:     System.Message.ToName -- PKEY_Message_ToName
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 17
-//
-//  Person names in To: field
-DEFINE_PROPERTYKEY(PKEY_Message_ToName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 17);
- 
-//-----------------------------------------------------------------------------
-// Music properties
-
-//  Name:     System.Music.AlbumArtist -- PKEY_Music_AlbumArtist
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 13 (PIDSI_MUSIC_ALBUM_ARTIST)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_AlbumArtist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 13);
-
-//  Name:     System.Music.AlbumTitle -- PKEY_Music_AlbumTitle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 4 (PIDSI_MUSIC_ALBUM)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_AlbumTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 4);
-
-//  Name:     System.Music.Artist -- PKEY_Music_Artist
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 2 (PIDSI_MUSIC_ARTIST)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Artist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 2);
-
-//  Name:     System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_BeatsPerMinute, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 35);
-
-//  Name:     System.Music.Composer -- PKEY_Music_Composer
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 19 (PIDMSI_COMPOSER)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Composer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 19);
-
-//  Name:     System.Music.Conductor -- PKEY_Music_Conductor
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 36 (PIDSI_MUSIC_CONDUCTOR)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Conductor, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 36);
-
-//  Name:     System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_ContentGroupDescription, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 33);
-
-//  Name:     System.Music.Genre -- PKEY_Music_Genre
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 11 (PIDSI_MUSIC_GENRE)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Genre, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 11);
-
-//  Name:     System.Music.InitialKey -- PKEY_Music_InitialKey
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 34 (PIDSI_MUSIC_INITIAL_KEY)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_InitialKey, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 34);
-
-//  Name:     System.Music.Lyrics -- PKEY_Music_Lyrics
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 12 (PIDSI_MUSIC_LYRICS)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Lyrics, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 12);
-
-//  Name:     System.Music.Mood -- PKEY_Music_Mood
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 39 (PIDSI_MUSIC_MOOD)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Mood, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 39);
-
-//  Name:     System.Music.PartOfSet -- PKEY_Music_PartOfSet
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 37 (PIDSI_MUSIC_PART_OF_SET)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_PartOfSet, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 37);
-
-//  Name:     System.Music.Period -- PKEY_Music_Period
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 31 (PIDMSI_PERIOD)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_Period, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 31);
-
-//  Name:     System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics
-//  Type:     Blob -- VT_BLOB
-//  FormatID: 6B223B6A-162E-4AA9-B39F-05D678FC6D77, 100
-DEFINE_PROPERTYKEY(PKEY_Music_SynchronizedLyrics, 0x6B223B6A, 0x162E, 0x4AA9, 0xB3, 0x9F, 0x05, 0xD6, 0x78, 0xFC, 0x6D, 0x77, 100);
-
-//  Name:     System.Music.TrackNumber -- PKEY_Music_TrackNumber
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 7 (PIDSI_MUSIC_TRACK)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Music_TrackNumber, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 7);
-
- 
- 
-//-----------------------------------------------------------------------------
-// Note properties
-
-//  Name:     System.Note.Color -- PKEY_Note_Color
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: 4776CAFA-BCE4-4CB1-A23E-265E76D8EB11, 100
-DEFINE_PROPERTYKEY(PKEY_Note_Color, 0x4776CAFA, 0xBCE4, 0x4CB1, 0xA2, 0x3E, 0x26, 0x5E, 0x76, 0xD8, 0xEB, 0x11, 100);
-
-// Possible discrete values for PKEY_Note_Color are:
-#define NOTE_COLOR_BLUE                     0u
-#define NOTE_COLOR_GREEN                    1u
-#define NOTE_COLOR_PINK                     2u
-#define NOTE_COLOR_YELLOW                   3u
-#define NOTE_COLOR_WHITE                    4u
-#define NOTE_COLOR_LIGHTGREEN               5u
-
-//  Name:     System.Note.ColorText -- PKEY_Note_ColorText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 46B4E8DE-CDB2-440D-885C-1658EB65B914, 100
-//  
-//  This is the user-friendly form of System.Note.Color.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Note_ColorText, 0x46B4E8DE, 0xCDB2, 0x440D, 0x88, 0x5C, 0x16, 0x58, 0xEB, 0x65, 0xB9, 0x14, 100);
- 
-//-----------------------------------------------------------------------------
-// Photo properties
-
-
-
-//  Name:     System.Photo.Aperture -- PKEY_Photo_Aperture
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37378
-//
-//  PropertyTagExifAperture.  Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_Aperture, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37378);
-
-//  Name:     System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: E1A9A38B-6685-46BD-875E-570DC7AD7320, 100
-//
-//  Denominator of PKEY_Photo_Aperture
-DEFINE_PROPERTYKEY(PKEY_Photo_ApertureDenominator, 0xE1A9A38B, 0x6685, 0x46BD, 0x87, 0x5E, 0x57, 0x0D, 0xC7, 0xAD, 0x73, 0x20, 100);
-
-//  Name:     System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 0337ECEC-39FB-4581-A0BD-4C4CC51E9914, 100
-//
-//  Numerator of PKEY_Photo_Aperture
-DEFINE_PROPERTYKEY(PKEY_Photo_ApertureNumerator, 0x0337ECEC, 0x39FB, 0x4581, 0xA0, 0xBD, 0x4C, 0x4C, 0xC5, 0x1E, 0x99, 0x14, 100);
-
-//  Name:     System.Photo.Brightness -- PKEY_Photo_Brightness
-//  Type:     Double -- VT_R8
-//  FormatID: 1A701BF6-478C-4361-83AB-3701BB053C58, 100 (PropertyTagExifBrightness)
-//  
-//  This is the brightness of the photo.
-//  
-//  Calculated from PKEY_Photo_BrightnessNumerator and PKEY_Photo_BrightnessDenominator.
-//  
-//  The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of 
-//  the recorded value is FFFFFFFF.H, "Unknown" should be indicated.
-DEFINE_PROPERTYKEY(PKEY_Photo_Brightness, 0x1A701BF6, 0x478C, 0x4361, 0x83, 0xAB, 0x37, 0x01, 0xBB, 0x05, 0x3C, 0x58, 100);
-
-//  Name:     System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 6EBE6946-2321-440A-90F0-C043EFD32476, 100
-//
-//  Denominator of PKEY_Photo_Brightness
-DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessDenominator, 0x6EBE6946, 0x2321, 0x440A, 0x90, 0xF0, 0xC0, 0x43, 0xEF, 0xD3, 0x24, 0x76, 100);
-
-//  Name:     System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 9E7D118F-B314-45A0-8CFB-D654B917C9E9, 100
-//
-//  Numerator of PKEY_Photo_Brightness
-DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessNumerator, 0x9E7D118F, 0xB314, 0x45A0, 0x8C, 0xFB, 0xD6, 0x54, 0xB9, 0x17, 0xC9, 0xE9, 100);
-
-//  Name:     System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 271 (PropertyTagEquipMake)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Photo_CameraManufacturer, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 271);
-
-//  Name:     System.Photo.CameraModel -- PKEY_Photo_CameraModel
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 272 (PropertyTagEquipModel)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Photo_CameraModel, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 272);
-
-//  Name:     System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 273
-//
-//  Serial number of camera that produced this photo
-DEFINE_PROPERTYKEY(PKEY_Photo_CameraSerialNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 273);
-
-//  Name:     System.Photo.Contrast -- PKEY_Photo_Contrast
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 2A785BA9-8D23-4DED-82E6-60A350C86A10, 100
-//  
-//  This indicates the direction of contrast processing applied by the camera 
-//  when the image was shot.
-DEFINE_PROPERTYKEY(PKEY_Photo_Contrast, 0x2A785BA9, 0x8D23, 0x4DED, 0x82, 0xE6, 0x60, 0xA3, 0x50, 0xC8, 0x6A, 0x10, 100);
-
-// Possible discrete values for PKEY_Photo_Contrast are:
-#define PHOTO_CONTRAST_NORMAL               0ul
-#define PHOTO_CONTRAST_SOFT                 1ul
-#define PHOTO_CONTRAST_HARD                 2ul
-
-//  Name:     System.Photo.ContrastText -- PKEY_Photo_ContrastText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 59DDE9F2-5253-40EA-9A8B-479E96C6249A, 100
-//  
-//  This is the user-friendly form of System.Photo.Contrast.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_ContrastText, 0x59DDE9F2, 0x5253, 0x40EA, 0x9A, 0x8B, 0x47, 0x9E, 0x96, 0xC6, 0x24, 0x9A, 100);
-
-//  Name:     System.Photo.DateTaken -- PKEY_Photo_DateTaken
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 36867
-//
-//  PropertyTagExifDTOrig
-DEFINE_PROPERTYKEY(PKEY_Photo_DateTaken, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 36867);
-
-//  Name:     System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom
-//  Type:     Double -- VT_R8
-//  FormatID: F85BF840-A925-4BC2-B0C4-8E36B598679E, 100
-//
-//  PropertyTagExifDigitalZoom.  Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoom, 0xF85BF840, 0xA925, 0x4BC2, 0xB0, 0xC4, 0x8E, 0x36, 0xB5, 0x98, 0x67, 0x9E, 100);
-
-//  Name:     System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 745BAF0E-E5C1-4CFB-8A1B-D031A0A52393, 100
-//
-//  Denominator of PKEY_Photo_DigitalZoom
-DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomDenominator, 0x745BAF0E, 0xE5C1, 0x4CFB, 0x8A, 0x1B, 0xD0, 0x31, 0xA0, 0xA5, 0x23, 0x93, 100);
-
-//  Name:     System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 16CBB924-6500-473B-A5BE-F1599BCBE413, 100
-//
-//  Numerator of PKEY_Photo_DigitalZoom
-DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomNumerator, 0x16CBB924, 0x6500, 0x473B, 0xA5, 0xBE, 0xF1, 0x59, 0x9B, 0xCB, 0xE4, 0x13, 100);
-
-//  Name:     System.Photo.Event -- PKEY_Photo_Event
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18248
-//
-//  The event at which the photo was taken
-DEFINE_PROPERTYKEY(PKEY_Photo_Event, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18248);
-
-//  Name:     System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: D35F743A-EB2E-47F2-A286-844132CB1427, 100
-//
-//  The EXIF version.
-DEFINE_PROPERTYKEY(PKEY_Photo_EXIFVersion, 0xD35F743A, 0xEB2E, 0x47F2, 0xA2, 0x86, 0x84, 0x41, 0x32, 0xCB, 0x14, 0x27, 100);
-
-//  Name:     System.Photo.ExposureBias -- PKEY_Photo_ExposureBias
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37380
-//
-//  PropertyTagExifExposureBias.  Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBias, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37380);
-
-//  Name:     System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator
-//  Type:     Int32 -- VT_I4
-//  FormatID: AB205E50-04B7-461C-A18C-2F233836E627, 100
-//
-//  Denominator of PKEY_Photo_ExposureBias
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasDenominator, 0xAB205E50, 0x04B7, 0x461C, 0xA1, 0x8C, 0x2F, 0x23, 0x38, 0x36, 0xE6, 0x27, 100);
-
-//  Name:     System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator
-//  Type:     Int32 -- VT_I4
-//  FormatID: 738BF284-1D87-420B-92CF-5834BF6EF9ED, 100
-//
-//  Numerator of PKEY_Photo_ExposureBias
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasNumerator, 0x738BF284, 0x1D87, 0x420B, 0x92, 0xCF, 0x58, 0x34, 0xBF, 0x6E, 0xF9, 0xED, 100);
-
-//  Name:     System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex
-//  Type:     Double -- VT_R8
-//  FormatID: 967B5AF8-995A-46ED-9E11-35B3C5B9782D, 100
-//
-//  PropertyTagExifExposureIndex.  Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndex, 0x967B5AF8, 0x995A, 0x46ED, 0x9E, 0x11, 0x35, 0xB3, 0xC5, 0xB9, 0x78, 0x2D, 100);
-
-//  Name:     System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 93112F89-C28B-492F-8A9D-4BE2062CEE8A, 100
-//
-//  Denominator of PKEY_Photo_ExposureIndex
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexDenominator, 0x93112F89, 0xC28B, 0x492F, 0x8A, 0x9D, 0x4B, 0xE2, 0x06, 0x2C, 0xEE, 0x8A, 100);
-
-//  Name:     System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89, 100
-//
-//  Numerator of PKEY_Photo_ExposureIndex
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexNumerator, 0xCDEDCF30, 0x8919, 0x44DF, 0x8F, 0x4C, 0x4E, 0xB2, 0xFF, 0xDB, 0x8D, 0x89, 100);
-
-//  Name:     System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34850 (PropertyTagExifExposureProg)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgram, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34850);
-
-// Possible discrete values for PKEY_Photo_ExposureProgram are:
-#define PHOTO_EXPOSUREPROGRAM_UNKNOWN       0ul
-#define PHOTO_EXPOSUREPROGRAM_MANUAL        1ul
-#define PHOTO_EXPOSUREPROGRAM_NORMAL        2ul
-#define PHOTO_EXPOSUREPROGRAM_APERTURE      3ul
-#define PHOTO_EXPOSUREPROGRAM_SHUTTER       4ul
-#define PHOTO_EXPOSUREPROGRAM_CREATIVE      5ul
-#define PHOTO_EXPOSUREPROGRAM_ACTION        6ul
-#define PHOTO_EXPOSUREPROGRAM_PORTRAIT      7ul
-#define PHOTO_EXPOSUREPROGRAM_LANDSCAPE     8ul
-
-//  Name:     System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: FEC690B7-5F30-4646-AE47-4CAAFBA884A3, 100
-//  
-//  This is the user-friendly form of System.Photo.ExposureProgram.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgramText, 0xFEC690B7, 0x5F30, 0x4646, 0xAE, 0x47, 0x4C, 0xAA, 0xFB, 0xA8, 0x84, 0xA3, 100);
-
-//  Name:     System.Photo.ExposureTime -- PKEY_Photo_ExposureTime
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33434
-//
-//  PropertyTagExifExposureTime.  Calculated from  PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTime, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33434);
-
-//  Name:     System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 55E98597-AD16-42E0-B624-21599A199838, 100
-//
-//  Denominator of PKEY_Photo_ExposureTime
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeDenominator, 0x55E98597, 0xAD16, 0x42E0, 0xB6, 0x24, 0x21, 0x59, 0x9A, 0x19, 0x98, 0x38, 100);
-
-//  Name:     System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 257E44E2-9031-4323-AC38-85C552871B2E, 100
-//
-//  Numerator of PKEY_Photo_ExposureTime
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeNumerator, 0x257E44E2, 0x9031, 0x4323, 0xAC, 0x38, 0x85, 0xC5, 0x52, 0x87, 0x1B, 0x2E, 100);
-
-//  Name:     System.Photo.Flash -- PKEY_Photo_Flash
-//  Type:     Byte -- VT_UI1
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37385
-//
-//  PropertyTagExifFlash
-DEFINE_PROPERTYKEY(PKEY_Photo_Flash, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37385);
-
-// Possible discrete values for PKEY_Photo_Flash are:
-#define PHOTO_FLASH_NONE                    0
-#define PHOTO_FLASH_FLASH                   1
-#define PHOTO_FLASH_WITHOUTSTROBE           5
-#define PHOTO_FLASH_WITHSTROBE              7
-
-//  Name:     System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 41483
-//
-//  PropertyTagExifFlashEnergy.  Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergy, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 41483);
-
-//  Name:     System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: D7B61C70-6323-49CD-A5FC-C84277162C97, 100
-//
-//  Denominator of PKEY_Photo_FlashEnergy
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyDenominator, 0xD7B61C70, 0x6323, 0x49CD, 0xA5, 0xFC, 0xC8, 0x42, 0x77, 0x16, 0x2C, 0x97, 100);
-
-//  Name:     System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC, 100
-//
-//  Numerator of PKEY_Photo_FlashEnergy
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyNumerator, 0xFCAD3D3D, 0x0858, 0x400F, 0xAA, 0xA3, 0x2F, 0x66, 0xCC, 0xE2, 0xA6, 0xBC, 100);
-
-//  Name:     System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: AABAF6C9-E0C5-4719-8585-57B103E584FE, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashManufacturer, 0xAABAF6C9, 0xE0C5, 0x4719, 0x85, 0x85, 0x57, 0xB1, 0x03, 0xE5, 0x84, 0xFE, 100);
-
-//  Name:     System.Photo.FlashModel -- PKEY_Photo_FlashModel
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: FE83BB35-4D1A-42E2-916B-06F3E1AF719E, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashModel, 0xFE83BB35, 0x4D1A, 0x42E2, 0x91, 0x6B, 0x06, 0xF3, 0xE1, 0xAF, 0x71, 0x9E, 100);
-
-//  Name:     System.Photo.FlashText -- PKEY_Photo_FlashText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6B8B68F6-200B-47EA-8D25-D8050F57339F, 100
-//  
-//  This is the user-friendly form of System.Photo.Flash.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashText, 0x6B8B68F6, 0x200B, 0x47EA, 0x8D, 0x25, 0xD8, 0x05, 0x0F, 0x57, 0x33, 0x9F, 100);
-
-//  Name:     System.Photo.FNumber -- PKEY_Photo_FNumber
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33437
-//
-//  PropertyTagExifFNumber.  Calculated from PKEY_Photo_FNumberNumerator and PKEY_Photo_FNumberDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_FNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33437);
-
-//  Name:     System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: E92A2496-223B-4463-A4E3-30EABBA79D80, 100
-//
-//  Denominator of PKEY_Photo_FNumber
-DEFINE_PROPERTYKEY(PKEY_Photo_FNumberDenominator, 0xE92A2496, 0x223B, 0x4463, 0xA4, 0xE3, 0x30, 0xEA, 0xBB, 0xA7, 0x9D, 0x80, 100);
-
-//  Name:     System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 1B97738A-FDFC-462F-9D93-1957E08BE90C, 100
-//
-//  Numerator of PKEY_Photo_FNumber
-DEFINE_PROPERTYKEY(PKEY_Photo_FNumberNumerator, 0x1B97738A, 0xFDFC, 0x462F, 0x9D, 0x93, 0x19, 0x57, 0xE0, 0x8B, 0xE9, 0x0C, 100);
-
-//  Name:     System.Photo.FocalLength -- PKEY_Photo_FocalLength
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37386
-//
-//  PropertyTagExifFocalLength.  Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLength, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37386);
-
-//  Name:     System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 305BC615-DCA1-44A5-9FD4-10C0BA79412E, 100
-//
-//  Denominator of PKEY_Photo_FocalLength
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthDenominator, 0x305BC615, 0xDCA1, 0x44A5, 0x9F, 0xD4, 0x10, 0xC0, 0xBA, 0x79, 0x41, 0x2E, 100);
-
-//  Name:     System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: A0E74609-B84D-4F49-B860-462BD9971F98, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthInFilm, 0xA0E74609, 0xB84D, 0x4F49, 0xB8, 0x60, 0x46, 0x2B, 0xD9, 0x97, 0x1F, 0x98, 100);
-
-//  Name:     System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A, 100
-//
-//  Numerator of PKEY_Photo_FocalLength
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthNumerator, 0x776B6B3B, 0x1E3D, 0x4B0C, 0x9A, 0x0E, 0x8F, 0xBA, 0xF2, 0xA8, 0x49, 0x2A, 100);
-
-//  Name:     System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution
-//  Type:     Double -- VT_R8
-//  FormatID: CFC08D97-C6F7-4484-89DD-EBEF4356FE76, 100
-//  
-//  PropertyTagExifFocalXRes.  Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and 
-//  PKEY_Photo_FocalPlaneXResolutionDenominator.
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolution, 0xCFC08D97, 0xC6F7, 0x4484, 0x89, 0xDD, 0xEB, 0xEF, 0x43, 0x56, 0xFE, 0x76, 100);
-
-//  Name:     System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 0933F3F5-4786-4F46-A8E8-D64DD37FA521, 100
-//
-//  Denominator of PKEY_Photo_FocalPlaneXResolution
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionDenominator, 0x0933F3F5, 0x4786, 0x4F46, 0xA8, 0xE8, 0xD6, 0x4D, 0xD3, 0x7F, 0xA5, 0x21, 100);
-
-//  Name:     System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: DCCB10AF-B4E2-4B88-95F9-031B4D5AB490, 100
-//
-//  Numerator of PKEY_Photo_FocalPlaneXResolution
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionNumerator, 0xDCCB10AF, 0xB4E2, 0x4B88, 0x95, 0xF9, 0x03, 0x1B, 0x4D, 0x5A, 0xB4, 0x90, 100);
-
-//  Name:     System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution
-//  Type:     Double -- VT_R8
-//  FormatID: 4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1, 100
-//  
-//  PropertyTagExifFocalYRes.  Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and 
-//  PKEY_Photo_FocalPlaneYResolutionDenominator.
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolution, 0x4FFFE4D0, 0x914F, 0x4AC4, 0x8D, 0x6F, 0xC9, 0xC6, 0x1D, 0xE1, 0x69, 0xB1, 100);
-
-//  Name:     System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 1D6179A6-A876-4031-B013-3347B2B64DC8, 100
-//
-//  Denominator of PKEY_Photo_FocalPlaneYResolution
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionDenominator, 0x1D6179A6, 0xA876, 0x4031, 0xB0, 0x13, 0x33, 0x47, 0xB2, 0xB6, 0x4D, 0xC8, 100);
-
-//  Name:     System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: A2E541C5-4440-4BA8-867E-75CFC06828CD, 100
-//
-//  Numerator of PKEY_Photo_FocalPlaneYResolution
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionNumerator, 0xA2E541C5, 0x4440, 0x4BA8, 0x86, 0x7E, 0x75, 0xCF, 0xC0, 0x68, 0x28, 0xCD, 100);
-
-//  Name:     System.Photo.GainControl -- PKEY_Photo_GainControl
-//  Type:     Double -- VT_R8
-//  FormatID: FA304789-00C7-4D80-904A-1E4DCC7265AA, 100 (PropertyTagExifGainControl)
-//  
-//  This indicates the degree of overall image gain adjustment.
-//  
-//  Calculated from PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator.
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControl, 0xFA304789, 0x00C7, 0x4D80, 0x90, 0x4A, 0x1E, 0x4D, 0xCC, 0x72, 0x65, 0xAA, 100);
-
-// Possible discrete values for PKEY_Photo_GainControl are:
-#define PHOTO_GAINCONTROL_NONE              0.0
-#define PHOTO_GAINCONTROL_LOWGAINUP         1.0
-#define PHOTO_GAINCONTROL_HIGHGAINUP        2.0
-#define PHOTO_GAINCONTROL_LOWGAINDOWN       3.0
-#define PHOTO_GAINCONTROL_HIGHGAINDOWN      4.0
-
-//  Name:     System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 42864DFD-9DA4-4F77-BDED-4AAD7B256735, 100
-//
-//  Denominator of PKEY_Photo_GainControl
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControlDenominator, 0x42864DFD, 0x9DA4, 0x4F77, 0xBD, 0xED, 0x4A, 0xAD, 0x7B, 0x25, 0x67, 0x35, 100);
-
-//  Name:     System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E, 100
-//
-//  Numerator of PKEY_Photo_GainControl
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControlNumerator, 0x8E8ECF7C, 0xB7B8, 0x4EB8, 0xA6, 0x3F, 0x0E, 0xE7, 0x15, 0xC9, 0x6F, 0x9E, 100);
-
-//  Name:     System.Photo.GainControlText -- PKEY_Photo_GainControlText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C06238B2-0BF9-4279-A723-25856715CB9D, 100
-//  
-//  This is the user-friendly form of System.Photo.GainControl.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControlText, 0xC06238B2, 0x0BF9, 0x4279, 0xA7, 0x23, 0x25, 0x85, 0x67, 0x15, 0xCB, 0x9D, 100);
-
-//  Name:     System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34855
-//
-//  PropertyTagExifISOSpeed
-DEFINE_PROPERTYKEY(PKEY_Photo_ISOSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34855);
-
-//  Name:     System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E6DDCAF7-29C5-4F0A-9A68-D19412EC7090, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_LensManufacturer, 0xE6DDCAF7, 0x29C5, 0x4F0A, 0x9A, 0x68, 0xD1, 0x94, 0x12, 0xEC, 0x70, 0x90, 100);
-
-//  Name:     System.Photo.LensModel -- PKEY_Photo_LensModel
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: E1277516-2B5F-4869-89B1-2E585BD38B7A, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_LensModel, 0xE1277516, 0x2B5F, 0x4869, 0x89, 0xB1, 0x2E, 0x58, 0x5B, 0xD3, 0x8B, 0x7A, 100);
-
-//  Name:     System.Photo.LightSource -- PKEY_Photo_LightSource
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37384
-//
-//  PropertyTagExifLightSource
-DEFINE_PROPERTYKEY(PKEY_Photo_LightSource, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37384);
-
-// Possible discrete values for PKEY_Photo_LightSource are:
-#define PHOTO_LIGHTSOURCE_UNKNOWN           0ul
-#define PHOTO_LIGHTSOURCE_DAYLIGHT          1ul
-#define PHOTO_LIGHTSOURCE_FLUORESCENT       2ul
-#define PHOTO_LIGHTSOURCE_TUNGSTEN          3ul
-#define PHOTO_LIGHTSOURCE_STANDARD_A        17ul
-#define PHOTO_LIGHTSOURCE_STANDARD_B        18ul
-#define PHOTO_LIGHTSOURCE_STANDARD_C        19ul
-#define PHOTO_LIGHTSOURCE_D55               20ul
-#define PHOTO_LIGHTSOURCE_D65               21ul
-#define PHOTO_LIGHTSOURCE_D75               22ul
-
-//  Name:     System.Photo.MakerNote -- PKEY_Photo_MakerNote
-//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
-//  FormatID: FA303353-B659-4052-85E9-BCAC79549B84, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_MakerNote, 0xFA303353, 0xB659, 0x4052, 0x85, 0xE9, 0xBC, 0xAC, 0x79, 0x54, 0x9B, 0x84, 100);
-
-//  Name:     System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset
-//  Type:     UInt64 -- VT_UI8
-//  FormatID: 813F4124-34E6-4D17-AB3E-6B1F3C2247A1, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_MakerNoteOffset, 0x813F4124, 0x34E6, 0x4D17, 0xAB, 0x3E, 0x6B, 0x1F, 0x3C, 0x22, 0x47, 0xA1, 100);
-
-//  Name:     System.Photo.MaxAperture -- PKEY_Photo_MaxAperture
-//  Type:     Double -- VT_R8
-//  FormatID: 08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E, 100
-//
-//  Calculated from PKEY_Photo_MaxApertureNumerator and PKEY_Photo_MaxApertureDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_MaxAperture, 0x08F6D7C2, 0xE3F2, 0x44FC, 0xAF, 0x1E, 0x5A, 0xA5, 0xC8, 0x1A, 0x2D, 0x3E, 100);
-
-//  Name:     System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: C77724D4-601F-46C5-9B89-C53F93BCEB77, 100
-//
-//  Denominator of PKEY_Photo_MaxAperture
-DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureDenominator, 0xC77724D4, 0x601F, 0x46C5, 0x9B, 0x89, 0xC5, 0x3F, 0x93, 0xBC, 0xEB, 0x77, 100);
-
-//  Name:     System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: C107E191-A459-44C5-9AE6-B952AD4B906D, 100
-//
-//  Numerator of PKEY_Photo_MaxAperture
-DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureNumerator, 0xC107E191, 0xA459, 0x44C5, 0x9A, 0xE6, 0xB9, 0x52, 0xAD, 0x4B, 0x90, 0x6D, 100);
-
-//  Name:     System.Photo.MeteringMode -- PKEY_Photo_MeteringMode
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37383
-//
-//  PropertyTagExifMeteringMode
-DEFINE_PROPERTYKEY(PKEY_Photo_MeteringMode, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37383);
-
-// Possible discrete values for PKEY_Photo_MeteringMode are:
-#define PHOTO_METERINGMODE_UNKNOWN          0u
-#define PHOTO_METERINGMODE_AVERAGE          1u
-#define PHOTO_METERINGMODE_CENTER           2u
-#define PHOTO_METERINGMODE_SPOT             3u
-#define PHOTO_METERINGMODE_MULTISPOT        4u
-#define PHOTO_METERINGMODE_PATTERN          5u
-#define PHOTO_METERINGMODE_PARTIAL          6u
-
-//  Name:     System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: F628FD8C-7BA8-465A-A65B-C5AA79263A9E, 100
-//  
-//  This is the user-friendly form of System.Photo.MeteringMode.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_MeteringModeText, 0xF628FD8C, 0x7BA8, 0x465A, 0xA6, 0x5B, 0xC5, 0xAA, 0x79, 0x26, 0x3A, 0x9E, 100);
-
-//  Name:     System.Photo.Orientation -- PKEY_Photo_Orientation
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 274 (PropertyTagOrientation)
-//  
-//  This is the image orientation viewed in terms of rows and columns.
-DEFINE_PROPERTYKEY(PKEY_Photo_Orientation, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 274);
-
-// Possible discrete values for PKEY_Photo_Orientation are:
-#define PHOTO_ORIENTATION_NORMAL            1u
-#define PHOTO_ORIENTATION_FLIPHORIZONTAL    2u
-#define PHOTO_ORIENTATION_ROTATE180         3u
-#define PHOTO_ORIENTATION_FLIPVERTICAL      4u
-#define PHOTO_ORIENTATION_TRANSPOSE         5u
-#define PHOTO_ORIENTATION_ROTATE270         6u
-#define PHOTO_ORIENTATION_TRANSVERSE        7u
-#define PHOTO_ORIENTATION_ROTATE90          8u
-
-//  Name:     System.Photo.OrientationText -- PKEY_Photo_OrientationText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A9EA193C-C511-498A-A06B-58E2776DCC28, 100
-//  
-//  This is the user-friendly form of System.Photo.Orientation.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_OrientationText, 0xA9EA193C, 0xC511, 0x498A, 0xA0, 0x6B, 0x58, 0xE2, 0x77, 0x6D, 0xCC, 0x28, 100);
-
-//  Name:     System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: 341796F1-1DF9-4B1C-A564-91BDEFA43877, 100
-//  
-//  This is the pixel composition. In JPEG compressed data, a JPEG marker is used 
-//  instead of this property.
-DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretation, 0x341796F1, 0x1DF9, 0x4B1C, 0xA5, 0x64, 0x91, 0xBD, 0xEF, 0xA4, 0x38, 0x77, 100);
-
-// Possible discrete values for PKEY_Photo_PhotometricInterpretation are:
-#define PHOTO_PHOTOMETRIC_RGB               2u
-#define PHOTO_PHOTOMETRIC_YCBCR             6u
-
-//  Name:     System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 821437D6-9EAB-4765-A589-3B1CBBD22A61, 100
-//  
-//  This is the user-friendly form of System.Photo.PhotometricInterpretation.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretationText, 0x821437D6, 0x9EAB, 0x4765, 0xA5, 0x89, 0x3B, 0x1C, 0xBB, 0xD2, 0x2A, 0x61, 100);
-
-//  Name:     System.Photo.ProgramMode -- PKEY_Photo_ProgramMode
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 6D217F6D-3F6A-4825-B470-5F03CA2FBE9B, 100
-//  
-//  This is the class of the program used by the camera to set exposure when the 
-//  picture is taken.
-DEFINE_PROPERTYKEY(PKEY_Photo_ProgramMode, 0x6D217F6D, 0x3F6A, 0x4825, 0xB4, 0x70, 0x5F, 0x03, 0xCA, 0x2F, 0xBE, 0x9B, 100);
-
-// Possible discrete values for PKEY_Photo_ProgramMode are:
-#define PHOTO_PROGRAMMODE_NOTDEFINED        0ul
-#define PHOTO_PROGRAMMODE_MANUAL            1ul
-#define PHOTO_PROGRAMMODE_NORMAL            2ul
-#define PHOTO_PROGRAMMODE_APERTURE          3ul
-#define PHOTO_PROGRAMMODE_SHUTTER           4ul
-#define PHOTO_PROGRAMMODE_CREATIVE          5ul
-#define PHOTO_PROGRAMMODE_ACTION            6ul
-#define PHOTO_PROGRAMMODE_PORTRAIT          7ul
-#define PHOTO_PROGRAMMODE_LANDSCAPE         8ul
-
-//  Name:     System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7FE3AA27-2648-42F3-89B0-454E5CB150C3, 100
-//  
-//  This is the user-friendly form of System.Photo.ProgramMode.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_ProgramModeText, 0x7FE3AA27, 0x2648, 0x42F3, 0x89, 0xB0, 0x45, 0x4E, 0x5C, 0xB1, 0x50, 0xC3, 100);
-
-//  Name:     System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 318A6B45-087F-4DC2-B8CC-05359551FC9E, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_RelatedSoundFile, 0x318A6B45, 0x087F, 0x4DC2, 0xB8, 0xCC, 0x05, 0x35, 0x95, 0x51, 0xFC, 0x9E, 100);
-
-//  Name:     System.Photo.Saturation -- PKEY_Photo_Saturation
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 49237325-A95A-4F67-B211-816B2D45D2E0, 100
-//  
-//  This indicates the direction of saturation processing applied by the camera when 
-//  the image was shot.
-DEFINE_PROPERTYKEY(PKEY_Photo_Saturation, 0x49237325, 0xA95A, 0x4F67, 0xB2, 0x11, 0x81, 0x6B, 0x2D, 0x45, 0xD2, 0xE0, 100);
-
-// Possible discrete values for PKEY_Photo_Saturation are:
-#define PHOTO_SATURATION_NORMAL             0ul
-#define PHOTO_SATURATION_LOW                1ul
-#define PHOTO_SATURATION_HIGH               2ul
-
-//  Name:     System.Photo.SaturationText -- PKEY_Photo_SaturationText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 61478C08-B600-4A84-BBE4-E99C45F0A072, 100
-//  
-//  This is the user-friendly form of System.Photo.Saturation.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_SaturationText, 0x61478C08, 0xB600, 0x4A84, 0xBB, 0xE4, 0xE9, 0x9C, 0x45, 0xF0, 0xA0, 0x72, 100);
-
-//  Name:     System.Photo.Sharpness -- PKEY_Photo_Sharpness
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: FC6976DB-8349-4970-AE97-B3C5316A08F0, 100
-//  
-//  This indicates the direction of sharpness processing applied by the camera when 
-//  the image was shot.
-DEFINE_PROPERTYKEY(PKEY_Photo_Sharpness, 0xFC6976DB, 0x8349, 0x4970, 0xAE, 0x97, 0xB3, 0xC5, 0x31, 0x6A, 0x08, 0xF0, 100);
-
-// Possible discrete values for PKEY_Photo_Sharpness are:
-#define PHOTO_SHARPNESS_NORMAL              0ul
-#define PHOTO_SHARPNESS_SOFT                1ul
-#define PHOTO_SHARPNESS_HARD                2ul
-
-//  Name:     System.Photo.SharpnessText -- PKEY_Photo_SharpnessText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 51EC3F47-DD50-421D-8769-334F50424B1E, 100
-//  
-//  This is the user-friendly form of System.Photo.Sharpness.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_SharpnessText, 0x51EC3F47, 0xDD50, 0x421D, 0x87, 0x69, 0x33, 0x4F, 0x50, 0x42, 0x4B, 0x1E, 100);
-
-//  Name:     System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37377
-//
-//  PropertyTagExifShutterSpeed.  Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37377);
-
-//  Name:     System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator
-//  Type:     Int32 -- VT_I4
-//  FormatID: E13D8975-81C7-4948-AE3F-37CAE11E8FF7, 100
-//
-//  Denominator of PKEY_Photo_ShutterSpeed
-DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedDenominator, 0xE13D8975, 0x81C7, 0x4948, 0xAE, 0x3F, 0x37, 0xCA, 0xE1, 0x1E, 0x8F, 0xF7, 100);
-
-//  Name:     System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator
-//  Type:     Int32 -- VT_I4
-//  FormatID: 16EA4042-D6F4-4BCA-8349-7C78D30FB333, 100
-//
-//  Numerator of PKEY_Photo_ShutterSpeed
-DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedNumerator, 0x16EA4042, 0xD6F4, 0x4BCA, 0x83, 0x49, 0x7C, 0x78, 0xD3, 0x0F, 0xB3, 0x33, 100);
-
-//  Name:     System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance
-//  Type:     Double -- VT_R8
-//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37382
-//
-//  PropertyTagExifSubjectDist.  Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator
-DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistance, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37382);
-
-//  Name:     System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 0C840A88-B043-466D-9766-D4B26DA3FA77, 100
-//
-//  Denominator of PKEY_Photo_SubjectDistance
-DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceDenominator, 0x0C840A88, 0xB043, 0x466D, 0x97, 0x66, 0xD4, 0xB2, 0x6D, 0xA3, 0xFA, 0x77, 100);
-
-//  Name:     System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 8AF4961C-F526-43E5-AA81-DB768219178D, 100
-//
-//  Numerator of PKEY_Photo_SubjectDistance
-DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceNumerator, 0x8AF4961C, 0xF526, 0x43E5, 0xAA, 0x81, 0xDB, 0x76, 0x82, 0x19, 0x17, 0x8D, 100);
-
-//  Name:     System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 9A8EBB75-6458-4E82-BACB-35C0095B03BB, 100
-DEFINE_PROPERTYKEY(PKEY_Photo_TranscodedForSync, 0x9A8EBB75, 0x6458, 0x4E82, 0xBA, 0xCB, 0x35, 0xC0, 0x09, 0x5B, 0x03, 0xBB, 100);
-
-//  Name:     System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9, 100
-//  
-//  This indicates the white balance mode set when the image was shot.
-DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalance, 0xEE3D3D8A, 0x5381, 0x4CFA, 0xB1, 0x3B, 0xAA, 0xF6, 0x6B, 0x5F, 0x4E, 0xC9, 100);
-
-// Possible discrete values for PKEY_Photo_WhiteBalance are:
-#define PHOTO_WHITEBALANCE_AUTO             0ul
-#define PHOTO_WHITEBALANCE_MANUAL           1ul
-
-//  Name:     System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6336B95E-C7A7-426D-86FD-7AE3D39C84B4, 100
-//  
-//  This is the user-friendly form of System.Photo.WhiteBalance.  Not intended to be parsed 
-//  programmatically.
-DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalanceText, 0x6336B95E, 0xC7A7, 0x426D, 0x86, 0xFD, 0x7A, 0xE3, 0xD3, 0x9C, 0x84, 0xB4, 100);
- 
-//-----------------------------------------------------------------------------
-// PropGroup properties
-
-//  Name:     System.PropGroup.Advanced -- PKEY_PropGroup_Advanced
-//  Type:     Null -- VT_NULL
-//  FormatID: 900A403B-097B-4B95-8AE2-071FDAEEB118, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Advanced, 0x900A403B, 0x097B, 0x4B95, 0x8A, 0xE2, 0x07, 0x1F, 0xDA, 0xEE, 0xB1, 0x18, 100);
-
-//  Name:     System.PropGroup.Audio -- PKEY_PropGroup_Audio
-//  Type:     Null -- VT_NULL
-//  FormatID: 2804D469-788F-48AA-8570-71B9C187E138, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Audio, 0x2804D469, 0x788F, 0x48AA, 0x85, 0x70, 0x71, 0xB9, 0xC1, 0x87, 0xE1, 0x38, 100);
-
-//  Name:     System.PropGroup.Calendar -- PKEY_PropGroup_Calendar
-//  Type:     Null -- VT_NULL
-//  FormatID: 9973D2B5-BFD8-438A-BA94-5349B293181A, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Calendar, 0x9973D2B5, 0xBFD8, 0x438A, 0xBA, 0x94, 0x53, 0x49, 0xB2, 0x93, 0x18, 0x1A, 100);
-
-//  Name:     System.PropGroup.Camera -- PKEY_PropGroup_Camera
-//  Type:     Null -- VT_NULL
-//  FormatID: DE00DE32-547E-4981-AD4B-542F2E9007D8, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Camera, 0xDE00DE32, 0x547E, 0x4981, 0xAD, 0x4B, 0x54, 0x2F, 0x2E, 0x90, 0x07, 0xD8, 100);
-
-//  Name:     System.PropGroup.Contact -- PKEY_PropGroup_Contact
-//  Type:     Null -- VT_NULL
-//  FormatID: DF975FD3-250A-4004-858F-34E29A3E37AA, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Contact, 0xDF975FD3, 0x250A, 0x4004, 0x85, 0x8F, 0x34, 0xE2, 0x9A, 0x3E, 0x37, 0xAA, 100);
-
-//  Name:     System.PropGroup.Content -- PKEY_PropGroup_Content
-//  Type:     Null -- VT_NULL
-//  FormatID: D0DAB0BA-368A-4050-A882-6C010FD19A4F, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Content, 0xD0DAB0BA, 0x368A, 0x4050, 0xA8, 0x82, 0x6C, 0x01, 0x0F, 0xD1, 0x9A, 0x4F, 100);
-
-//  Name:     System.PropGroup.Description -- PKEY_PropGroup_Description
-//  Type:     Null -- VT_NULL
-//  FormatID: 8969B275-9475-4E00-A887-FF93B8B41E44, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Description, 0x8969B275, 0x9475, 0x4E00, 0xA8, 0x87, 0xFF, 0x93, 0xB8, 0xB4, 0x1E, 0x44, 100);
-
-//  Name:     System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem
-//  Type:     Null -- VT_NULL
-//  FormatID: E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_FileSystem, 0xE3A7D2C1, 0x80FC, 0x4B40, 0x8F, 0x34, 0x30, 0xEA, 0x11, 0x1B, 0xDC, 0x2E, 100);
-
-//  Name:     System.PropGroup.General -- PKEY_PropGroup_General
-//  Type:     Null -- VT_NULL
-//  FormatID: CC301630-B192-4C22-B372-9F4C6D338E07, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_General, 0xCC301630, 0xB192, 0x4C22, 0xB3, 0x72, 0x9F, 0x4C, 0x6D, 0x33, 0x8E, 0x07, 100);
-
-//  Name:     System.PropGroup.GPS -- PKEY_PropGroup_GPS
-//  Type:     Null -- VT_NULL
-//  FormatID: F3713ADA-90E3-4E11-AAE5-FDC17685B9BE, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_GPS, 0xF3713ADA, 0x90E3, 0x4E11, 0xAA, 0xE5, 0xFD, 0xC1, 0x76, 0x85, 0xB9, 0xBE, 100);
-
-//  Name:     System.PropGroup.Image -- PKEY_PropGroup_Image
-//  Type:     Null -- VT_NULL
-//  FormatID: E3690A87-0FA8-4A2A-9A9F-FCE8827055AC, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Image, 0xE3690A87, 0x0FA8, 0x4A2A, 0x9A, 0x9F, 0xFC, 0xE8, 0x82, 0x70, 0x55, 0xAC, 100);
-
-//  Name:     System.PropGroup.Media -- PKEY_PropGroup_Media
-//  Type:     Null -- VT_NULL
-//  FormatID: 61872CF7-6B5E-4B4B-AC2D-59DA84459248, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Media, 0x61872CF7, 0x6B5E, 0x4B4B, 0xAC, 0x2D, 0x59, 0xDA, 0x84, 0x45, 0x92, 0x48, 100);
-
-//  Name:     System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced
-//  Type:     Null -- VT_NULL
-//  FormatID: 8859A284-DE7E-4642-99BA-D431D044B1EC, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_MediaAdvanced, 0x8859A284, 0xDE7E, 0x4642, 0x99, 0xBA, 0xD4, 0x31, 0xD0, 0x44, 0xB1, 0xEC, 100);
-
-//  Name:     System.PropGroup.Message -- PKEY_PropGroup_Message
-//  Type:     Null -- VT_NULL
-//  FormatID: 7FD7259D-16B4-4135-9F97-7C96ECD2FA9E, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Message, 0x7FD7259D, 0x16B4, 0x4135, 0x9F, 0x97, 0x7C, 0x96, 0xEC, 0xD2, 0xFA, 0x9E, 100);
-
-//  Name:     System.PropGroup.Music -- PKEY_PropGroup_Music
-//  Type:     Null -- VT_NULL
-//  FormatID: 68DD6094-7216-40F1-A029-43FE7127043F, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Music, 0x68DD6094, 0x7216, 0x40F1, 0xA0, 0x29, 0x43, 0xFE, 0x71, 0x27, 0x04, 0x3F, 100);
-
-//  Name:     System.PropGroup.Origin -- PKEY_PropGroup_Origin
-//  Type:     Null -- VT_NULL
-//  FormatID: 2598D2FB-5569-4367-95DF-5CD3A177E1A5, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Origin, 0x2598D2FB, 0x5569, 0x4367, 0x95, 0xDF, 0x5C, 0xD3, 0xA1, 0x77, 0xE1, 0xA5, 100);
-
-//  Name:     System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced
-//  Type:     Null -- VT_NULL
-//  FormatID: 0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_PhotoAdvanced, 0x0CB2BF5A, 0x9EE7, 0x4A86, 0x82, 0x22, 0xF0, 0x1E, 0x07, 0xFD, 0xAD, 0xAF, 100);
-
-//  Name:     System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV
-//  Type:     Null -- VT_NULL
-//  FormatID: E7B33238-6584-4170-A5C0-AC25EFD9DA56, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_RecordedTV, 0xE7B33238, 0x6584, 0x4170, 0xA5, 0xC0, 0xAC, 0x25, 0xEF, 0xD9, 0xDA, 0x56, 100);
-
-//  Name:     System.PropGroup.Video -- PKEY_PropGroup_Video
-//  Type:     Null -- VT_NULL
-//  FormatID: BEBE0920-7671-4C54-A3EB-49FDDFC191EE, 100
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Video, 0xBEBE0920, 0x7671, 0x4C54, 0xA3, 0xEB, 0x49, 0xFD, 0xDF, 0xC1, 0x91, 0xEE, 100);
- 
-//-----------------------------------------------------------------------------
-// PropList properties
-
-
-
-//  Name:     System.PropList.ConflictPrompt -- PKEY_PropList_ConflictPrompt
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 11
-//  
-//  The list of properties to show in the file operation conflict resolution dialog. Properties with empty 
-//  values will not be displayed. Register under the regvalue of "ConflictPrompt".
-DEFINE_PROPERTYKEY(PKEY_PropList_ConflictPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 11);
-
-//  Name:     System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 9
-//  
-//  The list of properties to show in the listview on extended tiles. Register under the regvalue of 
-//  "ExtendedTileInfo".
-DEFINE_PROPERTYKEY(PKEY_PropList_ExtendedTileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 9);
-
-//  Name:     System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 10
-//  
-//  The list of properties to show in the file operation confirmation dialog. Properties with empty values 
-//  will not be displayed. If this list is not specified, then the InfoTip property list is used instead. 
-//  Register under the regvalue of "FileOperationPrompt".
-DEFINE_PROPERTYKEY(PKEY_PropList_FileOperationPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 10);
-
-//  Name:     System.PropList.FullDetails -- PKEY_PropList_FullDetails
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 2
-//  
-//  The list of all the properties to show in the details page.  Property groups can be included in this list 
-//  in order to more easily organize the UI.  Register under the regvalue of "FullDetails".
-DEFINE_PROPERTYKEY(PKEY_PropList_FullDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 2);
-
-//  Name:     System.PropList.InfoTip -- PKEY_PropList_InfoTip
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 4 (PID_PROPLIST_INFOTIP)
-//  
-//  The list of properties to show in the infotip. Properties with empty values will not be displayed. Register 
-//  under the regvalue of "InfoTip".
-DEFINE_PROPERTYKEY(PKEY_PropList_InfoTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 4);
-
-//  Name:     System.PropList.NonPersonal -- PKEY_PropList_NonPersonal
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 49D1091F-082E-493F-B23F-D2308AA9668C, 100
-//  
-//  The list of properties that are considered 'non-personal'. When told to remove all non-personal properties 
-//  from a given file, the system will leave these particular properties untouched. Register under the regvalue 
-//  of "NonPersonal".
-DEFINE_PROPERTYKEY(PKEY_PropList_NonPersonal, 0x49D1091F, 0x082E, 0x493F, 0xB2, 0x3F, 0xD2, 0x30, 0x8A, 0xA9, 0x66, 0x8C, 100);
-
-//  Name:     System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 8
-//
-//  The list of properties to display in the preview pane.  Register under the regvalue of "PreviewDetails".
-DEFINE_PROPERTYKEY(PKEY_PropList_PreviewDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 8);
-
-//  Name:     System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 6
-//  
-//  The one or two properties to display in the preview pane title section.  The optional second property is 
-//  displayed as a subtitle.  Register under the regvalue of "PreviewTitle".
-DEFINE_PROPERTYKEY(PKEY_PropList_PreviewTitle, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 6);
-
-//  Name:     System.PropList.QuickTip -- PKEY_PropList_QuickTip
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 5 (PID_PROPLIST_QUICKTIP)
-//  
-//  The list of properties to show in the infotip when the item is on a slow network. Properties with empty 
-//  values will not be displayed. Register under the regvalue of "QuickTip".
-DEFINE_PROPERTYKEY(PKEY_PropList_QuickTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 5);
-
-//  Name:     System.PropList.TileInfo -- PKEY_PropList_TileInfo
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 3 (PID_PROPLIST_TILEINFO)
-//  
-//  The list of properties to show in the listview on tiles. Register under the regvalue of "TileInfo".
-DEFINE_PROPERTYKEY(PKEY_PropList_TileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 3);
-
-//  Name:     System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_WebView) F2275480-F782-4291-BD94-F13693513AEC, 0 (PID_DISPLAY_PROPERTIES)
-//
-//  The list of properties to display in the XP webview details panel. Obsolete.
-DEFINE_PROPERTYKEY(PKEY_PropList_XPDetailsPanel, 0xF2275480, 0xF782, 0x4291, 0xBD, 0x94, 0xF1, 0x36, 0x93, 0x51, 0x3A, 0xEC, 0);
- 
-//-----------------------------------------------------------------------------
-// RecordedTV properties
-
-
-
-//  Name:     System.RecordedTV.ChannelNumber -- PKEY_RecordedTV_ChannelNumber
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 7
-//
-//  Example: 42
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_ChannelNumber, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 7);
-
-//  Name:     System.RecordedTV.Credits -- PKEY_RecordedTV_Credits
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 4
-//
-//  Example: "Don Messick/Frank Welker/Casey Kasem/Heather North/Nicole Jaffe;;;"
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_Credits, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 4);
-
-//  Name:     System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 15
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_DateContentExpires, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 15);
-
-//  Name:     System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 2
-//
-//  Example: "Nowhere to Hyde"
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_EpisodeName, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 2);
-
-//  Name:     System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 16
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsATSCContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 16);
-
-//  Name:     System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 12
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsClosedCaptioningAvailable, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 12);
-
-//  Name:     System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 17
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsDTVContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 17);
-
-//  Name:     System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 18
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsHDContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 18);
-
-//  Name:     System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 13
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsRepeatBroadcast, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 13);
-
-//  Name:     System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 14
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsSAP, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 14);
-
-//  Name:     System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 2C53C813-FB63-4E22-A1AB-0B331CA1E273, 100
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_NetworkAffiliation, 0x2C53C813, 0xFB63, 0x4E22, 0xA1, 0xAB, 0x0B, 0x33, 0x1C, 0xA1, 0xE2, 0x73, 100);
-
-//  Name:     System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 4684FE97-8765-4842-9C13-F006447B178C, 100
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_OriginalBroadcastDate, 0x4684FE97, 0x8765, 0x4842, 0x9C, 0x13, 0xF0, 0x06, 0x44, 0x7B, 0x17, 0x8C, 100);
-
-//  Name:     System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 3
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_ProgramDescription, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 3);
-
-//  Name:     System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: A5477F61-7A82-4ECA-9DDE-98B69B2479B3, 100
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_RecordingTime, 0xA5477F61, 0x7A82, 0x4ECA, 0x9D, 0xDE, 0x98, 0xB6, 0x9B, 0x24, 0x79, 0xB3, 100);
-
-//  Name:     System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 5
-//
-//  Example: "TOONP"
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationCallSign, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 5);
-
-//  Name:     System.RecordedTV.StationName -- PKEY_RecordedTV_StationName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493, 100
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationName, 0x1B5439E7, 0xEBA1, 0x4AF8, 0xBD, 0xD7, 0x7A, 0xF1, 0xD4, 0x54, 0x94, 0x93, 100);
- 
-//-----------------------------------------------------------------------------
-// Search properties
-
-
-
-//  Name:     System.Search.AutoSummary -- PKEY_Search_AutoSummary
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 2
-//
-//  General Summary of the document.
-DEFINE_PROPERTYKEY(PKEY_Search_AutoSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 2);
-
-//  Name:     System.Search.ContainerHash -- PKEY_Search_ContainerHash
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: BCEEE283-35DF-4D53-826A-F36A3EEFC6BE, 100
-//
-//  Hash code used to identify attachments to be deleted based on a common container url
-DEFINE_PROPERTYKEY(PKEY_Search_ContainerHash, 0xBCEEE283, 0x35DF, 0x4D53, 0x82, 0x6A, 0xF3, 0x6A, 0x3E, 0xEF, 0xC6, 0xBE, 100);
-
-//  Name:     System.Search.Contents -- PKEY_Search_Contents
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 19 (PID_STG_CONTENTS)
-//  
-//  The contents of the item. This property is for query restrictions only; it cannot be retrieved in a 
-//  query result. The Indexing Service friendly name is 'contents'.
-DEFINE_PROPERTYKEY(PKEY_Search_Contents, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 19);
-
-//  Name:     System.Search.EntryID -- PKEY_Search_EntryID
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 5 (PROPID_QUERY_WORKID)
-//  
-//  The entry ID for an item within a given catalog in the Windows Search Index.
-//  This value may be recycled, and therefore is not considered unique over time.
-DEFINE_PROPERTYKEY(PKEY_Search_EntryID, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 5);
-
-//  Name:     System.Search.GatherTime -- PKEY_Search_GatherTime
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 8
-//
-//  The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows Search Gatherer Plugins.
-DEFINE_PROPERTYKEY(PKEY_Search_GatherTime, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 8);
-
-//  Name:     System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 23
-//
-//  If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well.  For example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified time of that email.
-DEFINE_PROPERTYKEY(PKEY_Search_IsClosedDirectory, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);
-
-//  Name:     System.Search.IsFullyContained -- PKEY_Search_IsFullyContained
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 24
-//
-//  Any child URL of a URL which has System.Search.IsClosedDirectory=TRUE must emit System.Search.IsFullyContained=TRUE.  This ensures that the URL is not deleted at the end of a crawl because it hasn't been visited (which is the normal mechanism for detecting deletes).  For example an email attachment would emit this property
-DEFINE_PROPERTYKEY(PKEY_Search_IsFullyContained, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 24);
-
-//  Name:     System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 3
-//
-//  Query Focused Summary of the document.
-DEFINE_PROPERTYKEY(PKEY_Search_QueryFocusedSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 3);
-
-//  Name:     System.Search.Rank -- PKEY_Search_Rank
-//  Type:     Int32 -- VT_I4
-//  FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 3 (PROPID_QUERY_RANK)
-//  
-//  Relevance rank of row. Ranges from 0-1000. Larger numbers = better matches.  Query-time only, not 
-//  defined in Search schema, retrievable but not searchable.
-DEFINE_PROPERTYKEY(PKEY_Search_Rank, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 3);
-
-//  Name:     System.Search.Store -- PKEY_Search_Store
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: A06992B3-8CAF-4ED7-A547-B259E32AC9FC, 100
-//
-//  The identifier for the protocol handler that produced this item. (E.g. MAPI, CSC, FILE etc.)
-DEFINE_PROPERTYKEY(PKEY_Search_Store, 0xA06992B3, 0x8CAF, 0x4ED7, 0xA5, 0x47, 0xB2, 0x59, 0xE3, 0x2A, 0xC9, 0xFC, 100);
-
-//  Name:     System.Search.UrlToIndex -- PKEY_Search_UrlToIndex
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 2
-//
-//  This property should be emitted by a container IFilter for each child URL within the container.  The children will eventually be crawled by the indexer if they are within scope.
-DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndex, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 2);
-
-//  Name:     System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime
-//  Type:     Multivalue Any -- VT_VECTOR | VT_NULL  (For variants: VT_ARRAY | VT_NULL)
-//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 12
-//
-//  This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last modified.  This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for this information to determine if the content needs to be indexed again.  The property is a vector with two elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time.
-DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndexWithModificationTime, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 12);
- 
-//-----------------------------------------------------------------------------
-// Shell properties
-
-
-
-//  Name:     System.DescriptionID -- PKEY_DescriptionID
-//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
-//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 2 (PID_DESCRIPTIONID)
-//
-//  The contents of a SHDESCRIPTIONID structure as a buffer of bytes.
-DEFINE_PROPERTYKEY(PKEY_DescriptionID, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 2);
-
-//  Name:     System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 3
-//  
-//  Expresses the SFGAO flags of a link as string values and is used as a query optimization.  See 
-//  PKEY_Shell_SFGAOFlagsStrings for possible values of this.
-DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 3);
-
-//  Name:     System.Link.TargetUrl -- PKEY_Link_TargetUrl
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 2  (PKEYs relating to URLs.  Used by IE History.)
-DEFINE_PROPERTYKEY(PKEY_Link_TargetUrl, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 2);
-
-//  Name:     System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 2
-//
-//  Expresses the SFGAO flags as string values and is used as a query optimization.
-DEFINE_PROPERTYKEY(PKEY_Shell_SFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 2);
-
-// Possible discrete values for PKEY_Shell_SFGAOFlagsStrings are:
-#define SFGAOSTR_FILESYS                    L"filesys"               // SFGAO_FILESYSTEM
-#define SFGAOSTR_FILEANC                    L"fileanc"               // SFGAO_FILESYSANCESTOR
-#define SFGAOSTR_STORAGEANC                 L"storageanc"               // SFGAO_STORAGEANCESTOR
-#define SFGAOSTR_STREAM                     L"stream"               // SFGAO_STREAM
-#define SFGAOSTR_LINK                       L"link"               // SFGAO_LINK
-#define SFGAOSTR_HIDDEN                     L"hidden"               // SFGAO_HIDDEN
-#define SFGAOSTR_FOLDER                     L"folder"               // SFGAO_FOLDER
-#define SFGAOSTR_NONENUM                    L"nonenum"               // SFGAO_NONENUMERATED
-#define SFGAOSTR_BROWSABLE                  L"browsable"               // SFGAO_BROWSABLE
- 
-//-----------------------------------------------------------------------------
-// Software properties
-
-
-
-//  Name:     System.Software.DateLastUsed -- PKEY_Software_DateLastUsed
-//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
-//  FormatID: 841E4F90-FF59-4D16-8947-E81BBFFAB36D, 16
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Software_DateLastUsed, 0x841E4F90, 0xFF59, 0x4D16, 0x89, 0x47, 0xE8, 0x1B, 0xBF, 0xFA, 0xB3, 0x6D, 16);
-
-//  Name:     System.Software.ProductName -- PKEY_Software_ProductName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 7
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Software_ProductName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 7);
- 
-//-----------------------------------------------------------------------------
-// Sync properties
-
-
-
-//  Name:     System.Sync.Comments -- PKEY_Sync_Comments
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 13
-DEFINE_PROPERTYKEY(PKEY_Sync_Comments, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 13);
-
-//  Name:     System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 4
-DEFINE_PROPERTYKEY(PKEY_Sync_ConflictDescription, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 4);
-
-//  Name:     System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 6
-DEFINE_PROPERTYKEY(PKEY_Sync_ConflictFirstLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 6);
-
-//  Name:     System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 7
-DEFINE_PROPERTYKEY(PKEY_Sync_ConflictSecondLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 7);
-
-//  Name:     System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID
-//  Type:     Guid -- VT_CLSID
-//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 2
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerCollectionID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 2);
-
-//  Name:     System.Sync.HandlerID -- PKEY_Sync_HandlerID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 3
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 3);
-
-//  Name:     System.Sync.HandlerName -- PKEY_Sync_HandlerName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 2
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 2);
-
-//  Name:     System.Sync.HandlerType -- PKEY_Sync_HandlerType
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 8
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerType, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 8);
-
-// Possible discrete values for PKEY_Sync_HandlerType are:
-#define SYNC_HANDLERTYPE_OTHER              0ul
-#define SYNC_HANDLERTYPE_PROGRAMS           1ul
-#define SYNC_HANDLERTYPE_DEVICES            2ul
-#define SYNC_HANDLERTYPE_FOLDERS            3ul
-#define SYNC_HANDLERTYPE_WEBSERVICES        4ul
-#define SYNC_HANDLERTYPE_COMPUTERS          5ul
-
-//  Name:     System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 9
-//  
-//  
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerTypeLabel, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 9);
-
-//  Name:     System.Sync.ItemID -- PKEY_Sync_ItemID
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 6
-DEFINE_PROPERTYKEY(PKEY_Sync_ItemID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 6);
-
-//  Name:     System.Sync.ItemName -- PKEY_Sync_ItemName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 3
-DEFINE_PROPERTYKEY(PKEY_Sync_ItemName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 3);
- 
-//-----------------------------------------------------------------------------
-// Task properties
-
-//  Name:     System.Task.BillingInformation -- PKEY_Task_BillingInformation
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: D37D52C6-261C-4303-82B3-08B926AC6F12, 100
-DEFINE_PROPERTYKEY(PKEY_Task_BillingInformation, 0xD37D52C6, 0x261C, 0x4303, 0x82, 0xB3, 0x08, 0xB9, 0x26, 0xAC, 0x6F, 0x12, 100);
-
-//  Name:     System.Task.CompletionStatus -- PKEY_Task_CompletionStatus
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 084D8A0A-E6D5-40DE-BF1F-C8820E7C877C, 100
-DEFINE_PROPERTYKEY(PKEY_Task_CompletionStatus, 0x084D8A0A, 0xE6D5, 0x40DE, 0xBF, 0x1F, 0xC8, 0x82, 0x0E, 0x7C, 0x87, 0x7C, 100);
-
-//  Name:     System.Task.Owner -- PKEY_Task_Owner
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: 08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0, 100
-DEFINE_PROPERTYKEY(PKEY_Task_Owner, 0x08C7CC5F, 0x60F2, 0x4494, 0xAD, 0x75, 0x55, 0xE3, 0xE0, 0xB5, 0xAD, 0xD0, 100);
-
- 
- 
-//-----------------------------------------------------------------------------
-// Video properties
-
-//  Name:     System.Video.Compression -- PKEY_Video_Compression
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 10 (PIDVSI_COMPRESSION)
-//
-//  Indicates the level of compression for the video stream.  "Compression".
-DEFINE_PROPERTYKEY(PKEY_Video_Compression, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);
-
-//  Name:     System.Video.Director -- PKEY_Video_Director
-//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
-//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 20 (PIDMSI_DIRECTOR)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Video_Director, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 20);
-
-//  Name:     System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 8 (PIDVSI_DATA_RATE)
-//
-//  Indicates the data rate in "bits per second" for the video stream. "DataRate".
-DEFINE_PROPERTYKEY(PKEY_Video_EncodingBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);
-
-//  Name:     System.Video.FourCC -- PKEY_Video_FourCC
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 44
-//  
-//  Indicates the 4CC for the video stream.
-DEFINE_PROPERTYKEY(PKEY_Video_FourCC, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 44);
-
-//  Name:     System.Video.FrameHeight -- PKEY_Video_FrameHeight
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 4
-//
-//  Indicates the frame height for the video stream.
-DEFINE_PROPERTYKEY(PKEY_Video_FrameHeight, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
-
-//  Name:     System.Video.FrameRate -- PKEY_Video_FrameRate
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 6 (PIDVSI_FRAME_RATE)
-//
-//  Indicates the frame rate in "frames per millisecond" for the video stream.  "FrameRate".
-DEFINE_PROPERTYKEY(PKEY_Video_FrameRate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
-
-//  Name:     System.Video.FrameWidth -- PKEY_Video_FrameWidth
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 3
-//
-//  Indicates the frame width for the video stream.
-DEFINE_PROPERTYKEY(PKEY_Video_FrameWidth, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
-
-//  Name:     System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 42
-//  
-//  Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY,
-//  like 16:9.
-DEFINE_PROPERTYKEY(PKEY_Video_HorizontalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 42);
-
-//  Name:     System.Video.SampleSize -- PKEY_Video_SampleSize
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 9 (PIDVSI_SAMPLE_SIZE)
-//
-//  Indicates the sample size in bits for the video stream.  "SampleSize".
-DEFINE_PROPERTYKEY(PKEY_Video_SampleSize, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
-
-//  Name:     System.Video.StreamName -- PKEY_Video_StreamName
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 2 (PIDVSI_STREAM_NAME)
-//
-//  Indicates the name for the video stream. "StreamName".
-DEFINE_PROPERTYKEY(PKEY_Video_StreamName, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);
-
-//  Name:     System.Video.StreamNumber -- PKEY_Video_StreamNumber
-//  Type:     UInt16 -- VT_UI2
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 11 (PIDVSI_STREAM_NUMBER)
-//
-//  "Stream Number".
-DEFINE_PROPERTYKEY(PKEY_Video_StreamNumber, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);
-
-//  Name:     System.Video.TotalBitrate -- PKEY_Video_TotalBitrate
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 43 (PIDVSI_TOTAL_BITRATE)
-//
-//  Indicates the total data rate in "bits per second" for all video and audio streams.
-DEFINE_PROPERTYKEY(PKEY_Video_TotalBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 43);
-
-//  Name:     System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio
-//  Type:     UInt32 -- VT_UI4
-//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 45
-//  
-//  Indicates the vertical portion of the aspect ratio. The Y portion of 
-//  XX:YY, like 16:9.
-DEFINE_PROPERTYKEY(PKEY_Video_VerticalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 45);
-
- 
- 
-//-----------------------------------------------------------------------------
-// Volume properties
-
-//  Name:     System.Volume.FileSystem -- PKEY_Volume_FileSystem
-//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
-//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 4 (PID_VOLUME_FILESYSTEM)  (Filesystem Volume Properties)
-//
-//  Indicates the filesystem of the volume.
-DEFINE_PROPERTYKEY(PKEY_Volume_FileSystem, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);
-
-//  Name:     System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: 149C0B69-2C2D-48FC-808F-D318D78C4636, 2
-DEFINE_PROPERTYKEY(PKEY_Volume_IsMappedDrive, 0x149C0B69, 0x2C2D, 0x48FC, 0x80, 0x8F, 0xD3, 0x18, 0xD7, 0x8C, 0x46, 0x36, 2);
-
-//  Name:     System.Volume.IsRoot -- PKEY_Volume_IsRoot
-//  Type:     Boolean -- VT_BOOL
-//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 10  (Filesystem Volume Properties)
-//
-//  
-DEFINE_PROPERTYKEY(PKEY_Volume_IsRoot, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 10);
-
-#endif  /* _INC_PROPKEY */
-
-
+//===========================================================================
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//===========================================================================
+
+
+#ifndef _INC_PROPKEY
+#define _INC_PROPKEY
+
+#ifndef DEFINE_API_PKEY
+#define DEFINE_API_PKEY(name, managed_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
+        DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid)
+#endif
+
+#include <propkeydef.h>
+
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x0501
+#else
+#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
+#error _WIN32_IE setting conflicts with _WIN32_WINNT setting
+#endif
+#endif
+
+ 
+//-----------------------------------------------------------------------------
+// Audio properties
+
+//  Name:     System.Audio.ChannelCount -- PKEY_Audio_ChannelCount
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 7 (PIDASI_CHANNEL_COUNT)
+//
+//  Indicates the channel count for the audio file.  Values: 1 (mono), 2 (stereo).
+DEFINE_PROPERTYKEY(PKEY_Audio_ChannelCount, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);
+
+// Possible discrete values for PKEY_Audio_ChannelCount are:
+#define AUDIO_CHANNELCOUNT_MONO             1ul
+#define AUDIO_CHANNELCOUNT_STEREO           2ul
+
+//  Name:     System.Audio.Compression -- PKEY_Audio_Compression
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 10 (PIDASI_COMPRESSION)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Audio_Compression, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);
+
+//  Name:     System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 4 (PIDASI_AVG_DATA_RATE)
+//
+//  Indicates the average data rate in Hz for the audio file in "bits per second".
+DEFINE_PROPERTYKEY(PKEY_Audio_EncodingBitrate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
+
+//  Name:     System.Audio.Format -- PKEY_Audio_Format
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_BSTR.
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 2 (PIDASI_FORMAT)
+//
+//  Indicates the format of the audio file.
+DEFINE_PROPERTYKEY(PKEY_Audio_Format, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);
+
+//  Name:     System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C, 100
+DEFINE_PROPERTYKEY(PKEY_Audio_IsVariableBitRate, 0xE6822FEE, 0x8C17, 0x4D62, 0x82, 0x3C, 0x8E, 0x9C, 0xFC, 0xBD, 0x1D, 0x5C, 100);
+
+//  Name:     System.Audio.PeakValue -- PKEY_Audio_PeakValue
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E, 100
+DEFINE_PROPERTYKEY(PKEY_Audio_PeakValue, 0x2579E5D0, 0x1116, 0x4084, 0xBD, 0x9A, 0x9B, 0x4F, 0x7C, 0xB4, 0xDF, 0x5E, 100);
+
+//  Name:     System.Audio.SampleRate -- PKEY_Audio_SampleRate
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 5 (PIDASI_SAMPLE_RATE)
+//
+//  Indicates the audio sample rate for the audio file in "samples per second".
+DEFINE_PROPERTYKEY(PKEY_Audio_SampleRate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);
+
+//  Name:     System.Audio.SampleSize -- PKEY_Audio_SampleSize
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 6 (PIDASI_SAMPLE_SIZE)
+//
+//  Indicates the audio sample size for the audio file in "bits per sample".
+DEFINE_PROPERTYKEY(PKEY_Audio_SampleSize, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
+
+//  Name:     System.Audio.StreamName -- PKEY_Audio_StreamName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 9 (PIDASI_STREAM_NAME)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Audio_StreamName, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
+
+//  Name:     System.Audio.StreamNumber -- PKEY_Audio_StreamNumber
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 8 (PIDASI_STREAM_NUMBER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Audio_StreamNumber, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);
+
+ 
+ 
+//-----------------------------------------------------------------------------
+// Calendar properties
+
+//  Name:     System.Calendar.Duration -- PKEY_Calendar_Duration
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 293CA35A-09AA-4DD2-B180-1FE245728A52, 100
+//
+//  The duration as specified in a string.
+DEFINE_PROPERTYKEY(PKEY_Calendar_Duration, 0x293CA35A, 0x09AA, 0x4DD2, 0xB1, 0x80, 0x1F, 0xE2, 0x45, 0x72, 0x8A, 0x52, 100);
+
+//  Name:     System.Calendar.IsOnline -- PKEY_Calendar_IsOnline
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: BFEE9149-E3E2-49A7-A862-C05988145CEC, 100
+//
+//  Identifies if the event is an online event.
+DEFINE_PROPERTYKEY(PKEY_Calendar_IsOnline, 0xBFEE9149, 0xE3E2, 0x49A7, 0xA8, 0x62, 0xC0, 0x59, 0x88, 0x14, 0x5C, 0xEC, 100);
+
+//  Name:     System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 315B9C8D-80A9-4EF9-AE16-8E746DA51D70, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_IsRecurring, 0x315B9C8D, 0x80A9, 0x4EF9, 0xAE, 0x16, 0x8E, 0x74, 0x6D, 0xA5, 0x1D, 0x70, 100);
+
+//  Name:     System.Calendar.Location -- PKEY_Calendar_Location
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F6272D18-CECC-40B1-B26A-3911717AA7BD, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_Location, 0xF6272D18, 0xCECC, 0x40B1, 0xB2, 0x6A, 0x39, 0x11, 0x71, 0x7A, 0xA7, 0xBD, 100);
+
+//  Name:     System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D55BAE5A-3892-417A-A649-C6AC5AAAEAB3, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeAddresses, 0xD55BAE5A, 0x3892, 0x417A, 0xA6, 0x49, 0xC6, 0xAC, 0x5A, 0xAA, 0xEA, 0xB3, 100);
+
+//  Name:     System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 09429607-582D-437F-84C3-DE93A2B24C3C, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeNames, 0x09429607, 0x582D, 0x437F, 0x84, 0xC3, 0xDE, 0x93, 0xA2, 0xB2, 0x4C, 0x3C, 100);
+
+//  Name:     System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 744C8242-4DF5-456C-AB9E-014EFB9021E3, 100
+//
+//  Address of the organizer organizing the event.
+DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerAddress, 0x744C8242, 0x4DF5, 0x456C, 0xAB, 0x9E, 0x01, 0x4E, 0xFB, 0x90, 0x21, 0xE3, 100);
+
+//  Name:     System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: AAA660F9-9865-458E-B484-01BC7FE3973E, 100
+//
+//  Name of the organizer organizing the event.
+DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerName, 0xAAA660F9, 0x9865, 0x458E, 0xB4, 0x84, 0x01, 0xBC, 0x7F, 0xE3, 0x97, 0x3E, 100);
+
+//  Name:     System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 72FC5BA4-24F9-4011-9F3F-ADD27AFAD818, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_ReminderTime, 0x72FC5BA4, 0x24F9, 0x4011, 0x9F, 0x3F, 0xAD, 0xD2, 0x7A, 0xFA, 0xD8, 0x18, 100);
+
+//  Name:     System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 0BA7D6C3-568D-4159-AB91-781A91FB71E5, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeAddresses, 0x0BA7D6C3, 0x568D, 0x4159, 0xAB, 0x91, 0x78, 0x1A, 0x91, 0xFB, 0x71, 0xE5, 100);
+
+//  Name:     System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: B33AF30B-F552-4584-936C-CB93E5CDA29F, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeNames, 0xB33AF30B, 0xF552, 0x4584, 0x93, 0x6C, 0xCB, 0x93, 0xE5, 0xCD, 0xA2, 0x9F, 100);
+
+//  Name:     System.Calendar.Resources -- PKEY_Calendar_Resources
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 00F58A38-C54B-4C40-8696-97235980EAE1, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_Resources, 0x00F58A38, 0xC54B, 0x4C40, 0x86, 0x96, 0x97, 0x23, 0x59, 0x80, 0xEA, 0xE1, 100);
+
+//  Name:     System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: 5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E, 100
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAs, 0x5BF396D4, 0x5EB2, 0x466F, 0xBD, 0xE9, 0x2F, 0xB3, 0xF2, 0x36, 0x1D, 0x6E, 100);
+
+// Possible discrete values for PKEY_Calendar_ShowTimeAs are:
+#define CALENDAR_SHOWTIMEAS_FREE            0u
+#define CALENDAR_SHOWTIMEAS_TENTATIVE       1u
+#define CALENDAR_SHOWTIMEAS_BUSY            2u
+#define CALENDAR_SHOWTIMEAS_OOF             3u
+
+//  Name:     System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 53DA57CF-62C0-45C4-81DE-7610BCEFD7F5, 100
+//  
+//  This is the user-friendly form of System.Calendar.ShowTimeAs.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAsText, 0x53DA57CF, 0x62C0, 0x45C4, 0x81, 0xDE, 0x76, 0x10, 0xBC, 0xEF, 0xD7, 0xF5, 100);
+ 
+//-----------------------------------------------------------------------------
+// Communication properties
+
+
+
+//  Name:     System.Communication.AccountName -- PKEY_Communication_AccountName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 9
+//
+//  Account Name
+DEFINE_PROPERTYKEY(PKEY_Communication_AccountName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 9);
+
+//  Name:     System.Communication.Suffix -- PKEY_Communication_Suffix
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 807B653A-9E91-43EF-8F97-11CE04EE20C5, 100
+DEFINE_PROPERTYKEY(PKEY_Communication_Suffix, 0x807B653A, 0x9E91, 0x43EF, 0x8F, 0x97, 0x11, 0xCE, 0x04, 0xEE, 0x20, 0xC5, 100);
+
+//  Name:     System.Communication.TaskStatus -- PKEY_Communication_TaskStatus
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999, 100
+DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatus, 0xBE1A72C6, 0x9A1D, 0x46B7, 0xAF, 0xE7, 0xAF, 0xAF, 0x8C, 0xEF, 0x49, 0x99, 100);
+
+// Possible discrete values for PKEY_Communication_TaskStatus are:
+#define TASKSTATUS_NOTSTARTED               0u
+#define TASKSTATUS_INPROGRESS               1u
+#define TASKSTATUS_COMPLETE                 2u
+#define TASKSTATUS_WAITING                  3u
+#define TASKSTATUS_DEFERRED                 4u
+
+//  Name:     System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A6744477-C237-475B-A075-54F34498292A, 100
+//  
+//  This is the user-friendly form of System.Communication.TaskStatus.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatusText, 0xA6744477, 0xC237, 0x475B, 0xA0, 0x75, 0x54, 0xF3, 0x44, 0x98, 0x29, 0x2A, 100);
+ 
+//-----------------------------------------------------------------------------
+// Computer properties
+
+
+
+//  Name:     System.Computer.DecoratedFreeSpace -- PKEY_Computer_DecoratedFreeSpace
+//  Type:     Multivalue UInt64 -- VT_VECTOR | VT_UI8  (For variants: VT_ARRAY | VT_UI8)
+//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 7  (Filesystem Volume Properties)
+//
+//  Free space and total space: "%s free of %s"
+DEFINE_PROPERTYKEY(PKEY_Computer_DecoratedFreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 7);
+ 
+//-----------------------------------------------------------------------------
+// Contact properties
+
+
+
+//  Name:     System.Contact.Anniversary -- PKEY_Contact_Anniversary
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 9AD5BADB-CEA7-4470-A03D-B84E51B9949E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Anniversary, 0x9AD5BADB, 0xCEA7, 0x4470, 0xA0, 0x3D, 0xB8, 0x4E, 0x51, 0xB9, 0x94, 0x9E, 100);
+
+//  Name:     System.Contact.AssistantName -- PKEY_Contact_AssistantName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CD102C9C-5540-4A88-A6F6-64E4981C8CD1, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_AssistantName, 0xCD102C9C, 0x5540, 0x4A88, 0xA6, 0xF6, 0x64, 0xE4, 0x98, 0x1C, 0x8C, 0xD1, 100);
+
+//  Name:     System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_AssistantTelephone, 0x9A93244D, 0xA7AD, 0x4FF8, 0x9B, 0x99, 0x45, 0xEE, 0x4C, 0xC0, 0x9A, 0xF6, 100);
+
+//  Name:     System.Contact.Birthday -- PKEY_Contact_Birthday
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 47
+DEFINE_PROPERTYKEY(PKEY_Contact_Birthday, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 47);
+
+//  Name:     System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 730FB6DD-CF7C-426B-A03F-BD166CC9EE24, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddress, 0x730FB6DD, 0xCF7C, 0x426B, 0xA0, 0x3F, 0xBD, 0x16, 0x6C, 0xC9, 0xEE, 0x24, 100);
+
+//  Name:     System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 402B5934-EC5A-48C3-93E6-85E86A2D934E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCity, 0x402B5934, 0xEC5A, 0x48C3, 0x93, 0xE6, 0x85, 0xE8, 0x6A, 0x2D, 0x93, 0x4E, 100);
+
+//  Name:     System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCountry, 0xB0B87314, 0xFCF6, 0x4FEB, 0x8D, 0xFF, 0xA5, 0x0D, 0xA6, 0xAF, 0x56, 0x1C, 100);
+
+//  Name:     System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostalCode, 0xE1D4A09E, 0xD758, 0x4CD1, 0xB6, 0xEC, 0x34, 0xA8, 0xB5, 0xA7, 0x3F, 0x80, 100);
+
+//  Name:     System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: BC4E71CE-17F9-48D5-BEE9-021DF0EA5409, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostOfficeBox, 0xBC4E71CE, 0x17F9, 0x48D5, 0xBE, 0xE9, 0x02, 0x1D, 0xF0, 0xEA, 0x54, 0x09, 100);
+
+//  Name:     System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 446F787F-10C4-41CB-A6C4-4D0343551597, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressState, 0x446F787F, 0x10C4, 0x41CB, 0xA6, 0xC4, 0x4D, 0x03, 0x43, 0x55, 0x15, 0x97, 100);
+
+//  Name:     System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DDD1460F-C0BF-4553-8CE4-10433C908FB0, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressStreet, 0xDDD1460F, 0xC0BF, 0x4553, 0x8C, 0xE4, 0x10, 0x43, 0x3C, 0x90, 0x8F, 0xB0, 100);
+
+//  Name:     System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 91EFF6F3-2E27-42CA-933E-7C999FBE310B, 100
+//
+//  Business fax number of the contact.
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessFaxNumber, 0x91EFF6F3, 0x2E27, 0x42CA, 0x93, 0x3E, 0x7C, 0x99, 0x9F, 0xBE, 0x31, 0x0B, 100);
+
+//  Name:     System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 56310920-2491-4919-99CE-EADB06FAFDB2, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessHomePage, 0x56310920, 0x2491, 0x4919, 0x99, 0xCE, 0xEA, 0xDB, 0x06, 0xFA, 0xFD, 0xB2, 100);
+
+//  Name:     System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessTelephone, 0x6A15E5A0, 0x0A1E, 0x4CD7, 0xBB, 0x8C, 0xD2, 0xF1, 0xB0, 0xC9, 0x29, 0xBC, 100);
+
+//  Name:     System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: BF53D1C3-49E0-4F7F-8567-5A821D8AC542, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_CallbackTelephone, 0xBF53D1C3, 0x49E0, 0x4F7F, 0x85, 0x67, 0x5A, 0x82, 0x1D, 0x8A, 0xC5, 0x42, 100);
+
+//  Name:     System.Contact.CarTelephone -- PKEY_Contact_CarTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 8FDC6DEA-B929-412B-BA90-397A257465FE, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_CarTelephone, 0x8FDC6DEA, 0xB929, 0x412B, 0xBA, 0x90, 0x39, 0x7A, 0x25, 0x74, 0x65, 0xFE, 100);
+
+//  Name:     System.Contact.Children -- PKEY_Contact_Children
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D4729704-8EF1-43EF-9024-2BD381187FD5, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Children, 0xD4729704, 0x8EF1, 0x43EF, 0x90, 0x24, 0x2B, 0xD3, 0x81, 0x18, 0x7F, 0xD5, 100);
+
+//  Name:     System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 8589E481-6040-473D-B171-7FA89C2708ED, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_CompanyMainTelephone, 0x8589E481, 0x6040, 0x473D, 0xB1, 0x71, 0x7F, 0xA8, 0x9C, 0x27, 0x08, 0xED, 100);
+
+//  Name:     System.Contact.Department -- PKEY_Contact_Department
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Department, 0xFC9F7306, 0xFF8F, 0x4D49, 0x9F, 0xB6, 0x3F, 0xFE, 0x5C, 0x09, 0x51, 0xEC, 100);
+
+//  Name:     System.Contact.EmailAddress -- PKEY_Contact_EmailAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress, 0xF8FA7FA3, 0xD12B, 0x4785, 0x8A, 0x4E, 0x69, 0x1A, 0x94, 0xF7, 0xA3, 0xE7, 100);
+
+//  Name:     System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 38965063-EDC8-4268-8491-B7723172CF29, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress2, 0x38965063, 0xEDC8, 0x4268, 0x84, 0x91, 0xB7, 0x72, 0x31, 0x72, 0xCF, 0x29, 100);
+
+//  Name:     System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 644D37B4-E1B3-4BAD-B099-7E7C04966ACA, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress3, 0x644D37B4, 0xE1B3, 0x4BAD, 0xB0, 0x99, 0x7E, 0x7C, 0x04, 0x96, 0x6A, 0xCA, 100);
+
+//  Name:     System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 84D8F337-981D-44B3-9615-C7596DBA17E3, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddresses, 0x84D8F337, 0x981D, 0x44B3, 0x96, 0x15, 0xC7, 0x59, 0x6D, 0xBA, 0x17, 0xE3, 100);
+
+//  Name:     System.Contact.EmailName -- PKEY_Contact_EmailName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CC6F4F24-6083-4BD4-8754-674D0DE87AB8, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailName, 0xCC6F4F24, 0x6083, 0x4BD4, 0x87, 0x54, 0x67, 0x4D, 0x0D, 0xE8, 0x7A, 0xB8, 100);
+
+//  Name:     System.Contact.FileAsName -- PKEY_Contact_FileAsName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_FileAsName, 0xF1A24AA7, 0x9CA7, 0x40F6, 0x89, 0xEC, 0x97, 0xDE, 0xF9, 0xFF, 0xE8, 0xDB, 100);
+
+//  Name:     System.Contact.FirstName -- PKEY_Contact_FirstName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 14977844-6B49-4AAD-A714-A4513BF60460, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_FirstName, 0x14977844, 0x6B49, 0x4AAD, 0xA7, 0x14, 0xA4, 0x51, 0x3B, 0xF6, 0x04, 0x60, 100);
+
+//  Name:     System.Contact.FullName -- PKEY_Contact_FullName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 635E9051-50A5-4BA2-B9DB-4ED056C77296, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_FullName, 0x635E9051, 0x50A5, 0x4BA2, 0xB9, 0xDB, 0x4E, 0xD0, 0x56, 0xC7, 0x72, 0x96, 100);
+
+//  Name:     System.Contact.Gender -- PKEY_Contact_Gender
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Gender, 0x3C8CEE58, 0xD4F0, 0x4CF9, 0xB7, 0x56, 0x4E, 0x5D, 0x24, 0x44, 0x7B, 0xCD, 100);
+
+//  Name:     System.Contact.Hobbies -- PKEY_Contact_Hobbies
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 5DC2253F-5E11-4ADF-9CFE-910DD01E3E70, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Hobbies, 0x5DC2253F, 0x5E11, 0x4ADF, 0x9C, 0xFE, 0x91, 0x0D, 0xD0, 0x1E, 0x3E, 0x70, 100);
+
+//  Name:     System.Contact.HomeAddress -- PKEY_Contact_HomeAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 98F98354-617A-46B8-8560-5B1B64BF1F89, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddress, 0x98F98354, 0x617A, 0x46B8, 0x85, 0x60, 0x5B, 0x1B, 0x64, 0xBF, 0x1F, 0x89, 100);
+
+//  Name:     System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 65
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCity, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 65);
+
+//  Name:     System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCountry, 0x08A65AA1, 0xF4C9, 0x43DD, 0x9D, 0xDF, 0xA3, 0x3D, 0x8E, 0x7E, 0xAD, 0x85, 100);
+
+//  Name:     System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 8AFCC170-8A46-4B53-9EEE-90BAE7151E62, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostalCode, 0x8AFCC170, 0x8A46, 0x4B53, 0x9E, 0xEE, 0x90, 0xBA, 0xE7, 0x15, 0x1E, 0x62, 100);
+
+//  Name:     System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7B9F6399-0A3F-4B12-89BD-4ADC51C918AF, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostOfficeBox, 0x7B9F6399, 0x0A3F, 0x4B12, 0x89, 0xBD, 0x4A, 0xDC, 0x51, 0xC9, 0x18, 0xAF, 100);
+
+//  Name:     System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C89A23D0-7D6D-4EB8-87D4-776A82D493E5, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressState, 0xC89A23D0, 0x7D6D, 0x4EB8, 0x87, 0xD4, 0x77, 0x6A, 0x82, 0xD4, 0x93, 0xE5, 100);
+
+//  Name:     System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 0ADEF160-DB3F-4308-9A21-06237B16FA2A, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressStreet, 0x0ADEF160, 0xDB3F, 0x4308, 0x9A, 0x21, 0x06, 0x23, 0x7B, 0x16, 0xFA, 0x2A, 100);
+
+//  Name:     System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 660E04D6-81AB-4977-A09F-82313113AB26, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeFaxNumber, 0x660E04D6, 0x81AB, 0x4977, 0xA0, 0x9F, 0x82, 0x31, 0x31, 0x13, 0xAB, 0x26, 100);
+
+//  Name:     System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 20
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 20);
+
+//  Name:     System.Contact.IMAddress -- PKEY_Contact_IMAddress
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D68DBD8A-3374-4B81-9972-3EC30682DB3D, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_IMAddress, 0xD68DBD8A, 0x3374, 0x4B81, 0x99, 0x72, 0x3E, 0xC3, 0x06, 0x82, 0xDB, 0x3D, 100);
+
+//  Name:     System.Contact.Initials -- PKEY_Contact_Initials
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F3D8F40D-50CB-44A2-9718-40CB9119495D, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Initials, 0xF3D8F40D, 0x50CB, 0x44A2, 0x97, 0x18, 0x40, 0xCB, 0x91, 0x19, 0x49, 0x5D, 100);
+
+//  Name:     System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 2
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Contact_JA_CompanyNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 2);
+
+//  Name:     System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 3
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Contact_JA_FirstNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 3);
+
+//  Name:     System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 4
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Contact_JA_LastNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 4);
+
+//  Name:     System.Contact.JobTitle -- PKEY_Contact_JobTitle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 6
+DEFINE_PROPERTYKEY(PKEY_Contact_JobTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 6);
+
+//  Name:     System.Contact.Label -- PKEY_Contact_Label
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 97B0AD89-DF49-49CC-834E-660974FD755B, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Label, 0x97B0AD89, 0xDF49, 0x49CC, 0x83, 0x4E, 0x66, 0x09, 0x74, 0xFD, 0x75, 0x5B, 100);
+
+//  Name:     System.Contact.LastName -- PKEY_Contact_LastName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 8F367200-C270-457C-B1D4-E07C5BCD90C7, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_LastName, 0x8F367200, 0xC270, 0x457C, 0xB1, 0xD4, 0xE0, 0x7C, 0x5B, 0xCD, 0x90, 0xC7, 100);
+
+//  Name:     System.Contact.MailingAddress -- PKEY_Contact_MailingAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C0AC206A-827E-4650-95AE-77E2BB74FCC9, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_MailingAddress, 0xC0AC206A, 0x827E, 0x4650, 0x95, 0xAE, 0x77, 0xE2, 0xBB, 0x74, 0xFC, 0xC9, 100);
+
+//  Name:     System.Contact.MiddleName -- PKEY_Contact_MiddleName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 71
+DEFINE_PROPERTYKEY(PKEY_Contact_MiddleName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 71);
+
+//  Name:     System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 35
+DEFINE_PROPERTYKEY(PKEY_Contact_MobileTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 35);
+
+//  Name:     System.Contact.NickName -- PKEY_Contact_NickName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 74
+DEFINE_PROPERTYKEY(PKEY_Contact_NickName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 74);
+
+//  Name:     System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 7
+DEFINE_PROPERTYKEY(PKEY_Contact_OfficeLocation, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 7);
+
+//  Name:     System.Contact.OtherAddress -- PKEY_Contact_OtherAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 508161FA-313B-43D5-83A1-C1ACCF68622C, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddress, 0x508161FA, 0x313B, 0x43D5, 0x83, 0xA1, 0xC1, 0xAC, 0xCF, 0x68, 0x62, 0x2C, 100);
+
+//  Name:     System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6E682923-7F7B-4F0C-A337-CFCA296687BF, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCity, 0x6E682923, 0x7F7B, 0x4F0C, 0xA3, 0x37, 0xCF, 0xCA, 0x29, 0x66, 0x87, 0xBF, 100);
+
+//  Name:     System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 8F167568-0AAE-4322-8ED9-6055B7B0E398, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCountry, 0x8F167568, 0x0AAE, 0x4322, 0x8E, 0xD9, 0x60, 0x55, 0xB7, 0xB0, 0xE3, 0x98, 100);
+
+//  Name:     System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 95C656C1-2ABF-4148-9ED3-9EC602E3B7CD, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostalCode, 0x95C656C1, 0x2ABF, 0x4148, 0x9E, 0xD3, 0x9E, 0xC6, 0x02, 0xE3, 0xB7, 0xCD, 100);
+
+//  Name:     System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 8B26EA41-058F-43F6-AECC-4035681CE977, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostOfficeBox, 0x8B26EA41, 0x058F, 0x43F6, 0xAE, 0xCC, 0x40, 0x35, 0x68, 0x1C, 0xE9, 0x77, 100);
+
+//  Name:     System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 71B377D6-E570-425F-A170-809FAE73E54E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressState, 0x71B377D6, 0xE570, 0x425F, 0xA1, 0x70, 0x80, 0x9F, 0xAE, 0x73, 0xE5, 0x4E, 100);
+
+//  Name:     System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: FF962609-B7D6-4999-862D-95180D529AEA, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressStreet, 0xFF962609, 0xB7D6, 0x4999, 0x86, 0x2D, 0x95, 0x18, 0x0D, 0x52, 0x9A, 0xEA, 100);
+
+//  Name:     System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: D6304E01-F8F5-4F45-8B15-D024A6296789, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PagerTelephone, 0xD6304E01, 0xF8F5, 0x4F45, 0x8B, 0x15, 0xD0, 0x24, 0xA6, 0x29, 0x67, 0x89, 100);
+
+//  Name:     System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 69
+DEFINE_PROPERTYKEY(PKEY_Contact_PersonalTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 69);
+
+//  Name:     System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C8EA94F0-A9E3-4969-A94B-9C62A95324E0, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCity, 0xC8EA94F0, 0xA9E3, 0x4969, 0xA9, 0x4B, 0x9C, 0x62, 0xA9, 0x53, 0x24, 0xE0, 100);
+
+//  Name:     System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E53D799D-0F3F-466E-B2FF-74634A3CB7A4, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCountry, 0xE53D799D, 0x0F3F, 0x466E, 0xB2, 0xFF, 0x74, 0x63, 0x4A, 0x3C, 0xB7, 0xA4, 100);
+
+//  Name:     System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 18BBD425-ECFD-46EF-B612-7B4A6034EDA0, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostalCode, 0x18BBD425, 0xECFD, 0x46EF, 0xB6, 0x12, 0x7B, 0x4A, 0x60, 0x34, 0xED, 0xA0, 100);
+
+//  Name:     System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DE5EF3C7-46E1-484E-9999-62C5308394C1, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostOfficeBox, 0xDE5EF3C7, 0x46E1, 0x484E, 0x99, 0x99, 0x62, 0xC5, 0x30, 0x83, 0x94, 0xC1, 100);
+
+//  Name:     System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F1176DFE-7138-4640-8B4C-AE375DC70A6D, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressState, 0xF1176DFE, 0x7138, 0x4640, 0x8B, 0x4C, 0xAE, 0x37, 0x5D, 0xC7, 0x0A, 0x6D, 100);
+
+//  Name:     System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 63C25B20-96BE-488F-8788-C09C407AD812, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressStreet, 0x63C25B20, 0x96BE, 0x488F, 0x87, 0x88, 0xC0, 0x9C, 0x40, 0x7A, 0xD8, 0x12, 100);
+
+//  Name:     System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 48
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryEmailAddress, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 48);
+
+//  Name:     System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 25
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 25);
+
+//  Name:     System.Contact.Profession -- PKEY_Contact_Profession
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Profession, 0x7268AF55, 0x1CE4, 0x4F6E, 0xA4, 0x1F, 0xB6, 0xE4, 0xEF, 0x10, 0xE4, 0xA9, 100);
+
+//  Name:     System.Contact.SpouseName -- PKEY_Contact_SpouseName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 9D2408B6-3167-422B-82B0-F583B7A7CFE3, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_SpouseName, 0x9D2408B6, 0x3167, 0x422B, 0x82, 0xB0, 0xF5, 0x83, 0xB7, 0xA7, 0xCF, 0xE3, 100);
+
+//  Name:     System.Contact.Suffix -- PKEY_Contact_Suffix
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 73
+DEFINE_PROPERTYKEY(PKEY_Contact_Suffix, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 73);
+
+//  Name:     System.Contact.TelexNumber -- PKEY_Contact_TelexNumber
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C554493C-C1F7-40C1-A76C-EF8C0614003E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_TelexNumber, 0xC554493C, 0xC1F7, 0x40C1, 0xA7, 0x6C, 0xEF, 0x8C, 0x06, 0x14, 0x00, 0x3E, 100);
+
+//  Name:     System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: AAF16BAC-2B55-45E6-9F6D-415EB94910DF, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_TTYTDDTelephone, 0xAAF16BAC, 0x2B55, 0x45E6, 0x9F, 0x6D, 0x41, 0x5E, 0xB9, 0x49, 0x10, 0xDF, 100);
+
+//  Name:     System.Contact.WebPage -- PKEY_Contact_WebPage
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 18
+DEFINE_PROPERTYKEY(PKEY_Contact_WebPage, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 18);
+ 
+//-----------------------------------------------------------------------------
+// Core properties
+
+
+
+//  Name:     System.AcquisitionID -- PKEY_AcquisitionID
+//  Type:     Int32 -- VT_I4
+//  FormatID: 65A98875-3C80-40AB-ABBC-EFDAF77DBEE2, 100
+//
+//  Hash to determine acquisition session.
+DEFINE_PROPERTYKEY(PKEY_AcquisitionID, 0x65A98875, 0x3C80, 0x40AB, 0xAB, 0xBC, 0xEF, 0xDA, 0xF7, 0x7D, 0xBE, 0xE2, 100);
+
+//  Name:     System.ApplicationName -- PKEY_ApplicationName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_LPSTR.
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 18 (PIDSI_APPNAME)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_ApplicationName, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 18);
+
+//  Name:     System.Author -- PKEY_Author
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)  Legacy code may treat this as VT_LPSTR.
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 4 (PIDSI_AUTHOR)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Author, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 4);
+
+//  Name:     System.Capacity -- PKEY_Capacity
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 3 (PID_VOLUME_CAPACITY)  (Filesystem Volume Properties)
+//
+//  The amount of total space in bytes.
+DEFINE_PROPERTYKEY(PKEY_Capacity, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 3);
+
+//  Name:     System.Category -- PKEY_Category
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 2 (PIDDSI_CATEGORY)
+//
+//  Legacy code treats this as VT_LPSTR.
+DEFINE_PROPERTYKEY(PKEY_Category, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 2);
+
+//  Name:     System.Comment -- PKEY_Comment
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_LPSTR.
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 6 (PIDSI_COMMENTS)
+//
+//  Comments.
+DEFINE_PROPERTYKEY(PKEY_Comment, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 6);
+
+//  Name:     System.Company -- PKEY_Company
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 15 (PIDDSI_COMPANY)
+//
+//  The company or publisher.
+DEFINE_PROPERTYKEY(PKEY_Company, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 15);
+
+//  Name:     System.ComputerName -- PKEY_ComputerName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 5 (PID_COMPUTERNAME)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_ComputerName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 5);
+
+//  Name:     System.ContainedItems -- PKEY_ContainedItems
+//  Type:     Multivalue Guid -- VT_VECTOR | VT_CLSID  (For variants: VT_ARRAY | VT_CLSID)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 29
+//  
+//  The list of type of items, this item contains. For example, this item contains urls, attachments etc.
+//  This is represented as a vector array of GUIDs where each GUID represents certain type.
+DEFINE_PROPERTYKEY(PKEY_ContainedItems, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 29);
+
+//  Name:     System.ContentStatus -- PKEY_ContentStatus
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 27
+DEFINE_PROPERTYKEY(PKEY_ContentStatus, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 27);
+
+//  Name:     System.ContentType -- PKEY_ContentType
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 26
+DEFINE_PROPERTYKEY(PKEY_ContentType, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 26);
+
+//  Name:     System.Copyright -- PKEY_Copyright
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 11 (PIDMSI_COPYRIGHT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Copyright, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);
+
+//  Name:     System.DateAccessed -- PKEY_DateAccessed
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 16 (PID_STG_ACCESSTIME)
+//
+//  The time of the last access to the item.  The Indexing Service friendly name is 'access'.
+DEFINE_PROPERTYKEY(PKEY_DateAccessed, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 16);
+
+//  Name:     System.DateAcquired -- PKEY_DateAcquired
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 2CBAA8F5-D81F-47CA-B17A-F8D822300131, 100
+//  
+//  The time the file entered the system via acquisition.  This is not the same as System.DateImported.
+//  Examples are when pictures are acquired from a camera, or when music is purchased online.
+DEFINE_PROPERTYKEY(PKEY_DateAcquired, 0x2CBAA8F5, 0xD81F, 0x47CA, 0xB1, 0x7A, 0xF8, 0xD8, 0x22, 0x30, 0x01, 0x31, 100);
+
+//  Name:     System.DateArchived -- PKEY_DateArchived
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 43F8D7B7-A444-4F87-9383-52271C9B915C, 100
+DEFINE_PROPERTYKEY(PKEY_DateArchived, 0x43F8D7B7, 0xA444, 0x4F87, 0x93, 0x83, 0x52, 0x27, 0x1C, 0x9B, 0x91, 0x5C, 100);
+
+//  Name:     System.DateCompleted -- PKEY_DateCompleted
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 72FAB781-ACDA-43E5-B155-B2434F85E678, 100
+DEFINE_PROPERTYKEY(PKEY_DateCompleted, 0x72FAB781, 0xACDA, 0x43E5, 0xB1, 0x55, 0xB2, 0x43, 0x4F, 0x85, 0xE6, 0x78, 100);
+
+//  Name:     System.DateCreated -- PKEY_DateCreated
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 15 (PID_STG_CREATETIME)
+//
+//  The date and time the item was created. The Indexing Service friendly name is 'create'.
+DEFINE_PROPERTYKEY(PKEY_DateCreated, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 15);
+
+//  Name:     System.DateImported -- PKEY_DateImported
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18258
+//
+//  The time the file is imported into a separate database.  This is not the same as System.DateAcquired.  (Eg, 2003:05:22 13:55:04)
+DEFINE_PROPERTYKEY(PKEY_DateImported, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18258);
+
+//  Name:     System.DateModified -- PKEY_DateModified
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 14 (PID_STG_WRITETIME)
+//
+//  The date and time of the last write to the item. The Indexing Service friendly name is 'write'.
+DEFINE_PROPERTYKEY(PKEY_DateModified, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 14);
+
+//  Name:     System.DueDate -- PKEY_DueDate
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE, 100
+DEFINE_PROPERTYKEY(PKEY_DueDate, 0x3F8472B5, 0xE0AF, 0x4DB2, 0x80, 0x71, 0xC5, 0x3F, 0xE7, 0x6A, 0xE7, 0xCE, 100);
+
+//  Name:     System.EndDate -- PKEY_EndDate
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: C75FAA05-96FD-49E7-9CB4-9F601082D553, 100
+DEFINE_PROPERTYKEY(PKEY_EndDate, 0xC75FAA05, 0x96FD, 0x49E7, 0x9C, 0xB4, 0x9F, 0x60, 0x10, 0x82, 0xD5, 0x53, 100);
+
+//  Name:     System.FileAllocationSize -- PKEY_FileAllocationSize
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 18 (PID_STG_ALLOCSIZE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_FileAllocationSize, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 18);
+
+//  Name:     System.FileAttributes -- PKEY_FileAttributes
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 13 (PID_STG_ATTRIBUTES)
+//  
+//  This is the WIN32_FIND_DATA dwFileAttributes for the file-based item.
+DEFINE_PROPERTYKEY(PKEY_FileAttributes, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 13);
+
+//  Name:     System.FileCount -- PKEY_FileCount
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 12
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_FileCount, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 12);
+
+//  Name:     System.FileDescription -- PKEY_FileDescription
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 3 (PIDVSI_FileDescription)
+//  
+//  This is a user-friendly description of the file.
+DEFINE_PROPERTYKEY(PKEY_FileDescription, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 3);
+
+//  Name:     System.FileExtension -- PKEY_FileExtension
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E4F10A3C-49E6-405D-8288-A23BD4EEAA6C, 100
+//  
+//  This is the file extension of the file based item, including the leading period.  
+//  
+//  If System.FileName is VT_EMPTY, then this property should be too.  Otherwise, it should be derived
+//  appropriately by the data source from System.FileName.  If System.FileName does not have a file 
+//  extension, this value should be VT_EMPTY.
+//  
+//  To obtain the type of any item (including an item that is not a file), use System.ItemType.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                ".txt"
+//      "\\server\share\mydir\goodnews.doc"   ".doc"
+//      "\\server\share\numbers.xls"          ".xls"
+//      "\\server\share\folder"               VT_EMPTY
+//      "c:\foo\MyFolder"                     VT_EMPTY
+//      [desktop]                             VT_EMPTY
+DEFINE_PROPERTYKEY(PKEY_FileExtension, 0xE4F10A3C, 0x49E6, 0x405D, 0x82, 0x88, 0xA2, 0x3B, 0xD4, 0xEE, 0xAA, 0x6C, 100);
+
+//  Name:     System.FileFRN -- PKEY_FileFRN
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 21 (PID_STG_FRN)
+//  
+//  This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value
+//  as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx().
+DEFINE_PROPERTYKEY(PKEY_FileFRN, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 21);
+
+//  Name:     System.FileName -- PKEY_FileName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 41CF5AE0-F75A-4806-BD87-59C7D9248EB9, 100
+//  
+//  This is the file name (including extension) of the file.
+//  
+//  It is possible that the item might not exist on a filesystem (ie, it may not be opened 
+//  using CreateFile).  Nonetheless, if the item is represented as a file from the logical sense 
+//  (and its name follows standard Win32 file-naming syntax), then the data source should emit this property.
+//  
+//  If an item is not a file, then the value for this property is VT_EMPTY.  See 
+//  System.ItemNameDisplay.
+//  
+//  This has the same value as System.ParsingName for items that are provided by the Shell's file folder.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "hello.txt"
+//      "\\server\share\mydir\goodnews.doc"   "goodnews.doc"
+//      "\\server\share\numbers.xls"          "numbers.xls"
+//      "c:\foo\MyFolder"                     "MyFolder"
+//      (email message)                       VT_EMPTY
+//      (song on portable device)             "song.wma"
+DEFINE_PROPERTYKEY(PKEY_FileName, 0x41CF5AE0, 0xF75A, 0x4806, 0xBD, 0x87, 0x59, 0xC7, 0xD9, 0x24, 0x8E, 0xB9, 100);
+
+//  Name:     System.FileOwner -- PKEY_FileOwner
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Misc) 9B174B34-40FF-11D2-A27E-00C04FC30871, 4 (PID_MISC_OWNER)
+//  
+//  This is the owner of the file, according to the file system.
+DEFINE_PROPERTYKEY(PKEY_FileOwner, 0x9B174B34, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);
+
+//  Name:     System.FileVersion -- PKEY_FileVersion
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 4 (PIDVSI_FileVersion)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_FileVersion, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 4);
+
+//  Name:     System.FindData -- PKEY_FindData
+//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 0 (PID_FINDDATA)
+//
+//  WIN32_FIND_DATAW in buffer of bytes.
+DEFINE_PROPERTYKEY(PKEY_FindData, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 0);
+
+//  Name:     System.FlagColor -- PKEY_FlagColor
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: 67DF94DE-0CA7-4D6F-B792-053A3E4F03CF, 100
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_FlagColor, 0x67DF94DE, 0x0CA7, 0x4D6F, 0xB7, 0x92, 0x05, 0x3A, 0x3E, 0x4F, 0x03, 0xCF, 100);
+
+// Possible discrete values for PKEY_FlagColor are:
+#define FLAGCOLOR_PURPLE                    1u
+#define FLAGCOLOR_ORANGE                    2u
+#define FLAGCOLOR_GREEN                     3u
+#define FLAGCOLOR_YELLOW                    4u
+#define FLAGCOLOR_BLUE                      5u
+#define FLAGCOLOR_RED                       6u
+
+//  Name:     System.FlagColorText -- PKEY_FlagColorText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 45EAE747-8E2A-40AE-8CBF-CA52ABA6152A, 100
+//  
+//  This is the user-friendly form of System.FlagColor.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_FlagColorText, 0x45EAE747, 0x8E2A, 0x40AE, 0x8C, 0xBF, 0xCA, 0x52, 0xAB, 0xA6, 0x15, 0x2A, 100);
+
+//  Name:     System.FlagStatus -- PKEY_FlagStatus
+//  Type:     Int32 -- VT_I4
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 12
+//
+//  Status of Flag.  Values: (0=none 1=white 2=Red).  cdoPR_FLAG_STATUS
+DEFINE_PROPERTYKEY(PKEY_FlagStatus, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 12);
+
+// Possible discrete values for PKEY_FlagStatus are:
+#define FLAGSTATUS_NOTFLAGGED               0l
+#define FLAGSTATUS_COMPLETED                1l
+#define FLAGSTATUS_FOLLOWUP                 2l
+
+//  Name:     System.FlagStatusText -- PKEY_FlagStatusText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DC54FD2E-189D-4871-AA01-08C2F57A4ABC, 100
+//  
+//  This is the user-friendly form of System.FlagStatus.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_FlagStatusText, 0xDC54FD2E, 0x189D, 0x4871, 0xAA, 0x01, 0x08, 0xC2, 0xF5, 0x7A, 0x4A, 0xBC, 100);
+
+//  Name:     System.FreeSpace -- PKEY_FreeSpace
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 2 (PID_VOLUME_FREE)  (Filesystem Volume Properties)
+//
+//  The amount of free space in bytes.
+DEFINE_PROPERTYKEY(PKEY_FreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 2);
+
+//  Name:     System.Identity -- PKEY_Identity
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A26F4AFC-7346-4299-BE47-EB1AE613139F, 100
+DEFINE_PROPERTYKEY(PKEY_Identity, 0xA26F4AFC, 0x7346, 0x4299, 0xBE, 0x47, 0xEB, 0x1A, 0xE6, 0x13, 0x13, 0x9F, 100);
+
+//  Name:     System.Importance -- PKEY_Importance
+//  Type:     Int32 -- VT_I4
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 11
+DEFINE_PROPERTYKEY(PKEY_Importance, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 11);
+
+// Possible range of values for PKEY_Importance are:
+#define IMPORTANCE_LOW_MIN                  0l
+#define IMPORTANCE_LOW_SET                  1l
+#define IMPORTANCE_LOW_MAX                  1l
+
+#define IMPORTANCE_NORMAL_MIN               2l
+#define IMPORTANCE_NORMAL_SET               3l
+#define IMPORTANCE_NORMAL_MAX               4l
+
+#define IMPORTANCE_HIGH_MIN                 5l
+#define IMPORTANCE_HIGH_SET                 5l
+#define IMPORTANCE_HIGH_MAX                 5l
+
+
+//  Name:     System.ImportanceText -- PKEY_ImportanceText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A3B29791-7713-4E1D-BB40-17DB85F01831, 100
+//  
+//  This is the user-friendly form of System.Importance.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_ImportanceText, 0xA3B29791, 0x7713, 0x4E1D, 0xBB, 0x40, 0x17, 0xDB, 0x85, 0xF0, 0x18, 0x31, 100);
+
+//  Name:     System.IsAttachment -- PKEY_IsAttachment
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: F23F425C-71A1-4FA8-922F-678EA4A60408, 100
+//
+//  Identifies if this item is an attachment.
+DEFINE_PROPERTYKEY(PKEY_IsAttachment, 0xF23F425C, 0x71A1, 0x4FA8, 0x92, 0x2F, 0x67, 0x8E, 0xA4, 0xA6, 0x04, 0x08, 100);
+
+//  Name:     System.IsDeleted -- PKEY_IsDeleted
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D, 100
+DEFINE_PROPERTYKEY(PKEY_IsDeleted, 0x5CDA5FC8, 0x33EE, 0x4FF3, 0x90, 0x94, 0xAE, 0x7B, 0xD8, 0x86, 0x8C, 0x4D, 100);
+
+//  Name:     System.IsFlagged -- PKEY_IsFlagged
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 5DA84765-E3FF-4278-86B0-A27967FBDD03, 100
+DEFINE_PROPERTYKEY(PKEY_IsFlagged, 0x5DA84765, 0xE3FF, 0x4278, 0x86, 0xB0, 0xA2, 0x79, 0x67, 0xFB, 0xDD, 0x03, 100);
+
+//  Name:     System.IsFlaggedComplete -- PKEY_IsFlaggedComplete
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: A6F360D2-55F9-48DE-B909-620E090A647C, 100
+DEFINE_PROPERTYKEY(PKEY_IsFlaggedComplete, 0xA6F360D2, 0x55F9, 0x48DE, 0xB9, 0x09, 0x62, 0x0E, 0x09, 0x0A, 0x64, 0x7C, 100);
+
+//  Name:     System.IsIncomplete -- PKEY_IsIncomplete
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 346C8BD1-2E6A-4C45-89A4-61B78E8E700F, 100
+//
+//  Identifies if the message was not completely received for some error condition.
+DEFINE_PROPERTYKEY(PKEY_IsIncomplete, 0x346C8BD1, 0x2E6A, 0x4C45, 0x89, 0xA4, 0x61, 0xB7, 0x8E, 0x8E, 0x70, 0x0F, 100);
+
+//  Name:     System.IsRead -- PKEY_IsRead
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 10
+//
+//  Has the item been read?
+DEFINE_PROPERTYKEY(PKEY_IsRead, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 10);
+
+//  Name:     System.IsSendToTarget -- PKEY_IsSendToTarget
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 33
+//
+//  Provided by certain shell folders. Return TRUE if the folder is a valid Send To target.
+DEFINE_PROPERTYKEY(PKEY_IsSendToTarget, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 33);
+
+//  Name:     System.IsShared -- PKEY_IsShared
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 100
+//
+//  Is this item shared?
+DEFINE_PROPERTYKEY(PKEY_IsShared, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 100);
+
+//  Name:     System.ItemAuthors -- PKEY_ItemAuthors
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D0A04F0A-462A-48A4-BB2F-3706E88DBD7D, 100
+//  
+//  This is the generic list of authors associated with an item. 
+//  
+//  For example, the artist name for a track is the item author.
+DEFINE_PROPERTYKEY(PKEY_ItemAuthors, 0xD0A04F0A, 0x462A, 0x48A4, 0xBB, 0x2F, 0x37, 0x06, 0xE8, 0x8D, 0xBD, 0x7D, 100);
+
+//  Name:     System.ItemDate -- PKEY_ItemDate
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: F7DB74B4-4287-4103-AFBA-F1B13DCD75CF, 100
+//  
+//  This is the main date for an item. The date of interest. 
+//  
+//  For example, for photos this maps to System.Photo.DateTaken.
+DEFINE_PROPERTYKEY(PKEY_ItemDate, 0xF7DB74B4, 0x4287, 0x4103, 0xAF, 0xBA, 0xF1, 0xB1, 0x3D, 0xCD, 0x75, 0xCF, 100);
+
+//  Name:     System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 2 (PID_STG_DIRECTORY)
+//  
+//  This is the user-friendly display name of the parent folder of an item.
+//  
+//  If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too.  Otherwise, it 
+//  should be derived appropriately by the data source from System.ItemFolderPathDisplay.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "bar"
+//      "\\server\share\mydir\goodnews.doc"   "mydir"
+//      "\\server\share\numbers.xls"          "share"
+//      "c:\foo\MyFolder"                     "foo"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox"
+DEFINE_PROPERTYKEY(PKEY_ItemFolderNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 2);
+
+//  Name:     System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 6
+//  
+//  This is the user-friendly display path of the parent folder of an item.
+//  
+//  If System.ItemPathDisplay is VT_EMPTY, then this property should be too.  Otherwise, it should 
+//  be derived appropriately by the data source from System.ItemPathDisplay.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "c:\foo\bar"
+//      "\\server\share\mydir\goodnews.doc"   "\\server\share\mydir"
+//      "\\server\share\numbers.xls"          "\\server\share"
+//      "c:\foo\MyFolder"                     "c:\foo"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox"
+DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 6);
+
+//  Name:     System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DABD30ED-0043-4789-A7F8-D013A4736622, 100
+//  
+//  This is the user-friendly display path of the parent folder of an item.  The format of the string
+//  should be tailored such that the folder name comes first, to optimize for a narrow viewing column.
+//  
+//  If the folder is a file folder, the value includes localized names if they are present.
+//  
+//  If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too.  Otherwise, it should
+//  be derived appropriately by the data source from System.ItemFolderPathDisplay.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "bar (c:\foo)"
+//      "\\server\share\mydir\goodnews.doc"   "mydir (\\server\share)"
+//      "\\server\share\numbers.xls"          "share (\\server)"
+//      "c:\foo\MyFolder"                     "foo (c:\)"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)"
+DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplayNarrow, 0xDABD30ED, 0x0043, 0x4789, 0xA7, 0xF8, 0xD0, 0x13, 0xA4, 0x73, 0x66, 0x22, 100);
+
+//  Name:     System.ItemName -- PKEY_ItemName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F, 100
+//  
+//  This is the base-name of the System.ItemNameDisplay.
+//  
+//  If the item is a file this property
+//  includes the extension in all cases, and will be localized if a localized name is available.
+//  
+//  If the item is a message, then the value of this property does not include the forwarding or
+//  reply prefixes (see System.ItemNamePrefix).
+DEFINE_PROPERTYKEY(PKEY_ItemName, 0x6B8DA074, 0x3B5C, 0x43BC, 0x88, 0x6F, 0x0A, 0x2C, 0xDC, 0xE0, 0x0B, 0x6F, 100);
+
+//  Name:     System.ItemNameDisplay -- PKEY_ItemNameDisplay
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 10 (PID_STG_NAME)
+//  
+//  This is the display name in "most complete" form.  This is the best effort unique representation
+//  of the name of an item that makes sense for end users to read.  It is the concatentation of
+//  System.ItemNamePrefix and System.ItemName.
+//  
+//  If the item is a file this property
+//  includes the extension in all cases, and will be localized if a localized name is available.
+//  
+//  There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property 
+//  is completely different.  Email messages are a key example.  If the item is an email message, 
+//  the item name is likely the subject.  In that case, the value must be the concatenation of the
+//  System.ItemNamePrefix and System.ItemName.  Since the value of System.ItemNamePrefix excludes
+//  any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay.
+//  
+//  Note that this property is not guaranteed to be unique, but the idea is to promote the most likely
+//  candidate that can be unique and also makes sense for end users. For example, for documents, you
+//  might think about using System.Title as the System.ItemNameDisplay, but in practice the title of
+//  the documents may not be useful or unique enough to be of value as the sole System.ItemNameDisplay.  
+//  Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a better
+//  candidate.  In Windows Mail, the emails are stored in the file system as .eml files and the 
+//  System.FileName for those files are not human-friendly as they contain GUIDs. In this example, 
+//  promoting System.Subject as System.ItemNameDisplay makes more sense.
+//  
+//  Compatibility notes:
+//  
+//  Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when
+//  you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use
+//  another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property store or
+//  ISF2::GetDetailsEx in order to get the value of the name.
+//  
+//  Shell folder implementations on XP: the first column needs to be the name column, and Explorer
+//  will call ISF::GetDisplayNameOf to get the value of the name.  The PKEY/SCID does not matter.
+//  
+//  Example values:
+//  
+//      File:          "hello.txt"
+//      Message:       "Re: Let's talk about Tom's argyle socks!"
+//      Device folder: "song.wma"
+//      Folder:        "Documents"
+DEFINE_PROPERTYKEY(PKEY_ItemNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 10);
+
+//  Name:     System.ItemNamePrefix -- PKEY_ItemNamePrefix
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: D7313FF1-A77A-401C-8C99-3DBDD68ADD36, 100
+//  
+//  This is the prefix of an item, used for email messages.
+//  where the subject begins with "Re:" which is the prefix.
+//  
+//  If the item is a file, then the value of this property is VT_EMPTY.
+//  
+//  If the item is a message, then the value of this property is the forwarding or reply 
+//  prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix.
+//  
+//  Example values:
+//  
+//  System.ItemNamePrefix    System.ItemName      System.ItemNameDisplay
+//  ---------------------    -------------------  ----------------------
+//  VT_EMPTY                 "Great day"          "Great day"
+//  "Re:"                    "Great day"          "Re: Great day"
+//  "Fwd: "                  "Monthly budget"     "Fwd: Monthly budget"
+//  VT_EMPTY                 "accounts.xls"       "accounts.xls"
+DEFINE_PROPERTYKEY(PKEY_ItemNamePrefix, 0xD7313FF1, 0xA77A, 0x401C, 0x8C, 0x99, 0x3D, 0xBD, 0xD6, 0x8A, 0xDD, 0x36, 100);
+
+//  Name:     System.ItemParticipants -- PKEY_ItemParticipants
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D4D0AA16-9948-41A4-AA85-D97FF9646993, 100
+//  
+//  This is the generic list of people associated with an item and who contributed 
+//  to the item. 
+//  
+//  For example, this is the combination of people in the To list, Cc list and 
+//  sender of an email message.
+DEFINE_PROPERTYKEY(PKEY_ItemParticipants, 0xD4D0AA16, 0x9948, 0x41A4, 0xAA, 0x85, 0xD9, 0x7F, 0xF9, 0x64, 0x69, 0x93, 100);
+
+//  Name:     System.ItemPathDisplay -- PKEY_ItemPathDisplay
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 7
+//  
+//  This is the user-friendly display path to the item.
+//  
+//  If the item is a file or folder this property
+//  includes the extension in all cases, and will be localized if a localized name is available.
+//  
+//  For other items,this is the user-friendly equivalent, assuming the item exists in hierarchical storage.
+//  
+//  Unlike System.ItemUrl, this property value does not include the URL scheme.
+//  
+//  To parse an item path, use System.ItemUrl or System.ParsingPath.  To reference shell 
+//  namespace items using shell APIs, use System.ParsingPath.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "c:\foo\bar\hello.txt"
+//      "\\server\share\mydir\goodnews.doc"   "\\server\share\mydir\goodnews.doc"
+//      "\\server\share\numbers.xls"          "\\server\share\numbers.xls"
+//      "c:\foo\MyFolder"                     "c:\foo\MyFolder"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox/'Re: Hello!'"
+DEFINE_PROPERTYKEY(PKEY_ItemPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 7);
+
+//  Name:     System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 8
+//  
+//  This is the user-friendly display path to the item. The format of the string should be 
+//  tailored such that the name comes first, to optimize for a narrow viewing column.
+//  
+//  If the item is a file, the value excludes the file extension, and includes localized names if they are present.
+//  If the item is a message, the value includes the System.ItemNamePrefix.
+//  
+//  To parse an item path, use System.ItemUrl or System.ParsingPath.
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "hello (c:\foo\bar)"
+//      "\\server\share\mydir\goodnews.doc"   "goodnews (\\server\share\mydir)"
+//      "\\server\share\folder"               "folder (\\server\share)"
+//      "c:\foo\MyFolder"                     "MyFolder (c:\foo)"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)"
+DEFINE_PROPERTYKEY(PKEY_ItemPathDisplayNarrow, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 8);
+
+//  Name:     System.ItemType -- PKEY_ItemType
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 11
+//  
+//  This is the canonical type of the item and is intended to be programmatically
+//  parsed.
+//  
+//  If there is no canonical type, the value is VT_EMPTY.
+//  
+//  If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as
+//  System.FileExtension.
+//  
+//  Use System.ItemTypeText when you want to display the type to end users in a view.  (If
+//   the item is a file, passing the System.ItemType value to PSFormatForDisplay will
+//   result in the same value as System.ItemTypeText.)
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                ".txt"
+//      "\\server\share\mydir\goodnews.doc"   ".doc"
+//      "\\server\share\folder"               "Directory"
+//      "c:\foo\MyFolder"                     "Directory"
+//      [desktop]                             "Folder"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message"
+DEFINE_PROPERTYKEY(PKEY_ItemType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 11);
+
+//  Name:     System.ItemTypeText -- PKEY_ItemTypeText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 4 (PID_STG_STORAGETYPE)
+//  
+//  This is the user friendly type name of the item.  This is not intended to be
+//  programmatically parsed.
+//  
+//  If System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY.
+//  
+//  If the item is a file, the value of this property is the same as if you passed the 
+//  file's System.ItemType value to PSFormatForDisplay.
+//  
+//  This property should not be confused with System.Kind, where System.Kind is a high-level
+//  user friendly kind name. For example, for a document, System.Kind = "Document" and 
+//  System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document"
+//  
+//  Example values:
+//  
+//      If the path is...                     The property value is...
+//      -----------------                     ------------------------
+//      "c:\foo\bar\hello.txt"                "Text File"
+//      "\\server\share\mydir\goodnews.doc"   "Microsoft Word Document"
+//      "\\server\share\folder"               "File Folder"
+//      "c:\foo\MyFolder"                     "File Folder"
+//      "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message"
+DEFINE_PROPERTYKEY(PKEY_ItemTypeText, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 4);
+
+//  Name:     System.ItemUrl -- PKEY_ItemUrl
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 9 (PROPID_QUERY_VIRTUALPATH)
+//  
+//  This always represents a well formed URL that points to the item.  
+//  
+//  To reference shell namespace items using shell APIs, use System.ParsingPath.
+//  
+//  Example values:
+//  
+//      Files:    "file:///c:/foo/bar/hello.txt"
+//                "csc://{GUID}/..."
+//      Messages: "mapi://..."
+DEFINE_PROPERTYKEY(PKEY_ItemUrl, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 9);
+
+//  Name:     System.Keywords -- PKEY_Keywords
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)  Legacy code may treat this as VT_LPSTR.
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 5 (PIDSI_KEYWORDS)
+//
+//  The keywords for the item.  Also referred to as tags.
+DEFINE_PROPERTYKEY(PKEY_Keywords, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 5);
+
+//  Name:     System.Kind -- PKEY_Kind
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 1E3EE840-BC2B-476C-8237-2ACD1A839B22, 3
+//  
+//  System.Kind is used to map extensions to various .Search folders.
+//  Extensions are mapped to Kinds at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap
+//  The list of kinds is not extensible.
+DEFINE_PROPERTYKEY(PKEY_Kind, 0x1E3EE840, 0xBC2B, 0x476C, 0x82, 0x37, 0x2A, 0xCD, 0x1A, 0x83, 0x9B, 0x22, 3);
+
+// Possible discrete values for PKEY_Kind are:
+#define KIND_CALENDAR                       L"calendar"
+#define KIND_COMMUNICATION                  L"communication"
+#define KIND_CONTACT                        L"contact"
+#define KIND_DOCUMENT                       L"document"
+#define KIND_EMAIL                          L"email"
+#define KIND_FEED                           L"feed"
+#define KIND_FOLDER                         L"folder"
+#define KIND_GAME                           L"game"
+#define KIND_INSTANTMESSAGE                 L"instantmessage"
+#define KIND_JOURNAL                        L"journal"
+#define KIND_LINK                           L"link"
+#define KIND_MOVIE                          L"movie"
+#define KIND_MUSIC                          L"music"
+#define KIND_NOTE                           L"note"
+#define KIND_PICTURE                        L"picture"
+#define KIND_PROGRAM                        L"program"
+#define KIND_RECORDEDTV                     L"recordedtv"
+#define KIND_SEARCHFOLDER                   L"searchfolder"
+#define KIND_TASK                           L"task"
+#define KIND_VIDEO                          L"video"
+#define KIND_WEBHISTORY                     L"webhistory"
+
+//  Name:     System.KindText -- PKEY_KindText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F04BEF95-C585-4197-A2B7-DF46FDC9EE6D, 100
+//  
+//  This is the user-friendly form of System.Kind.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_KindText, 0xF04BEF95, 0xC585, 0x4197, 0xA2, 0xB7, 0xDF, 0x46, 0xFD, 0xC9, 0xEE, 0x6D, 100);
+
+//  Name:     System.Language -- PKEY_Language
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 28
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Language, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 28);
+
+//  Name:     System.MileageInformation -- PKEY_MileageInformation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: FDF84370-031A-4ADD-9E91-0D775F1C6605, 100
+DEFINE_PROPERTYKEY(PKEY_MileageInformation, 0xFDF84370, 0x031A, 0x4ADD, 0x9E, 0x91, 0x0D, 0x77, 0x5F, 0x1C, 0x66, 0x05, 100);
+
+//  Name:     System.MIMEType -- PKEY_MIMEType
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 5
+//
+//  The MIME type.  Eg, for EML files: 'message/rfc822'.
+DEFINE_PROPERTYKEY(PKEY_MIMEType, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 5);
+
+//  Name:     System.Null -- PKEY_Null
+//  Type:     Null -- VT_NULL
+//  FormatID: 00000000-0000-0000-0000-000000000000, 0
+DEFINE_PROPERTYKEY(PKEY_Null, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0);
+
+//  Name:     System.OfflineAvailability -- PKEY_OfflineAvailability
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: A94688B6-7D9F-4570-A648-E3DFC0AB2B3F, 100
+DEFINE_PROPERTYKEY(PKEY_OfflineAvailability, 0xA94688B6, 0x7D9F, 0x4570, 0xA6, 0x48, 0xE3, 0xDF, 0xC0, 0xAB, 0x2B, 0x3F, 100);
+
+// Possible discrete values for PKEY_OfflineAvailability are:
+#define OFFLINEAVAILABILITY_NOT_AVAILABLE   0ul
+#define OFFLINEAVAILABILITY_AVAILABLE       1ul
+#define OFFLINEAVAILABILITY_ALWAYS_AVAILABLE 2ul
+
+//  Name:     System.OfflineStatus -- PKEY_OfflineStatus
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 6D24888F-4718-4BDA-AFED-EA0FB4386CD8, 100
+DEFINE_PROPERTYKEY(PKEY_OfflineStatus, 0x6D24888F, 0x4718, 0x4BDA, 0xAF, 0xED, 0xEA, 0x0F, 0xB4, 0x38, 0x6C, 0xD8, 100);
+
+// Possible discrete values for PKEY_OfflineStatus are:
+#define OFFLINESTATUS_ONLINE                0ul
+#define OFFLINESTATUS_OFFLINE               1ul
+#define OFFLINESTATUS_OFFLINE_FORCED        2ul
+#define OFFLINESTATUS_OFFLINE_SLOW          3ul
+#define OFFLINESTATUS_OFFLINE_ERROR         4ul
+#define OFFLINESTATUS_OFFLINE_ITEM_VERSION_CONFLICT 5ul
+#define OFFLINESTATUS_OFFLINE_SUSPENDED     6ul
+
+//  Name:     System.OriginalFileName -- PKEY_OriginalFileName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 6
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_OriginalFileName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 6);
+
+//  Name:     System.ParentalRating -- PKEY_ParentalRating
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 21 (PIDMSI_PARENTAL_RATING)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_ParentalRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 21);
+
+//  Name:     System.ParentalRatingReason -- PKEY_ParentalRatingReason
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 10984E0A-F9F2-4321-B7EF-BAF195AF4319, 100
+DEFINE_PROPERTYKEY(PKEY_ParentalRatingReason, 0x10984E0A, 0xF9F2, 0x4321, 0xB7, 0xEF, 0xBA, 0xF1, 0x95, 0xAF, 0x43, 0x19, 100);
+
+//  Name:     System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A7FE0840-1344-46F0-8D37-52ED712A4BF9, 100
+DEFINE_PROPERTYKEY(PKEY_ParentalRatingsOrganization, 0xA7FE0840, 0x1344, 0x46F0, 0x8D, 0x37, 0x52, 0xED, 0x71, 0x2A, 0x4B, 0xF9, 100);
+
+//  Name:     System.ParsingBindContext -- PKEY_ParsingBindContext
+//  Type:     Any -- VT_NULL  Legacy code may treat this as VT_UNKNOWN.
+//  FormatID: DFB9A04D-362F-4CA3-B30B-0254B17B5B84, 100
+//  
+//  used to get the IBindCtx for an item for parsing
+DEFINE_PROPERTYKEY(PKEY_ParsingBindContext, 0xDFB9A04D, 0x362F, 0x4CA3, 0xB3, 0x0B, 0x02, 0x54, 0xB1, 0x7B, 0x5B, 0x84, 100);
+
+//  Name:     System.ParsingName -- PKEY_ParsingName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 24
+//  
+//  The shell namespace name of an item relative to a parent folder.  This name may be passed to 
+//  IShellFolder::ParseDisplayName() of the parent shell folder.
+DEFINE_PROPERTYKEY(PKEY_ParsingName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 24);
+
+//  Name:     System.ParsingPath -- PKEY_ParsingPath
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 30
+//  
+//  This is the shell namespace path to the item.  This path may be passed to 
+//  SHParseDisplayName to parse the path to the correct shell folder.
+//  
+//  If the item is a file, the value is identical to System.ItemPathDisplay.
+//  
+//  If the item cannot be accessed through the shell namespace, this value is VT_EMPTY.
+DEFINE_PROPERTYKEY(PKEY_ParsingPath, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 30);
+
+//  Name:     System.PerceivedType -- PKEY_PerceivedType
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 9
+//
+//  The perceived type of a shell item, based upon its canonical type.
+DEFINE_PROPERTYKEY(PKEY_PerceivedType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 9);
+
+// For the enumerated values of PKEY_PerceivedType, see the PERCEIVED_TYPE_* values in shtypes.idl.
+
+//  Name:     System.PercentFull -- PKEY_PercentFull
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 5  (Filesystem Volume Properties)
+//
+//  The amount filled as a percentage, multiplied by 100 (ie, the valid range is 0 through 100).
+DEFINE_PROPERTYKEY(PKEY_PercentFull, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 5);
+
+//  Name:     System.Priority -- PKEY_Priority
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 5
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Priority, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 5);
+
+// Possible discrete values for PKEY_Priority are:
+#define PRIORITY_PROP_LOW                   0u
+#define PRIORITY_PROP_NORMAL                1u
+#define PRIORITY_PROP_HIGH                  2u
+
+//  Name:     System.PriorityText -- PKEY_PriorityText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: D98BE98B-B86B-4095-BF52-9D23B2E0A752, 100
+//  
+//  This is the user-friendly form of System.Priority.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_PriorityText, 0xD98BE98B, 0xB86B, 0x4095, 0xBF, 0x52, 0x9D, 0x23, 0xB2, 0xE0, 0xA7, 0x52, 100);
+
+//  Name:     System.Project -- PKEY_Project
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 39A7F922-477C-48DE-8BC8-B28441E342E3, 100
+DEFINE_PROPERTYKEY(PKEY_Project, 0x39A7F922, 0x477C, 0x48DE, 0x8B, 0xC8, 0xB2, 0x84, 0x41, 0xE3, 0x42, 0xE3, 100);
+
+//  Name:     System.ProviderItemID -- PKEY_ProviderItemID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F21D9941-81F0-471A-ADEE-4E74B49217ED, 100
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_ProviderItemID, 0xF21D9941, 0x81F0, 0x471A, 0xAD, 0xEE, 0x4E, 0x74, 0xB4, 0x92, 0x17, 0xED, 100);
+
+//  Name:     System.Rating -- PKEY_Rating
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 9 (PIDMSI_RATING)
+//  
+//  Indicates the users preference rating of an item on a scale of 0-99 (0 = unrated, 1-12 = One Star, 
+//  13-37 = Two Stars, 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars).
+DEFINE_PROPERTYKEY(PKEY_Rating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
+
+// Use the following constants to convert between visual stars and the ratings value:
+#define RATING_UNRATED_MIN                  0ul
+#define RATING_UNRATED_SET                  0ul
+#define RATING_UNRATED_MAX                  0ul
+
+#define RATING_ONE_STAR_MIN                 1ul
+#define RATING_ONE_STAR_SET                 1ul
+#define RATING_ONE_STAR_MAX                 12ul
+
+#define RATING_TWO_STARS_MIN                13ul
+#define RATING_TWO_STARS_SET                25ul
+#define RATING_TWO_STARS_MAX                37ul
+
+#define RATING_THREE_STARS_MIN              38ul
+#define RATING_THREE_STARS_SET              50ul
+#define RATING_THREE_STARS_MAX              62ul
+
+#define RATING_FOUR_STARS_MIN               63ul
+#define RATING_FOUR_STARS_SET               75ul
+#define RATING_FOUR_STARS_MAX               87ul
+
+#define RATING_FIVE_STARS_MIN               88ul
+#define RATING_FIVE_STARS_SET               99ul
+#define RATING_FIVE_STARS_MAX               99ul
+
+
+//  Name:     System.RatingText -- PKEY_RatingText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 90197CA7-FD8F-4E8C-9DA3-B57E1E609295, 100
+//  
+//  This is the user-friendly form of System.Rating.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_RatingText, 0x90197CA7, 0xFD8F, 0x4E8C, 0x9D, 0xA3, 0xB5, 0x7E, 0x1E, 0x60, 0x92, 0x95, 100);
+
+//  Name:     System.Sensitivity -- PKEY_Sensitivity
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: F8D3F6AC-4874-42CB-BE59-AB454B30716A, 100
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Sensitivity, 0xF8D3F6AC, 0x4874, 0x42CB, 0xBE, 0x59, 0xAB, 0x45, 0x4B, 0x30, 0x71, 0x6A, 100);
+
+// Possible discrete values for PKEY_Sensitivity are:
+#define SENSITIVITY_PROP_NORMAL             0u
+#define SENSITIVITY_PROP_PERSONAL           1u
+#define SENSITIVITY_PROP_PRIVATE            2u
+#define SENSITIVITY_PROP_CONFIDENTIAL       3u
+
+//  Name:     System.SensitivityText -- PKEY_SensitivityText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: D0C7F054-3F72-4725-8527-129A577CB269, 100
+//  
+//  This is the user-friendly form of System.Sensitivity.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_SensitivityText, 0xD0C7F054, 0x3F72, 0x4725, 0x85, 0x27, 0x12, 0x9A, 0x57, 0x7C, 0xB2, 0x69, 100);
+
+//  Name:     System.SFGAOFlags -- PKEY_SFGAOFlags
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 25
+//
+//  IShellFolder::GetAttributesOf flags, with SFGAO_PKEYSFGAOMASK attributes masked out.
+DEFINE_PROPERTYKEY(PKEY_SFGAOFlags, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 25);
+
+//  Name:     System.SharedWith -- PKEY_SharedWith
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 200
+//
+//  Who is the item shared with?
+DEFINE_PROPERTYKEY(PKEY_SharedWith, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 200);
+
+//  Name:     System.ShareUserRating -- PKEY_ShareUserRating
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 12 (PIDMSI_SHARE_USER_RATING)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_ShareUserRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);
+
+//  Name:     System.Shell.OmitFromView -- PKEY_Shell_OmitFromView
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DE35258C-C695-4CBC-B982-38B0AD24CED0, 2
+//  
+//  Set this to a string value of 'True' to omit this item from shell views
+DEFINE_PROPERTYKEY(PKEY_Shell_OmitFromView, 0xDE35258C, 0xC695, 0x4CBC, 0xB9, 0x82, 0x38, 0xB0, 0xAD, 0x24, 0xCE, 0xD0, 2);
+
+//  Name:     System.SimpleRating -- PKEY_SimpleRating
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: A09F084E-AD41-489F-8076-AA5BE3082BCA, 100
+//  
+//  Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three Stars,
+//  4=Four Stars, 5=Five Stars)
+DEFINE_PROPERTYKEY(PKEY_SimpleRating, 0xA09F084E, 0xAD41, 0x489F, 0x80, 0x76, 0xAA, 0x5B, 0xE3, 0x08, 0x2B, 0xCA, 100);
+
+//  Name:     System.Size -- PKEY_Size
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 12 (PID_STG_SIZE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
+
+//  Name:     System.SoftwareUsed -- PKEY_SoftwareUsed
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 305
+//
+//  PropertyTagSoftwareUsed
+DEFINE_PROPERTYKEY(PKEY_SoftwareUsed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 305);
+
+//  Name:     System.SourceItem -- PKEY_SourceItem
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 668CDFA5-7A1B-4323-AE4B-E527393A1D81, 100
+DEFINE_PROPERTYKEY(PKEY_SourceItem, 0x668CDFA5, 0x7A1B, 0x4323, 0xAE, 0x4B, 0xE5, 0x27, 0x39, 0x3A, 0x1D, 0x81, 100);
+
+//  Name:     System.StartDate -- PKEY_StartDate
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE, 100
+DEFINE_PROPERTYKEY(PKEY_StartDate, 0x48FD6EC8, 0x8A12, 0x4CDF, 0xA0, 0x3E, 0x4E, 0xC5, 0xA5, 0x11, 0xED, 0xDE, 100);
+
+//  Name:     System.Status -- PKEY_Status
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_IntSite) 000214A1-0000-0000-C000-000000000046, 9
+DEFINE_PROPERTYKEY(PKEY_Status, 0x000214A1, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 9);
+
+//  Name:     System.Subject -- PKEY_Subject
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 3 (PIDSI_SUBJECT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Subject, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 3);
+
+//  Name:     System.Thumbnail -- PKEY_Thumbnail
+//  Type:     Clipboard -- VT_CF
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 17 (PIDSI_THUMBNAIL)
+//
+//  A data that represents the thumbnail in VT_CF format.
+DEFINE_PROPERTYKEY(PKEY_Thumbnail, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 17);
+
+//  Name:     System.ThumbnailCacheId -- PKEY_ThumbnailCacheId
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: 446D16B1-8DAD-4870-A748-402EA43D788C, 100
+//  
+//  Unique value that can be used as a key to cache thumbnails. The value changes when the name, volume, or data modified 
+//  of an item changes.
+DEFINE_PROPERTYKEY(PKEY_ThumbnailCacheId, 0x446D16B1, 0x8DAD, 0x4870, 0xA7, 0x48, 0x40, 0x2E, 0xA4, 0x3D, 0x78, 0x8C, 100);
+
+//  Name:     System.ThumbnailStream -- PKEY_ThumbnailStream
+//  Type:     Stream -- VT_STREAM
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 27
+//
+//  Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc).
+DEFINE_PROPERTYKEY(PKEY_ThumbnailStream, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 27);
+
+//  Name:     System.Title -- PKEY_Title
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)  Legacy code may treat this as VT_LPSTR.
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 2 (PIDSI_TITLE)
+//
+//  Title of item.
+DEFINE_PROPERTYKEY(PKEY_Title, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 2);
+
+//  Name:     System.TotalFileSize -- PKEY_TotalFileSize
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 14
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_TotalFileSize, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 14);
+
+//  Name:     System.Trademarks -- PKEY_Trademarks
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 9 (PIDVSI_Trademarks)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Trademarks, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 9);
+ 
+//-----------------------------------------------------------------------------
+// Document properties
+
+
+
+//  Name:     System.Document.ByteCount -- PKEY_Document_ByteCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 4 (PIDDSI_BYTECOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_ByteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 4);
+
+//  Name:     System.Document.CharacterCount -- PKEY_Document_CharacterCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 16 (PIDSI_CHARCOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_CharacterCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 16);
+
+//  Name:     System.Document.ClientID -- PKEY_Document_ClientID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 276D7BB0-5B34-4FB0-AA4B-158ED12A1809, 100
+DEFINE_PROPERTYKEY(PKEY_Document_ClientID, 0x276D7BB0, 0x5B34, 0x4FB0, 0xAA, 0x4B, 0x15, 0x8E, 0xD1, 0x2A, 0x18, 0x09, 100);
+
+//  Name:     System.Document.Contributor -- PKEY_Document_Contributor
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: F334115E-DA1B-4509-9B3D-119504DC7ABB, 100
+DEFINE_PROPERTYKEY(PKEY_Document_Contributor, 0xF334115E, 0xDA1B, 0x4509, 0x9B, 0x3D, 0x11, 0x95, 0x04, 0xDC, 0x7A, 0xBB, 100);
+
+//  Name:     System.Document.DateCreated -- PKEY_Document_DateCreated
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 12 (PIDSI_CREATE_DTM)
+//  
+//  This property is stored in the document, not obtained from the file system.
+DEFINE_PROPERTYKEY(PKEY_Document_DateCreated, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 12);
+
+//  Name:     System.Document.DatePrinted -- PKEY_Document_DatePrinted
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 11 (PIDSI_LASTPRINTED)
+//
+//  Legacy name: "DocLastPrinted".
+DEFINE_PROPERTYKEY(PKEY_Document_DatePrinted, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 11);
+
+//  Name:     System.Document.DateSaved -- PKEY_Document_DateSaved
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 13 (PIDSI_LASTSAVE_DTM)
+//
+//  Legacy name: "DocLastSavedTm".
+DEFINE_PROPERTYKEY(PKEY_Document_DateSaved, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 13);
+
+//  Name:     System.Document.Division -- PKEY_Document_Division
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 1E005EE6-BF27-428B-B01C-79676ACD2870, 100
+DEFINE_PROPERTYKEY(PKEY_Document_Division, 0x1E005EE6, 0xBF27, 0x428B, 0xB0, 0x1C, 0x79, 0x67, 0x6A, 0xCD, 0x28, 0x70, 100);
+
+//  Name:     System.Document.DocumentID -- PKEY_Document_DocumentID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E08805C8-E395-40DF-80D2-54F0D6C43154, 100
+DEFINE_PROPERTYKEY(PKEY_Document_DocumentID, 0xE08805C8, 0xE395, 0x40DF, 0x80, 0xD2, 0x54, 0xF0, 0xD6, 0xC4, 0x31, 0x54, 100);
+
+//  Name:     System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 9 (PIDDSI_HIDDENCOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_HiddenSlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 9);
+
+//  Name:     System.Document.LastAuthor -- PKEY_Document_LastAuthor
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 8 (PIDSI_LASTAUTHOR)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_LastAuthor, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 8);
+
+//  Name:     System.Document.LineCount -- PKEY_Document_LineCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 5 (PIDDSI_LINECOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_LineCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 5);
+
+//  Name:     System.Document.Manager -- PKEY_Document_Manager
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 14 (PIDDSI_MANAGER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_Manager, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 14);
+
+//  Name:     System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 10 (PIDDSI_MMCLIPCOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_MultimediaClipCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 10);
+
+//  Name:     System.Document.NoteCount -- PKEY_Document_NoteCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 8 (PIDDSI_NOTECOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_NoteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 8);
+
+//  Name:     System.Document.PageCount -- PKEY_Document_PageCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 14 (PIDSI_PAGECOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_PageCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 14);
+
+//  Name:     System.Document.ParagraphCount -- PKEY_Document_ParagraphCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 6 (PIDDSI_PARCOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_ParagraphCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 6);
+
+//  Name:     System.Document.PresentationFormat -- PKEY_Document_PresentationFormat
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 3 (PIDDSI_PRESFORMAT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_PresentationFormat, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 3);
+
+//  Name:     System.Document.RevisionNumber -- PKEY_Document_RevisionNumber
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 9 (PIDSI_REVNUMBER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_RevisionNumber, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 9);
+
+//  Name:     System.Document.Security -- PKEY_Document_Security
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 19
+//
+//  Access control information, from SummaryInfo propset
+DEFINE_PROPERTYKEY(PKEY_Document_Security, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 19);
+
+//  Name:     System.Document.SlideCount -- PKEY_Document_SlideCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 7 (PIDDSI_SLIDECOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_SlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 7);
+
+//  Name:     System.Document.Template -- PKEY_Document_Template
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 7 (PIDSI_TEMPLATE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_Template, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 7);
+
+//  Name:     System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 10 (PIDSI_EDITTIME)
+//
+//  100ns units, not milliseconds. VT_FILETIME for IPropertySetStorage handlers (legacy)
+DEFINE_PROPERTYKEY(PKEY_Document_TotalEditingTime, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 10);
+
+//  Name:     System.Document.Version -- PKEY_Document_Version
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 29
+DEFINE_PROPERTYKEY(PKEY_Document_Version, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 29);
+
+//  Name:     System.Document.WordCount -- PKEY_Document_WordCount
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 15 (PIDSI_WORDCOUNT)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Document_WordCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 15);
+
+ 
+ 
+//-----------------------------------------------------------------------------
+// DRM properties
+
+//  Name:     System.DRM.DatePlayExpires -- PKEY_DRM_DatePlayExpires
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 6 (PIDDRSI_PLAYEXPIRES)
+//
+//  Indicates when play expires for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayExpires, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 6);
+
+//  Name:     System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 5 (PIDDRSI_PLAYSTARTS)
+//
+//  Indicates when play starts for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayStarts, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 5);
+
+//  Name:     System.DRM.Description -- PKEY_DRM_Description
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 3 (PIDDRSI_DESCRIPTION)
+//
+//  Displays the description for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_Description, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 3);
+
+//  Name:     System.DRM.IsProtected -- PKEY_DRM_IsProtected
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 2 (PIDDRSI_PROTECTED)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_DRM_IsProtected, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 2);
+
+//  Name:     System.DRM.PlayCount -- PKEY_DRM_PlayCount
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 4 (PIDDRSI_PLAYCOUNT)
+//
+//  Indicates the play count for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_PlayCount, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 4);
+ 
+//-----------------------------------------------------------------------------
+// GPS properties
+
+//  Name:     System.GPS.Altitude -- PKEY_GPS_Altitude
+//  Type:     Double -- VT_R8
+//  FormatID: 827EDB4F-5B73-44A7-891D-FDFFABEA35CA, 100
+//  
+//  Indicates the altitude based on the reference in PKEY_GPS_AltitudeRef.  Calculated from PKEY_GPS_AltitudeNumerator and 
+//  PKEY_GPS_AltitudeDenominator
+DEFINE_PROPERTYKEY(PKEY_GPS_Altitude, 0x827EDB4F, 0x5B73, 0x44A7, 0x89, 0x1D, 0xFD, 0xFF, 0xAB, 0xEA, 0x35, 0xCA, 100);
+
+//  Name:     System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 78342DCB-E358-4145-AE9A-6BFE4E0F9F51, 100
+//
+//  Denominator of PKEY_GPS_Altitude
+DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeDenominator, 0x78342DCB, 0xE358, 0x4145, 0xAE, 0x9A, 0x6B, 0xFE, 0x4E, 0x0F, 0x9F, 0x51, 100);
+
+//  Name:     System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE, 100
+//
+//  Numerator of PKEY_GPS_Altitude
+DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeNumerator, 0x2DAD1EB7, 0x816D, 0x40D3, 0x9E, 0xC3, 0xC9, 0x77, 0x3B, 0xE2, 0xAA, 0xDE, 100);
+
+//  Name:     System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef
+//  Type:     Byte -- VT_UI1
+//  FormatID: 46AC629D-75EA-4515-867F-6DC4321C5844, 100
+//
+//  Indicates the reference for the altitude property. (eg: above sea level, below sea level, absolute value)
+DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeRef, 0x46AC629D, 0x75EA, 0x4515, 0x86, 0x7F, 0x6D, 0xC4, 0x32, 0x1C, 0x58, 0x44, 100);
+
+//  Name:     System.GPS.AreaInformation -- PKEY_GPS_AreaInformation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 972E333E-AC7E-49F1-8ADF-A70D07A9BCAB, 100
+//
+//  Represents the name of the GPS area
+DEFINE_PROPERTYKEY(PKEY_GPS_AreaInformation, 0x972E333E, 0xAC7E, 0x49F1, 0x8A, 0xDF, 0xA7, 0x0D, 0x07, 0xA9, 0xBC, 0xAB, 100);
+
+//  Name:     System.GPS.Date -- PKEY_GPS_Date
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 3602C812-0F3B-45F0-85AD-603468D69423, 100
+//
+//  Date and time of the GPS record
+DEFINE_PROPERTYKEY(PKEY_GPS_Date, 0x3602C812, 0x0F3B, 0x45F0, 0x85, 0xAD, 0x60, 0x34, 0x68, 0xD6, 0x94, 0x23, 100);
+
+//  Name:     System.GPS.DestBearing -- PKEY_GPS_DestBearing
+//  Type:     Double -- VT_R8
+//  FormatID: C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA, 100
+//  
+//  Indicates the bearing to the destination point.  Calculated from PKEY_GPS_DestBearingNumerator and 
+//  PKEY_GPS_DestBearingDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearing, 0xC66D4B3C, 0xE888, 0x47CC, 0xB9, 0x9F, 0x9D, 0xCA, 0x3E, 0xE3, 0x4D, 0xEA, 100);
+
+//  Name:     System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5, 100
+//
+//  Denominator of PKEY_GPS_DestBearing
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingDenominator, 0x7ABCF4F8, 0x7C3F, 0x4988, 0xAC, 0x91, 0x8D, 0x2C, 0x2E, 0x97, 0xEC, 0xA5, 100);
+
+//  Name:     System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF, 100
+//
+//  Numerator of PKEY_GPS_DestBearing
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingNumerator, 0xBA3B1DA9, 0x86EE, 0x4B5D, 0xA2, 0xA4, 0xA2, 0x71, 0xA4, 0x29, 0xF0, 0xCF, 100);
+
+//  Name:     System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 9AB84393-2A0F-4B75-BB22-7279786977CB, 100
+//
+//  Indicates the reference used for the giving the bearing to the destination point.  (eg: true direction, magnetic direction)
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingRef, 0x9AB84393, 0x2A0F, 0x4B75, 0xBB, 0x22, 0x72, 0x79, 0x78, 0x69, 0x77, 0xCB, 100);
+
+//  Name:     System.GPS.DestDistance -- PKEY_GPS_DestDistance
+//  Type:     Double -- VT_R8
+//  FormatID: A93EAE04-6804-4F24-AC81-09B266452118, 100
+//  
+//  Indicates the distance to the destination point.  Calculated from PKEY_GPS_DestDistanceNumerator and 
+//  PKEY_GPS_DestDistanceDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistance, 0xA93EAE04, 0x6804, 0x4F24, 0xAC, 0x81, 0x09, 0xB2, 0x66, 0x45, 0x21, 0x18, 100);
+
+//  Name:     System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7, 100
+//
+//  Denominator of PKEY_GPS_DestDistance
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceDenominator, 0x9BC2C99B, 0xAC71, 0x4127, 0x9D, 0x1C, 0x25, 0x96, 0xD0, 0xD7, 0xDC, 0xB7, 100);
+
+//  Name:     System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0, 100
+//
+//  Numerator of PKEY_GPS_DestDistance
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceNumerator, 0x2BDA47DA, 0x08C6, 0x4FE1, 0x80, 0xBC, 0xA7, 0x2F, 0xC5, 0x17, 0xC5, 0xD0, 100);
+
+//  Name:     System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: ED4DF2D3-8695-450B-856F-F5C1C53ACB66, 100
+//
+//  Indicates the unit used to express the distance to the destination.  (eg: kilometers, miles, knots)
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceRef, 0xED4DF2D3, 0x8695, 0x450B, 0x85, 0x6F, 0xF5, 0xC1, 0xC5, 0x3A, 0xCB, 0x66, 100);
+
+//  Name:     System.GPS.DestLatitude -- PKEY_GPS_DestLatitude
+//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
+//  FormatID: 9D1D7CC5-5C39-451C-86B3-928E2D18CC47, 100
+//  
+//  Indicates the latitude of the destination point.  This is an array of three values.  Index 0 is the degrees, index 1 
+//  is the minutes, index 2 is the seconds.  Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and 
+//  PKEY_GPS_DestLatitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitude, 0x9D1D7CC5, 0x5C39, 0x451C, 0x86, 0xB3, 0x92, 0x8E, 0x2D, 0x18, 0xCC, 0x47, 100);
+
+//  Name:     System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: 3A372292-7FCA-49A7-99D5-E47BB2D4E7AB, 100
+//
+//  Denominator of PKEY_GPS_DestLatitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeDenominator, 0x3A372292, 0x7FCA, 0x49A7, 0x99, 0xD5, 0xE4, 0x7B, 0xB2, 0xD4, 0xE7, 0xAB, 100);
+
+//  Name:     System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: ECF4B6F6-D5A6-433C-BB92-4076650FC890, 100
+//
+//  Numerator of PKEY_GPS_DestLatitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeNumerator, 0xECF4B6F6, 0xD5A6, 0x433C, 0xBB, 0x92, 0x40, 0x76, 0x65, 0x0F, 0xC8, 0x90, 100);
+
+//  Name:     System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CEA820B9-CE61-4885-A128-005D9087C192, 100
+//
+//  Indicates whether the latitude destination point is north or south latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeRef, 0xCEA820B9, 0xCE61, 0x4885, 0xA1, 0x28, 0x00, 0x5D, 0x90, 0x87, 0xC1, 0x92, 100);
+
+//  Name:     System.GPS.DestLongitude -- PKEY_GPS_DestLongitude
+//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
+//  FormatID: 47A96261-CB4C-4807-8AD3-40B9D9DBC6BC, 100
+//  
+//  Indicates the latitude of the destination point.  This is an array of three values.  Index 0 is the degrees, index 1 
+//  is the minutes, index 2 is the seconds.  Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and 
+//  PKEY_GPS_DestLongitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitude, 0x47A96261, 0xCB4C, 0x4807, 0x8A, 0xD3, 0x40, 0xB9, 0xD9, 0xDB, 0xC6, 0xBC, 100);
+
+//  Name:     System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: 425D69E5-48AD-4900-8D80-6EB6B8D0AC86, 100
+//
+//  Denominator of PKEY_GPS_DestLongitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeDenominator, 0x425D69E5, 0x48AD, 0x4900, 0x8D, 0x80, 0x6E, 0xB6, 0xB8, 0xD0, 0xAC, 0x86, 100);
+
+//  Name:     System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: A3250282-FB6D-48D5-9A89-DBCACE75CCCF, 100
+//
+//  Numerator of PKEY_GPS_DestLongitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeNumerator, 0xA3250282, 0xFB6D, 0x48D5, 0x9A, 0x89, 0xDB, 0xCA, 0xCE, 0x75, 0xCC, 0xCF, 100);
+
+//  Name:     System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128, 100
+//
+//  Indicates whether the longitude destination point is east or west longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeRef, 0x182C1EA6, 0x7C1C, 0x4083, 0xAB, 0x4B, 0xAC, 0x6C, 0x9F, 0x4E, 0xD1, 0x28, 100);
+
+//  Name:     System.GPS.Differential -- PKEY_GPS_Differential
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D, 100
+//
+//  Indicates whether differential correction was applied to the GPS receiver
+DEFINE_PROPERTYKEY(PKEY_GPS_Differential, 0xAAF4EE25, 0xBD3B, 0x4DD7, 0xBF, 0xC4, 0x47, 0xF7, 0x7B, 0xB0, 0x0F, 0x6D, 100);
+
+//  Name:     System.GPS.DOP -- PKEY_GPS_DOP
+//  Type:     Double -- VT_R8
+//  FormatID: 0CF8FB02-1837-42F1-A697-A7017AA289B9, 100
+//
+//  Indicates the GPS DOP (data degree of precision).  Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator
+DEFINE_PROPERTYKEY(PKEY_GPS_DOP, 0x0CF8FB02, 0x1837, 0x42F1, 0xA6, 0x97, 0xA7, 0x01, 0x7A, 0xA2, 0x89, 0xB9, 100);
+
+//  Name:     System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: A0BE94C5-50BA-487B-BD35-0654BE8881ED, 100
+//
+//  Denominator of PKEY_GPS_DOP
+DEFINE_PROPERTYKEY(PKEY_GPS_DOPDenominator, 0xA0BE94C5, 0x50BA, 0x487B, 0xBD, 0x35, 0x06, 0x54, 0xBE, 0x88, 0x81, 0xED, 100);
+
+//  Name:     System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 47166B16-364F-4AA0-9F31-E2AB3DF449C3, 100
+//
+//  Numerator of PKEY_GPS_DOP
+DEFINE_PROPERTYKEY(PKEY_GPS_DOPNumerator, 0x47166B16, 0x364F, 0x4AA0, 0x9F, 0x31, 0xE2, 0xAB, 0x3D, 0xF4, 0x49, 0xC3, 100);
+
+//  Name:     System.GPS.ImgDirection -- PKEY_GPS_ImgDirection
+//  Type:     Double -- VT_R8
+//  FormatID: 16473C91-D017-4ED9-BA4D-B6BAA55DBCF8, 100
+//  
+//  Indicates direction of the image when it was captured.  Calculated from PKEY_GPS_ImgDirectionNumerator and 
+//  PKEY_GPS_ImgDirectionDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirection, 0x16473C91, 0xD017, 0x4ED9, 0xBA, 0x4D, 0xB6, 0xBA, 0xA5, 0x5D, 0xBC, 0xF8, 100);
+
+//  Name:     System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 10B24595-41A2-4E20-93C2-5761C1395F32, 100
+//
+//  Denominator of PKEY_GPS_ImgDirection
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionDenominator, 0x10B24595, 0x41A2, 0x4E20, 0x93, 0xC2, 0x57, 0x61, 0xC1, 0x39, 0x5F, 0x32, 100);
+
+//  Name:     System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: DC5877C7-225F-45F7-BAC7-E81334B6130A, 100
+//
+//  Numerator of PKEY_GPS_ImgDirection
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionNumerator, 0xDC5877C7, 0x225F, 0x45F7, 0xBA, 0xC7, 0xE8, 0x13, 0x34, 0xB6, 0x13, 0x0A, 100);
+
+//  Name:     System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5, 100
+//
+//  Indicates reference for giving the direction of the image when it was captured.  (eg: true direction, magnetic direction)
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionRef, 0xA4AAA5B7, 0x1AD0, 0x445F, 0x81, 0x1A, 0x0F, 0x8F, 0x6E, 0x67, 0xF6, 0xB5, 100);
+
+//  Name:     System.GPS.Latitude -- PKEY_GPS_Latitude
+//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
+//  FormatID: 8727CFFF-4868-4EC6-AD5B-81B98521D1AB, 100
+//  
+//  Indicates the latitude.  This is an array of three values.  Index 0 is the degrees, index 1 is the minutes, index 2 
+//  is the seconds.  Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Latitude, 0x8727CFFF, 0x4868, 0x4EC6, 0xAD, 0x5B, 0x81, 0xB9, 0x85, 0x21, 0xD1, 0xAB, 100);
+
+//  Name:     System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: 16E634EE-2BFF-497B-BD8A-4341AD39EEB9, 100
+//
+//  Denominator of PKEY_GPS_Latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeDenominator, 0x16E634EE, 0x2BFF, 0x497B, 0xBD, 0x8A, 0x43, 0x41, 0xAD, 0x39, 0xEE, 0xB9, 100);
+
+//  Name:     System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: 7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2, 100
+//
+//  Numerator of PKEY_GPS_Latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeNumerator, 0x7DDAAAD1, 0xCCC8, 0x41AE, 0xB7, 0x50, 0xB2, 0xCB, 0x80, 0x31, 0xAE, 0xA2, 100);
+
+//  Name:     System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 029C0252-5B86-46C7-ACA0-2769FFC8E3D4, 100
+//
+//  Indicates whether latitude is north or south latitude 
+DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeRef, 0x029C0252, 0x5B86, 0x46C7, 0xAC, 0xA0, 0x27, 0x69, 0xFF, 0xC8, 0xE3, 0xD4, 100);
+
+//  Name:     System.GPS.Longitude -- PKEY_GPS_Longitude
+//  Type:     Multivalue Double -- VT_VECTOR | VT_R8  (For variants: VT_ARRAY | VT_R8)
+//  FormatID: C4C4DBB2-B593-466B-BBDA-D03D27D5E43A, 100
+//  
+//  Indicates the longitude.  This is an array of three values.  Index 0 is the degrees, index 1 is the minutes, index 2 
+//  is the seconds.  Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Longitude, 0xC4C4DBB2, 0xB593, 0x466B, 0xBB, 0xDA, 0xD0, 0x3D, 0x27, 0xD5, 0xE4, 0x3A, 100);
+
+//  Name:     System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: BE6E176C-4534-4D2C-ACE5-31DEDAC1606B, 100
+//
+//  Denominator of PKEY_GPS_Longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeDenominator, 0xBE6E176C, 0x4534, 0x4D2C, 0xAC, 0xE5, 0x31, 0xDE, 0xDA, 0xC1, 0x60, 0x6B, 100);
+
+//  Name:     System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator
+//  Type:     Multivalue UInt32 -- VT_VECTOR | VT_UI4  (For variants: VT_ARRAY | VT_UI4)
+//  FormatID: 02B0F689-A914-4E45-821D-1DDA452ED2C4, 100
+//
+//  Numerator of PKEY_GPS_Longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeNumerator, 0x02B0F689, 0xA914, 0x4E45, 0x82, 0x1D, 0x1D, 0xDA, 0x45, 0x2E, 0xD2, 0xC4, 100);
+
+//  Name:     System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 33DCF22B-28D5-464C-8035-1EE9EFD25278, 100
+//
+//  Indicates whether longitude is east or west longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeRef, 0x33DCF22B, 0x28D5, 0x464C, 0x80, 0x35, 0x1E, 0xE9, 0xEF, 0xD2, 0x52, 0x78, 100);
+
+//  Name:     System.GPS.MapDatum -- PKEY_GPS_MapDatum
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 2CA2DAE6-EDDC-407D-BEF1-773942ABFA95, 100
+//
+//  Indicates the geodetic survey data used by the GPS receiver
+DEFINE_PROPERTYKEY(PKEY_GPS_MapDatum, 0x2CA2DAE6, 0xEDDC, 0x407D, 0xBE, 0xF1, 0x77, 0x39, 0x42, 0xAB, 0xFA, 0x95, 100);
+
+//  Name:     System.GPS.MeasureMode -- PKEY_GPS_MeasureMode
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A015ED5D-AAEA-4D58-8A86-3C586920EA0B, 100
+//
+//  Indicates the GPS measurement mode.  (eg: 2-dimensional, 3-dimensional)
+DEFINE_PROPERTYKEY(PKEY_GPS_MeasureMode, 0xA015ED5D, 0xAAEA, 0x4D58, 0x8A, 0x86, 0x3C, 0x58, 0x69, 0x20, 0xEA, 0x0B, 100);
+
+//  Name:     System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 59D49E61-840F-4AA9-A939-E2099B7F6399, 100
+//
+//  Indicates the name of the method used for location finding
+DEFINE_PROPERTYKEY(PKEY_GPS_ProcessingMethod, 0x59D49E61, 0x840F, 0x4AA9, 0xA9, 0x39, 0xE2, 0x09, 0x9B, 0x7F, 0x63, 0x99, 100);
+
+//  Name:     System.GPS.Satellites -- PKEY_GPS_Satellites
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 467EE575-1F25-4557-AD4E-B8B58B0D9C15, 100
+//
+//  Indicates the GPS satellites used for measurements
+DEFINE_PROPERTYKEY(PKEY_GPS_Satellites, 0x467EE575, 0x1F25, 0x4557, 0xAD, 0x4E, 0xB8, 0xB5, 0x8B, 0x0D, 0x9C, 0x15, 100);
+
+//  Name:     System.GPS.Speed -- PKEY_GPS_Speed
+//  Type:     Double -- VT_R8
+//  FormatID: DA5D0862-6E76-4E1B-BABD-70021BD25494, 100
+//  
+//  Indicates the speed of the GPS receiver movement.  Calculated from PKEY_GPS_SpeedNumerator and 
+//  PKEY_GPS_SpeedDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Speed, 0xDA5D0862, 0x6E76, 0x4E1B, 0xBA, 0xBD, 0x70, 0x02, 0x1B, 0xD2, 0x54, 0x94, 100);
+
+//  Name:     System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 7D122D5A-AE5E-4335-8841-D71E7CE72F53, 100
+//
+//  Denominator of PKEY_GPS_Speed
+DEFINE_PROPERTYKEY(PKEY_GPS_SpeedDenominator, 0x7D122D5A, 0xAE5E, 0x4335, 0x88, 0x41, 0xD7, 0x1E, 0x7C, 0xE7, 0x2F, 0x53, 100);
+
+//  Name:     System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: ACC9CE3D-C213-4942-8B48-6D0820F21C6D, 100
+//
+//  Numerator of PKEY_GPS_Speed
+DEFINE_PROPERTYKEY(PKEY_GPS_SpeedNumerator, 0xACC9CE3D, 0xC213, 0x4942, 0x8B, 0x48, 0x6D, 0x08, 0x20, 0xF2, 0x1C, 0x6D, 100);
+
+//  Name:     System.GPS.SpeedRef -- PKEY_GPS_SpeedRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453, 100
+//  
+//  Indicates the unit used to express the speed of the GPS receiver movement.  (eg: kilometers per hour, 
+//  miles per hour, knots).
+DEFINE_PROPERTYKEY(PKEY_GPS_SpeedRef, 0xECF7F4C9, 0x544F, 0x4D6D, 0x9D, 0x98, 0x8A, 0xD7, 0x9A, 0xDA, 0xF4, 0x53, 100);
+
+//  Name:     System.GPS.Status -- PKEY_GPS_Status
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 125491F4-818F-46B2-91B5-D537753617B2, 100
+//  
+//  Indicates the status of the GPS receiver when the image was recorded.  (eg: measurement in progress, 
+//  measurement interoperability).
+DEFINE_PROPERTYKEY(PKEY_GPS_Status, 0x125491F4, 0x818F, 0x46B2, 0x91, 0xB5, 0xD5, 0x37, 0x75, 0x36, 0x17, 0xB2, 100);
+
+//  Name:     System.GPS.Track -- PKEY_GPS_Track
+//  Type:     Double -- VT_R8
+//  FormatID: 76C09943-7C33-49E3-9E7E-CDBA872CFADA, 100
+//  
+//  Indicates the direction of the GPS receiver movement.  Calculated from PKEY_GPS_TrackNumerator and 
+//  PKEY_GPS_TrackDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Track, 0x76C09943, 0x7C33, 0x49E3, 0x9E, 0x7E, 0xCD, 0xBA, 0x87, 0x2C, 0xFA, 0xDA, 100);
+
+//  Name:     System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: C8D1920C-01F6-40C0-AC86-2F3A4AD00770, 100
+//
+//  Denominator of PKEY_GPS_Track
+DEFINE_PROPERTYKEY(PKEY_GPS_TrackDenominator, 0xC8D1920C, 0x01F6, 0x40C0, 0xAC, 0x86, 0x2F, 0x3A, 0x4A, 0xD0, 0x07, 0x70, 100);
+
+//  Name:     System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 702926F4-44A6-43E1-AE71-45627116893B, 100
+//
+//  Numerator of PKEY_GPS_Track
+DEFINE_PROPERTYKEY(PKEY_GPS_TrackNumerator, 0x702926F4, 0x44A6, 0x43E1, 0xAE, 0x71, 0x45, 0x62, 0x71, 0x16, 0x89, 0x3B, 100);
+
+//  Name:     System.GPS.TrackRef -- PKEY_GPS_TrackRef
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 35DBE6FE-44C3-4400-AAAE-D2C799C407E8, 100
+//
+//  Indicates reference for the direction of the GPS receiver movement.  (eg: true direction, magnetic direction)
+DEFINE_PROPERTYKEY(PKEY_GPS_TrackRef, 0x35DBE6FE, 0x44C3, 0x4400, 0xAA, 0xAE, 0xD2, 0xC7, 0x99, 0xC4, 0x07, 0xE8, 100);
+
+//  Name:     System.GPS.VersionID -- PKEY_GPS_VersionID
+//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
+//  FormatID: 22704DA4-C6B2-4A99-8E56-F16DF8C92599, 100
+//
+//  Indicates the version of the GPS information
+DEFINE_PROPERTYKEY(PKEY_GPS_VersionID, 0x22704DA4, 0xC6B2, 0x4A99, 0x8E, 0x56, 0xF1, 0x6D, 0xF8, 0xC9, 0x25, 0x99, 100);
+ 
+//-----------------------------------------------------------------------------
+// Image properties
+
+
+
+//  Name:     System.Image.BitDepth -- PKEY_Image_BitDepth
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 7 (PIDISI_BITDEPTH)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Image_BitDepth, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);
+
+//  Name:     System.Image.ColorSpace -- PKEY_Image_ColorSpace
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 40961
+//
+//  PropertyTagExifColorSpace
+DEFINE_PROPERTYKEY(PKEY_Image_ColorSpace, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 40961);
+
+// Possible discrete values for PKEY_Image_ColorSpace are:
+#define IMAGE_COLORSPACE_SRGB               1u
+#define IMAGE_COLORSPACE_UNCALIBRATED       0xFFFFu
+
+//  Name:     System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel
+//  Type:     Double -- VT_R8
+//  FormatID: 364B6FA9-37AB-482A-BE2B-AE02F60D4318, 100
+//
+//  Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixel, 0x364B6FA9, 0x37AB, 0x482A, 0xBE, 0x2B, 0xAE, 0x02, 0xF6, 0x0D, 0x43, 0x18, 100);
+
+//  Name:     System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 1F8844E1-24AD-4508-9DFD-5326A415CE02, 100
+//
+//  Denominator of PKEY_Image_CompressedBitsPerPixel.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelDenominator, 0x1F8844E1, 0x24AD, 0x4508, 0x9D, 0xFD, 0x53, 0x26, 0xA4, 0x15, 0xCE, 0x02, 100);
+
+//  Name:     System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: D21A7148-D32C-4624-8900-277210F79C0F, 100
+//
+//  Numerator of PKEY_Image_CompressedBitsPerPixel.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelNumerator, 0xD21A7148, 0xD32C, 0x4624, 0x89, 0x00, 0x27, 0x72, 0x10, 0xF7, 0x9C, 0x0F, 100);
+
+//  Name:     System.Image.Compression -- PKEY_Image_Compression
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 259
+//
+//  Indicates the image compression level.  PropertyTagCompression.
+DEFINE_PROPERTYKEY(PKEY_Image_Compression, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 259);
+
+// Possible discrete values for PKEY_Image_Compression are:
+#define IMAGE_COMPRESSION_UNCOMPRESSED      1u
+#define IMAGE_COMPRESSION_CCITT_T3          2u
+#define IMAGE_COMPRESSION_CCITT_T4          3u
+#define IMAGE_COMPRESSION_CCITT_T6          4u
+#define IMAGE_COMPRESSION_LZW               5u
+#define IMAGE_COMPRESSION_JPEG              6u
+#define IMAGE_COMPRESSION_PACKBITS          32773u
+
+//  Name:     System.Image.CompressionText -- PKEY_Image_CompressionText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 3F08E66F-2F44-4BB9-A682-AC35D2562322, 100
+//  
+//  This is the user-friendly form of System.Image.Compression.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressionText, 0x3F08E66F, 0x2F44, 0x4BB9, 0xA6, 0x82, 0xAC, 0x35, 0xD2, 0x56, 0x23, 0x22, 100);
+
+//  Name:     System.Image.Dimensions -- PKEY_Image_Dimensions
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 13 (PIDISI_DIMENSIONS)
+//
+//  Indicates the dimensions of the image.
+DEFINE_PROPERTYKEY(PKEY_Image_Dimensions, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);
+
+//  Name:     System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution
+//  Type:     Double -- VT_R8
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 5 (PIDISI_RESOLUTIONX)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Image_HorizontalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);
+
+//  Name:     System.Image.HorizontalSize -- PKEY_Image_HorizontalSize
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 3 (PIDISI_CX)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Image_HorizontalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
+
+//  Name:     System.Image.ImageID -- PKEY_Image_ImageID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 10DABE05-32AA-4C29-BF1A-63E2D220587F, 100
+DEFINE_PROPERTYKEY(PKEY_Image_ImageID, 0x10DABE05, 0x32AA, 0x4C29, 0xBF, 0x1A, 0x63, 0xE2, 0xD2, 0x20, 0x58, 0x7F, 100);
+
+//  Name:     System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit
+//  Type:     Int16 -- VT_I2
+//  FormatID: 19B51FA6-1F92-4A5C-AB48-7DF0ABD67444, 100
+DEFINE_PROPERTYKEY(PKEY_Image_ResolutionUnit, 0x19B51FA6, 0x1F92, 0x4A5C, 0xAB, 0x48, 0x7D, 0xF0, 0xAB, 0xD6, 0x74, 0x44, 100);
+
+//  Name:     System.Image.VerticalResolution -- PKEY_Image_VerticalResolution
+//  Type:     Double -- VT_R8
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 6 (PIDISI_RESOLUTIONY)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Image_VerticalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
+
+//  Name:     System.Image.VerticalSize -- PKEY_Image_VerticalSize
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 4 (PIDISI_CY)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Image_VerticalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
+
+ 
+ 
+//-----------------------------------------------------------------------------
+// Journal properties
+
+//  Name:     System.Journal.Contacts -- PKEY_Journal_Contacts
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1, 100
+DEFINE_PROPERTYKEY(PKEY_Journal_Contacts, 0xDEA7C82C, 0x1D89, 0x4A66, 0x94, 0x27, 0xA4, 0xE3, 0xDE, 0xBA, 0xBC, 0xB1, 100);
+
+//  Name:     System.Journal.EntryType -- PKEY_Journal_EntryType
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 95BEB1FC-326D-4644-B396-CD3ED90E6DDF, 100
+DEFINE_PROPERTYKEY(PKEY_Journal_EntryType, 0x95BEB1FC, 0x326D, 0x4644, 0xB3, 0x96, 0xCD, 0x3E, 0xD9, 0x0E, 0x6D, 0xDF, 100);
+ 
+//-----------------------------------------------------------------------------
+// Link properties
+
+
+
+//  Name:     System.Link.Comment -- PKEY_Link_Comment
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 5
+DEFINE_PROPERTYKEY(PKEY_Link_Comment, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 5);
+
+//  Name:     System.Link.DateVisited -- PKEY_Link_DateVisited
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 23  (PKEYs relating to URLs.  Used by IE History.)
+DEFINE_PROPERTYKEY(PKEY_Link_DateVisited, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 23);
+
+//  Name:     System.Link.Description -- PKEY_Link_Description
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 21  (PKEYs relating to URLs.  Used by IE History.)
+DEFINE_PROPERTYKEY(PKEY_Link_Description, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 21);
+
+//  Name:     System.Link.Status -- PKEY_Link_Status
+//  Type:     Int32 -- VT_I4
+//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 3 (PID_LINK_TARGET_TYPE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Link_Status, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 3);
+
+// Possible discrete values for PKEY_Link_Status are:
+#define LINK_STATUS_RESOLVED                1l
+#define LINK_STATUS_BROKEN                  2l
+
+//  Name:     System.Link.TargetExtension -- PKEY_Link_TargetExtension
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: 7A7D76F4-B630-4BD7-95FF-37CC51A975C9, 2
+//
+//  The file extension of the link target.  See System.File.Extension
+DEFINE_PROPERTYKEY(PKEY_Link_TargetExtension, 0x7A7D76F4, 0xB630, 0x4BD7, 0x95, 0xFF, 0x37, 0xCC, 0x51, 0xA9, 0x75, 0xC9, 2);
+
+//  Name:     System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 2 (PID_LINK_TARGET)
+//  
+//  This is the shell namespace path to the target of the link item.  This path may be passed to 
+//  SHParseDisplayName to parse the path to the correct shell folder.
+//  
+//  If the target item is a file, the value is identical to System.ItemPathDisplay.
+//  
+//  If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY.
+DEFINE_PROPERTYKEY(PKEY_Link_TargetParsingPath, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 2);
+
+//  Name:     System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 8
+//  
+//  IShellFolder::GetAttributesOf flags for the target of a link, with SFGAO_PKEYSFGAOMASK 
+//  attributes masked out.
+DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlags, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 8);
+ 
+//-----------------------------------------------------------------------------
+// Media properties
+
+
+
+//  Name:     System.Media.AuthorUrl -- PKEY_Media_AuthorUrl
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 32 (PIDMSI_AUTHOR_URL)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_AuthorUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 32);
+
+//  Name:     System.Media.AverageLevel -- PKEY_Media_AverageLevel
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 09EDD5B6-B301-43C5-9990-D00302EFFD46, 100
+DEFINE_PROPERTYKEY(PKEY_Media_AverageLevel, 0x09EDD5B6, 0xB301, 0x43C5, 0x99, 0x90, 0xD0, 0x03, 0x02, 0xEF, 0xFD, 0x46, 100);
+
+//  Name:     System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 13 (PIDMSI_CLASS_PRIMARY_ID)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_ClassPrimaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);
+
+//  Name:     System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 14 (PIDMSI_CLASS_SECONDARY_ID)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_ClassSecondaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 14);
+
+//  Name:     System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 24 (PIDMSI_COLLECTION_GROUP_ID)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_CollectionGroupID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 24);
+
+//  Name:     System.Media.CollectionID -- PKEY_Media_CollectionID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 25 (PIDMSI_COLLECTION_ID)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_CollectionID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 25);
+
+//  Name:     System.Media.ContentDistributor -- PKEY_Media_ContentDistributor
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 18 (PIDMSI_CONTENTDISTRIBUTOR)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_ContentDistributor, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 18);
+
+//  Name:     System.Media.ContentID -- PKEY_Media_ContentID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 26 (PIDMSI_CONTENT_ID)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_ContentID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 26);
+
+//  Name:     System.Media.CreatorApplication -- PKEY_Media_CreatorApplication
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 27 (PIDMSI_TOOL_NAME)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplication, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 27);
+
+//  Name:     System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 28 (PIDMSI_TOOL_VERSION)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplicationVersion, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 28);
+
+//  Name:     System.Media.DateEncoded -- PKEY_Media_DateEncoded
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 2E4B640D-5019-46D8-8881-55414CC5CAA0, 100
+//
+//  DateTime is in UTC (in the doc, not file system).
+DEFINE_PROPERTYKEY(PKEY_Media_DateEncoded, 0x2E4B640D, 0x5019, 0x46D8, 0x88, 0x81, 0x55, 0x41, 0x4C, 0xC5, 0xCA, 0xA0, 100);
+
+//  Name:     System.Media.DateReleased -- PKEY_Media_DateReleased
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DE41CC29-6971-4290-B472-F59F2E2F31E2, 100
+DEFINE_PROPERTYKEY(PKEY_Media_DateReleased, 0xDE41CC29, 0x6971, 0x4290, 0xB4, 0x72, 0xF5, 0x9F, 0x2E, 0x2F, 0x31, 0xE2, 100);
+
+//  Name:     System.Media.Duration -- PKEY_Media_Duration
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 3 (PIDASI_TIMELENGTH)
+//
+//  100ns units, not milliseconds
+DEFINE_PROPERTYKEY(PKEY_Media_Duration, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
+
+//  Name:     System.Media.DVDID -- PKEY_Media_DVDID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 15 (PIDMSI_DVDID)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_DVDID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 15);
+
+//  Name:     System.Media.EncodedBy -- PKEY_Media_EncodedBy
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 36 (PIDMSI_ENCODED_BY)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_EncodedBy, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 36);
+
+//  Name:     System.Media.EncodingSettings -- PKEY_Media_EncodingSettings
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 37 (PIDMSI_ENCODING_SETTINGS)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_EncodingSettings, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 37);
+
+//  Name:     System.Media.FrameCount -- PKEY_Media_FrameCount
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 12 (PIDISI_FRAMECOUNT)
+//
+//  Indicates the frame count for the image.
+DEFINE_PROPERTYKEY(PKEY_Media_FrameCount, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);
+
+//  Name:     System.Media.MCDI -- PKEY_Media_MCDI
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 16 (PIDMSI_MCDI)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_MCDI, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 16);
+
+//  Name:     System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 17 (PIDMSI_PROVIDER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_MetadataContentProvider, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 17);
+
+//  Name:     System.Media.Producer -- PKEY_Media_Producer
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 22 (PIDMSI_PRODUCER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_Producer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 22);
+
+//  Name:     System.Media.PromotionUrl -- PKEY_Media_PromotionUrl
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 33 (PIDMSI_PROMOTION_URL)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_PromotionUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 33);
+
+//  Name:     System.Media.ProtectionType -- PKEY_Media_ProtectionType
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 38
+//  
+//  If media is protected, how is it protected?
+DEFINE_PROPERTYKEY(PKEY_Media_ProtectionType, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 38);
+
+//  Name:     System.Media.ProviderRating -- PKEY_Media_ProviderRating
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 39
+//  
+//  Rating (0 - 99) supplied by metadata provider
+DEFINE_PROPERTYKEY(PKEY_Media_ProviderRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 39);
+
+//  Name:     System.Media.ProviderStyle -- PKEY_Media_ProviderStyle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 40
+//  
+//  Style of music or video, supplied by metadata provider
+DEFINE_PROPERTYKEY(PKEY_Media_ProviderStyle, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 40);
+
+//  Name:     System.Media.Publisher -- PKEY_Media_Publisher
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 30 (PIDMSI_PUBLISHER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_Publisher, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 30);
+
+//  Name:     System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 9AEBAE7A-9644-487D-A92C-657585ED751A, 100
+DEFINE_PROPERTYKEY(PKEY_Media_SubscriptionContentId, 0x9AEBAE7A, 0x9644, 0x487D, 0xA9, 0x2C, 0x65, 0x75, 0x85, 0xED, 0x75, 0x1A, 100);
+
+//  Name:     System.Media.SubTitle -- PKEY_Media_SubTitle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 38 (PIDSI_MUSIC_SUB_TITLE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_SubTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 38);
+
+//  Name:     System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_UniqueFileIdentifier, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 35);
+
+//  Name:     System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 41
+//  
+//  If true, do NOT alter this file's metadata. Set by user.
+DEFINE_PROPERTYKEY(PKEY_Media_UserNoAutoInfo, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 41);
+
+//  Name:     System.Media.UserWebUrl -- PKEY_Media_UserWebUrl
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 34 (PIDMSI_USER_WEB_URL)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_UserWebUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 34);
+
+//  Name:     System.Media.Writer -- PKEY_Media_Writer
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 23 (PIDMSI_WRITER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_Writer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 23);
+
+//  Name:     System.Media.Year -- PKEY_Media_Year
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 5 (PIDSI_MUSIC_YEAR)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Media_Year, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 5);
+ 
+//-----------------------------------------------------------------------------
+// Message properties
+
+
+
+//  Name:     System.Message.AttachmentContents -- PKEY_Message_AttachmentContents
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 3143BF7C-80A8-4854-8880-E2E40189BDD0, 100
+DEFINE_PROPERTYKEY(PKEY_Message_AttachmentContents, 0x3143BF7C, 0x80A8, 0x4854, 0x88, 0x80, 0xE2, 0xE4, 0x01, 0x89, 0xBD, 0xD0, 100);
+
+//  Name:     System.Message.AttachmentNames -- PKEY_Message_AttachmentNames
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 21
+//
+//  The names of the attachments in a message
+DEFINE_PROPERTYKEY(PKEY_Message_AttachmentNames, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 21);
+
+//  Name:     System.Message.BccAddress -- PKEY_Message_BccAddress
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 2
+//
+//  Addresses in Bcc: field
+DEFINE_PROPERTYKEY(PKEY_Message_BccAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 2);
+
+//  Name:     System.Message.BccName -- PKEY_Message_BccName
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 3
+//
+//  person names in Bcc: field
+DEFINE_PROPERTYKEY(PKEY_Message_BccName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 3);
+
+//  Name:     System.Message.CcAddress -- PKEY_Message_CcAddress
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 4
+//
+//  Addresses in Cc: field
+DEFINE_PROPERTYKEY(PKEY_Message_CcAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 4);
+
+//  Name:     System.Message.CcName -- PKEY_Message_CcName
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 5
+//
+//  person names in Cc: field
+DEFINE_PROPERTYKEY(PKEY_Message_CcName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 5);
+
+//  Name:     System.Message.ConversationID -- PKEY_Message_ConversationID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 100
+DEFINE_PROPERTYKEY(PKEY_Message_ConversationID, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 100);
+
+//  Name:     System.Message.ConversationIndex -- PKEY_Message_ConversationIndex
+//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
+//  FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 101
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Message_ConversationIndex, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 101);
+
+//  Name:     System.Message.DateReceived -- PKEY_Message_DateReceived
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 20
+//
+//  Date and Time communication was received
+DEFINE_PROPERTYKEY(PKEY_Message_DateReceived, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 20);
+
+//  Name:     System.Message.DateSent -- PKEY_Message_DateSent
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 19
+//
+//  Date and Time communication was sent
+DEFINE_PROPERTYKEY(PKEY_Message_DateSent, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 19);
+
+//  Name:     System.Message.FromAddress -- PKEY_Message_FromAddress
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 13
+DEFINE_PROPERTYKEY(PKEY_Message_FromAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 13);
+
+//  Name:     System.Message.FromName -- PKEY_Message_FromName
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 14
+//
+//  Address in from field as person name
+DEFINE_PROPERTYKEY(PKEY_Message_FromName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 14);
+
+//  Name:     System.Message.HasAttachments -- PKEY_Message_HasAttachments
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 8
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Message_HasAttachments, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 8);
+
+//  Name:     System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply
+//  Type:     Int32 -- VT_I4
+//  FormatID: 9A9BC088-4F6D-469E-9919-E705412040F9, 100
+DEFINE_PROPERTYKEY(PKEY_Message_IsFwdOrReply, 0x9A9BC088, 0x4F6D, 0x469E, 0x99, 0x19, 0xE7, 0x05, 0x41, 0x20, 0x40, 0xF9, 100);
+
+//  Name:     System.Message.MessageClass -- PKEY_Message_MessageClass
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CD9ED458-08CE-418F-A70E-F912C7BB9C5C, 103
+//  
+//  What type of outlook msg this is (meeting, task, mail, etc.)
+DEFINE_PROPERTYKEY(PKEY_Message_MessageClass, 0xCD9ED458, 0x08CE, 0x418F, 0xA7, 0x0E, 0xF9, 0x12, 0xC7, 0xBB, 0x9C, 0x5C, 103);
+
+//  Name:     System.Message.SenderAddress -- PKEY_Message_SenderAddress
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 0BE1C8E7-1981-4676-AE14-FDD78F05A6E7, 100
+DEFINE_PROPERTYKEY(PKEY_Message_SenderAddress, 0x0BE1C8E7, 0x1981, 0x4676, 0xAE, 0x14, 0xFD, 0xD7, 0x8F, 0x05, 0xA6, 0xE7, 100);
+
+//  Name:     System.Message.SenderName -- PKEY_Message_SenderName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 0DA41CFA-D224-4A18-AE2F-596158DB4B3A, 100
+DEFINE_PROPERTYKEY(PKEY_Message_SenderName, 0x0DA41CFA, 0xD224, 0x4A18, 0xAE, 0x2F, 0x59, 0x61, 0x58, 0xDB, 0x4B, 0x3A, 100);
+
+//  Name:     System.Message.Store -- PKEY_Message_Store
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 15
+//
+//  The store (aka protocol handler) FILE, MAIL, OUTLOOKEXPRESS
+DEFINE_PROPERTYKEY(PKEY_Message_Store, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 15);
+
+//  Name:     System.Message.ToAddress -- PKEY_Message_ToAddress
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 16
+//
+//  Addresses in To: field
+DEFINE_PROPERTYKEY(PKEY_Message_ToAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 16);
+
+//  Name:     System.Message.ToDoTitle -- PKEY_Message_ToDoTitle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7, 100
+DEFINE_PROPERTYKEY(PKEY_Message_ToDoTitle, 0xBCCC8A3C, 0x8CEF, 0x42E5, 0x9B, 0x1C, 0xC6, 0x90, 0x79, 0x39, 0x8B, 0xC7, 100);
+
+//  Name:     System.Message.ToName -- PKEY_Message_ToName
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 17
+//
+//  Person names in To: field
+DEFINE_PROPERTYKEY(PKEY_Message_ToName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 17);
+ 
+//-----------------------------------------------------------------------------
+// Music properties
+
+//  Name:     System.Music.AlbumArtist -- PKEY_Music_AlbumArtist
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 13 (PIDSI_MUSIC_ALBUM_ARTIST)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_AlbumArtist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 13);
+
+//  Name:     System.Music.AlbumTitle -- PKEY_Music_AlbumTitle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 4 (PIDSI_MUSIC_ALBUM)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_AlbumTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 4);
+
+//  Name:     System.Music.Artist -- PKEY_Music_Artist
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 2 (PIDSI_MUSIC_ARTIST)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Artist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 2);
+
+//  Name:     System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_BeatsPerMinute, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 35);
+
+//  Name:     System.Music.Composer -- PKEY_Music_Composer
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 19 (PIDMSI_COMPOSER)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Composer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 19);
+
+//  Name:     System.Music.Conductor -- PKEY_Music_Conductor
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 36 (PIDSI_MUSIC_CONDUCTOR)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Conductor, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 36);
+
+//  Name:     System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_ContentGroupDescription, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 33);
+
+//  Name:     System.Music.Genre -- PKEY_Music_Genre
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 11 (PIDSI_MUSIC_GENRE)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Genre, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 11);
+
+//  Name:     System.Music.InitialKey -- PKEY_Music_InitialKey
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 34 (PIDSI_MUSIC_INITIAL_KEY)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_InitialKey, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 34);
+
+//  Name:     System.Music.Lyrics -- PKEY_Music_Lyrics
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 12 (PIDSI_MUSIC_LYRICS)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Lyrics, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 12);
+
+//  Name:     System.Music.Mood -- PKEY_Music_Mood
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 39 (PIDSI_MUSIC_MOOD)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Mood, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 39);
+
+//  Name:     System.Music.PartOfSet -- PKEY_Music_PartOfSet
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 37 (PIDSI_MUSIC_PART_OF_SET)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_PartOfSet, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 37);
+
+//  Name:     System.Music.Period -- PKEY_Music_Period
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 31 (PIDMSI_PERIOD)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_Period, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 31);
+
+//  Name:     System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics
+//  Type:     Blob -- VT_BLOB
+//  FormatID: 6B223B6A-162E-4AA9-B39F-05D678FC6D77, 100
+DEFINE_PROPERTYKEY(PKEY_Music_SynchronizedLyrics, 0x6B223B6A, 0x162E, 0x4AA9, 0xB3, 0x9F, 0x05, 0xD6, 0x78, 0xFC, 0x6D, 0x77, 100);
+
+//  Name:     System.Music.TrackNumber -- PKEY_Music_TrackNumber
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 7 (PIDSI_MUSIC_TRACK)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Music_TrackNumber, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 7);
+
+ 
+ 
+//-----------------------------------------------------------------------------
+// Note properties
+
+//  Name:     System.Note.Color -- PKEY_Note_Color
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: 4776CAFA-BCE4-4CB1-A23E-265E76D8EB11, 100
+DEFINE_PROPERTYKEY(PKEY_Note_Color, 0x4776CAFA, 0xBCE4, 0x4CB1, 0xA2, 0x3E, 0x26, 0x5E, 0x76, 0xD8, 0xEB, 0x11, 100);
+
+// Possible discrete values for PKEY_Note_Color are:
+#define NOTE_COLOR_BLUE                     0u
+#define NOTE_COLOR_GREEN                    1u
+#define NOTE_COLOR_PINK                     2u
+#define NOTE_COLOR_YELLOW                   3u
+#define NOTE_COLOR_WHITE                    4u
+#define NOTE_COLOR_LIGHTGREEN               5u
+
+//  Name:     System.Note.ColorText -- PKEY_Note_ColorText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 46B4E8DE-CDB2-440D-885C-1658EB65B914, 100
+//  
+//  This is the user-friendly form of System.Note.Color.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Note_ColorText, 0x46B4E8DE, 0xCDB2, 0x440D, 0x88, 0x5C, 0x16, 0x58, 0xEB, 0x65, 0xB9, 0x14, 100);
+ 
+//-----------------------------------------------------------------------------
+// Photo properties
+
+
+
+//  Name:     System.Photo.Aperture -- PKEY_Photo_Aperture
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37378
+//
+//  PropertyTagExifAperture.  Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_Aperture, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37378);
+
+//  Name:     System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: E1A9A38B-6685-46BD-875E-570DC7AD7320, 100
+//
+//  Denominator of PKEY_Photo_Aperture
+DEFINE_PROPERTYKEY(PKEY_Photo_ApertureDenominator, 0xE1A9A38B, 0x6685, 0x46BD, 0x87, 0x5E, 0x57, 0x0D, 0xC7, 0xAD, 0x73, 0x20, 100);
+
+//  Name:     System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 0337ECEC-39FB-4581-A0BD-4C4CC51E9914, 100
+//
+//  Numerator of PKEY_Photo_Aperture
+DEFINE_PROPERTYKEY(PKEY_Photo_ApertureNumerator, 0x0337ECEC, 0x39FB, 0x4581, 0xA0, 0xBD, 0x4C, 0x4C, 0xC5, 0x1E, 0x99, 0x14, 100);
+
+//  Name:     System.Photo.Brightness -- PKEY_Photo_Brightness
+//  Type:     Double -- VT_R8
+//  FormatID: 1A701BF6-478C-4361-83AB-3701BB053C58, 100 (PropertyTagExifBrightness)
+//  
+//  This is the brightness of the photo.
+//  
+//  Calculated from PKEY_Photo_BrightnessNumerator and PKEY_Photo_BrightnessDenominator.
+//  
+//  The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of 
+//  the recorded value is FFFFFFFF.H, "Unknown" should be indicated.
+DEFINE_PROPERTYKEY(PKEY_Photo_Brightness, 0x1A701BF6, 0x478C, 0x4361, 0x83, 0xAB, 0x37, 0x01, 0xBB, 0x05, 0x3C, 0x58, 100);
+
+//  Name:     System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 6EBE6946-2321-440A-90F0-C043EFD32476, 100
+//
+//  Denominator of PKEY_Photo_Brightness
+DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessDenominator, 0x6EBE6946, 0x2321, 0x440A, 0x90, 0xF0, 0xC0, 0x43, 0xEF, 0xD3, 0x24, 0x76, 100);
+
+//  Name:     System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 9E7D118F-B314-45A0-8CFB-D654B917C9E9, 100
+//
+//  Numerator of PKEY_Photo_Brightness
+DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessNumerator, 0x9E7D118F, 0xB314, 0x45A0, 0x8C, 0xFB, 0xD6, 0x54, 0xB9, 0x17, 0xC9, 0xE9, 100);
+
+//  Name:     System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 271 (PropertyTagEquipMake)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Photo_CameraManufacturer, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 271);
+
+//  Name:     System.Photo.CameraModel -- PKEY_Photo_CameraModel
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 272 (PropertyTagEquipModel)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Photo_CameraModel, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 272);
+
+//  Name:     System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 273
+//
+//  Serial number of camera that produced this photo
+DEFINE_PROPERTYKEY(PKEY_Photo_CameraSerialNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 273);
+
+//  Name:     System.Photo.Contrast -- PKEY_Photo_Contrast
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 2A785BA9-8D23-4DED-82E6-60A350C86A10, 100
+//  
+//  This indicates the direction of contrast processing applied by the camera 
+//  when the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_Contrast, 0x2A785BA9, 0x8D23, 0x4DED, 0x82, 0xE6, 0x60, 0xA3, 0x50, 0xC8, 0x6A, 0x10, 100);
+
+// Possible discrete values for PKEY_Photo_Contrast are:
+#define PHOTO_CONTRAST_NORMAL               0ul
+#define PHOTO_CONTRAST_SOFT                 1ul
+#define PHOTO_CONTRAST_HARD                 2ul
+
+//  Name:     System.Photo.ContrastText -- PKEY_Photo_ContrastText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 59DDE9F2-5253-40EA-9A8B-479E96C6249A, 100
+//  
+//  This is the user-friendly form of System.Photo.Contrast.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_ContrastText, 0x59DDE9F2, 0x5253, 0x40EA, 0x9A, 0x8B, 0x47, 0x9E, 0x96, 0xC6, 0x24, 0x9A, 100);
+
+//  Name:     System.Photo.DateTaken -- PKEY_Photo_DateTaken
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 36867
+//
+//  PropertyTagExifDTOrig
+DEFINE_PROPERTYKEY(PKEY_Photo_DateTaken, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 36867);
+
+//  Name:     System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom
+//  Type:     Double -- VT_R8
+//  FormatID: F85BF840-A925-4BC2-B0C4-8E36B598679E, 100
+//
+//  PropertyTagExifDigitalZoom.  Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoom, 0xF85BF840, 0xA925, 0x4BC2, 0xB0, 0xC4, 0x8E, 0x36, 0xB5, 0x98, 0x67, 0x9E, 100);
+
+//  Name:     System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 745BAF0E-E5C1-4CFB-8A1B-D031A0A52393, 100
+//
+//  Denominator of PKEY_Photo_DigitalZoom
+DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomDenominator, 0x745BAF0E, 0xE5C1, 0x4CFB, 0x8A, 0x1B, 0xD0, 0x31, 0xA0, 0xA5, 0x23, 0x93, 100);
+
+//  Name:     System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 16CBB924-6500-473B-A5BE-F1599BCBE413, 100
+//
+//  Numerator of PKEY_Photo_DigitalZoom
+DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomNumerator, 0x16CBB924, 0x6500, 0x473B, 0xA5, 0xBE, 0xF1, 0x59, 0x9B, 0xCB, 0xE4, 0x13, 100);
+
+//  Name:     System.Photo.Event -- PKEY_Photo_Event
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18248
+//
+//  The event at which the photo was taken
+DEFINE_PROPERTYKEY(PKEY_Photo_Event, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18248);
+
+//  Name:     System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: D35F743A-EB2E-47F2-A286-844132CB1427, 100
+//
+//  The EXIF version.
+DEFINE_PROPERTYKEY(PKEY_Photo_EXIFVersion, 0xD35F743A, 0xEB2E, 0x47F2, 0xA2, 0x86, 0x84, 0x41, 0x32, 0xCB, 0x14, 0x27, 100);
+
+//  Name:     System.Photo.ExposureBias -- PKEY_Photo_ExposureBias
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37380
+//
+//  PropertyTagExifExposureBias.  Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBias, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37380);
+
+//  Name:     System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator
+//  Type:     Int32 -- VT_I4
+//  FormatID: AB205E50-04B7-461C-A18C-2F233836E627, 100
+//
+//  Denominator of PKEY_Photo_ExposureBias
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasDenominator, 0xAB205E50, 0x04B7, 0x461C, 0xA1, 0x8C, 0x2F, 0x23, 0x38, 0x36, 0xE6, 0x27, 100);
+
+//  Name:     System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator
+//  Type:     Int32 -- VT_I4
+//  FormatID: 738BF284-1D87-420B-92CF-5834BF6EF9ED, 100
+//
+//  Numerator of PKEY_Photo_ExposureBias
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasNumerator, 0x738BF284, 0x1D87, 0x420B, 0x92, 0xCF, 0x58, 0x34, 0xBF, 0x6E, 0xF9, 0xED, 100);
+
+//  Name:     System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex
+//  Type:     Double -- VT_R8
+//  FormatID: 967B5AF8-995A-46ED-9E11-35B3C5B9782D, 100
+//
+//  PropertyTagExifExposureIndex.  Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndex, 0x967B5AF8, 0x995A, 0x46ED, 0x9E, 0x11, 0x35, 0xB3, 0xC5, 0xB9, 0x78, 0x2D, 100);
+
+//  Name:     System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 93112F89-C28B-492F-8A9D-4BE2062CEE8A, 100
+//
+//  Denominator of PKEY_Photo_ExposureIndex
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexDenominator, 0x93112F89, 0xC28B, 0x492F, 0x8A, 0x9D, 0x4B, 0xE2, 0x06, 0x2C, 0xEE, 0x8A, 100);
+
+//  Name:     System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89, 100
+//
+//  Numerator of PKEY_Photo_ExposureIndex
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexNumerator, 0xCDEDCF30, 0x8919, 0x44DF, 0x8F, 0x4C, 0x4E, 0xB2, 0xFF, 0xDB, 0x8D, 0x89, 100);
+
+//  Name:     System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34850 (PropertyTagExifExposureProg)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgram, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34850);
+
+// Possible discrete values for PKEY_Photo_ExposureProgram are:
+#define PHOTO_EXPOSUREPROGRAM_UNKNOWN       0ul
+#define PHOTO_EXPOSUREPROGRAM_MANUAL        1ul
+#define PHOTO_EXPOSUREPROGRAM_NORMAL        2ul
+#define PHOTO_EXPOSUREPROGRAM_APERTURE      3ul
+#define PHOTO_EXPOSUREPROGRAM_SHUTTER       4ul
+#define PHOTO_EXPOSUREPROGRAM_CREATIVE      5ul
+#define PHOTO_EXPOSUREPROGRAM_ACTION        6ul
+#define PHOTO_EXPOSUREPROGRAM_PORTRAIT      7ul
+#define PHOTO_EXPOSUREPROGRAM_LANDSCAPE     8ul
+
+//  Name:     System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: FEC690B7-5F30-4646-AE47-4CAAFBA884A3, 100
+//  
+//  This is the user-friendly form of System.Photo.ExposureProgram.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgramText, 0xFEC690B7, 0x5F30, 0x4646, 0xAE, 0x47, 0x4C, 0xAA, 0xFB, 0xA8, 0x84, 0xA3, 100);
+
+//  Name:     System.Photo.ExposureTime -- PKEY_Photo_ExposureTime
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33434
+//
+//  PropertyTagExifExposureTime.  Calculated from  PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTime, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33434);
+
+//  Name:     System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 55E98597-AD16-42E0-B624-21599A199838, 100
+//
+//  Denominator of PKEY_Photo_ExposureTime
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeDenominator, 0x55E98597, 0xAD16, 0x42E0, 0xB6, 0x24, 0x21, 0x59, 0x9A, 0x19, 0x98, 0x38, 100);
+
+//  Name:     System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 257E44E2-9031-4323-AC38-85C552871B2E, 100
+//
+//  Numerator of PKEY_Photo_ExposureTime
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeNumerator, 0x257E44E2, 0x9031, 0x4323, 0xAC, 0x38, 0x85, 0xC5, 0x52, 0x87, 0x1B, 0x2E, 100);
+
+//  Name:     System.Photo.Flash -- PKEY_Photo_Flash
+//  Type:     Byte -- VT_UI1
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37385
+//
+//  PropertyTagExifFlash
+DEFINE_PROPERTYKEY(PKEY_Photo_Flash, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37385);
+
+// Possible discrete values for PKEY_Photo_Flash are:
+#define PHOTO_FLASH_NONE                    0
+#define PHOTO_FLASH_FLASH                   1
+#define PHOTO_FLASH_WITHOUTSTROBE           5
+#define PHOTO_FLASH_WITHSTROBE              7
+
+//  Name:     System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 41483
+//
+//  PropertyTagExifFlashEnergy.  Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergy, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 41483);
+
+//  Name:     System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: D7B61C70-6323-49CD-A5FC-C84277162C97, 100
+//
+//  Denominator of PKEY_Photo_FlashEnergy
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyDenominator, 0xD7B61C70, 0x6323, 0x49CD, 0xA5, 0xFC, 0xC8, 0x42, 0x77, 0x16, 0x2C, 0x97, 100);
+
+//  Name:     System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC, 100
+//
+//  Numerator of PKEY_Photo_FlashEnergy
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyNumerator, 0xFCAD3D3D, 0x0858, 0x400F, 0xAA, 0xA3, 0x2F, 0x66, 0xCC, 0xE2, 0xA6, 0xBC, 100);
+
+//  Name:     System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: AABAF6C9-E0C5-4719-8585-57B103E584FE, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashManufacturer, 0xAABAF6C9, 0xE0C5, 0x4719, 0x85, 0x85, 0x57, 0xB1, 0x03, 0xE5, 0x84, 0xFE, 100);
+
+//  Name:     System.Photo.FlashModel -- PKEY_Photo_FlashModel
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: FE83BB35-4D1A-42E2-916B-06F3E1AF719E, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashModel, 0xFE83BB35, 0x4D1A, 0x42E2, 0x91, 0x6B, 0x06, 0xF3, 0xE1, 0xAF, 0x71, 0x9E, 100);
+
+//  Name:     System.Photo.FlashText -- PKEY_Photo_FlashText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6B8B68F6-200B-47EA-8D25-D8050F57339F, 100
+//  
+//  This is the user-friendly form of System.Photo.Flash.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashText, 0x6B8B68F6, 0x200B, 0x47EA, 0x8D, 0x25, 0xD8, 0x05, 0x0F, 0x57, 0x33, 0x9F, 100);
+
+//  Name:     System.Photo.FNumber -- PKEY_Photo_FNumber
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33437
+//
+//  PropertyTagExifFNumber.  Calculated from PKEY_Photo_FNumberNumerator and PKEY_Photo_FNumberDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_FNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33437);
+
+//  Name:     System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: E92A2496-223B-4463-A4E3-30EABBA79D80, 100
+//
+//  Denominator of PKEY_Photo_FNumber
+DEFINE_PROPERTYKEY(PKEY_Photo_FNumberDenominator, 0xE92A2496, 0x223B, 0x4463, 0xA4, 0xE3, 0x30, 0xEA, 0xBB, 0xA7, 0x9D, 0x80, 100);
+
+//  Name:     System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 1B97738A-FDFC-462F-9D93-1957E08BE90C, 100
+//
+//  Numerator of PKEY_Photo_FNumber
+DEFINE_PROPERTYKEY(PKEY_Photo_FNumberNumerator, 0x1B97738A, 0xFDFC, 0x462F, 0x9D, 0x93, 0x19, 0x57, 0xE0, 0x8B, 0xE9, 0x0C, 100);
+
+//  Name:     System.Photo.FocalLength -- PKEY_Photo_FocalLength
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37386
+//
+//  PropertyTagExifFocalLength.  Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLength, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37386);
+
+//  Name:     System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 305BC615-DCA1-44A5-9FD4-10C0BA79412E, 100
+//
+//  Denominator of PKEY_Photo_FocalLength
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthDenominator, 0x305BC615, 0xDCA1, 0x44A5, 0x9F, 0xD4, 0x10, 0xC0, 0xBA, 0x79, 0x41, 0x2E, 100);
+
+//  Name:     System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: A0E74609-B84D-4F49-B860-462BD9971F98, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthInFilm, 0xA0E74609, 0xB84D, 0x4F49, 0xB8, 0x60, 0x46, 0x2B, 0xD9, 0x97, 0x1F, 0x98, 100);
+
+//  Name:     System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A, 100
+//
+//  Numerator of PKEY_Photo_FocalLength
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthNumerator, 0x776B6B3B, 0x1E3D, 0x4B0C, 0x9A, 0x0E, 0x8F, 0xBA, 0xF2, 0xA8, 0x49, 0x2A, 100);
+
+//  Name:     System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution
+//  Type:     Double -- VT_R8
+//  FormatID: CFC08D97-C6F7-4484-89DD-EBEF4356FE76, 100
+//  
+//  PropertyTagExifFocalXRes.  Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and 
+//  PKEY_Photo_FocalPlaneXResolutionDenominator.
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolution, 0xCFC08D97, 0xC6F7, 0x4484, 0x89, 0xDD, 0xEB, 0xEF, 0x43, 0x56, 0xFE, 0x76, 100);
+
+//  Name:     System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 0933F3F5-4786-4F46-A8E8-D64DD37FA521, 100
+//
+//  Denominator of PKEY_Photo_FocalPlaneXResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionDenominator, 0x0933F3F5, 0x4786, 0x4F46, 0xA8, 0xE8, 0xD6, 0x4D, 0xD3, 0x7F, 0xA5, 0x21, 100);
+
+//  Name:     System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: DCCB10AF-B4E2-4B88-95F9-031B4D5AB490, 100
+//
+//  Numerator of PKEY_Photo_FocalPlaneXResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionNumerator, 0xDCCB10AF, 0xB4E2, 0x4B88, 0x95, 0xF9, 0x03, 0x1B, 0x4D, 0x5A, 0xB4, 0x90, 100);
+
+//  Name:     System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution
+//  Type:     Double -- VT_R8
+//  FormatID: 4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1, 100
+//  
+//  PropertyTagExifFocalYRes.  Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and 
+//  PKEY_Photo_FocalPlaneYResolutionDenominator.
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolution, 0x4FFFE4D0, 0x914F, 0x4AC4, 0x8D, 0x6F, 0xC9, 0xC6, 0x1D, 0xE1, 0x69, 0xB1, 100);
+
+//  Name:     System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 1D6179A6-A876-4031-B013-3347B2B64DC8, 100
+//
+//  Denominator of PKEY_Photo_FocalPlaneYResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionDenominator, 0x1D6179A6, 0xA876, 0x4031, 0xB0, 0x13, 0x33, 0x47, 0xB2, 0xB6, 0x4D, 0xC8, 100);
+
+//  Name:     System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: A2E541C5-4440-4BA8-867E-75CFC06828CD, 100
+//
+//  Numerator of PKEY_Photo_FocalPlaneYResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionNumerator, 0xA2E541C5, 0x4440, 0x4BA8, 0x86, 0x7E, 0x75, 0xCF, 0xC0, 0x68, 0x28, 0xCD, 100);
+
+//  Name:     System.Photo.GainControl -- PKEY_Photo_GainControl
+//  Type:     Double -- VT_R8
+//  FormatID: FA304789-00C7-4D80-904A-1E4DCC7265AA, 100 (PropertyTagExifGainControl)
+//  
+//  This indicates the degree of overall image gain adjustment.
+//  
+//  Calculated from PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator.
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControl, 0xFA304789, 0x00C7, 0x4D80, 0x90, 0x4A, 0x1E, 0x4D, 0xCC, 0x72, 0x65, 0xAA, 100);
+
+// Possible discrete values for PKEY_Photo_GainControl are:
+#define PHOTO_GAINCONTROL_NONE              0.0
+#define PHOTO_GAINCONTROL_LOWGAINUP         1.0
+#define PHOTO_GAINCONTROL_HIGHGAINUP        2.0
+#define PHOTO_GAINCONTROL_LOWGAINDOWN       3.0
+#define PHOTO_GAINCONTROL_HIGHGAINDOWN      4.0
+
+//  Name:     System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 42864DFD-9DA4-4F77-BDED-4AAD7B256735, 100
+//
+//  Denominator of PKEY_Photo_GainControl
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControlDenominator, 0x42864DFD, 0x9DA4, 0x4F77, 0xBD, 0xED, 0x4A, 0xAD, 0x7B, 0x25, 0x67, 0x35, 100);
+
+//  Name:     System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E, 100
+//
+//  Numerator of PKEY_Photo_GainControl
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControlNumerator, 0x8E8ECF7C, 0xB7B8, 0x4EB8, 0xA6, 0x3F, 0x0E, 0xE7, 0x15, 0xC9, 0x6F, 0x9E, 100);
+
+//  Name:     System.Photo.GainControlText -- PKEY_Photo_GainControlText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C06238B2-0BF9-4279-A723-25856715CB9D, 100
+//  
+//  This is the user-friendly form of System.Photo.GainControl.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControlText, 0xC06238B2, 0x0BF9, 0x4279, 0xA7, 0x23, 0x25, 0x85, 0x67, 0x15, 0xCB, 0x9D, 100);
+
+//  Name:     System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34855
+//
+//  PropertyTagExifISOSpeed
+DEFINE_PROPERTYKEY(PKEY_Photo_ISOSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34855);
+
+//  Name:     System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E6DDCAF7-29C5-4F0A-9A68-D19412EC7090, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_LensManufacturer, 0xE6DDCAF7, 0x29C5, 0x4F0A, 0x9A, 0x68, 0xD1, 0x94, 0x12, 0xEC, 0x70, 0x90, 100);
+
+//  Name:     System.Photo.LensModel -- PKEY_Photo_LensModel
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: E1277516-2B5F-4869-89B1-2E585BD38B7A, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_LensModel, 0xE1277516, 0x2B5F, 0x4869, 0x89, 0xB1, 0x2E, 0x58, 0x5B, 0xD3, 0x8B, 0x7A, 100);
+
+//  Name:     System.Photo.LightSource -- PKEY_Photo_LightSource
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37384
+//
+//  PropertyTagExifLightSource
+DEFINE_PROPERTYKEY(PKEY_Photo_LightSource, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37384);
+
+// Possible discrete values for PKEY_Photo_LightSource are:
+#define PHOTO_LIGHTSOURCE_UNKNOWN           0ul
+#define PHOTO_LIGHTSOURCE_DAYLIGHT          1ul
+#define PHOTO_LIGHTSOURCE_FLUORESCENT       2ul
+#define PHOTO_LIGHTSOURCE_TUNGSTEN          3ul
+#define PHOTO_LIGHTSOURCE_STANDARD_A        17ul
+#define PHOTO_LIGHTSOURCE_STANDARD_B        18ul
+#define PHOTO_LIGHTSOURCE_STANDARD_C        19ul
+#define PHOTO_LIGHTSOURCE_D55               20ul
+#define PHOTO_LIGHTSOURCE_D65               21ul
+#define PHOTO_LIGHTSOURCE_D75               22ul
+
+//  Name:     System.Photo.MakerNote -- PKEY_Photo_MakerNote
+//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
+//  FormatID: FA303353-B659-4052-85E9-BCAC79549B84, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_MakerNote, 0xFA303353, 0xB659, 0x4052, 0x85, 0xE9, 0xBC, 0xAC, 0x79, 0x54, 0x9B, 0x84, 100);
+
+//  Name:     System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset
+//  Type:     UInt64 -- VT_UI8
+//  FormatID: 813F4124-34E6-4D17-AB3E-6B1F3C2247A1, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_MakerNoteOffset, 0x813F4124, 0x34E6, 0x4D17, 0xAB, 0x3E, 0x6B, 0x1F, 0x3C, 0x22, 0x47, 0xA1, 100);
+
+//  Name:     System.Photo.MaxAperture -- PKEY_Photo_MaxAperture
+//  Type:     Double -- VT_R8
+//  FormatID: 08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E, 100
+//
+//  Calculated from PKEY_Photo_MaxApertureNumerator and PKEY_Photo_MaxApertureDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_MaxAperture, 0x08F6D7C2, 0xE3F2, 0x44FC, 0xAF, 0x1E, 0x5A, 0xA5, 0xC8, 0x1A, 0x2D, 0x3E, 100);
+
+//  Name:     System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: C77724D4-601F-46C5-9B89-C53F93BCEB77, 100
+//
+//  Denominator of PKEY_Photo_MaxAperture
+DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureDenominator, 0xC77724D4, 0x601F, 0x46C5, 0x9B, 0x89, 0xC5, 0x3F, 0x93, 0xBC, 0xEB, 0x77, 100);
+
+//  Name:     System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: C107E191-A459-44C5-9AE6-B952AD4B906D, 100
+//
+//  Numerator of PKEY_Photo_MaxAperture
+DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureNumerator, 0xC107E191, 0xA459, 0x44C5, 0x9A, 0xE6, 0xB9, 0x52, 0xAD, 0x4B, 0x90, 0x6D, 100);
+
+//  Name:     System.Photo.MeteringMode -- PKEY_Photo_MeteringMode
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37383
+//
+//  PropertyTagExifMeteringMode
+DEFINE_PROPERTYKEY(PKEY_Photo_MeteringMode, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37383);
+
+// Possible discrete values for PKEY_Photo_MeteringMode are:
+#define PHOTO_METERINGMODE_UNKNOWN          0u
+#define PHOTO_METERINGMODE_AVERAGE          1u
+#define PHOTO_METERINGMODE_CENTER           2u
+#define PHOTO_METERINGMODE_SPOT             3u
+#define PHOTO_METERINGMODE_MULTISPOT        4u
+#define PHOTO_METERINGMODE_PATTERN          5u
+#define PHOTO_METERINGMODE_PARTIAL          6u
+
+//  Name:     System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: F628FD8C-7BA8-465A-A65B-C5AA79263A9E, 100
+//  
+//  This is the user-friendly form of System.Photo.MeteringMode.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_MeteringModeText, 0xF628FD8C, 0x7BA8, 0x465A, 0xA6, 0x5B, 0xC5, 0xAA, 0x79, 0x26, 0x3A, 0x9E, 100);
+
+//  Name:     System.Photo.Orientation -- PKEY_Photo_Orientation
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 274 (PropertyTagOrientation)
+//  
+//  This is the image orientation viewed in terms of rows and columns.
+DEFINE_PROPERTYKEY(PKEY_Photo_Orientation, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 274);
+
+// Possible discrete values for PKEY_Photo_Orientation are:
+#define PHOTO_ORIENTATION_NORMAL            1u
+#define PHOTO_ORIENTATION_FLIPHORIZONTAL    2u
+#define PHOTO_ORIENTATION_ROTATE180         3u
+#define PHOTO_ORIENTATION_FLIPVERTICAL      4u
+#define PHOTO_ORIENTATION_TRANSPOSE         5u
+#define PHOTO_ORIENTATION_ROTATE270         6u
+#define PHOTO_ORIENTATION_TRANSVERSE        7u
+#define PHOTO_ORIENTATION_ROTATE90          8u
+
+//  Name:     System.Photo.OrientationText -- PKEY_Photo_OrientationText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A9EA193C-C511-498A-A06B-58E2776DCC28, 100
+//  
+//  This is the user-friendly form of System.Photo.Orientation.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_OrientationText, 0xA9EA193C, 0xC511, 0x498A, 0xA0, 0x6B, 0x58, 0xE2, 0x77, 0x6D, 0xCC, 0x28, 100);
+
+//  Name:     System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: 341796F1-1DF9-4B1C-A564-91BDEFA43877, 100
+//  
+//  This is the pixel composition. In JPEG compressed data, a JPEG marker is used 
+//  instead of this property.
+DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretation, 0x341796F1, 0x1DF9, 0x4B1C, 0xA5, 0x64, 0x91, 0xBD, 0xEF, 0xA4, 0x38, 0x77, 100);
+
+// Possible discrete values for PKEY_Photo_PhotometricInterpretation are:
+#define PHOTO_PHOTOMETRIC_RGB               2u
+#define PHOTO_PHOTOMETRIC_YCBCR             6u
+
+//  Name:     System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 821437D6-9EAB-4765-A589-3B1CBBD22A61, 100
+//  
+//  This is the user-friendly form of System.Photo.PhotometricInterpretation.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretationText, 0x821437D6, 0x9EAB, 0x4765, 0xA5, 0x89, 0x3B, 0x1C, 0xBB, 0xD2, 0x2A, 0x61, 100);
+
+//  Name:     System.Photo.ProgramMode -- PKEY_Photo_ProgramMode
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 6D217F6D-3F6A-4825-B470-5F03CA2FBE9B, 100
+//  
+//  This is the class of the program used by the camera to set exposure when the 
+//  picture is taken.
+DEFINE_PROPERTYKEY(PKEY_Photo_ProgramMode, 0x6D217F6D, 0x3F6A, 0x4825, 0xB4, 0x70, 0x5F, 0x03, 0xCA, 0x2F, 0xBE, 0x9B, 100);
+
+// Possible discrete values for PKEY_Photo_ProgramMode are:
+#define PHOTO_PROGRAMMODE_NOTDEFINED        0ul
+#define PHOTO_PROGRAMMODE_MANUAL            1ul
+#define PHOTO_PROGRAMMODE_NORMAL            2ul
+#define PHOTO_PROGRAMMODE_APERTURE          3ul
+#define PHOTO_PROGRAMMODE_SHUTTER           4ul
+#define PHOTO_PROGRAMMODE_CREATIVE          5ul
+#define PHOTO_PROGRAMMODE_ACTION            6ul
+#define PHOTO_PROGRAMMODE_PORTRAIT          7ul
+#define PHOTO_PROGRAMMODE_LANDSCAPE         8ul
+
+//  Name:     System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7FE3AA27-2648-42F3-89B0-454E5CB150C3, 100
+//  
+//  This is the user-friendly form of System.Photo.ProgramMode.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_ProgramModeText, 0x7FE3AA27, 0x2648, 0x42F3, 0x89, 0xB0, 0x45, 0x4E, 0x5C, 0xB1, 0x50, 0xC3, 100);
+
+//  Name:     System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 318A6B45-087F-4DC2-B8CC-05359551FC9E, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_RelatedSoundFile, 0x318A6B45, 0x087F, 0x4DC2, 0xB8, 0xCC, 0x05, 0x35, 0x95, 0x51, 0xFC, 0x9E, 100);
+
+//  Name:     System.Photo.Saturation -- PKEY_Photo_Saturation
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 49237325-A95A-4F67-B211-816B2D45D2E0, 100
+//  
+//  This indicates the direction of saturation processing applied by the camera when 
+//  the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_Saturation, 0x49237325, 0xA95A, 0x4F67, 0xB2, 0x11, 0x81, 0x6B, 0x2D, 0x45, 0xD2, 0xE0, 100);
+
+// Possible discrete values for PKEY_Photo_Saturation are:
+#define PHOTO_SATURATION_NORMAL             0ul
+#define PHOTO_SATURATION_LOW                1ul
+#define PHOTO_SATURATION_HIGH               2ul
+
+//  Name:     System.Photo.SaturationText -- PKEY_Photo_SaturationText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 61478C08-B600-4A84-BBE4-E99C45F0A072, 100
+//  
+//  This is the user-friendly form of System.Photo.Saturation.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_SaturationText, 0x61478C08, 0xB600, 0x4A84, 0xBB, 0xE4, 0xE9, 0x9C, 0x45, 0xF0, 0xA0, 0x72, 100);
+
+//  Name:     System.Photo.Sharpness -- PKEY_Photo_Sharpness
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: FC6976DB-8349-4970-AE97-B3C5316A08F0, 100
+//  
+//  This indicates the direction of sharpness processing applied by the camera when 
+//  the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_Sharpness, 0xFC6976DB, 0x8349, 0x4970, 0xAE, 0x97, 0xB3, 0xC5, 0x31, 0x6A, 0x08, 0xF0, 100);
+
+// Possible discrete values for PKEY_Photo_Sharpness are:
+#define PHOTO_SHARPNESS_NORMAL              0ul
+#define PHOTO_SHARPNESS_SOFT                1ul
+#define PHOTO_SHARPNESS_HARD                2ul
+
+//  Name:     System.Photo.SharpnessText -- PKEY_Photo_SharpnessText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 51EC3F47-DD50-421D-8769-334F50424B1E, 100
+//  
+//  This is the user-friendly form of System.Photo.Sharpness.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_SharpnessText, 0x51EC3F47, 0xDD50, 0x421D, 0x87, 0x69, 0x33, 0x4F, 0x50, 0x42, 0x4B, 0x1E, 100);
+
+//  Name:     System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37377
+//
+//  PropertyTagExifShutterSpeed.  Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37377);
+
+//  Name:     System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator
+//  Type:     Int32 -- VT_I4
+//  FormatID: E13D8975-81C7-4948-AE3F-37CAE11E8FF7, 100
+//
+//  Denominator of PKEY_Photo_ShutterSpeed
+DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedDenominator, 0xE13D8975, 0x81C7, 0x4948, 0xAE, 0x3F, 0x37, 0xCA, 0xE1, 0x1E, 0x8F, 0xF7, 100);
+
+//  Name:     System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator
+//  Type:     Int32 -- VT_I4
+//  FormatID: 16EA4042-D6F4-4BCA-8349-7C78D30FB333, 100
+//
+//  Numerator of PKEY_Photo_ShutterSpeed
+DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedNumerator, 0x16EA4042, 0xD6F4, 0x4BCA, 0x83, 0x49, 0x7C, 0x78, 0xD3, 0x0F, 0xB3, 0x33, 100);
+
+//  Name:     System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance
+//  Type:     Double -- VT_R8
+//  FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37382
+//
+//  PropertyTagExifSubjectDist.  Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistance, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37382);
+
+//  Name:     System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 0C840A88-B043-466D-9766-D4B26DA3FA77, 100
+//
+//  Denominator of PKEY_Photo_SubjectDistance
+DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceDenominator, 0x0C840A88, 0xB043, 0x466D, 0x97, 0x66, 0xD4, 0xB2, 0x6D, 0xA3, 0xFA, 0x77, 100);
+
+//  Name:     System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 8AF4961C-F526-43E5-AA81-DB768219178D, 100
+//
+//  Numerator of PKEY_Photo_SubjectDistance
+DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceNumerator, 0x8AF4961C, 0xF526, 0x43E5, 0xAA, 0x81, 0xDB, 0x76, 0x82, 0x19, 0x17, 0x8D, 100);
+
+//  Name:     System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 9A8EBB75-6458-4E82-BACB-35C0095B03BB, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_TranscodedForSync, 0x9A8EBB75, 0x6458, 0x4E82, 0xBA, 0xCB, 0x35, 0xC0, 0x09, 0x5B, 0x03, 0xBB, 100);
+
+//  Name:     System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9, 100
+//  
+//  This indicates the white balance mode set when the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalance, 0xEE3D3D8A, 0x5381, 0x4CFA, 0xB1, 0x3B, 0xAA, 0xF6, 0x6B, 0x5F, 0x4E, 0xC9, 100);
+
+// Possible discrete values for PKEY_Photo_WhiteBalance are:
+#define PHOTO_WHITEBALANCE_AUTO             0ul
+#define PHOTO_WHITEBALANCE_MANUAL           1ul
+
+//  Name:     System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6336B95E-C7A7-426D-86FD-7AE3D39C84B4, 100
+//  
+//  This is the user-friendly form of System.Photo.WhiteBalance.  Not intended to be parsed 
+//  programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalanceText, 0x6336B95E, 0xC7A7, 0x426D, 0x86, 0xFD, 0x7A, 0xE3, 0xD3, 0x9C, 0x84, 0xB4, 100);
+ 
+//-----------------------------------------------------------------------------
+// PropGroup properties
+
+//  Name:     System.PropGroup.Advanced -- PKEY_PropGroup_Advanced
+//  Type:     Null -- VT_NULL
+//  FormatID: 900A403B-097B-4B95-8AE2-071FDAEEB118, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Advanced, 0x900A403B, 0x097B, 0x4B95, 0x8A, 0xE2, 0x07, 0x1F, 0xDA, 0xEE, 0xB1, 0x18, 100);
+
+//  Name:     System.PropGroup.Audio -- PKEY_PropGroup_Audio
+//  Type:     Null -- VT_NULL
+//  FormatID: 2804D469-788F-48AA-8570-71B9C187E138, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Audio, 0x2804D469, 0x788F, 0x48AA, 0x85, 0x70, 0x71, 0xB9, 0xC1, 0x87, 0xE1, 0x38, 100);
+
+//  Name:     System.PropGroup.Calendar -- PKEY_PropGroup_Calendar
+//  Type:     Null -- VT_NULL
+//  FormatID: 9973D2B5-BFD8-438A-BA94-5349B293181A, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Calendar, 0x9973D2B5, 0xBFD8, 0x438A, 0xBA, 0x94, 0x53, 0x49, 0xB2, 0x93, 0x18, 0x1A, 100);
+
+//  Name:     System.PropGroup.Camera -- PKEY_PropGroup_Camera
+//  Type:     Null -- VT_NULL
+//  FormatID: DE00DE32-547E-4981-AD4B-542F2E9007D8, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Camera, 0xDE00DE32, 0x547E, 0x4981, 0xAD, 0x4B, 0x54, 0x2F, 0x2E, 0x90, 0x07, 0xD8, 100);
+
+//  Name:     System.PropGroup.Contact -- PKEY_PropGroup_Contact
+//  Type:     Null -- VT_NULL
+//  FormatID: DF975FD3-250A-4004-858F-34E29A3E37AA, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Contact, 0xDF975FD3, 0x250A, 0x4004, 0x85, 0x8F, 0x34, 0xE2, 0x9A, 0x3E, 0x37, 0xAA, 100);
+
+//  Name:     System.PropGroup.Content -- PKEY_PropGroup_Content
+//  Type:     Null -- VT_NULL
+//  FormatID: D0DAB0BA-368A-4050-A882-6C010FD19A4F, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Content, 0xD0DAB0BA, 0x368A, 0x4050, 0xA8, 0x82, 0x6C, 0x01, 0x0F, 0xD1, 0x9A, 0x4F, 100);
+
+//  Name:     System.PropGroup.Description -- PKEY_PropGroup_Description
+//  Type:     Null -- VT_NULL
+//  FormatID: 8969B275-9475-4E00-A887-FF93B8B41E44, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Description, 0x8969B275, 0x9475, 0x4E00, 0xA8, 0x87, 0xFF, 0x93, 0xB8, 0xB4, 0x1E, 0x44, 100);
+
+//  Name:     System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem
+//  Type:     Null -- VT_NULL
+//  FormatID: E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_FileSystem, 0xE3A7D2C1, 0x80FC, 0x4B40, 0x8F, 0x34, 0x30, 0xEA, 0x11, 0x1B, 0xDC, 0x2E, 100);
+
+//  Name:     System.PropGroup.General -- PKEY_PropGroup_General
+//  Type:     Null -- VT_NULL
+//  FormatID: CC301630-B192-4C22-B372-9F4C6D338E07, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_General, 0xCC301630, 0xB192, 0x4C22, 0xB3, 0x72, 0x9F, 0x4C, 0x6D, 0x33, 0x8E, 0x07, 100);
+
+//  Name:     System.PropGroup.GPS -- PKEY_PropGroup_GPS
+//  Type:     Null -- VT_NULL
+//  FormatID: F3713ADA-90E3-4E11-AAE5-FDC17685B9BE, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_GPS, 0xF3713ADA, 0x90E3, 0x4E11, 0xAA, 0xE5, 0xFD, 0xC1, 0x76, 0x85, 0xB9, 0xBE, 100);
+
+//  Name:     System.PropGroup.Image -- PKEY_PropGroup_Image
+//  Type:     Null -- VT_NULL
+//  FormatID: E3690A87-0FA8-4A2A-9A9F-FCE8827055AC, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Image, 0xE3690A87, 0x0FA8, 0x4A2A, 0x9A, 0x9F, 0xFC, 0xE8, 0x82, 0x70, 0x55, 0xAC, 100);
+
+//  Name:     System.PropGroup.Media -- PKEY_PropGroup_Media
+//  Type:     Null -- VT_NULL
+//  FormatID: 61872CF7-6B5E-4B4B-AC2D-59DA84459248, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Media, 0x61872CF7, 0x6B5E, 0x4B4B, 0xAC, 0x2D, 0x59, 0xDA, 0x84, 0x45, 0x92, 0x48, 100);
+
+//  Name:     System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced
+//  Type:     Null -- VT_NULL
+//  FormatID: 8859A284-DE7E-4642-99BA-D431D044B1EC, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_MediaAdvanced, 0x8859A284, 0xDE7E, 0x4642, 0x99, 0xBA, 0xD4, 0x31, 0xD0, 0x44, 0xB1, 0xEC, 100);
+
+//  Name:     System.PropGroup.Message -- PKEY_PropGroup_Message
+//  Type:     Null -- VT_NULL
+//  FormatID: 7FD7259D-16B4-4135-9F97-7C96ECD2FA9E, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Message, 0x7FD7259D, 0x16B4, 0x4135, 0x9F, 0x97, 0x7C, 0x96, 0xEC, 0xD2, 0xFA, 0x9E, 100);
+
+//  Name:     System.PropGroup.Music -- PKEY_PropGroup_Music
+//  Type:     Null -- VT_NULL
+//  FormatID: 68DD6094-7216-40F1-A029-43FE7127043F, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Music, 0x68DD6094, 0x7216, 0x40F1, 0xA0, 0x29, 0x43, 0xFE, 0x71, 0x27, 0x04, 0x3F, 100);
+
+//  Name:     System.PropGroup.Origin -- PKEY_PropGroup_Origin
+//  Type:     Null -- VT_NULL
+//  FormatID: 2598D2FB-5569-4367-95DF-5CD3A177E1A5, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Origin, 0x2598D2FB, 0x5569, 0x4367, 0x95, 0xDF, 0x5C, 0xD3, 0xA1, 0x77, 0xE1, 0xA5, 100);
+
+//  Name:     System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced
+//  Type:     Null -- VT_NULL
+//  FormatID: 0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_PhotoAdvanced, 0x0CB2BF5A, 0x9EE7, 0x4A86, 0x82, 0x22, 0xF0, 0x1E, 0x07, 0xFD, 0xAD, 0xAF, 100);
+
+//  Name:     System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV
+//  Type:     Null -- VT_NULL
+//  FormatID: E7B33238-6584-4170-A5C0-AC25EFD9DA56, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_RecordedTV, 0xE7B33238, 0x6584, 0x4170, 0xA5, 0xC0, 0xAC, 0x25, 0xEF, 0xD9, 0xDA, 0x56, 100);
+
+//  Name:     System.PropGroup.Video -- PKEY_PropGroup_Video
+//  Type:     Null -- VT_NULL
+//  FormatID: BEBE0920-7671-4C54-A3EB-49FDDFC191EE, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Video, 0xBEBE0920, 0x7671, 0x4C54, 0xA3, 0xEB, 0x49, 0xFD, 0xDF, 0xC1, 0x91, 0xEE, 100);
+ 
+//-----------------------------------------------------------------------------
+// PropList properties
+
+
+
+//  Name:     System.PropList.ConflictPrompt -- PKEY_PropList_ConflictPrompt
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 11
+//  
+//  The list of properties to show in the file operation conflict resolution dialog. Properties with empty 
+//  values will not be displayed. Register under the regvalue of "ConflictPrompt".
+DEFINE_PROPERTYKEY(PKEY_PropList_ConflictPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 11);
+
+//  Name:     System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 9
+//  
+//  The list of properties to show in the listview on extended tiles. Register under the regvalue of 
+//  "ExtendedTileInfo".
+DEFINE_PROPERTYKEY(PKEY_PropList_ExtendedTileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 9);
+
+//  Name:     System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 10
+//  
+//  The list of properties to show in the file operation confirmation dialog. Properties with empty values 
+//  will not be displayed. If this list is not specified, then the InfoTip property list is used instead. 
+//  Register under the regvalue of "FileOperationPrompt".
+DEFINE_PROPERTYKEY(PKEY_PropList_FileOperationPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 10);
+
+//  Name:     System.PropList.FullDetails -- PKEY_PropList_FullDetails
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 2
+//  
+//  The list of all the properties to show in the details page.  Property groups can be included in this list 
+//  in order to more easily organize the UI.  Register under the regvalue of "FullDetails".
+DEFINE_PROPERTYKEY(PKEY_PropList_FullDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 2);
+
+//  Name:     System.PropList.InfoTip -- PKEY_PropList_InfoTip
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 4 (PID_PROPLIST_INFOTIP)
+//  
+//  The list of properties to show in the infotip. Properties with empty values will not be displayed. Register 
+//  under the regvalue of "InfoTip".
+DEFINE_PROPERTYKEY(PKEY_PropList_InfoTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 4);
+
+//  Name:     System.PropList.NonPersonal -- PKEY_PropList_NonPersonal
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 49D1091F-082E-493F-B23F-D2308AA9668C, 100
+//  
+//  The list of properties that are considered 'non-personal'. When told to remove all non-personal properties 
+//  from a given file, the system will leave these particular properties untouched. Register under the regvalue 
+//  of "NonPersonal".
+DEFINE_PROPERTYKEY(PKEY_PropList_NonPersonal, 0x49D1091F, 0x082E, 0x493F, 0xB2, 0x3F, 0xD2, 0x30, 0x8A, 0xA9, 0x66, 0x8C, 100);
+
+//  Name:     System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 8
+//
+//  The list of properties to display in the preview pane.  Register under the regvalue of "PreviewDetails".
+DEFINE_PROPERTYKEY(PKEY_PropList_PreviewDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 8);
+
+//  Name:     System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 6
+//  
+//  The one or two properties to display in the preview pane title section.  The optional second property is 
+//  displayed as a subtitle.  Register under the regvalue of "PreviewTitle".
+DEFINE_PROPERTYKEY(PKEY_PropList_PreviewTitle, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 6);
+
+//  Name:     System.PropList.QuickTip -- PKEY_PropList_QuickTip
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 5 (PID_PROPLIST_QUICKTIP)
+//  
+//  The list of properties to show in the infotip when the item is on a slow network. Properties with empty 
+//  values will not be displayed. Register under the regvalue of "QuickTip".
+DEFINE_PROPERTYKEY(PKEY_PropList_QuickTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 5);
+
+//  Name:     System.PropList.TileInfo -- PKEY_PropList_TileInfo
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 3 (PID_PROPLIST_TILEINFO)
+//  
+//  The list of properties to show in the listview on tiles. Register under the regvalue of "TileInfo".
+DEFINE_PROPERTYKEY(PKEY_PropList_TileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 3);
+
+//  Name:     System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_WebView) F2275480-F782-4291-BD94-F13693513AEC, 0 (PID_DISPLAY_PROPERTIES)
+//
+//  The list of properties to display in the XP webview details panel. Obsolete.
+DEFINE_PROPERTYKEY(PKEY_PropList_XPDetailsPanel, 0xF2275480, 0xF782, 0x4291, 0xBD, 0x94, 0xF1, 0x36, 0x93, 0x51, 0x3A, 0xEC, 0);
+ 
+//-----------------------------------------------------------------------------
+// RecordedTV properties
+
+
+
+//  Name:     System.RecordedTV.ChannelNumber -- PKEY_RecordedTV_ChannelNumber
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 7
+//
+//  Example: 42
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_ChannelNumber, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 7);
+
+//  Name:     System.RecordedTV.Credits -- PKEY_RecordedTV_Credits
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 4
+//
+//  Example: "Don Messick/Frank Welker/Casey Kasem/Heather North/Nicole Jaffe;;;"
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_Credits, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 4);
+
+//  Name:     System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 15
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_DateContentExpires, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 15);
+
+//  Name:     System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 2
+//
+//  Example: "Nowhere to Hyde"
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_EpisodeName, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 2);
+
+//  Name:     System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 16
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsATSCContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 16);
+
+//  Name:     System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 12
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsClosedCaptioningAvailable, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 12);
+
+//  Name:     System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 17
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsDTVContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 17);
+
+//  Name:     System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 18
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsHDContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 18);
+
+//  Name:     System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 13
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsRepeatBroadcast, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 13);
+
+//  Name:     System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 14
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsSAP, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 14);
+
+//  Name:     System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 2C53C813-FB63-4E22-A1AB-0B331CA1E273, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_NetworkAffiliation, 0x2C53C813, 0xFB63, 0x4E22, 0xA1, 0xAB, 0x0B, 0x33, 0x1C, 0xA1, 0xE2, 0x73, 100);
+
+//  Name:     System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 4684FE97-8765-4842-9C13-F006447B178C, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_OriginalBroadcastDate, 0x4684FE97, 0x8765, 0x4842, 0x9C, 0x13, 0xF0, 0x06, 0x44, 0x7B, 0x17, 0x8C, 100);
+
+//  Name:     System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 3
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_ProgramDescription, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 3);
+
+//  Name:     System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: A5477F61-7A82-4ECA-9DDE-98B69B2479B3, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_RecordingTime, 0xA5477F61, 0x7A82, 0x4ECA, 0x9D, 0xDE, 0x98, 0xB6, 0x9B, 0x24, 0x79, 0xB3, 100);
+
+//  Name:     System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 5
+//
+//  Example: "TOONP"
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationCallSign, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 5);
+
+//  Name:     System.RecordedTV.StationName -- PKEY_RecordedTV_StationName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationName, 0x1B5439E7, 0xEBA1, 0x4AF8, 0xBD, 0xD7, 0x7A, 0xF1, 0xD4, 0x54, 0x94, 0x93, 100);
+ 
+//-----------------------------------------------------------------------------
+// Search properties
+
+
+
+//  Name:     System.Search.AutoSummary -- PKEY_Search_AutoSummary
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 2
+//
+//  General Summary of the document.
+DEFINE_PROPERTYKEY(PKEY_Search_AutoSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 2);
+
+//  Name:     System.Search.ContainerHash -- PKEY_Search_ContainerHash
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: BCEEE283-35DF-4D53-826A-F36A3EEFC6BE, 100
+//
+//  Hash code used to identify attachments to be deleted based on a common container url
+DEFINE_PROPERTYKEY(PKEY_Search_ContainerHash, 0xBCEEE283, 0x35DF, 0x4D53, 0x82, 0x6A, 0xF3, 0x6A, 0x3E, 0xEF, 0xC6, 0xBE, 100);
+
+//  Name:     System.Search.Contents -- PKEY_Search_Contents
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 19 (PID_STG_CONTENTS)
+//  
+//  The contents of the item. This property is for query restrictions only; it cannot be retrieved in a 
+//  query result. The Indexing Service friendly name is 'contents'.
+DEFINE_PROPERTYKEY(PKEY_Search_Contents, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 19);
+
+//  Name:     System.Search.EntryID -- PKEY_Search_EntryID
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 5 (PROPID_QUERY_WORKID)
+//  
+//  The entry ID for an item within a given catalog in the Windows Search Index.
+//  This value may be recycled, and therefore is not considered unique over time.
+DEFINE_PROPERTYKEY(PKEY_Search_EntryID, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 5);
+
+//  Name:     System.Search.GatherTime -- PKEY_Search_GatherTime
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 8
+//
+//  The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows Search Gatherer Plugins.
+DEFINE_PROPERTYKEY(PKEY_Search_GatherTime, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 8);
+
+//  Name:     System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 23
+//
+//  If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well.  For example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified time of that email.
+DEFINE_PROPERTYKEY(PKEY_Search_IsClosedDirectory, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);
+
+//  Name:     System.Search.IsFullyContained -- PKEY_Search_IsFullyContained
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 24
+//
+//  Any child URL of a URL which has System.Search.IsClosedDirectory=TRUE must emit System.Search.IsFullyContained=TRUE.  This ensures that the URL is not deleted at the end of a crawl because it hasn't been visited (which is the normal mechanism for detecting deletes).  For example an email attachment would emit this property
+DEFINE_PROPERTYKEY(PKEY_Search_IsFullyContained, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 24);
+
+//  Name:     System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 3
+//
+//  Query Focused Summary of the document.
+DEFINE_PROPERTYKEY(PKEY_Search_QueryFocusedSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 3);
+
+//  Name:     System.Search.Rank -- PKEY_Search_Rank
+//  Type:     Int32 -- VT_I4
+//  FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 3 (PROPID_QUERY_RANK)
+//  
+//  Relevance rank of row. Ranges from 0-1000. Larger numbers = better matches.  Query-time only, not 
+//  defined in Search schema, retrievable but not searchable.
+DEFINE_PROPERTYKEY(PKEY_Search_Rank, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 3);
+
+//  Name:     System.Search.Store -- PKEY_Search_Store
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: A06992B3-8CAF-4ED7-A547-B259E32AC9FC, 100
+//
+//  The identifier for the protocol handler that produced this item. (E.g. MAPI, CSC, FILE etc.)
+DEFINE_PROPERTYKEY(PKEY_Search_Store, 0xA06992B3, 0x8CAF, 0x4ED7, 0xA5, 0x47, 0xB2, 0x59, 0xE3, 0x2A, 0xC9, 0xFC, 100);
+
+//  Name:     System.Search.UrlToIndex -- PKEY_Search_UrlToIndex
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 2
+//
+//  This property should be emitted by a container IFilter for each child URL within the container.  The children will eventually be crawled by the indexer if they are within scope.
+DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndex, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 2);
+
+//  Name:     System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime
+//  Type:     Multivalue Any -- VT_VECTOR | VT_NULL  (For variants: VT_ARRAY | VT_NULL)
+//  FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 12
+//
+//  This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last modified.  This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for this information to determine if the content needs to be indexed again.  The property is a vector with two elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time.
+DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndexWithModificationTime, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 12);
+ 
+//-----------------------------------------------------------------------------
+// Shell properties
+
+
+
+//  Name:     System.DescriptionID -- PKEY_DescriptionID
+//  Type:     Buffer -- VT_VECTOR | VT_UI1  (For variants: VT_ARRAY | VT_UI1)
+//  FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 2 (PID_DESCRIPTIONID)
+//
+//  The contents of a SHDESCRIPTIONID structure as a buffer of bytes.
+DEFINE_PROPERTYKEY(PKEY_DescriptionID, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 2);
+
+//  Name:     System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 3
+//  
+//  Expresses the SFGAO flags of a link as string values and is used as a query optimization.  See 
+//  PKEY_Shell_SFGAOFlagsStrings for possible values of this.
+DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 3);
+
+//  Name:     System.Link.TargetUrl -- PKEY_Link_TargetUrl
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 2  (PKEYs relating to URLs.  Used by IE History.)
+DEFINE_PROPERTYKEY(PKEY_Link_TargetUrl, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 2);
+
+//  Name:     System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 2
+//
+//  Expresses the SFGAO flags as string values and is used as a query optimization.
+DEFINE_PROPERTYKEY(PKEY_Shell_SFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 2);
+
+// Possible discrete values for PKEY_Shell_SFGAOFlagsStrings are:
+#define SFGAOSTR_FILESYS                    L"filesys"               // SFGAO_FILESYSTEM
+#define SFGAOSTR_FILEANC                    L"fileanc"               // SFGAO_FILESYSANCESTOR
+#define SFGAOSTR_STORAGEANC                 L"storageanc"               // SFGAO_STORAGEANCESTOR
+#define SFGAOSTR_STREAM                     L"stream"               // SFGAO_STREAM
+#define SFGAOSTR_LINK                       L"link"               // SFGAO_LINK
+#define SFGAOSTR_HIDDEN                     L"hidden"               // SFGAO_HIDDEN
+#define SFGAOSTR_FOLDER                     L"folder"               // SFGAO_FOLDER
+#define SFGAOSTR_NONENUM                    L"nonenum"               // SFGAO_NONENUMERATED
+#define SFGAOSTR_BROWSABLE                  L"browsable"               // SFGAO_BROWSABLE
+ 
+//-----------------------------------------------------------------------------
+// Software properties
+
+
+
+//  Name:     System.Software.DateLastUsed -- PKEY_Software_DateLastUsed
+//  Type:     DateTime -- VT_FILETIME  (For variants: VT_DATE)
+//  FormatID: 841E4F90-FF59-4D16-8947-E81BBFFAB36D, 16
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Software_DateLastUsed, 0x841E4F90, 0xFF59, 0x4D16, 0x89, 0x47, 0xE8, 0x1B, 0xBF, 0xFA, 0xB3, 0x6D, 16);
+
+//  Name:     System.Software.ProductName -- PKEY_Software_ProductName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 7
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Software_ProductName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 7);
+ 
+//-----------------------------------------------------------------------------
+// Sync properties
+
+
+
+//  Name:     System.Sync.Comments -- PKEY_Sync_Comments
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 13
+DEFINE_PROPERTYKEY(PKEY_Sync_Comments, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 13);
+
+//  Name:     System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 4
+DEFINE_PROPERTYKEY(PKEY_Sync_ConflictDescription, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 4);
+
+//  Name:     System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 6
+DEFINE_PROPERTYKEY(PKEY_Sync_ConflictFirstLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 6);
+
+//  Name:     System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 7
+DEFINE_PROPERTYKEY(PKEY_Sync_ConflictSecondLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 7);
+
+//  Name:     System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID
+//  Type:     Guid -- VT_CLSID
+//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 2
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerCollectionID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 2);
+
+//  Name:     System.Sync.HandlerID -- PKEY_Sync_HandlerID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 3
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 3);
+
+//  Name:     System.Sync.HandlerName -- PKEY_Sync_HandlerName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 2
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 2);
+
+//  Name:     System.Sync.HandlerType -- PKEY_Sync_HandlerType
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 8
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerType, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 8);
+
+// Possible discrete values for PKEY_Sync_HandlerType are:
+#define SYNC_HANDLERTYPE_OTHER              0ul
+#define SYNC_HANDLERTYPE_PROGRAMS           1ul
+#define SYNC_HANDLERTYPE_DEVICES            2ul
+#define SYNC_HANDLERTYPE_FOLDERS            3ul
+#define SYNC_HANDLERTYPE_WEBSERVICES        4ul
+#define SYNC_HANDLERTYPE_COMPUTERS          5ul
+
+//  Name:     System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 9
+//  
+//  
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerTypeLabel, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 9);
+
+//  Name:     System.Sync.ItemID -- PKEY_Sync_ItemID
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 6
+DEFINE_PROPERTYKEY(PKEY_Sync_ItemID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 6);
+
+//  Name:     System.Sync.ItemName -- PKEY_Sync_ItemName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 3
+DEFINE_PROPERTYKEY(PKEY_Sync_ItemName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 3);
+ 
+//-----------------------------------------------------------------------------
+// Task properties
+
+//  Name:     System.Task.BillingInformation -- PKEY_Task_BillingInformation
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: D37D52C6-261C-4303-82B3-08B926AC6F12, 100
+DEFINE_PROPERTYKEY(PKEY_Task_BillingInformation, 0xD37D52C6, 0x261C, 0x4303, 0x82, 0xB3, 0x08, 0xB9, 0x26, 0xAC, 0x6F, 0x12, 100);
+
+//  Name:     System.Task.CompletionStatus -- PKEY_Task_CompletionStatus
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 084D8A0A-E6D5-40DE-BF1F-C8820E7C877C, 100
+DEFINE_PROPERTYKEY(PKEY_Task_CompletionStatus, 0x084D8A0A, 0xE6D5, 0x40DE, 0xBF, 0x1F, 0xC8, 0x82, 0x0E, 0x7C, 0x87, 0x7C, 100);
+
+//  Name:     System.Task.Owner -- PKEY_Task_Owner
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: 08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0, 100
+DEFINE_PROPERTYKEY(PKEY_Task_Owner, 0x08C7CC5F, 0x60F2, 0x4494, 0xAD, 0x75, 0x55, 0xE3, 0xE0, 0xB5, 0xAD, 0xD0, 100);
+
+ 
+ 
+//-----------------------------------------------------------------------------
+// Video properties
+
+//  Name:     System.Video.Compression -- PKEY_Video_Compression
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 10 (PIDVSI_COMPRESSION)
+//
+//  Indicates the level of compression for the video stream.  "Compression".
+DEFINE_PROPERTYKEY(PKEY_Video_Compression, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);
+
+//  Name:     System.Video.Director -- PKEY_Video_Director
+//  Type:     Multivalue String -- VT_VECTOR | VT_LPWSTR  (For variants: VT_ARRAY | VT_BSTR)
+//  FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 20 (PIDMSI_DIRECTOR)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Video_Director, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 20);
+
+//  Name:     System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 8 (PIDVSI_DATA_RATE)
+//
+//  Indicates the data rate in "bits per second" for the video stream. "DataRate".
+DEFINE_PROPERTYKEY(PKEY_Video_EncodingBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);
+
+//  Name:     System.Video.FourCC -- PKEY_Video_FourCC
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 44
+//  
+//  Indicates the 4CC for the video stream.
+DEFINE_PROPERTYKEY(PKEY_Video_FourCC, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 44);
+
+//  Name:     System.Video.FrameHeight -- PKEY_Video_FrameHeight
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 4
+//
+//  Indicates the frame height for the video stream.
+DEFINE_PROPERTYKEY(PKEY_Video_FrameHeight, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
+
+//  Name:     System.Video.FrameRate -- PKEY_Video_FrameRate
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 6 (PIDVSI_FRAME_RATE)
+//
+//  Indicates the frame rate in "frames per millisecond" for the video stream.  "FrameRate".
+DEFINE_PROPERTYKEY(PKEY_Video_FrameRate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
+
+//  Name:     System.Video.FrameWidth -- PKEY_Video_FrameWidth
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 3
+//
+//  Indicates the frame width for the video stream.
+DEFINE_PROPERTYKEY(PKEY_Video_FrameWidth, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
+
+//  Name:     System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 42
+//  
+//  Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY,
+//  like 16:9.
+DEFINE_PROPERTYKEY(PKEY_Video_HorizontalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 42);
+
+//  Name:     System.Video.SampleSize -- PKEY_Video_SampleSize
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 9 (PIDVSI_SAMPLE_SIZE)
+//
+//  Indicates the sample size in bits for the video stream.  "SampleSize".
+DEFINE_PROPERTYKEY(PKEY_Video_SampleSize, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
+
+//  Name:     System.Video.StreamName -- PKEY_Video_StreamName
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 2 (PIDVSI_STREAM_NAME)
+//
+//  Indicates the name for the video stream. "StreamName".
+DEFINE_PROPERTYKEY(PKEY_Video_StreamName, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);
+
+//  Name:     System.Video.StreamNumber -- PKEY_Video_StreamNumber
+//  Type:     UInt16 -- VT_UI2
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 11 (PIDVSI_STREAM_NUMBER)
+//
+//  "Stream Number".
+DEFINE_PROPERTYKEY(PKEY_Video_StreamNumber, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);
+
+//  Name:     System.Video.TotalBitrate -- PKEY_Video_TotalBitrate
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 43 (PIDVSI_TOTAL_BITRATE)
+//
+//  Indicates the total data rate in "bits per second" for all video and audio streams.
+DEFINE_PROPERTYKEY(PKEY_Video_TotalBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 43);
+
+//  Name:     System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio
+//  Type:     UInt32 -- VT_UI4
+//  FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 45
+//  
+//  Indicates the vertical portion of the aspect ratio. The Y portion of 
+//  XX:YY, like 16:9.
+DEFINE_PROPERTYKEY(PKEY_Video_VerticalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 45);
+
+ 
+ 
+//-----------------------------------------------------------------------------
+// Volume properties
+
+//  Name:     System.Volume.FileSystem -- PKEY_Volume_FileSystem
+//  Type:     String -- VT_LPWSTR  (For variants: VT_BSTR)
+//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 4 (PID_VOLUME_FILESYSTEM)  (Filesystem Volume Properties)
+//
+//  Indicates the filesystem of the volume.
+DEFINE_PROPERTYKEY(PKEY_Volume_FileSystem, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);
+
+//  Name:     System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: 149C0B69-2C2D-48FC-808F-D318D78C4636, 2
+DEFINE_PROPERTYKEY(PKEY_Volume_IsMappedDrive, 0x149C0B69, 0x2C2D, 0x48FC, 0x80, 0x8F, 0xD3, 0x18, 0xD7, 0x8C, 0x46, 0x36, 2);
+
+//  Name:     System.Volume.IsRoot -- PKEY_Volume_IsRoot
+//  Type:     Boolean -- VT_BOOL
+//  FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 10  (Filesystem Volume Properties)
+//
+//  
+DEFINE_PROPERTYKEY(PKEY_Volume_IsRoot, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 10);
+
+#endif  /* _INC_PROPKEY */
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/propkeydef.h b/portaudio/src/hostapi/wasapi/mingw-include/propkeydef.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/propkeydef.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/propkeydef.h
@@ -1,26 +1,26 @@
-#ifndef PID_FIRST_USABLE
-#define PID_FIRST_USABLE 2
-#endif
-
-#ifndef REFPROPERTYKEY
-#ifdef __cplusplus
-#define REFPROPERTYKEY const PROPERTYKEY &
-#else // !__cplusplus
-#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST
-#endif // __cplusplus
-#endif //REFPROPERTYKEY
-
-#ifdef DEFINE_PROPERTYKEY
-#undef DEFINE_PROPERTYKEY
-#endif
-
-#ifdef INITGUID
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
-#else
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
-#endif // INITGUID
-
-#ifndef IsEqualPropertyKey
-#define IsEqualPropertyKey(a, b)   (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid) )
-#endif  // IsEqualPropertyKey
-
+#ifndef PID_FIRST_USABLE
+#define PID_FIRST_USABLE 2
+#endif
+
+#ifndef REFPROPERTYKEY
+#ifdef __cplusplus
+#define REFPROPERTYKEY const PROPERTYKEY &
+#else // !__cplusplus
+#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST
+#endif // __cplusplus
+#endif //REFPROPERTYKEY
+
+#ifdef DEFINE_PROPERTYKEY
+#undef DEFINE_PROPERTYKEY
+#endif
+
+#ifdef INITGUID
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
+#else
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
+#endif // INITGUID
+
+#ifndef IsEqualPropertyKey
+#define IsEqualPropertyKey(a, b)   (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid) )
+#endif  // IsEqualPropertyKey
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/propsys.h b/portaudio/src/hostapi/wasapi/mingw-include/propsys.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/propsys.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/propsys.h
@@ -1,3605 +1,3605 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for propsys.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 475
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __propsys_h__
-#define __propsys_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IInitializeWithFile_FWD_DEFINED__
-#define __IInitializeWithFile_FWD_DEFINED__
-typedef interface IInitializeWithFile IInitializeWithFile;
-#endif 	/* __IInitializeWithFile_FWD_DEFINED__ */
-
-
-#ifndef __IInitializeWithStream_FWD_DEFINED__
-#define __IInitializeWithStream_FWD_DEFINED__
-typedef interface IInitializeWithStream IInitializeWithStream;
-#endif 	/* __IInitializeWithStream_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyStore_FWD_DEFINED__
-#define __IPropertyStore_FWD_DEFINED__
-typedef interface IPropertyStore IPropertyStore;
-#endif 	/* __IPropertyStore_FWD_DEFINED__ */
-
-
-#ifndef __INamedPropertyStore_FWD_DEFINED__
-#define __INamedPropertyStore_FWD_DEFINED__
-typedef interface INamedPropertyStore INamedPropertyStore;
-#endif 	/* __INamedPropertyStore_FWD_DEFINED__ */
-
-
-#ifndef __IObjectWithPropertyKey_FWD_DEFINED__
-#define __IObjectWithPropertyKey_FWD_DEFINED__
-typedef interface IObjectWithPropertyKey IObjectWithPropertyKey;
-#endif 	/* __IObjectWithPropertyKey_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyChange_FWD_DEFINED__
-#define __IPropertyChange_FWD_DEFINED__
-typedef interface IPropertyChange IPropertyChange;
-#endif 	/* __IPropertyChange_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyChangeArray_FWD_DEFINED__
-#define __IPropertyChangeArray_FWD_DEFINED__
-typedef interface IPropertyChangeArray IPropertyChangeArray;
-#endif 	/* __IPropertyChangeArray_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyStoreCapabilities_FWD_DEFINED__
-#define __IPropertyStoreCapabilities_FWD_DEFINED__
-typedef interface IPropertyStoreCapabilities IPropertyStoreCapabilities;
-#endif 	/* __IPropertyStoreCapabilities_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyStoreCache_FWD_DEFINED__
-#define __IPropertyStoreCache_FWD_DEFINED__
-typedef interface IPropertyStoreCache IPropertyStoreCache;
-#endif 	/* __IPropertyStoreCache_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyEnumType_FWD_DEFINED__
-#define __IPropertyEnumType_FWD_DEFINED__
-typedef interface IPropertyEnumType IPropertyEnumType;
-#endif 	/* __IPropertyEnumType_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyEnumTypeList_FWD_DEFINED__
-#define __IPropertyEnumTypeList_FWD_DEFINED__
-typedef interface IPropertyEnumTypeList IPropertyEnumTypeList;
-#endif 	/* __IPropertyEnumTypeList_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyDescription_FWD_DEFINED__
-#define __IPropertyDescription_FWD_DEFINED__
-typedef interface IPropertyDescription IPropertyDescription;
-#endif 	/* __IPropertyDescription_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyDescriptionAliasInfo_FWD_DEFINED__
-#define __IPropertyDescriptionAliasInfo_FWD_DEFINED__
-typedef interface IPropertyDescriptionAliasInfo IPropertyDescriptionAliasInfo;
-#endif 	/* __IPropertyDescriptionAliasInfo_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyDescriptionSearchInfo_FWD_DEFINED__
-#define __IPropertyDescriptionSearchInfo_FWD_DEFINED__
-typedef interface IPropertyDescriptionSearchInfo IPropertyDescriptionSearchInfo;
-#endif 	/* __IPropertyDescriptionSearchInfo_FWD_DEFINED__ */
-
-
-#ifndef __IPropertySystem_FWD_DEFINED__
-#define __IPropertySystem_FWD_DEFINED__
-typedef interface IPropertySystem IPropertySystem;
-#endif 	/* __IPropertySystem_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyDescriptionList_FWD_DEFINED__
-#define __IPropertyDescriptionList_FWD_DEFINED__
-typedef interface IPropertyDescriptionList IPropertyDescriptionList;
-#endif 	/* __IPropertyDescriptionList_FWD_DEFINED__ */
-
-
-#ifndef __IPropertyStoreFactory_FWD_DEFINED__
-#define __IPropertyStoreFactory_FWD_DEFINED__
-typedef interface IPropertyStoreFactory IPropertyStoreFactory;
-#endif 	/* __IPropertyStoreFactory_FWD_DEFINED__ */
-
-
-#ifndef __IDelayedPropertyStoreFactory_FWD_DEFINED__
-#define __IDelayedPropertyStoreFactory_FWD_DEFINED__
-typedef interface IDelayedPropertyStoreFactory IDelayedPropertyStoreFactory;
-#endif 	/* __IDelayedPropertyStoreFactory_FWD_DEFINED__ */
-
-
-#ifndef __IPersistSerializedPropStorage_FWD_DEFINED__
-#define __IPersistSerializedPropStorage_FWD_DEFINED__
-typedef interface IPersistSerializedPropStorage IPersistSerializedPropStorage;
-#endif 	/* __IPersistSerializedPropStorage_FWD_DEFINED__ */
-
-
-#ifndef __IPropertySystemChangeNotify_FWD_DEFINED__
-#define __IPropertySystemChangeNotify_FWD_DEFINED__
-typedef interface IPropertySystemChangeNotify IPropertySystemChangeNotify;
-#endif 	/* __IPropertySystemChangeNotify_FWD_DEFINED__ */
-
-
-#ifndef __ICreateObject_FWD_DEFINED__
-#define __ICreateObject_FWD_DEFINED__
-typedef interface ICreateObject ICreateObject;
-#endif 	/* __ICreateObject_FWD_DEFINED__ */
-
-
-#ifndef __InMemoryPropertyStore_FWD_DEFINED__
-#define __InMemoryPropertyStore_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class InMemoryPropertyStore InMemoryPropertyStore;
-#else
-typedef struct InMemoryPropertyStore InMemoryPropertyStore;
-#endif /* __cplusplus */
-
-#endif 	/* __InMemoryPropertyStore_FWD_DEFINED__ */
-
-
-#ifndef __PropertySystem_FWD_DEFINED__
-#define __PropertySystem_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class PropertySystem PropertySystem;
-#else
-typedef struct PropertySystem PropertySystem;
-#endif /* __cplusplus */
-
-#endif 	/* __PropertySystem_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "objidl.h"
-#include "oleidl.h"
-#include "ocidl.h"
-#include "shtypes.h"
-#include "structuredquery.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_propsys_0000_0000 */
-/* [local] */ 
-
-#ifndef PSSTDAPI
-#if defined(_PROPSYS_)
-#define PSSTDAPI          STDAPI
-#define PSSTDAPI_(type)   STDAPI_(type)
-#else
-#define PSSTDAPI          EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
-#define PSSTDAPI_(type)   EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
-#endif
-#endif // PSSTDAPI
-#if 0
-typedef PROPERTYKEY *REFPROPERTYKEY;
-
-#endif // 0
-#include <propkeydef.h>
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IInitializeWithFile_INTERFACE_DEFINED__
-#define __IInitializeWithFile_INTERFACE_DEFINED__
-
-/* interface IInitializeWithFile */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IInitializeWithFile;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("b7d14566-0509-4cce-a71f-0a554233bd9b")
-    IInitializeWithFile : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Initialize( 
-            /* [string][in] */ __RPC__in LPCWSTR pszFilePath,
-            /* [in] */ DWORD grfMode) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IInitializeWithFileVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IInitializeWithFile * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IInitializeWithFile * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IInitializeWithFile * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Initialize )( 
-            IInitializeWithFile * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszFilePath,
-            /* [in] */ DWORD grfMode);
-        
-        END_INTERFACE
-    } IInitializeWithFileVtbl;
-
-    interface IInitializeWithFile
-    {
-        CONST_VTBL struct IInitializeWithFileVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IInitializeWithFile_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IInitializeWithFile_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IInitializeWithFile_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IInitializeWithFile_Initialize(This,pszFilePath,grfMode)	\
-    ( (This)->lpVtbl -> Initialize(This,pszFilePath,grfMode) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IInitializeWithFile_INTERFACE_DEFINED__ */
-
-
-#ifndef __IInitializeWithStream_INTERFACE_DEFINED__
-#define __IInitializeWithStream_INTERFACE_DEFINED__
-
-/* interface IInitializeWithStream */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IInitializeWithStream;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("b824b49d-22ac-4161-ac8a-9916e8fa3f7f")
-    IInitializeWithStream : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Initialize( 
-            /* [in] */ IStream *pstream,
-            /* [in] */ DWORD grfMode) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IInitializeWithStreamVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IInitializeWithStream * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IInitializeWithStream * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IInitializeWithStream * This);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Initialize )( 
-            IInitializeWithStream * This,
-            /* [in] */ IStream *pstream,
-            /* [in] */ DWORD grfMode);
-        
-        END_INTERFACE
-    } IInitializeWithStreamVtbl;
-
-    interface IInitializeWithStream
-    {
-        CONST_VTBL struct IInitializeWithStreamVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IInitializeWithStream_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IInitializeWithStream_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IInitializeWithStream_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IInitializeWithStream_Initialize(This,pstream,grfMode)	\
-    ( (This)->lpVtbl -> Initialize(This,pstream,grfMode) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_RemoteInitialize_Proxy( 
-    IInitializeWithStream * This,
-    /* [in] */ __RPC__in_opt IStream *pstream,
-    /* [in] */ DWORD grfMode);
-
-
-void __RPC_STUB IInitializeWithStream_RemoteInitialize_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-
-#endif 	/* __IInitializeWithStream_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyStore_INTERFACE_DEFINED__
-#define __IPropertyStore_INTERFACE_DEFINED__
-
-/* interface IPropertyStore */
-/* [unique][object][helpstring][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyStore;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")
-    IPropertyStore : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetCount( 
-            /* [out] */ __RPC__out DWORD *cProps) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAt( 
-            /* [in] */ DWORD iProp,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetValue( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PROPVARIANT *pv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetValue( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyStoreVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyStore * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyStore * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyStore * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IPropertyStore * This,
-            /* [out] */ __RPC__out DWORD *cProps);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
-            IPropertyStore * This,
-            /* [in] */ DWORD iProp,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
-            IPropertyStore * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PROPVARIANT *pv);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetValue )( 
-            IPropertyStore * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *Commit )( 
-            IPropertyStore * This);
-        
-        END_INTERFACE
-    } IPropertyStoreVtbl;
-
-    interface IPropertyStore
-    {
-        CONST_VTBL struct IPropertyStoreVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyStore_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyStore_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyStore_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyStore_GetCount(This,cProps)	\
-    ( (This)->lpVtbl -> GetCount(This,cProps) ) 
-
-#define IPropertyStore_GetAt(This,iProp,pkey)	\
-    ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) 
-
-#define IPropertyStore_GetValue(This,key,pv)	\
-    ( (This)->lpVtbl -> GetValue(This,key,pv) ) 
-
-#define IPropertyStore_SetValue(This,key,propvar)	\
-    ( (This)->lpVtbl -> SetValue(This,key,propvar) ) 
-
-#define IPropertyStore_Commit(This)	\
-    ( (This)->lpVtbl -> Commit(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyStore_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propsys_0000_0003 */
-/* [local] */ 
-
-typedef /* [unique] */  __RPC_unique_pointer IPropertyStore *LPPROPERTYSTORE;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_s_ifspec;
-
-#ifndef __INamedPropertyStore_INTERFACE_DEFINED__
-#define __INamedPropertyStore_INTERFACE_DEFINED__
-
-/* interface INamedPropertyStore */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_INamedPropertyStore;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("71604b0f-97b0-4764-8577-2f13e98a1422")
-    INamedPropertyStore : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetNamedValue( 
-            /* [string][in] */ __RPC__in LPCWSTR pszName,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetNamedValue( 
-            /* [string][in] */ __RPC__in LPCWSTR pszName,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetNameCount( 
-            /* [out] */ __RPC__out DWORD *pdwCount) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetNameAt( 
-            /* [in] */ DWORD iProp,
-            /* [out] */ __RPC__deref_out_opt BSTR *pbstrName) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct INamedPropertyStoreVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            INamedPropertyStore * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            INamedPropertyStore * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            INamedPropertyStore * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetNamedValue )( 
-            INamedPropertyStore * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszName,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetNamedValue )( 
-            INamedPropertyStore * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszName,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetNameCount )( 
-            INamedPropertyStore * This,
-            /* [out] */ __RPC__out DWORD *pdwCount);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetNameAt )( 
-            INamedPropertyStore * This,
-            /* [in] */ DWORD iProp,
-            /* [out] */ __RPC__deref_out_opt BSTR *pbstrName);
-        
-        END_INTERFACE
-    } INamedPropertyStoreVtbl;
-
-    interface INamedPropertyStore
-    {
-        CONST_VTBL struct INamedPropertyStoreVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define INamedPropertyStore_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define INamedPropertyStore_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define INamedPropertyStore_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define INamedPropertyStore_GetNamedValue(This,pszName,ppropvar)	\
-    ( (This)->lpVtbl -> GetNamedValue(This,pszName,ppropvar) ) 
-
-#define INamedPropertyStore_SetNamedValue(This,pszName,propvar)	\
-    ( (This)->lpVtbl -> SetNamedValue(This,pszName,propvar) ) 
-
-#define INamedPropertyStore_GetNameCount(This,pdwCount)	\
-    ( (This)->lpVtbl -> GetNameCount(This,pdwCount) ) 
-
-#define INamedPropertyStore_GetNameAt(This,iProp,pbstrName)	\
-    ( (This)->lpVtbl -> GetNameAt(This,iProp,pbstrName) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __INamedPropertyStore_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propsys_0000_0004 */
-/* [local] */ 
-
-/* [v1_enum] */ 
-enum tagGETPROPERTYSTOREFLAGS
-    {	GPS_DEFAULT	= 0,
-	GPS_HANDLERPROPERTIESONLY	= 0x1,
-	GPS_READWRITE	= 0x2,
-	GPS_TEMPORARY	= 0x4,
-	GPS_FASTPROPERTIESONLY	= 0x8,
-	GPS_OPENSLOWITEM	= 0x10,
-	GPS_DELAYCREATION	= 0x20,
-	GPS_BESTEFFORT	= 0x40,
-	GPS_MASK_VALID	= 0x7f
-    } ;
-typedef int GETPROPERTYSTOREFLAGS;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_s_ifspec;
-
-#ifndef __IObjectWithPropertyKey_INTERFACE_DEFINED__
-#define __IObjectWithPropertyKey_INTERFACE_DEFINED__
-
-/* interface IObjectWithPropertyKey */
-/* [uuid][object] */ 
-
-
-EXTERN_C const IID IID_IObjectWithPropertyKey;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("fc0ca0a7-c316-4fd2-9031-3e628e6d4f23")
-    IObjectWithPropertyKey : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SetPropertyKey( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( 
-            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IObjectWithPropertyKeyVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IObjectWithPropertyKey * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IObjectWithPropertyKey * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IObjectWithPropertyKey * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( 
-            IObjectWithPropertyKey * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
-            IObjectWithPropertyKey * This,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        END_INTERFACE
-    } IObjectWithPropertyKeyVtbl;
-
-    interface IObjectWithPropertyKey
-    {
-        CONST_VTBL struct IObjectWithPropertyKeyVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IObjectWithPropertyKey_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IObjectWithPropertyKey_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IObjectWithPropertyKey_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IObjectWithPropertyKey_SetPropertyKey(This,key)	\
-    ( (This)->lpVtbl -> SetPropertyKey(This,key) ) 
-
-#define IObjectWithPropertyKey_GetPropertyKey(This,pkey)	\
-    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IObjectWithPropertyKey_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propsys_0000_0005 */
-/* [local] */ 
-
-typedef /* [v1_enum] */ 
-enum tagPKA_FLAGS
-    {	PKA_SET	= 0,
-	PKA_APPEND	= ( PKA_SET + 1 ) ,
-	PKA_DELETE	= ( PKA_APPEND + 1 ) 
-    } 	PKA_FLAGS;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_s_ifspec;
-
-#ifndef __IPropertyChange_INTERFACE_DEFINED__
-#define __IPropertyChange_INTERFACE_DEFINED__
-
-/* interface IPropertyChange */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyChange;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("f917bc8a-1bba-4478-a245-1bde03eb9431")
-    IPropertyChange : public IObjectWithPropertyKey
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE ApplyToPropVariant( 
-            /* [in] */ __RPC__in REFPROPVARIANT propvarIn,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarOut) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyChangeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyChange * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyChange * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyChange * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( 
-            IPropertyChange * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
-            IPropertyChange * This,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        HRESULT ( STDMETHODCALLTYPE *ApplyToPropVariant )( 
-            IPropertyChange * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvarIn,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarOut);
-        
-        END_INTERFACE
-    } IPropertyChangeVtbl;
-
-    interface IPropertyChange
-    {
-        CONST_VTBL struct IPropertyChangeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyChange_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyChange_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyChange_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyChange_SetPropertyKey(This,key)	\
-    ( (This)->lpVtbl -> SetPropertyKey(This,key) ) 
-
-#define IPropertyChange_GetPropertyKey(This,pkey)	\
-    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
-
-
-#define IPropertyChange_ApplyToPropVariant(This,propvarIn,ppropvarOut)	\
-    ( (This)->lpVtbl -> ApplyToPropVariant(This,propvarIn,ppropvarOut) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyChange_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyChangeArray_INTERFACE_DEFINED__
-#define __IPropertyChangeArray_INTERFACE_DEFINED__
-
-/* interface IPropertyChangeArray */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyChangeArray;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("380f5cad-1b5e-42f2-805d-637fd392d31e")
-    IPropertyChangeArray : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetCount( 
-            /* [out] */ __RPC__out UINT *pcOperations) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAt( 
-            /* [in] */ UINT iIndex,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE InsertAt( 
-            /* [in] */ UINT iIndex,
-            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Append( 
-            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE AppendOrReplace( 
-            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RemoveAt( 
-            /* [in] */ UINT iIndex) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsKeyInArray( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyChangeArrayVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyChangeArray * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyChangeArray * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyChangeArray * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IPropertyChangeArray * This,
-            /* [out] */ __RPC__out UINT *pcOperations);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
-            IPropertyChangeArray * This,
-            /* [in] */ UINT iIndex,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *InsertAt )( 
-            IPropertyChangeArray * This,
-            /* [in] */ UINT iIndex,
-            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
-        
-        HRESULT ( STDMETHODCALLTYPE *Append )( 
-            IPropertyChangeArray * This,
-            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
-        
-        HRESULT ( STDMETHODCALLTYPE *AppendOrReplace )( 
-            IPropertyChangeArray * This,
-            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
-        
-        HRESULT ( STDMETHODCALLTYPE *RemoveAt )( 
-            IPropertyChangeArray * This,
-            /* [in] */ UINT iIndex);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsKeyInArray )( 
-            IPropertyChangeArray * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key);
-        
-        END_INTERFACE
-    } IPropertyChangeArrayVtbl;
-
-    interface IPropertyChangeArray
-    {
-        CONST_VTBL struct IPropertyChangeArrayVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyChangeArray_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyChangeArray_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyChangeArray_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyChangeArray_GetCount(This,pcOperations)	\
-    ( (This)->lpVtbl -> GetCount(This,pcOperations) ) 
-
-#define IPropertyChangeArray_GetAt(This,iIndex,riid,ppv)	\
-    ( (This)->lpVtbl -> GetAt(This,iIndex,riid,ppv) ) 
-
-#define IPropertyChangeArray_InsertAt(This,iIndex,ppropChange)	\
-    ( (This)->lpVtbl -> InsertAt(This,iIndex,ppropChange) ) 
-
-#define IPropertyChangeArray_Append(This,ppropChange)	\
-    ( (This)->lpVtbl -> Append(This,ppropChange) ) 
-
-#define IPropertyChangeArray_AppendOrReplace(This,ppropChange)	\
-    ( (This)->lpVtbl -> AppendOrReplace(This,ppropChange) ) 
-
-#define IPropertyChangeArray_RemoveAt(This,iIndex)	\
-    ( (This)->lpVtbl -> RemoveAt(This,iIndex) ) 
-
-#define IPropertyChangeArray_IsKeyInArray(This,key)	\
-    ( (This)->lpVtbl -> IsKeyInArray(This,key) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyChangeArray_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyStoreCapabilities_INTERFACE_DEFINED__
-#define __IPropertyStoreCapabilities_INTERFACE_DEFINED__
-
-/* interface IPropertyStoreCapabilities */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyStoreCapabilities;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("c8e2d566-186e-4d49-bf41-6909ead56acc")
-    IPropertyStoreCapabilities : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyStoreCapabilitiesVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyStoreCapabilities * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyStoreCapabilities * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyStoreCapabilities * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsPropertyWritable )( 
-            IPropertyStoreCapabilities * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key);
-        
-        END_INTERFACE
-    } IPropertyStoreCapabilitiesVtbl;
-
-    interface IPropertyStoreCapabilities
-    {
-        CONST_VTBL struct IPropertyStoreCapabilitiesVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyStoreCapabilities_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyStoreCapabilities_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyStoreCapabilities_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyStoreCapabilities_IsPropertyWritable(This,key)	\
-    ( (This)->lpVtbl -> IsPropertyWritable(This,key) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyStoreCapabilities_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyStoreCache_INTERFACE_DEFINED__
-#define __IPropertyStoreCache_INTERFACE_DEFINED__
-
-/* interface IPropertyStoreCache */
-/* [unique][object][uuid] */ 
-
-typedef /* [v1_enum] */ 
-enum _PSC_STATE
-    {	PSC_NORMAL	= 0,
-	PSC_NOTINSOURCE	= 1,
-	PSC_DIRTY	= 2,
-	PSC_READONLY	= 3
-    } 	PSC_STATE;
-
-
-EXTERN_C const IID IID_IPropertyStoreCache;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("3017056d-9a91-4e90-937d-746c72abbf4f")
-    IPropertyStoreCache : public IPropertyStore
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetState( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PSC_STATE *pstate) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetValueAndState( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvar,
-            /* [out] */ __RPC__out PSC_STATE *pstate) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetState( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ PSC_STATE state) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetValueAndState( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,
-            /* [in] */ PSC_STATE state) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyStoreCacheVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyStoreCache * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyStoreCache * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IPropertyStoreCache * This,
-            /* [out] */ __RPC__out DWORD *cProps);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
-            IPropertyStoreCache * This,
-            /* [in] */ DWORD iProp,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PROPVARIANT *pv);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetValue )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *Commit )( 
-            IPropertyStoreCache * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetState )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PSC_STATE *pstate);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValueAndState )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvar,
-            /* [out] */ __RPC__out PSC_STATE *pstate);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetState )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ PSC_STATE state);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetValueAndState )( 
-            IPropertyStoreCache * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,
-            /* [in] */ PSC_STATE state);
-        
-        END_INTERFACE
-    } IPropertyStoreCacheVtbl;
-
-    interface IPropertyStoreCache
-    {
-        CONST_VTBL struct IPropertyStoreCacheVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyStoreCache_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyStoreCache_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyStoreCache_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyStoreCache_GetCount(This,cProps)	\
-    ( (This)->lpVtbl -> GetCount(This,cProps) ) 
-
-#define IPropertyStoreCache_GetAt(This,iProp,pkey)	\
-    ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) 
-
-#define IPropertyStoreCache_GetValue(This,key,pv)	\
-    ( (This)->lpVtbl -> GetValue(This,key,pv) ) 
-
-#define IPropertyStoreCache_SetValue(This,key,propvar)	\
-    ( (This)->lpVtbl -> SetValue(This,key,propvar) ) 
-
-#define IPropertyStoreCache_Commit(This)	\
-    ( (This)->lpVtbl -> Commit(This) ) 
-
-
-#define IPropertyStoreCache_GetState(This,key,pstate)	\
-    ( (This)->lpVtbl -> GetState(This,key,pstate) ) 
-
-#define IPropertyStoreCache_GetValueAndState(This,key,ppropvar,pstate)	\
-    ( (This)->lpVtbl -> GetValueAndState(This,key,ppropvar,pstate) ) 
-
-#define IPropertyStoreCache_SetState(This,key,state)	\
-    ( (This)->lpVtbl -> SetState(This,key,state) ) 
-
-#define IPropertyStoreCache_SetValueAndState(This,key,ppropvar,state)	\
-    ( (This)->lpVtbl -> SetValueAndState(This,key,ppropvar,state) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyStoreCache_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyEnumType_INTERFACE_DEFINED__
-#define __IPropertyEnumType_INTERFACE_DEFINED__
-
-/* interface IPropertyEnumType */
-/* [unique][object][uuid] */ 
-
-/* [v1_enum] */ 
-enum tagPROPENUMTYPE
-    {	PET_DISCRETEVALUE	= 0,
-	PET_RANGEDVALUE	= 1,
-	PET_DEFAULTVALUE	= 2,
-	PET_ENDRANGE	= 3
-    } ;
-typedef enum tagPROPENUMTYPE PROPENUMTYPE;
-
-
-EXTERN_C const IID IID_IPropertyEnumType;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("11e1fbf9-2d56-4a6b-8db3-7cd193a471f2")
-    IPropertyEnumType : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetEnumType( 
-            /* [out] */ __RPC__out PROPENUMTYPE *penumtype) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetValue( 
-            /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetRangeMinValue( 
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarMin) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetRangeSetValue( 
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarSet) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayText( 
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyEnumTypeVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyEnumType * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyEnumType * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyEnumType * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEnumType )( 
-            IPropertyEnumType * This,
-            /* [out] */ __RPC__out PROPENUMTYPE *penumtype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
-            IPropertyEnumType * This,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRangeMinValue )( 
-            IPropertyEnumType * This,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarMin);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRangeSetValue )( 
-            IPropertyEnumType * This,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarSet);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayText )( 
-            IPropertyEnumType * This,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay);
-        
-        END_INTERFACE
-    } IPropertyEnumTypeVtbl;
-
-    interface IPropertyEnumType
-    {
-        CONST_VTBL struct IPropertyEnumTypeVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyEnumType_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyEnumType_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyEnumType_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyEnumType_GetEnumType(This,penumtype)	\
-    ( (This)->lpVtbl -> GetEnumType(This,penumtype) ) 
-
-#define IPropertyEnumType_GetValue(This,ppropvar)	\
-    ( (This)->lpVtbl -> GetValue(This,ppropvar) ) 
-
-#define IPropertyEnumType_GetRangeMinValue(This,ppropvarMin)	\
-    ( (This)->lpVtbl -> GetRangeMinValue(This,ppropvarMin) ) 
-
-#define IPropertyEnumType_GetRangeSetValue(This,ppropvarSet)	\
-    ( (This)->lpVtbl -> GetRangeSetValue(This,ppropvarSet) ) 
-
-#define IPropertyEnumType_GetDisplayText(This,ppszDisplay)	\
-    ( (This)->lpVtbl -> GetDisplayText(This,ppszDisplay) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyEnumType_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyEnumTypeList_INTERFACE_DEFINED__
-#define __IPropertyEnumTypeList_INTERFACE_DEFINED__
-
-/* interface IPropertyEnumTypeList */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyEnumTypeList;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("a99400f4-3d84-4557-94ba-1242fb2cc9a6")
-    IPropertyEnumTypeList : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetCount( 
-            /* [out] */ __RPC__out UINT *pctypes) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAt( 
-            /* [in] */ UINT itype,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetConditionAt( 
-            /* [in] */ UINT nIndex,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FindMatchingIndex( 
-            /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,
-            /* [out] */ __RPC__out UINT *pnIndex) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyEnumTypeListVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyEnumTypeList * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyEnumTypeList * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyEnumTypeList * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IPropertyEnumTypeList * This,
-            /* [out] */ __RPC__out UINT *pctypes);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
-            IPropertyEnumTypeList * This,
-            /* [in] */ UINT itype,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetConditionAt )( 
-            IPropertyEnumTypeList * This,
-            /* [in] */ UINT nIndex,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *FindMatchingIndex )( 
-            IPropertyEnumTypeList * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,
-            /* [out] */ __RPC__out UINT *pnIndex);
-        
-        END_INTERFACE
-    } IPropertyEnumTypeListVtbl;
-
-    interface IPropertyEnumTypeList
-    {
-        CONST_VTBL struct IPropertyEnumTypeListVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyEnumTypeList_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyEnumTypeList_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyEnumTypeList_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyEnumTypeList_GetCount(This,pctypes)	\
-    ( (This)->lpVtbl -> GetCount(This,pctypes) ) 
-
-#define IPropertyEnumTypeList_GetAt(This,itype,riid,ppv)	\
-    ( (This)->lpVtbl -> GetAt(This,itype,riid,ppv) ) 
-
-#define IPropertyEnumTypeList_GetConditionAt(This,nIndex,riid,ppv)	\
-    ( (This)->lpVtbl -> GetConditionAt(This,nIndex,riid,ppv) ) 
-
-#define IPropertyEnumTypeList_FindMatchingIndex(This,propvarCmp,pnIndex)	\
-    ( (This)->lpVtbl -> FindMatchingIndex(This,propvarCmp,pnIndex) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyEnumTypeList_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyDescription_INTERFACE_DEFINED__
-#define __IPropertyDescription_INTERFACE_DEFINED__
-
-/* interface IPropertyDescription */
-/* [unique][object][uuid] */ 
-
-/* [v1_enum] */ 
-enum tagPROPDESC_TYPE_FLAGS
-    {	PDTF_DEFAULT	= 0,
-	PDTF_MULTIPLEVALUES	= 0x1,
-	PDTF_ISINNATE	= 0x2,
-	PDTF_ISGROUP	= 0x4,
-	PDTF_CANGROUPBY	= 0x8,
-	PDTF_CANSTACKBY	= 0x10,
-	PDTF_ISTREEPROPERTY	= 0x20,
-	PDTF_INCLUDEINFULLTEXTQUERY	= 0x40,
-	PDTF_ISVIEWABLE	= 0x80,
-	PDTF_ISQUERYABLE	= 0x100,
-	PDTF_ISSYSTEMPROPERTY	= 0x80000000,
-	PDTF_MASK_ALL	= 0x800001ff
-    } ;
-typedef int PROPDESC_TYPE_FLAGS;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_VIEW_FLAGS
-    {	PDVF_DEFAULT	= 0,
-	PDVF_CENTERALIGN	= 0x1,
-	PDVF_RIGHTALIGN	= 0x2,
-	PDVF_BEGINNEWGROUP	= 0x4,
-	PDVF_FILLAREA	= 0x8,
-	PDVF_SORTDESCENDING	= 0x10,
-	PDVF_SHOWONLYIFPRESENT	= 0x20,
-	PDVF_SHOWBYDEFAULT	= 0x40,
-	PDVF_SHOWINPRIMARYLIST	= 0x80,
-	PDVF_SHOWINSECONDARYLIST	= 0x100,
-	PDVF_HIDELABEL	= 0x200,
-	PDVF_HIDDEN	= 0x800,
-	PDVF_CANWRAP	= 0x1000,
-	PDVF_MASK_ALL	= 0x1bff
-    } ;
-typedef int PROPDESC_VIEW_FLAGS;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_DISPLAYTYPE
-    {	PDDT_STRING	= 0,
-	PDDT_NUMBER	= 1,
-	PDDT_BOOLEAN	= 2,
-	PDDT_DATETIME	= 3,
-	PDDT_ENUMERATED	= 4
-    } ;
-typedef enum tagPROPDESC_DISPLAYTYPE PROPDESC_DISPLAYTYPE;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_GROUPING_RANGE
-    {	PDGR_DISCRETE	= 0,
-	PDGR_ALPHANUMERIC	= 1,
-	PDGR_SIZE	= 2,
-	PDGR_DYNAMIC	= 3,
-	PDGR_DATE	= 4,
-	PDGR_PERCENT	= 5,
-	PDGR_ENUMERATED	= 6
-    } ;
-typedef enum tagPROPDESC_GROUPING_RANGE PROPDESC_GROUPING_RANGE;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_FORMAT_FLAGS
-    {	PDFF_DEFAULT	= 0,
-	PDFF_PREFIXNAME	= 0x1,
-	PDFF_FILENAME	= 0x2,
-	PDFF_ALWAYSKB	= 0x4,
-	PDFF_RESERVED_RIGHTTOLEFT	= 0x8,
-	PDFF_SHORTTIME	= 0x10,
-	PDFF_LONGTIME	= 0x20,
-	PDFF_HIDETIME	= 0x40,
-	PDFF_SHORTDATE	= 0x80,
-	PDFF_LONGDATE	= 0x100,
-	PDFF_HIDEDATE	= 0x200,
-	PDFF_RELATIVEDATE	= 0x400,
-	PDFF_USEEDITINVITATION	= 0x800,
-	PDFF_READONLY	= 0x1000,
-	PDFF_NOAUTOREADINGORDER	= 0x2000
-    } ;
-typedef int PROPDESC_FORMAT_FLAGS;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_SORTDESCRIPTION
-    {	PDSD_GENERAL	= 0,
-	PDSD_A_Z	= 1,
-	PDSD_LOWEST_HIGHEST	= 2,
-	PDSD_SMALLEST_BIGGEST	= 3,
-	PDSD_OLDEST_NEWEST	= 4
-    } ;
-typedef enum tagPROPDESC_SORTDESCRIPTION PROPDESC_SORTDESCRIPTION;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE
-    {	PDRDT_GENERAL	= 0,
-	PDRDT_DATE	= 1,
-	PDRDT_SIZE	= 2,
-	PDRDT_COUNT	= 3,
-	PDRDT_REVISION	= 4,
-	PDRDT_LENGTH	= 5,
-	PDRDT_DURATION	= 6,
-	PDRDT_SPEED	= 7,
-	PDRDT_RATE	= 8,
-	PDRDT_RATING	= 9,
-	PDRDT_PRIORITY	= 10
-    } ;
-typedef enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE PROPDESC_RELATIVEDESCRIPTION_TYPE;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_AGGREGATION_TYPE
-    {	PDAT_DEFAULT	= 0,
-	PDAT_FIRST	= 1,
-	PDAT_SUM	= 2,
-	PDAT_AVERAGE	= 3,
-	PDAT_DATERANGE	= 4,
-	PDAT_UNION	= 5,
-	PDAT_MAX	= 6,
-	PDAT_MIN	= 7
-    } ;
-typedef enum tagPROPDESC_AGGREGATION_TYPE PROPDESC_AGGREGATION_TYPE;
-
-/* [v1_enum] */ 
-enum tagPROPDESC_CONDITION_TYPE
-    {	PDCOT_NONE	= 0,
-	PDCOT_STRING	= 1,
-	PDCOT_SIZE	= 2,
-	PDCOT_DATETIME	= 3,
-	PDCOT_BOOLEAN	= 4,
-	PDCOT_NUMBER	= 5
-    } ;
-typedef enum tagPROPDESC_CONDITION_TYPE PROPDESC_CONDITION_TYPE;
-
-
-EXTERN_C const IID IID_IPropertyDescription;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("6f79d558-3e96-4549-a1d1-7d75d2288814")
-    IPropertyDescription : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( 
-            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetCanonicalName( 
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyType( 
-            /* [out] */ __RPC__out VARTYPE *pvartype) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayName( 
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetEditInvitation( 
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetTypeFlags( 
-            /* [in] */ PROPDESC_TYPE_FLAGS mask,
-            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetViewFlags( 
-            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnWidth( 
-            /* [out] */ __RPC__out UINT *pcxChars) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetDisplayType( 
-            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetColumnState( 
-            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetGroupingRange( 
-            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetRelativeDescriptionType( 
-            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetRelativeDescription( 
-            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetSortDescription( 
-            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetSortDescriptionLabel( 
-            /* [in] */ BOOL fDescending,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAggregationType( 
-            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetConditionType( 
-            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
-            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetEnumTypeList( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE CoerceToCanonicalValue( 
-            /* [out][in] */ PROPVARIANT *ppropvar) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( 
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsValueCanonical( 
-            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyDescriptionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyDescription * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyDescription * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyDescription * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( 
-            IPropertyDescription * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out VARTYPE *pvartype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 
-            IPropertyDescription * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( 
-            IPropertyDescription * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( 
-            IPropertyDescription * This,
-            /* [in] */ PROPDESC_TYPE_FLAGS mask,
-            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out UINT *pcxChars);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( 
-            IPropertyDescription * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( 
-            IPropertyDescription * This,
-            /* [in] */ BOOL fDescending,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
-            IPropertyDescription * This,
-            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
-            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( 
-            IPropertyDescription * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( 
-            IPropertyDescription * This,
-            /* [out][in] */ PROPVARIANT *ppropvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
-            IPropertyDescription * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( 
-            IPropertyDescription * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar);
-        
-        END_INTERFACE
-    } IPropertyDescriptionVtbl;
-
-    interface IPropertyDescription
-    {
-        CONST_VTBL struct IPropertyDescriptionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyDescription_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyDescription_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyDescription_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyDescription_GetPropertyKey(This,pkey)	\
-    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
-
-#define IPropertyDescription_GetCanonicalName(This,ppszName)	\
-    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) 
-
-#define IPropertyDescription_GetPropertyType(This,pvartype)	\
-    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) 
-
-#define IPropertyDescription_GetDisplayName(This,ppszName)	\
-    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) 
-
-#define IPropertyDescription_GetEditInvitation(This,ppszInvite)	\
-    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) 
-
-#define IPropertyDescription_GetTypeFlags(This,mask,ppdtFlags)	\
-    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) 
-
-#define IPropertyDescription_GetViewFlags(This,ppdvFlags)	\
-    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) 
-
-#define IPropertyDescription_GetDefaultColumnWidth(This,pcxChars)	\
-    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) 
-
-#define IPropertyDescription_GetDisplayType(This,pdisplaytype)	\
-    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) 
-
-#define IPropertyDescription_GetColumnState(This,pcsFlags)	\
-    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) 
-
-#define IPropertyDescription_GetGroupingRange(This,pgr)	\
-    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) 
-
-#define IPropertyDescription_GetRelativeDescriptionType(This,prdt)	\
-    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) 
-
-#define IPropertyDescription_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)	\
-    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) 
-
-#define IPropertyDescription_GetSortDescription(This,psd)	\
-    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) 
-
-#define IPropertyDescription_GetSortDescriptionLabel(This,fDescending,ppszDescription)	\
-    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) 
-
-#define IPropertyDescription_GetAggregationType(This,paggtype)	\
-    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) 
-
-#define IPropertyDescription_GetConditionType(This,pcontype,popDefault)	\
-    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) 
-
-#define IPropertyDescription_GetEnumTypeList(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) 
-
-#define IPropertyDescription_CoerceToCanonicalValue(This,ppropvar)	\
-    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) 
-
-#define IPropertyDescription_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)	\
-    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) 
-
-#define IPropertyDescription_IsValueCanonical(This,propvar)	\
-    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_RemoteCoerceToCanonicalValue_Proxy( 
-    IPropertyDescription * This,
-    /* [in] */ __RPC__in REFPROPVARIANT propvar,
-    /* [out] */ __RPC__out PROPVARIANT *ppropvar);
-
-
-void __RPC_STUB IPropertyDescription_RemoteCoerceToCanonicalValue_Stub(
-    IRpcStubBuffer *This,
-    IRpcChannelBuffer *_pRpcChannelBuffer,
-    PRPC_MESSAGE _pRpcMessage,
-    DWORD *_pdwStubPhase);
-
-
-
-#endif 	/* __IPropertyDescription_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__
-#define __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__
-
-/* interface IPropertyDescriptionAliasInfo */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyDescriptionAliasInfo;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("f67104fc-2af9-46fd-b32d-243c1404f3d1")
-    IPropertyDescriptionAliasInfo : public IPropertyDescription
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetSortByAlias( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAdditionalSortByAliases( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyDescriptionAliasInfoVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyDescriptionAliasInfo * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyDescriptionAliasInfo * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out VARTYPE *pvartype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ PROPDESC_TYPE_FLAGS mask,
-            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out UINT *pcxChars);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ BOOL fDescending,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
-            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [out][in] */ PROPVARIANT *ppropvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortByAlias )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAdditionalSortByAliases )( 
-            IPropertyDescriptionAliasInfo * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        END_INTERFACE
-    } IPropertyDescriptionAliasInfoVtbl;
-
-    interface IPropertyDescriptionAliasInfo
-    {
-        CONST_VTBL struct IPropertyDescriptionAliasInfoVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyDescriptionAliasInfo_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyDescriptionAliasInfo_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyDescriptionAliasInfo_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyDescriptionAliasInfo_GetPropertyKey(This,pkey)	\
-    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
-
-#define IPropertyDescriptionAliasInfo_GetCanonicalName(This,ppszName)	\
-    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) 
-
-#define IPropertyDescriptionAliasInfo_GetPropertyType(This,pvartype)	\
-    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) 
-
-#define IPropertyDescriptionAliasInfo_GetDisplayName(This,ppszName)	\
-    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) 
-
-#define IPropertyDescriptionAliasInfo_GetEditInvitation(This,ppszInvite)	\
-    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) 
-
-#define IPropertyDescriptionAliasInfo_GetTypeFlags(This,mask,ppdtFlags)	\
-    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) 
-
-#define IPropertyDescriptionAliasInfo_GetViewFlags(This,ppdvFlags)	\
-    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) 
-
-#define IPropertyDescriptionAliasInfo_GetDefaultColumnWidth(This,pcxChars)	\
-    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) 
-
-#define IPropertyDescriptionAliasInfo_GetDisplayType(This,pdisplaytype)	\
-    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) 
-
-#define IPropertyDescriptionAliasInfo_GetColumnState(This,pcsFlags)	\
-    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) 
-
-#define IPropertyDescriptionAliasInfo_GetGroupingRange(This,pgr)	\
-    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) 
-
-#define IPropertyDescriptionAliasInfo_GetRelativeDescriptionType(This,prdt)	\
-    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) 
-
-#define IPropertyDescriptionAliasInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)	\
-    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) 
-
-#define IPropertyDescriptionAliasInfo_GetSortDescription(This,psd)	\
-    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) 
-
-#define IPropertyDescriptionAliasInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription)	\
-    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) 
-
-#define IPropertyDescriptionAliasInfo_GetAggregationType(This,paggtype)	\
-    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) 
-
-#define IPropertyDescriptionAliasInfo_GetConditionType(This,pcontype,popDefault)	\
-    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) 
-
-#define IPropertyDescriptionAliasInfo_GetEnumTypeList(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) 
-
-#define IPropertyDescriptionAliasInfo_CoerceToCanonicalValue(This,ppropvar)	\
-    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) 
-
-#define IPropertyDescriptionAliasInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)	\
-    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) 
-
-#define IPropertyDescriptionAliasInfo_IsValueCanonical(This,propvar)	\
-    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) 
-
-
-#define IPropertyDescriptionAliasInfo_GetSortByAlias(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetSortByAlias(This,riid,ppv) ) 
-
-#define IPropertyDescriptionAliasInfo_GetAdditionalSortByAliases(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetAdditionalSortByAliases(This,riid,ppv) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__
-#define __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__
-
-/* interface IPropertyDescriptionSearchInfo */
-/* [unique][object][uuid] */ 
-
-/* [v1_enum] */ 
-enum tagPROPDESC_SEARCHINFO_FLAGS
-    {	PDSIF_DEFAULT	= 0,
-	PDSIF_ININVERTEDINDEX	= 0x1,
-	PDSIF_ISCOLUMN	= 0x2,
-	PDSIF_ISCOLUMNSPARSE	= 0x4
-    } ;
-typedef int PROPDESC_SEARCHINFO_FLAGS;
-
-typedef /* [v1_enum] */ 
-enum tagPROPDESC_COLUMNINDEX_TYPE
-    {	PDCIT_NONE	= 0,
-	PDCIT_ONDISK	= 1,
-	PDCIT_INMEMORY	= 2
-    } 	PROPDESC_COLUMNINDEX_TYPE;
-
-
-EXTERN_C const IID IID_IPropertyDescriptionSearchInfo;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("078f91bd-29a2-440f-924e-46a291524520")
-    IPropertyDescriptionSearchInfo : public IPropertyDescription
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetSearchInfoFlags( 
-            /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetColumnIndexType( 
-            /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetProjectionString( 
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetMaxSize( 
-            /* [out] */ __RPC__out UINT *pcbMaxSize) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyDescriptionSearchInfoVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyDescriptionSearchInfo * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyDescriptionSearchInfo * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPERTYKEY *pkey);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out VARTYPE *pvartype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ PROPDESC_TYPE_FLAGS mask,
-            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out UINT *pcxChars);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ BOOL fDescending,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
-            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out][in] */ PROPVARIANT *ppropvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSearchInfoFlags )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetColumnIndexType )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetProjectionString )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetMaxSize )( 
-            IPropertyDescriptionSearchInfo * This,
-            /* [out] */ __RPC__out UINT *pcbMaxSize);
-        
-        END_INTERFACE
-    } IPropertyDescriptionSearchInfoVtbl;
-
-    interface IPropertyDescriptionSearchInfo
-    {
-        CONST_VTBL struct IPropertyDescriptionSearchInfoVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyDescriptionSearchInfo_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyDescriptionSearchInfo_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyDescriptionSearchInfo_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyDescriptionSearchInfo_GetPropertyKey(This,pkey)	\
-    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
-
-#define IPropertyDescriptionSearchInfo_GetCanonicalName(This,ppszName)	\
-    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) 
-
-#define IPropertyDescriptionSearchInfo_GetPropertyType(This,pvartype)	\
-    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) 
-
-#define IPropertyDescriptionSearchInfo_GetDisplayName(This,ppszName)	\
-    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) 
-
-#define IPropertyDescriptionSearchInfo_GetEditInvitation(This,ppszInvite)	\
-    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) 
-
-#define IPropertyDescriptionSearchInfo_GetTypeFlags(This,mask,ppdtFlags)	\
-    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) 
-
-#define IPropertyDescriptionSearchInfo_GetViewFlags(This,ppdvFlags)	\
-    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) 
-
-#define IPropertyDescriptionSearchInfo_GetDefaultColumnWidth(This,pcxChars)	\
-    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) 
-
-#define IPropertyDescriptionSearchInfo_GetDisplayType(This,pdisplaytype)	\
-    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) 
-
-#define IPropertyDescriptionSearchInfo_GetColumnState(This,pcsFlags)	\
-    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) 
-
-#define IPropertyDescriptionSearchInfo_GetGroupingRange(This,pgr)	\
-    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) 
-
-#define IPropertyDescriptionSearchInfo_GetRelativeDescriptionType(This,prdt)	\
-    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) 
-
-#define IPropertyDescriptionSearchInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)	\
-    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) 
-
-#define IPropertyDescriptionSearchInfo_GetSortDescription(This,psd)	\
-    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) 
-
-#define IPropertyDescriptionSearchInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription)	\
-    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) 
-
-#define IPropertyDescriptionSearchInfo_GetAggregationType(This,paggtype)	\
-    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) 
-
-#define IPropertyDescriptionSearchInfo_GetConditionType(This,pcontype,popDefault)	\
-    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) 
-
-#define IPropertyDescriptionSearchInfo_GetEnumTypeList(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) 
-
-#define IPropertyDescriptionSearchInfo_CoerceToCanonicalValue(This,ppropvar)	\
-    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) 
-
-#define IPropertyDescriptionSearchInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)	\
-    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) 
-
-#define IPropertyDescriptionSearchInfo_IsValueCanonical(This,propvar)	\
-    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) 
-
-
-#define IPropertyDescriptionSearchInfo_GetSearchInfoFlags(This,ppdsiFlags)	\
-    ( (This)->lpVtbl -> GetSearchInfoFlags(This,ppdsiFlags) ) 
-
-#define IPropertyDescriptionSearchInfo_GetColumnIndexType(This,ppdciType)	\
-    ( (This)->lpVtbl -> GetColumnIndexType(This,ppdciType) ) 
-
-#define IPropertyDescriptionSearchInfo_GetProjectionString(This,ppszProjection)	\
-    ( (This)->lpVtbl -> GetProjectionString(This,ppszProjection) ) 
-
-#define IPropertyDescriptionSearchInfo_GetMaxSize(This,pcbMaxSize)	\
-    ( (This)->lpVtbl -> GetMaxSize(This,pcbMaxSize) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propsys_0000_0014 */
-/* [local] */ 
-
-/* [v1_enum] */ 
-enum tagPROPDESC_ENUMFILTER
-    {	PDEF_ALL	= 0,
-	PDEF_SYSTEM	= 1,
-	PDEF_NONSYSTEM	= 2,
-	PDEF_VIEWABLE	= 3,
-	PDEF_QUERYABLE	= 4,
-	PDEF_INFULLTEXTQUERY	= 5,
-	PDEF_COLUMN	= 6
-    } ;
-typedef enum tagPROPDESC_ENUMFILTER PROPDESC_ENUMFILTER;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_s_ifspec;
-
-#ifndef __IPropertySystem_INTERFACE_DEFINED__
-#define __IPropertySystem_INTERFACE_DEFINED__
-
-/* interface IPropertySystem */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertySystem;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("ca724e8a-c3e6-442b-88a4-6fb0db8035a3")
-    IPropertySystem : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescription( 
-            /* [in] */ __RPC__in REFPROPERTYKEY propkey,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionByName( 
-            /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionListFromString( 
-            /* [string][in] */ __RPC__in LPCWSTR pszPropList,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE EnumeratePropertyDescriptions( 
-            /* [in] */ PROPDESC_ENUMFILTER filterOn,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
-            /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,
-            /* [in] */ DWORD cchText) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE FormatForDisplayAlloc( 
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RegisterPropertySchema( 
-            /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE UnregisterPropertySchema( 
-            /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RefreshPropertySchema( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertySystemVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertySystem * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertySystem * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertySystem * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescription )( 
-            IPropertySystem * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY propkey,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionByName )( 
-            IPropertySystem * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionListFromString )( 
-            IPropertySystem * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszPropList,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *EnumeratePropertyDescriptions )( 
-            IPropertySystem * This,
-            /* [in] */ PROPDESC_ENUMFILTER filterOn,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
-            IPropertySystem * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
-            /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,
-            /* [in] */ DWORD cchText);
-        
-        HRESULT ( STDMETHODCALLTYPE *FormatForDisplayAlloc )( 
-            IPropertySystem * This,
-            /* [in] */ __RPC__in REFPROPERTYKEY key,
-            /* [in] */ __RPC__in REFPROPVARIANT propvar,
-            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
-            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
-        
-        HRESULT ( STDMETHODCALLTYPE *RegisterPropertySchema )( 
-            IPropertySystem * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszPath);
-        
-        HRESULT ( STDMETHODCALLTYPE *UnregisterPropertySchema )( 
-            IPropertySystem * This,
-            /* [string][in] */ __RPC__in LPCWSTR pszPath);
-        
-        HRESULT ( STDMETHODCALLTYPE *RefreshPropertySchema )( 
-            IPropertySystem * This);
-        
-        END_INTERFACE
-    } IPropertySystemVtbl;
-
-    interface IPropertySystem
-    {
-        CONST_VTBL struct IPropertySystemVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertySystem_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertySystem_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertySystem_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertySystem_GetPropertyDescription(This,propkey,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyDescription(This,propkey,riid,ppv) ) 
-
-#define IPropertySystem_GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) ) 
-
-#define IPropertySystem_GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) ) 
-
-#define IPropertySystem_EnumeratePropertyDescriptions(This,filterOn,riid,ppv)	\
-    ( (This)->lpVtbl -> EnumeratePropertyDescriptions(This,filterOn,riid,ppv) ) 
-
-#define IPropertySystem_FormatForDisplay(This,key,propvar,pdff,pszText,cchText)	\
-    ( (This)->lpVtbl -> FormatForDisplay(This,key,propvar,pdff,pszText,cchText) ) 
-
-#define IPropertySystem_FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay)	\
-    ( (This)->lpVtbl -> FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) ) 
-
-#define IPropertySystem_RegisterPropertySchema(This,pszPath)	\
-    ( (This)->lpVtbl -> RegisterPropertySchema(This,pszPath) ) 
-
-#define IPropertySystem_UnregisterPropertySchema(This,pszPath)	\
-    ( (This)->lpVtbl -> UnregisterPropertySchema(This,pszPath) ) 
-
-#define IPropertySystem_RefreshPropertySchema(This)	\
-    ( (This)->lpVtbl -> RefreshPropertySchema(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertySystem_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyDescriptionList_INTERFACE_DEFINED__
-#define __IPropertyDescriptionList_INTERFACE_DEFINED__
-
-/* interface IPropertyDescriptionList */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyDescriptionList;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("1f9fc1d0-c39b-4b26-817f-011967d3440e")
-    IPropertyDescriptionList : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetCount( 
-            /* [out] */ __RPC__out UINT *pcElem) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetAt( 
-            /* [in] */ UINT iElem,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyDescriptionListVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyDescriptionList * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyDescriptionList * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyDescriptionList * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
-            IPropertyDescriptionList * This,
-            /* [out] */ __RPC__out UINT *pcElem);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
-            IPropertyDescriptionList * This,
-            /* [in] */ UINT iElem,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        END_INTERFACE
-    } IPropertyDescriptionListVtbl;
-
-    interface IPropertyDescriptionList
-    {
-        CONST_VTBL struct IPropertyDescriptionListVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyDescriptionList_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyDescriptionList_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyDescriptionList_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyDescriptionList_GetCount(This,pcElem)	\
-    ( (This)->lpVtbl -> GetCount(This,pcElem) ) 
-
-#define IPropertyDescriptionList_GetAt(This,iElem,riid,ppv)	\
-    ( (This)->lpVtbl -> GetAt(This,iElem,riid,ppv) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyDescriptionList_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertyStoreFactory_INTERFACE_DEFINED__
-#define __IPropertyStoreFactory_INTERFACE_DEFINED__
-
-/* interface IPropertyStoreFactory */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertyStoreFactory;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("bc110b6d-57e8-4148-a9c6-91015ab2f3a5")
-    IPropertyStoreFactory : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyStore( 
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyStoreForKeys( 
-            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
-            /* [in] */ UINT cKeys,
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertyStoreFactoryVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertyStoreFactory * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertyStoreFactory * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertyStoreFactory * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( 
-            IPropertyStoreFactory * This,
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( 
-            IPropertyStoreFactory * This,
-            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
-            /* [in] */ UINT cKeys,
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        END_INTERFACE
-    } IPropertyStoreFactoryVtbl;
-
-    interface IPropertyStoreFactory
-    {
-        CONST_VTBL struct IPropertyStoreFactoryVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertyStoreFactory_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertyStoreFactory_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertyStoreFactory_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) 
-
-#define IPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertyStoreFactory_INTERFACE_DEFINED__ */
-
-
-#ifndef __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__
-#define __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__
-
-/* interface IDelayedPropertyStoreFactory */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IDelayedPropertyStoreFactory;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("40d4577f-e237-4bdb-bd69-58f089431b6a")
-    IDelayedPropertyStoreFactory : public IPropertyStoreFactory
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetDelayedPropertyStore( 
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [in] */ DWORD dwStoreId,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IDelayedPropertyStoreFactoryVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IDelayedPropertyStoreFactory * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IDelayedPropertyStoreFactory * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IDelayedPropertyStoreFactory * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( 
-            IDelayedPropertyStoreFactory * This,
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( 
-            IDelayedPropertyStoreFactory * This,
-            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
-            /* [in] */ UINT cKeys,
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetDelayedPropertyStore )( 
-            IDelayedPropertyStoreFactory * This,
-            /* [in] */ GETPROPERTYSTOREFLAGS flags,
-            /* [in] */ DWORD dwStoreId,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        END_INTERFACE
-    } IDelayedPropertyStoreFactoryVtbl;
-
-    interface IDelayedPropertyStoreFactory
-    {
-        CONST_VTBL struct IDelayedPropertyStoreFactoryVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IDelayedPropertyStoreFactory_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IDelayedPropertyStoreFactory_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IDelayedPropertyStoreFactory_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IDelayedPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) 
-
-#define IDelayedPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv)	\
-    ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) 
-
-
-#define IDelayedPropertyStoreFactory_GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv)	\
-    ( (This)->lpVtbl -> GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propsys_0000_0018 */
-/* [local] */ 
-
-/* [v1_enum] */ 
-enum tagPERSIST_SPROPSTORE_FLAGS
-    {	FPSPS_READONLY	= 0x1
-    } ;
-typedef int PERSIST_SPROPSTORE_FLAGS;
-
-typedef struct tagSERIALIZEDPROPSTORAGE SERIALIZEDPROPSTORAGE;
-
-typedef SERIALIZEDPROPSTORAGE __unaligned *PUSERIALIZEDPROPSTORAGE;
-
-typedef const SERIALIZEDPROPSTORAGE __unaligned *PCUSERIALIZEDPROPSTORAGE;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_s_ifspec;
-
-#ifndef __IPersistSerializedPropStorage_INTERFACE_DEFINED__
-#define __IPersistSerializedPropStorage_INTERFACE_DEFINED__
-
-/* interface IPersistSerializedPropStorage */
-/* [object][local][unique][uuid] */ 
-
-
-EXTERN_C const IID IID_IPersistSerializedPropStorage;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("e318ad57-0aa0-450f-aca5-6fab7103d917")
-    IPersistSerializedPropStorage : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SetFlags( 
-            /* [in] */ PERSIST_SPROPSTORE_FLAGS flags) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetPropertyStorage( 
-            /* [in] */ 
-            __in_bcount(cb)  PCUSERIALIZEDPROPSTORAGE psps,
-            /* [in] */ 
-            __in  DWORD cb) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetPropertyStorage( 
-            /* [out] */ 
-            __deref_out_bcount(*pcb)  SERIALIZEDPROPSTORAGE **ppsps,
-            /* [out] */ 
-            __out  DWORD *pcb) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPersistSerializedPropStorageVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPersistSerializedPropStorage * This,
-            /* [in] */ REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPersistSerializedPropStorage * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPersistSerializedPropStorage * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetFlags )( 
-            IPersistSerializedPropStorage * This,
-            /* [in] */ PERSIST_SPROPSTORE_FLAGS flags);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetPropertyStorage )( 
-            IPersistSerializedPropStorage * This,
-            /* [in] */ 
-            __in_bcount(cb)  PCUSERIALIZEDPROPSTORAGE psps,
-            /* [in] */ 
-            __in  DWORD cb);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetPropertyStorage )( 
-            IPersistSerializedPropStorage * This,
-            /* [out] */ 
-            __deref_out_bcount(*pcb)  SERIALIZEDPROPSTORAGE **ppsps,
-            /* [out] */ 
-            __out  DWORD *pcb);
-        
-        END_INTERFACE
-    } IPersistSerializedPropStorageVtbl;
-
-    interface IPersistSerializedPropStorage
-    {
-        CONST_VTBL struct IPersistSerializedPropStorageVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPersistSerializedPropStorage_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPersistSerializedPropStorage_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPersistSerializedPropStorage_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPersistSerializedPropStorage_SetFlags(This,flags)	\
-    ( (This)->lpVtbl -> SetFlags(This,flags) ) 
-
-#define IPersistSerializedPropStorage_SetPropertyStorage(This,psps,cb)	\
-    ( (This)->lpVtbl -> SetPropertyStorage(This,psps,cb) ) 
-
-#define IPersistSerializedPropStorage_GetPropertyStorage(This,ppsps,pcb)	\
-    ( (This)->lpVtbl -> GetPropertyStorage(This,ppsps,pcb) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPersistSerializedPropStorage_INTERFACE_DEFINED__ */
-
-
-#ifndef __IPropertySystemChangeNotify_INTERFACE_DEFINED__
-#define __IPropertySystemChangeNotify_INTERFACE_DEFINED__
-
-/* interface IPropertySystemChangeNotify */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IPropertySystemChangeNotify;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("fa955fd9-38be-4879-a6ce-824cf52d609f")
-    IPropertySystemChangeNotify : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE SchemaRefreshed( void) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IPropertySystemChangeNotifyVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IPropertySystemChangeNotify * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IPropertySystemChangeNotify * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IPropertySystemChangeNotify * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *SchemaRefreshed )( 
-            IPropertySystemChangeNotify * This);
-        
-        END_INTERFACE
-    } IPropertySystemChangeNotifyVtbl;
-
-    interface IPropertySystemChangeNotify
-    {
-        CONST_VTBL struct IPropertySystemChangeNotifyVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IPropertySystemChangeNotify_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IPropertySystemChangeNotify_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IPropertySystemChangeNotify_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IPropertySystemChangeNotify_SchemaRefreshed(This)	\
-    ( (This)->lpVtbl -> SchemaRefreshed(This) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IPropertySystemChangeNotify_INTERFACE_DEFINED__ */
-
-
-#ifndef __ICreateObject_INTERFACE_DEFINED__
-#define __ICreateObject_INTERFACE_DEFINED__
-
-/* interface ICreateObject */
-/* [object][unique][uuid] */ 
-
-
-EXTERN_C const IID IID_ICreateObject;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("75121952-e0d0-43e5-9380-1d80483acf72")
-    ICreateObject : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE CreateObject( 
-            /* [in] */ __RPC__in REFCLSID clsid,
-            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct ICreateObjectVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ICreateObject * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ICreateObject * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ICreateObject * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateObject )( 
-            ICreateObject * This,
-            /* [in] */ __RPC__in REFCLSID clsid,
-            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
-        
-        END_INTERFACE
-    } ICreateObjectVtbl;
-
-    interface ICreateObject
-    {
-        CONST_VTBL struct ICreateObjectVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ICreateObject_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ICreateObject_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ICreateObject_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define ICreateObject_CreateObject(This,clsid,pUnkOuter,riid,ppv)	\
-    ( (This)->lpVtbl -> CreateObject(This,clsid,pUnkOuter,riid,ppv) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ICreateObject_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_propsys_0000_0021 */
-/* [local] */ 
-
-// Format a property value for display purposes
-PSSTDAPI PSFormatForDisplay(
-    __in REFPROPERTYKEY propkey,
-    __in REFPROPVARIANT propvar,
-    __in PROPDESC_FORMAT_FLAGS pdfFlags,
-    __out_ecount(cchText) LPWSTR pwszText,
-    __in DWORD cchText);
-
-PSSTDAPI PSFormatForDisplayAlloc(
-    __in REFPROPERTYKEY key,
-    __in REFPROPVARIANT propvar,
-    __in PROPDESC_FORMAT_FLAGS pdff,
-    __deref_out PWSTR *ppszDisplay);
-
-PSSTDAPI PSFormatPropertyValue(
-    __in IPropertyStore *pps,
-    __in IPropertyDescription *ppd,
-    __in PROPDESC_FORMAT_FLAGS pdff,
-    __deref_out LPWSTR *ppszDisplay);
-
-
-#define PKEY_PIDSTR_MAX     10   // will take care of any long integer value
-#define GUIDSTRING_MAX      (1 + 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)  // "{12345678-1234-1234-1234-123456789012}"
-#define PKEYSTR_MAX         (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)
-
-// Convert a PROPERTYKEY to and from a PWSTR
-PSSTDAPI PSStringFromPropertyKey(
-    __in REFPROPERTYKEY pkey,
-    __out_ecount(cch) LPWSTR psz,
-    __in UINT cch);
-
-PSSTDAPI PSPropertyKeyFromString(
-    __in LPCWSTR pszString,
-    __out PROPERTYKEY *pkey);
-
-
-// Creates an in-memory property store
-// Returns an IPropertyStore, IPersistSerializedPropStorage, and related interfaces interface
-PSSTDAPI PSCreateMemoryPropertyStore(
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Create a read-only, delay-bind multiplexing property store
-// Returns an IPropertyStore interface or related interfaces
-PSSTDAPI PSCreateDelayedMultiplexPropertyStore(
-    __in GETPROPERTYSTOREFLAGS flags,
-    __in IDelayedPropertyStoreFactory *pdpsf,
-    __in_ecount(cStores) const DWORD *rgStoreIds,
-    __in DWORD cStores,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Create a read-only property store from one or more sources (which each must support either IPropertyStore or IPropertySetStorage)
-// Returns an IPropertyStore interface or related interfaces
-PSSTDAPI PSCreateMultiplexPropertyStore(
-    __in_ecount(cStores) IUnknown **prgpunkStores,
-    __in DWORD cStores,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Create a container for IPropertyChanges
-// Returns an IPropertyChangeArray interface
-PSSTDAPI PSCreatePropertyChangeArray(
-    __in_ecount_opt(cChanges) const PROPERTYKEY *rgpropkey,
-    __in_ecount_opt(cChanges) const PKA_FLAGS *rgflags,
-    __in_ecount_opt(cChanges) const PROPVARIANT *rgpropvar,
-    __in UINT cChanges,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Create a simple property change
-// Returns an IPropertyChange interface
-PSSTDAPI PSCreateSimplePropertyChange(
-    __in PKA_FLAGS flags,
-    __in REFPROPERTYKEY key,
-    __in REFPROPVARIANT propvar,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Get a property description
-// Returns an IPropertyDescription interface
-PSSTDAPI PSGetPropertyDescription(
-    __in REFPROPERTYKEY propkey,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-PSSTDAPI PSGetPropertyDescriptionByName(
-    __in LPCWSTR pszCanonicalName,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Lookup a per-machine registered file property handler
-PSSTDAPI PSLookupPropertyHandlerCLSID(
-    __in PCWSTR pszFilePath,
-    __out CLSID *pclsid);
-// Get a property handler, on Vista or downlevel to XP
-// punkItem is a shell item created with an SHCreateItemXXX API
-// Returns an IPropertyStore
-PSSTDAPI PSGetItemPropertyHandler(
-    __in IUnknown *punkItem,
-    __in BOOL fReadWrite,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Get a property handler, on Vista or downlevel to XP
-// punkItem is a shell item created with an SHCreateItemXXX API
-// punkCreateObject supports ICreateObject
-// Returns an IPropertyStore
-PSSTDAPI PSGetItemPropertyHandlerWithCreateObject(
-    __in IUnknown *punkItem,
-    __in BOOL fReadWrite,
-    __in IUnknown *punkCreateObject,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Get or set a property value from a store
-PSSTDAPI PSGetPropertyValue(
-    __in IPropertyStore *pps,
-    __in IPropertyDescription *ppd,
-    __out PROPVARIANT *ppropvar);
-
-PSSTDAPI PSSetPropertyValue(
-    __in IPropertyStore *pps,
-    __in IPropertyDescription *ppd,
-    __in REFPROPVARIANT propvar);
-
-
-// Interact with the set of property descriptions
-PSSTDAPI PSRegisterPropertySchema(
-    __in PCWSTR pszPath);
-
-PSSTDAPI PSUnregisterPropertySchema(
-    __in PCWSTR pszPath);
-
-PSSTDAPI PSRefreshPropertySchema();
-
-// Returns either: IPropertyDescriptionList or IEnumUnknown interfaces
-PSSTDAPI PSEnumeratePropertyDescriptions(
-    __in PROPDESC_ENUMFILTER filterOn,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Convert between a PROPERTYKEY and its canonical name
-PSSTDAPI PSGetPropertyKeyFromName(
-    __in PCWSTR pszName,
-    __out PROPERTYKEY *ppropkey);
-
-PSSTDAPI PSGetNameFromPropertyKey(
-    __in REFPROPERTYKEY propkey,
-    __deref_out PWSTR *ppszCanonicalName);
-
-
-// Coerce and canonicalize a property value
-PSSTDAPI PSCoerceToCanonicalValue(
-    __in REFPROPERTYKEY key,
-    __inout PROPVARIANT *ppropvar);
-
-
-// Convert a 'prop:' string into a list of property descriptions
-// Returns an IPropertyDescriptionList interface
-PSSTDAPI PSGetPropertyDescriptionListFromString(
-    __in LPCWSTR pszPropList,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Wrap an IPropertySetStorage interface in an IPropertyStore interface
-// Returns an IPropertyStore or related interface
-PSSTDAPI PSCreatePropertyStoreFromPropertySetStorage(
-    __in IPropertySetStorage *ppss,
-    DWORD grfMode,
-    REFIID riid,
-    __deref_out void **ppv);
-
-
-// punkSource must support IPropertyStore or IPropertySetStorage
-// On success, the returned ppv is guaranteed to support IPropertyStore.
-// If punkSource already supports IPropertyStore, no wrapper is created.
-PSSTDAPI PSCreatePropertyStoreFromObject(
-    __in IUnknown *punk,
-    __in DWORD grfMode,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// punkSource must support IPropertyStore
-// riid may be IPropertyStore, IPropertySetStorage, IPropertyStoreCapabilities, or IObjectProvider
-PSSTDAPI PSCreateAdapterFromPropertyStore(
-    __in IPropertyStore *pps,
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Talk to the property system using an interface
-// Returns an IPropertySystem interface
-PSSTDAPI PSGetPropertySystem(
-    __in REFIID riid,
-    __deref_out void **ppv);
-
-
-// Obtain a value from serialized property storage
-PSSTDAPI PSGetPropertyFromPropertyStorage(
-    __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, 
-    __in DWORD cb, 
-    __in REFPROPERTYKEY rpkey, 
-    __out PROPVARIANT *ppropvar);
-
-
-// Obtain a named value from serialized property storage
-PSSTDAPI PSGetNamedPropertyFromPropertyStorage(
-    __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, 
-    __in DWORD cb, 
-    __in LPCWSTR pszName, 
-    __out PROPVARIANT *ppropvar);
-
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_s_ifspec;
-
-
-#ifndef __PropSysObjects_LIBRARY_DEFINED__
-#define __PropSysObjects_LIBRARY_DEFINED__
-
-/* library PropSysObjects */
-/* [version][lcid][uuid] */ 
-
-
-EXTERN_C const IID LIBID_PropSysObjects;
-
-EXTERN_C const CLSID CLSID_InMemoryPropertyStore;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("9a02e012-6303-4e1e-b9a1-630f802592c5")
-InMemoryPropertyStore;
-#endif
-
-EXTERN_C const CLSID CLSID_PropertySystem;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("b8967f85-58ae-4f46-9fb2-5d7904798f4b")
-PropertySystem;
-#endif
-#endif /* __PropSysObjects_LIBRARY_DEFINED__ */
-
-/* Additional Prototypes for ALL interfaces */
-
-unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); 
-unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); 
-unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); 
-void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); 
-
-unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
-unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
-unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
-void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); 
-
-unsigned long             __RPC_USER  BSTR_UserSize64(     unsigned long *, unsigned long            , BSTR * ); 
-unsigned char * __RPC_USER  BSTR_UserMarshal64(  unsigned long *, unsigned char *, BSTR * ); 
-unsigned char * __RPC_USER  BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * ); 
-void                      __RPC_USER  BSTR_UserFree64(     unsigned long *, BSTR * ); 
-
-unsigned long             __RPC_USER  LPSAFEARRAY_UserSize64(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
-unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal64(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
-unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
-void                      __RPC_USER  LPSAFEARRAY_UserFree64(     unsigned long *, LPSAFEARRAY * ); 
-
-/* [local] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Proxy( 
-    IInitializeWithStream * This,
-    /* [in] */ IStream *pstream,
-    /* [in] */ DWORD grfMode);
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Stub( 
-    IInitializeWithStream * This,
-    /* [in] */ __RPC__in_opt IStream *pstream,
-    /* [in] */ DWORD grfMode);
-
-/* [local] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Proxy( 
-    IPropertyDescription * This,
-    /* [out][in] */ PROPVARIANT *ppropvar);
-
-
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Stub( 
-    IPropertyDescription * This,
-    /* [in] */ __RPC__in REFPROPVARIANT propvar,
-    /* [out] */ __RPC__out PROPVARIANT *ppropvar);
-
-
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for propsys.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 475
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __propsys_h__
+#define __propsys_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IInitializeWithFile_FWD_DEFINED__
+#define __IInitializeWithFile_FWD_DEFINED__
+typedef interface IInitializeWithFile IInitializeWithFile;
+#endif 	/* __IInitializeWithFile_FWD_DEFINED__ */
+
+
+#ifndef __IInitializeWithStream_FWD_DEFINED__
+#define __IInitializeWithStream_FWD_DEFINED__
+typedef interface IInitializeWithStream IInitializeWithStream;
+#endif 	/* __IInitializeWithStream_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStore_FWD_DEFINED__
+#define __IPropertyStore_FWD_DEFINED__
+typedef interface IPropertyStore IPropertyStore;
+#endif 	/* __IPropertyStore_FWD_DEFINED__ */
+
+
+#ifndef __INamedPropertyStore_FWD_DEFINED__
+#define __INamedPropertyStore_FWD_DEFINED__
+typedef interface INamedPropertyStore INamedPropertyStore;
+#endif 	/* __INamedPropertyStore_FWD_DEFINED__ */
+
+
+#ifndef __IObjectWithPropertyKey_FWD_DEFINED__
+#define __IObjectWithPropertyKey_FWD_DEFINED__
+typedef interface IObjectWithPropertyKey IObjectWithPropertyKey;
+#endif 	/* __IObjectWithPropertyKey_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyChange_FWD_DEFINED__
+#define __IPropertyChange_FWD_DEFINED__
+typedef interface IPropertyChange IPropertyChange;
+#endif 	/* __IPropertyChange_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyChangeArray_FWD_DEFINED__
+#define __IPropertyChangeArray_FWD_DEFINED__
+typedef interface IPropertyChangeArray IPropertyChangeArray;
+#endif 	/* __IPropertyChangeArray_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCapabilities_FWD_DEFINED__
+#define __IPropertyStoreCapabilities_FWD_DEFINED__
+typedef interface IPropertyStoreCapabilities IPropertyStoreCapabilities;
+#endif 	/* __IPropertyStoreCapabilities_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCache_FWD_DEFINED__
+#define __IPropertyStoreCache_FWD_DEFINED__
+typedef interface IPropertyStoreCache IPropertyStoreCache;
+#endif 	/* __IPropertyStoreCache_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyEnumType_FWD_DEFINED__
+#define __IPropertyEnumType_FWD_DEFINED__
+typedef interface IPropertyEnumType IPropertyEnumType;
+#endif 	/* __IPropertyEnumType_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyEnumTypeList_FWD_DEFINED__
+#define __IPropertyEnumTypeList_FWD_DEFINED__
+typedef interface IPropertyEnumTypeList IPropertyEnumTypeList;
+#endif 	/* __IPropertyEnumTypeList_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescription_FWD_DEFINED__
+#define __IPropertyDescription_FWD_DEFINED__
+typedef interface IPropertyDescription IPropertyDescription;
+#endif 	/* __IPropertyDescription_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionAliasInfo_FWD_DEFINED__
+#define __IPropertyDescriptionAliasInfo_FWD_DEFINED__
+typedef interface IPropertyDescriptionAliasInfo IPropertyDescriptionAliasInfo;
+#endif 	/* __IPropertyDescriptionAliasInfo_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionSearchInfo_FWD_DEFINED__
+#define __IPropertyDescriptionSearchInfo_FWD_DEFINED__
+typedef interface IPropertyDescriptionSearchInfo IPropertyDescriptionSearchInfo;
+#endif 	/* __IPropertyDescriptionSearchInfo_FWD_DEFINED__ */
+
+
+#ifndef __IPropertySystem_FWD_DEFINED__
+#define __IPropertySystem_FWD_DEFINED__
+typedef interface IPropertySystem IPropertySystem;
+#endif 	/* __IPropertySystem_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionList_FWD_DEFINED__
+#define __IPropertyDescriptionList_FWD_DEFINED__
+typedef interface IPropertyDescriptionList IPropertyDescriptionList;
+#endif 	/* __IPropertyDescriptionList_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStoreFactory_FWD_DEFINED__
+#define __IPropertyStoreFactory_FWD_DEFINED__
+typedef interface IPropertyStoreFactory IPropertyStoreFactory;
+#endif 	/* __IPropertyStoreFactory_FWD_DEFINED__ */
+
+
+#ifndef __IDelayedPropertyStoreFactory_FWD_DEFINED__
+#define __IDelayedPropertyStoreFactory_FWD_DEFINED__
+typedef interface IDelayedPropertyStoreFactory IDelayedPropertyStoreFactory;
+#endif 	/* __IDelayedPropertyStoreFactory_FWD_DEFINED__ */
+
+
+#ifndef __IPersistSerializedPropStorage_FWD_DEFINED__
+#define __IPersistSerializedPropStorage_FWD_DEFINED__
+typedef interface IPersistSerializedPropStorage IPersistSerializedPropStorage;
+#endif 	/* __IPersistSerializedPropStorage_FWD_DEFINED__ */
+
+
+#ifndef __IPropertySystemChangeNotify_FWD_DEFINED__
+#define __IPropertySystemChangeNotify_FWD_DEFINED__
+typedef interface IPropertySystemChangeNotify IPropertySystemChangeNotify;
+#endif 	/* __IPropertySystemChangeNotify_FWD_DEFINED__ */
+
+
+#ifndef __ICreateObject_FWD_DEFINED__
+#define __ICreateObject_FWD_DEFINED__
+typedef interface ICreateObject ICreateObject;
+#endif 	/* __ICreateObject_FWD_DEFINED__ */
+
+
+#ifndef __InMemoryPropertyStore_FWD_DEFINED__
+#define __InMemoryPropertyStore_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class InMemoryPropertyStore InMemoryPropertyStore;
+#else
+typedef struct InMemoryPropertyStore InMemoryPropertyStore;
+#endif /* __cplusplus */
+
+#endif 	/* __InMemoryPropertyStore_FWD_DEFINED__ */
+
+
+#ifndef __PropertySystem_FWD_DEFINED__
+#define __PropertySystem_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class PropertySystem PropertySystem;
+#else
+typedef struct PropertySystem PropertySystem;
+#endif /* __cplusplus */
+
+#endif 	/* __PropertySystem_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "objidl.h"
+#include "oleidl.h"
+#include "ocidl.h"
+#include "shtypes.h"
+#include "structuredquery.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_propsys_0000_0000 */
+/* [local] */ 
+
+#ifndef PSSTDAPI
+#if defined(_PROPSYS_)
+#define PSSTDAPI          STDAPI
+#define PSSTDAPI_(type)   STDAPI_(type)
+#else
+#define PSSTDAPI          EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
+#define PSSTDAPI_(type)   EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
+#endif
+#endif // PSSTDAPI
+#if 0
+typedef PROPERTYKEY *REFPROPERTYKEY;
+
+#endif // 0
+#include <propkeydef.h>
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IInitializeWithFile_INTERFACE_DEFINED__
+#define __IInitializeWithFile_INTERFACE_DEFINED__
+
+/* interface IInitializeWithFile */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IInitializeWithFile;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("b7d14566-0509-4cce-a71f-0a554233bd9b")
+    IInitializeWithFile : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Initialize( 
+            /* [string][in] */ __RPC__in LPCWSTR pszFilePath,
+            /* [in] */ DWORD grfMode) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IInitializeWithFileVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IInitializeWithFile * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IInitializeWithFile * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IInitializeWithFile * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Initialize )( 
+            IInitializeWithFile * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszFilePath,
+            /* [in] */ DWORD grfMode);
+        
+        END_INTERFACE
+    } IInitializeWithFileVtbl;
+
+    interface IInitializeWithFile
+    {
+        CONST_VTBL struct IInitializeWithFileVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IInitializeWithFile_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IInitializeWithFile_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IInitializeWithFile_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IInitializeWithFile_Initialize(This,pszFilePath,grfMode)	\
+    ( (This)->lpVtbl -> Initialize(This,pszFilePath,grfMode) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IInitializeWithFile_INTERFACE_DEFINED__ */
+
+
+#ifndef __IInitializeWithStream_INTERFACE_DEFINED__
+#define __IInitializeWithStream_INTERFACE_DEFINED__
+
+/* interface IInitializeWithStream */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IInitializeWithStream;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("b824b49d-22ac-4161-ac8a-9916e8fa3f7f")
+    IInitializeWithStream : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Initialize( 
+            /* [in] */ IStream *pstream,
+            /* [in] */ DWORD grfMode) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IInitializeWithStreamVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IInitializeWithStream * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IInitializeWithStream * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IInitializeWithStream * This);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Initialize )( 
+            IInitializeWithStream * This,
+            /* [in] */ IStream *pstream,
+            /* [in] */ DWORD grfMode);
+        
+        END_INTERFACE
+    } IInitializeWithStreamVtbl;
+
+    interface IInitializeWithStream
+    {
+        CONST_VTBL struct IInitializeWithStreamVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IInitializeWithStream_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IInitializeWithStream_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IInitializeWithStream_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IInitializeWithStream_Initialize(This,pstream,grfMode)	\
+    ( (This)->lpVtbl -> Initialize(This,pstream,grfMode) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_RemoteInitialize_Proxy( 
+    IInitializeWithStream * This,
+    /* [in] */ __RPC__in_opt IStream *pstream,
+    /* [in] */ DWORD grfMode);
+
+
+void __RPC_STUB IInitializeWithStream_RemoteInitialize_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase);
+
+
+
+#endif 	/* __IInitializeWithStream_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStore_INTERFACE_DEFINED__
+#define __IPropertyStore_INTERFACE_DEFINED__
+
+/* interface IPropertyStore */
+/* [unique][object][helpstring][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyStore;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")
+    IPropertyStore : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetCount( 
+            /* [out] */ __RPC__out DWORD *cProps) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAt( 
+            /* [in] */ DWORD iProp,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetValue( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PROPVARIANT *pv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetValue( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyStoreVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyStore * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyStore * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyStore * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IPropertyStore * This,
+            /* [out] */ __RPC__out DWORD *cProps);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
+            IPropertyStore * This,
+            /* [in] */ DWORD iProp,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
+            IPropertyStore * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PROPVARIANT *pv);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetValue )( 
+            IPropertyStore * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *Commit )( 
+            IPropertyStore * This);
+        
+        END_INTERFACE
+    } IPropertyStoreVtbl;
+
+    interface IPropertyStore
+    {
+        CONST_VTBL struct IPropertyStoreVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStore_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyStore_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyStore_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyStore_GetCount(This,cProps)	\
+    ( (This)->lpVtbl -> GetCount(This,cProps) ) 
+
+#define IPropertyStore_GetAt(This,iProp,pkey)	\
+    ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) 
+
+#define IPropertyStore_GetValue(This,key,pv)	\
+    ( (This)->lpVtbl -> GetValue(This,key,pv) ) 
+
+#define IPropertyStore_SetValue(This,key,propvar)	\
+    ( (This)->lpVtbl -> SetValue(This,key,propvar) ) 
+
+#define IPropertyStore_Commit(This)	\
+    ( (This)->lpVtbl -> Commit(This) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyStore_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0003 */
+/* [local] */ 
+
+typedef /* [unique] */  __RPC_unique_pointer IPropertyStore *LPPROPERTYSTORE;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_s_ifspec;
+
+#ifndef __INamedPropertyStore_INTERFACE_DEFINED__
+#define __INamedPropertyStore_INTERFACE_DEFINED__
+
+/* interface INamedPropertyStore */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_INamedPropertyStore;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("71604b0f-97b0-4764-8577-2f13e98a1422")
+    INamedPropertyStore : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetNamedValue( 
+            /* [string][in] */ __RPC__in LPCWSTR pszName,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetNamedValue( 
+            /* [string][in] */ __RPC__in LPCWSTR pszName,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetNameCount( 
+            /* [out] */ __RPC__out DWORD *pdwCount) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetNameAt( 
+            /* [in] */ DWORD iProp,
+            /* [out] */ __RPC__deref_out_opt BSTR *pbstrName) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct INamedPropertyStoreVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            INamedPropertyStore * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            INamedPropertyStore * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            INamedPropertyStore * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetNamedValue )( 
+            INamedPropertyStore * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszName,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetNamedValue )( 
+            INamedPropertyStore * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszName,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetNameCount )( 
+            INamedPropertyStore * This,
+            /* [out] */ __RPC__out DWORD *pdwCount);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetNameAt )( 
+            INamedPropertyStore * This,
+            /* [in] */ DWORD iProp,
+            /* [out] */ __RPC__deref_out_opt BSTR *pbstrName);
+        
+        END_INTERFACE
+    } INamedPropertyStoreVtbl;
+
+    interface INamedPropertyStore
+    {
+        CONST_VTBL struct INamedPropertyStoreVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define INamedPropertyStore_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define INamedPropertyStore_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define INamedPropertyStore_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define INamedPropertyStore_GetNamedValue(This,pszName,ppropvar)	\
+    ( (This)->lpVtbl -> GetNamedValue(This,pszName,ppropvar) ) 
+
+#define INamedPropertyStore_SetNamedValue(This,pszName,propvar)	\
+    ( (This)->lpVtbl -> SetNamedValue(This,pszName,propvar) ) 
+
+#define INamedPropertyStore_GetNameCount(This,pdwCount)	\
+    ( (This)->lpVtbl -> GetNameCount(This,pdwCount) ) 
+
+#define INamedPropertyStore_GetNameAt(This,iProp,pbstrName)	\
+    ( (This)->lpVtbl -> GetNameAt(This,iProp,pbstrName) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __INamedPropertyStore_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0004 */
+/* [local] */ 
+
+/* [v1_enum] */ 
+enum tagGETPROPERTYSTOREFLAGS
+    {	GPS_DEFAULT	= 0,
+	GPS_HANDLERPROPERTIESONLY	= 0x1,
+	GPS_READWRITE	= 0x2,
+	GPS_TEMPORARY	= 0x4,
+	GPS_FASTPROPERTIESONLY	= 0x8,
+	GPS_OPENSLOWITEM	= 0x10,
+	GPS_DELAYCREATION	= 0x20,
+	GPS_BESTEFFORT	= 0x40,
+	GPS_MASK_VALID	= 0x7f
+    } ;
+typedef int GETPROPERTYSTOREFLAGS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_s_ifspec;
+
+#ifndef __IObjectWithPropertyKey_INTERFACE_DEFINED__
+#define __IObjectWithPropertyKey_INTERFACE_DEFINED__
+
+/* interface IObjectWithPropertyKey */
+/* [uuid][object] */ 
+
+
+EXTERN_C const IID IID_IObjectWithPropertyKey;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("fc0ca0a7-c316-4fd2-9031-3e628e6d4f23")
+    IObjectWithPropertyKey : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE SetPropertyKey( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( 
+            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IObjectWithPropertyKeyVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IObjectWithPropertyKey * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IObjectWithPropertyKey * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IObjectWithPropertyKey * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( 
+            IObjectWithPropertyKey * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
+            IObjectWithPropertyKey * This,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        END_INTERFACE
+    } IObjectWithPropertyKeyVtbl;
+
+    interface IObjectWithPropertyKey
+    {
+        CONST_VTBL struct IObjectWithPropertyKeyVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IObjectWithPropertyKey_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IObjectWithPropertyKey_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IObjectWithPropertyKey_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IObjectWithPropertyKey_SetPropertyKey(This,key)	\
+    ( (This)->lpVtbl -> SetPropertyKey(This,key) ) 
+
+#define IObjectWithPropertyKey_GetPropertyKey(This,pkey)	\
+    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IObjectWithPropertyKey_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0005 */
+/* [local] */ 
+
+typedef /* [v1_enum] */ 
+enum tagPKA_FLAGS
+    {	PKA_SET	= 0,
+	PKA_APPEND	= ( PKA_SET + 1 ) ,
+	PKA_DELETE	= ( PKA_APPEND + 1 ) 
+    } 	PKA_FLAGS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_s_ifspec;
+
+#ifndef __IPropertyChange_INTERFACE_DEFINED__
+#define __IPropertyChange_INTERFACE_DEFINED__
+
+/* interface IPropertyChange */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyChange;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("f917bc8a-1bba-4478-a245-1bde03eb9431")
+    IPropertyChange : public IObjectWithPropertyKey
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE ApplyToPropVariant( 
+            /* [in] */ __RPC__in REFPROPVARIANT propvarIn,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarOut) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyChangeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyChange * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyChange * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyChange * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( 
+            IPropertyChange * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
+            IPropertyChange * This,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        HRESULT ( STDMETHODCALLTYPE *ApplyToPropVariant )( 
+            IPropertyChange * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvarIn,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarOut);
+        
+        END_INTERFACE
+    } IPropertyChangeVtbl;
+
+    interface IPropertyChange
+    {
+        CONST_VTBL struct IPropertyChangeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyChange_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyChange_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyChange_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyChange_SetPropertyKey(This,key)	\
+    ( (This)->lpVtbl -> SetPropertyKey(This,key) ) 
+
+#define IPropertyChange_GetPropertyKey(This,pkey)	\
+    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
+
+
+#define IPropertyChange_ApplyToPropVariant(This,propvarIn,ppropvarOut)	\
+    ( (This)->lpVtbl -> ApplyToPropVariant(This,propvarIn,ppropvarOut) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyChange_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyChangeArray_INTERFACE_DEFINED__
+#define __IPropertyChangeArray_INTERFACE_DEFINED__
+
+/* interface IPropertyChangeArray */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyChangeArray;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("380f5cad-1b5e-42f2-805d-637fd392d31e")
+    IPropertyChangeArray : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetCount( 
+            /* [out] */ __RPC__out UINT *pcOperations) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAt( 
+            /* [in] */ UINT iIndex,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE InsertAt( 
+            /* [in] */ UINT iIndex,
+            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Append( 
+            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE AppendOrReplace( 
+            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RemoveAt( 
+            /* [in] */ UINT iIndex) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE IsKeyInArray( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyChangeArrayVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyChangeArray * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyChangeArray * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyChangeArray * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IPropertyChangeArray * This,
+            /* [out] */ __RPC__out UINT *pcOperations);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
+            IPropertyChangeArray * This,
+            /* [in] */ UINT iIndex,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *InsertAt )( 
+            IPropertyChangeArray * This,
+            /* [in] */ UINT iIndex,
+            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
+        
+        HRESULT ( STDMETHODCALLTYPE *Append )( 
+            IPropertyChangeArray * This,
+            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
+        
+        HRESULT ( STDMETHODCALLTYPE *AppendOrReplace )( 
+            IPropertyChangeArray * This,
+            /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
+        
+        HRESULT ( STDMETHODCALLTYPE *RemoveAt )( 
+            IPropertyChangeArray * This,
+            /* [in] */ UINT iIndex);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsKeyInArray )( 
+            IPropertyChangeArray * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key);
+        
+        END_INTERFACE
+    } IPropertyChangeArrayVtbl;
+
+    interface IPropertyChangeArray
+    {
+        CONST_VTBL struct IPropertyChangeArrayVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyChangeArray_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyChangeArray_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyChangeArray_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyChangeArray_GetCount(This,pcOperations)	\
+    ( (This)->lpVtbl -> GetCount(This,pcOperations) ) 
+
+#define IPropertyChangeArray_GetAt(This,iIndex,riid,ppv)	\
+    ( (This)->lpVtbl -> GetAt(This,iIndex,riid,ppv) ) 
+
+#define IPropertyChangeArray_InsertAt(This,iIndex,ppropChange)	\
+    ( (This)->lpVtbl -> InsertAt(This,iIndex,ppropChange) ) 
+
+#define IPropertyChangeArray_Append(This,ppropChange)	\
+    ( (This)->lpVtbl -> Append(This,ppropChange) ) 
+
+#define IPropertyChangeArray_AppendOrReplace(This,ppropChange)	\
+    ( (This)->lpVtbl -> AppendOrReplace(This,ppropChange) ) 
+
+#define IPropertyChangeArray_RemoveAt(This,iIndex)	\
+    ( (This)->lpVtbl -> RemoveAt(This,iIndex) ) 
+
+#define IPropertyChangeArray_IsKeyInArray(This,key)	\
+    ( (This)->lpVtbl -> IsKeyInArray(This,key) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyChangeArray_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCapabilities_INTERFACE_DEFINED__
+#define __IPropertyStoreCapabilities_INTERFACE_DEFINED__
+
+/* interface IPropertyStoreCapabilities */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyStoreCapabilities;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("c8e2d566-186e-4d49-bf41-6909ead56acc")
+    IPropertyStoreCapabilities : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyStoreCapabilitiesVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyStoreCapabilities * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyStoreCapabilities * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyStoreCapabilities * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsPropertyWritable )( 
+            IPropertyStoreCapabilities * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key);
+        
+        END_INTERFACE
+    } IPropertyStoreCapabilitiesVtbl;
+
+    interface IPropertyStoreCapabilities
+    {
+        CONST_VTBL struct IPropertyStoreCapabilitiesVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStoreCapabilities_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyStoreCapabilities_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyStoreCapabilities_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyStoreCapabilities_IsPropertyWritable(This,key)	\
+    ( (This)->lpVtbl -> IsPropertyWritable(This,key) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyStoreCapabilities_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCache_INTERFACE_DEFINED__
+#define __IPropertyStoreCache_INTERFACE_DEFINED__
+
+/* interface IPropertyStoreCache */
+/* [unique][object][uuid] */ 
+
+typedef /* [v1_enum] */ 
+enum _PSC_STATE
+    {	PSC_NORMAL	= 0,
+	PSC_NOTINSOURCE	= 1,
+	PSC_DIRTY	= 2,
+	PSC_READONLY	= 3
+    } 	PSC_STATE;
+
+
+EXTERN_C const IID IID_IPropertyStoreCache;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("3017056d-9a91-4e90-937d-746c72abbf4f")
+    IPropertyStoreCache : public IPropertyStore
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetState( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PSC_STATE *pstate) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetValueAndState( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvar,
+            /* [out] */ __RPC__out PSC_STATE *pstate) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetState( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ PSC_STATE state) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetValueAndState( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,
+            /* [in] */ PSC_STATE state) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyStoreCacheVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyStoreCache * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyStoreCache * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IPropertyStoreCache * This,
+            /* [out] */ __RPC__out DWORD *cProps);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
+            IPropertyStoreCache * This,
+            /* [in] */ DWORD iProp,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PROPVARIANT *pv);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetValue )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *Commit )( 
+            IPropertyStoreCache * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetState )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PSC_STATE *pstate);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValueAndState )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvar,
+            /* [out] */ __RPC__out PSC_STATE *pstate);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetState )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ PSC_STATE state);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetValueAndState )( 
+            IPropertyStoreCache * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,
+            /* [in] */ PSC_STATE state);
+        
+        END_INTERFACE
+    } IPropertyStoreCacheVtbl;
+
+    interface IPropertyStoreCache
+    {
+        CONST_VTBL struct IPropertyStoreCacheVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStoreCache_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyStoreCache_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyStoreCache_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyStoreCache_GetCount(This,cProps)	\
+    ( (This)->lpVtbl -> GetCount(This,cProps) ) 
+
+#define IPropertyStoreCache_GetAt(This,iProp,pkey)	\
+    ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) 
+
+#define IPropertyStoreCache_GetValue(This,key,pv)	\
+    ( (This)->lpVtbl -> GetValue(This,key,pv) ) 
+
+#define IPropertyStoreCache_SetValue(This,key,propvar)	\
+    ( (This)->lpVtbl -> SetValue(This,key,propvar) ) 
+
+#define IPropertyStoreCache_Commit(This)	\
+    ( (This)->lpVtbl -> Commit(This) ) 
+
+
+#define IPropertyStoreCache_GetState(This,key,pstate)	\
+    ( (This)->lpVtbl -> GetState(This,key,pstate) ) 
+
+#define IPropertyStoreCache_GetValueAndState(This,key,ppropvar,pstate)	\
+    ( (This)->lpVtbl -> GetValueAndState(This,key,ppropvar,pstate) ) 
+
+#define IPropertyStoreCache_SetState(This,key,state)	\
+    ( (This)->lpVtbl -> SetState(This,key,state) ) 
+
+#define IPropertyStoreCache_SetValueAndState(This,key,ppropvar,state)	\
+    ( (This)->lpVtbl -> SetValueAndState(This,key,ppropvar,state) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyStoreCache_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyEnumType_INTERFACE_DEFINED__
+#define __IPropertyEnumType_INTERFACE_DEFINED__
+
+/* interface IPropertyEnumType */
+/* [unique][object][uuid] */ 
+
+/* [v1_enum] */ 
+enum tagPROPENUMTYPE
+    {	PET_DISCRETEVALUE	= 0,
+	PET_RANGEDVALUE	= 1,
+	PET_DEFAULTVALUE	= 2,
+	PET_ENDRANGE	= 3
+    } ;
+typedef enum tagPROPENUMTYPE PROPENUMTYPE;
+
+
+EXTERN_C const IID IID_IPropertyEnumType;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("11e1fbf9-2d56-4a6b-8db3-7cd193a471f2")
+    IPropertyEnumType : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetEnumType( 
+            /* [out] */ __RPC__out PROPENUMTYPE *penumtype) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetValue( 
+            /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetRangeMinValue( 
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarMin) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetRangeSetValue( 
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarSet) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDisplayText( 
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyEnumTypeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyEnumType * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyEnumType * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyEnumType * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEnumType )( 
+            IPropertyEnumType * This,
+            /* [out] */ __RPC__out PROPENUMTYPE *penumtype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
+            IPropertyEnumType * This,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRangeMinValue )( 
+            IPropertyEnumType * This,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarMin);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRangeSetValue )( 
+            IPropertyEnumType * This,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarSet);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayText )( 
+            IPropertyEnumType * This,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay);
+        
+        END_INTERFACE
+    } IPropertyEnumTypeVtbl;
+
+    interface IPropertyEnumType
+    {
+        CONST_VTBL struct IPropertyEnumTypeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyEnumType_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyEnumType_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyEnumType_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyEnumType_GetEnumType(This,penumtype)	\
+    ( (This)->lpVtbl -> GetEnumType(This,penumtype) ) 
+
+#define IPropertyEnumType_GetValue(This,ppropvar)	\
+    ( (This)->lpVtbl -> GetValue(This,ppropvar) ) 
+
+#define IPropertyEnumType_GetRangeMinValue(This,ppropvarMin)	\
+    ( (This)->lpVtbl -> GetRangeMinValue(This,ppropvarMin) ) 
+
+#define IPropertyEnumType_GetRangeSetValue(This,ppropvarSet)	\
+    ( (This)->lpVtbl -> GetRangeSetValue(This,ppropvarSet) ) 
+
+#define IPropertyEnumType_GetDisplayText(This,ppszDisplay)	\
+    ( (This)->lpVtbl -> GetDisplayText(This,ppszDisplay) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyEnumType_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyEnumTypeList_INTERFACE_DEFINED__
+#define __IPropertyEnumTypeList_INTERFACE_DEFINED__
+
+/* interface IPropertyEnumTypeList */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyEnumTypeList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("a99400f4-3d84-4557-94ba-1242fb2cc9a6")
+    IPropertyEnumTypeList : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetCount( 
+            /* [out] */ __RPC__out UINT *pctypes) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAt( 
+            /* [in] */ UINT itype,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetConditionAt( 
+            /* [in] */ UINT nIndex,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE FindMatchingIndex( 
+            /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,
+            /* [out] */ __RPC__out UINT *pnIndex) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyEnumTypeListVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyEnumTypeList * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyEnumTypeList * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyEnumTypeList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IPropertyEnumTypeList * This,
+            /* [out] */ __RPC__out UINT *pctypes);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
+            IPropertyEnumTypeList * This,
+            /* [in] */ UINT itype,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetConditionAt )( 
+            IPropertyEnumTypeList * This,
+            /* [in] */ UINT nIndex,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *FindMatchingIndex )( 
+            IPropertyEnumTypeList * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,
+            /* [out] */ __RPC__out UINT *pnIndex);
+        
+        END_INTERFACE
+    } IPropertyEnumTypeListVtbl;
+
+    interface IPropertyEnumTypeList
+    {
+        CONST_VTBL struct IPropertyEnumTypeListVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyEnumTypeList_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyEnumTypeList_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyEnumTypeList_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyEnumTypeList_GetCount(This,pctypes)	\
+    ( (This)->lpVtbl -> GetCount(This,pctypes) ) 
+
+#define IPropertyEnumTypeList_GetAt(This,itype,riid,ppv)	\
+    ( (This)->lpVtbl -> GetAt(This,itype,riid,ppv) ) 
+
+#define IPropertyEnumTypeList_GetConditionAt(This,nIndex,riid,ppv)	\
+    ( (This)->lpVtbl -> GetConditionAt(This,nIndex,riid,ppv) ) 
+
+#define IPropertyEnumTypeList_FindMatchingIndex(This,propvarCmp,pnIndex)	\
+    ( (This)->lpVtbl -> FindMatchingIndex(This,propvarCmp,pnIndex) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyEnumTypeList_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescription_INTERFACE_DEFINED__
+#define __IPropertyDescription_INTERFACE_DEFINED__
+
+/* interface IPropertyDescription */
+/* [unique][object][uuid] */ 
+
+/* [v1_enum] */ 
+enum tagPROPDESC_TYPE_FLAGS
+    {	PDTF_DEFAULT	= 0,
+	PDTF_MULTIPLEVALUES	= 0x1,
+	PDTF_ISINNATE	= 0x2,
+	PDTF_ISGROUP	= 0x4,
+	PDTF_CANGROUPBY	= 0x8,
+	PDTF_CANSTACKBY	= 0x10,
+	PDTF_ISTREEPROPERTY	= 0x20,
+	PDTF_INCLUDEINFULLTEXTQUERY	= 0x40,
+	PDTF_ISVIEWABLE	= 0x80,
+	PDTF_ISQUERYABLE	= 0x100,
+	PDTF_ISSYSTEMPROPERTY	= 0x80000000,
+	PDTF_MASK_ALL	= 0x800001ff
+    } ;
+typedef int PROPDESC_TYPE_FLAGS;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_VIEW_FLAGS
+    {	PDVF_DEFAULT	= 0,
+	PDVF_CENTERALIGN	= 0x1,
+	PDVF_RIGHTALIGN	= 0x2,
+	PDVF_BEGINNEWGROUP	= 0x4,
+	PDVF_FILLAREA	= 0x8,
+	PDVF_SORTDESCENDING	= 0x10,
+	PDVF_SHOWONLYIFPRESENT	= 0x20,
+	PDVF_SHOWBYDEFAULT	= 0x40,
+	PDVF_SHOWINPRIMARYLIST	= 0x80,
+	PDVF_SHOWINSECONDARYLIST	= 0x100,
+	PDVF_HIDELABEL	= 0x200,
+	PDVF_HIDDEN	= 0x800,
+	PDVF_CANWRAP	= 0x1000,
+	PDVF_MASK_ALL	= 0x1bff
+    } ;
+typedef int PROPDESC_VIEW_FLAGS;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_DISPLAYTYPE
+    {	PDDT_STRING	= 0,
+	PDDT_NUMBER	= 1,
+	PDDT_BOOLEAN	= 2,
+	PDDT_DATETIME	= 3,
+	PDDT_ENUMERATED	= 4
+    } ;
+typedef enum tagPROPDESC_DISPLAYTYPE PROPDESC_DISPLAYTYPE;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_GROUPING_RANGE
+    {	PDGR_DISCRETE	= 0,
+	PDGR_ALPHANUMERIC	= 1,
+	PDGR_SIZE	= 2,
+	PDGR_DYNAMIC	= 3,
+	PDGR_DATE	= 4,
+	PDGR_PERCENT	= 5,
+	PDGR_ENUMERATED	= 6
+    } ;
+typedef enum tagPROPDESC_GROUPING_RANGE PROPDESC_GROUPING_RANGE;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_FORMAT_FLAGS
+    {	PDFF_DEFAULT	= 0,
+	PDFF_PREFIXNAME	= 0x1,
+	PDFF_FILENAME	= 0x2,
+	PDFF_ALWAYSKB	= 0x4,
+	PDFF_RESERVED_RIGHTTOLEFT	= 0x8,
+	PDFF_SHORTTIME	= 0x10,
+	PDFF_LONGTIME	= 0x20,
+	PDFF_HIDETIME	= 0x40,
+	PDFF_SHORTDATE	= 0x80,
+	PDFF_LONGDATE	= 0x100,
+	PDFF_HIDEDATE	= 0x200,
+	PDFF_RELATIVEDATE	= 0x400,
+	PDFF_USEEDITINVITATION	= 0x800,
+	PDFF_READONLY	= 0x1000,
+	PDFF_NOAUTOREADINGORDER	= 0x2000
+    } ;
+typedef int PROPDESC_FORMAT_FLAGS;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_SORTDESCRIPTION
+    {	PDSD_GENERAL	= 0,
+	PDSD_A_Z	= 1,
+	PDSD_LOWEST_HIGHEST	= 2,
+	PDSD_SMALLEST_BIGGEST	= 3,
+	PDSD_OLDEST_NEWEST	= 4
+    } ;
+typedef enum tagPROPDESC_SORTDESCRIPTION PROPDESC_SORTDESCRIPTION;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE
+    {	PDRDT_GENERAL	= 0,
+	PDRDT_DATE	= 1,
+	PDRDT_SIZE	= 2,
+	PDRDT_COUNT	= 3,
+	PDRDT_REVISION	= 4,
+	PDRDT_LENGTH	= 5,
+	PDRDT_DURATION	= 6,
+	PDRDT_SPEED	= 7,
+	PDRDT_RATE	= 8,
+	PDRDT_RATING	= 9,
+	PDRDT_PRIORITY	= 10
+    } ;
+typedef enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE PROPDESC_RELATIVEDESCRIPTION_TYPE;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_AGGREGATION_TYPE
+    {	PDAT_DEFAULT	= 0,
+	PDAT_FIRST	= 1,
+	PDAT_SUM	= 2,
+	PDAT_AVERAGE	= 3,
+	PDAT_DATERANGE	= 4,
+	PDAT_UNION	= 5,
+	PDAT_MAX	= 6,
+	PDAT_MIN	= 7
+    } ;
+typedef enum tagPROPDESC_AGGREGATION_TYPE PROPDESC_AGGREGATION_TYPE;
+
+/* [v1_enum] */ 
+enum tagPROPDESC_CONDITION_TYPE
+    {	PDCOT_NONE	= 0,
+	PDCOT_STRING	= 1,
+	PDCOT_SIZE	= 2,
+	PDCOT_DATETIME	= 3,
+	PDCOT_BOOLEAN	= 4,
+	PDCOT_NUMBER	= 5
+    } ;
+typedef enum tagPROPDESC_CONDITION_TYPE PROPDESC_CONDITION_TYPE;
+
+
+EXTERN_C const IID IID_IPropertyDescription;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("6f79d558-3e96-4549-a1d1-7d75d2288814")
+    IPropertyDescription : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( 
+            /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetCanonicalName( 
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyType( 
+            /* [out] */ __RPC__out VARTYPE *pvartype) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDisplayName( 
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetEditInvitation( 
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetTypeFlags( 
+            /* [in] */ PROPDESC_TYPE_FLAGS mask,
+            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetViewFlags( 
+            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnWidth( 
+            /* [out] */ __RPC__out UINT *pcxChars) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDisplayType( 
+            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetColumnState( 
+            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetGroupingRange( 
+            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetRelativeDescriptionType( 
+            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetRelativeDescription( 
+            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetSortDescription( 
+            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetSortDescriptionLabel( 
+            /* [in] */ BOOL fDescending,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAggregationType( 
+            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetConditionType( 
+            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetEnumTypeList( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE CoerceToCanonicalValue( 
+            /* [out][in] */ PROPVARIANT *ppropvar) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( 
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE IsValueCanonical( 
+            /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyDescriptionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyDescription * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyDescription * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyDescription * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( 
+            IPropertyDescription * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out VARTYPE *pvartype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 
+            IPropertyDescription * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( 
+            IPropertyDescription * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( 
+            IPropertyDescription * This,
+            /* [in] */ PROPDESC_TYPE_FLAGS mask,
+            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out UINT *pcxChars);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( 
+            IPropertyDescription * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( 
+            IPropertyDescription * This,
+            /* [in] */ BOOL fDescending,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
+            IPropertyDescription * This,
+            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( 
+            IPropertyDescription * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( 
+            IPropertyDescription * This,
+            /* [out][in] */ PROPVARIANT *ppropvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
+            IPropertyDescription * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( 
+            IPropertyDescription * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar);
+        
+        END_INTERFACE
+    } IPropertyDescriptionVtbl;
+
+    interface IPropertyDescription
+    {
+        CONST_VTBL struct IPropertyDescriptionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescription_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyDescription_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyDescription_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyDescription_GetPropertyKey(This,pkey)	\
+    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
+
+#define IPropertyDescription_GetCanonicalName(This,ppszName)	\
+    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) 
+
+#define IPropertyDescription_GetPropertyType(This,pvartype)	\
+    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) 
+
+#define IPropertyDescription_GetDisplayName(This,ppszName)	\
+    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) 
+
+#define IPropertyDescription_GetEditInvitation(This,ppszInvite)	\
+    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) 
+
+#define IPropertyDescription_GetTypeFlags(This,mask,ppdtFlags)	\
+    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) 
+
+#define IPropertyDescription_GetViewFlags(This,ppdvFlags)	\
+    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) 
+
+#define IPropertyDescription_GetDefaultColumnWidth(This,pcxChars)	\
+    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) 
+
+#define IPropertyDescription_GetDisplayType(This,pdisplaytype)	\
+    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) 
+
+#define IPropertyDescription_GetColumnState(This,pcsFlags)	\
+    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) 
+
+#define IPropertyDescription_GetGroupingRange(This,pgr)	\
+    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) 
+
+#define IPropertyDescription_GetRelativeDescriptionType(This,prdt)	\
+    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) 
+
+#define IPropertyDescription_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)	\
+    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) 
+
+#define IPropertyDescription_GetSortDescription(This,psd)	\
+    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) 
+
+#define IPropertyDescription_GetSortDescriptionLabel(This,fDescending,ppszDescription)	\
+    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) 
+
+#define IPropertyDescription_GetAggregationType(This,paggtype)	\
+    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) 
+
+#define IPropertyDescription_GetConditionType(This,pcontype,popDefault)	\
+    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) 
+
+#define IPropertyDescription_GetEnumTypeList(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) 
+
+#define IPropertyDescription_CoerceToCanonicalValue(This,ppropvar)	\
+    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) 
+
+#define IPropertyDescription_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)	\
+    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) 
+
+#define IPropertyDescription_IsValueCanonical(This,propvar)	\
+    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_RemoteCoerceToCanonicalValue_Proxy( 
+    IPropertyDescription * This,
+    /* [in] */ __RPC__in REFPROPVARIANT propvar,
+    /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+
+
+void __RPC_STUB IPropertyDescription_RemoteCoerceToCanonicalValue_Stub(
+    IRpcStubBuffer *This,
+    IRpcChannelBuffer *_pRpcChannelBuffer,
+    PRPC_MESSAGE _pRpcMessage,
+    DWORD *_pdwStubPhase);
+
+
+
+#endif 	/* __IPropertyDescription_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__
+#define __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__
+
+/* interface IPropertyDescriptionAliasInfo */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyDescriptionAliasInfo;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("f67104fc-2af9-46fd-b32d-243c1404f3d1")
+    IPropertyDescriptionAliasInfo : public IPropertyDescription
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetSortByAlias( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAdditionalSortByAliases( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyDescriptionAliasInfoVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyDescriptionAliasInfo * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyDescriptionAliasInfo * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out VARTYPE *pvartype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ PROPDESC_TYPE_FLAGS mask,
+            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out UINT *pcxChars);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ BOOL fDescending,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [out][in] */ PROPVARIANT *ppropvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortByAlias )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAdditionalSortByAliases )( 
+            IPropertyDescriptionAliasInfo * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        END_INTERFACE
+    } IPropertyDescriptionAliasInfoVtbl;
+
+    interface IPropertyDescriptionAliasInfo
+    {
+        CONST_VTBL struct IPropertyDescriptionAliasInfoVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescriptionAliasInfo_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyDescriptionAliasInfo_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyDescriptionAliasInfo_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyDescriptionAliasInfo_GetPropertyKey(This,pkey)	\
+    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
+
+#define IPropertyDescriptionAliasInfo_GetCanonicalName(This,ppszName)	\
+    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) 
+
+#define IPropertyDescriptionAliasInfo_GetPropertyType(This,pvartype)	\
+    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) 
+
+#define IPropertyDescriptionAliasInfo_GetDisplayName(This,ppszName)	\
+    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) 
+
+#define IPropertyDescriptionAliasInfo_GetEditInvitation(This,ppszInvite)	\
+    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) 
+
+#define IPropertyDescriptionAliasInfo_GetTypeFlags(This,mask,ppdtFlags)	\
+    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) 
+
+#define IPropertyDescriptionAliasInfo_GetViewFlags(This,ppdvFlags)	\
+    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) 
+
+#define IPropertyDescriptionAliasInfo_GetDefaultColumnWidth(This,pcxChars)	\
+    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) 
+
+#define IPropertyDescriptionAliasInfo_GetDisplayType(This,pdisplaytype)	\
+    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) 
+
+#define IPropertyDescriptionAliasInfo_GetColumnState(This,pcsFlags)	\
+    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) 
+
+#define IPropertyDescriptionAliasInfo_GetGroupingRange(This,pgr)	\
+    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) 
+
+#define IPropertyDescriptionAliasInfo_GetRelativeDescriptionType(This,prdt)	\
+    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) 
+
+#define IPropertyDescriptionAliasInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)	\
+    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) 
+
+#define IPropertyDescriptionAliasInfo_GetSortDescription(This,psd)	\
+    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) 
+
+#define IPropertyDescriptionAliasInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription)	\
+    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) 
+
+#define IPropertyDescriptionAliasInfo_GetAggregationType(This,paggtype)	\
+    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) 
+
+#define IPropertyDescriptionAliasInfo_GetConditionType(This,pcontype,popDefault)	\
+    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) 
+
+#define IPropertyDescriptionAliasInfo_GetEnumTypeList(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) 
+
+#define IPropertyDescriptionAliasInfo_CoerceToCanonicalValue(This,ppropvar)	\
+    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) 
+
+#define IPropertyDescriptionAliasInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)	\
+    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) 
+
+#define IPropertyDescriptionAliasInfo_IsValueCanonical(This,propvar)	\
+    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) 
+
+
+#define IPropertyDescriptionAliasInfo_GetSortByAlias(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetSortByAlias(This,riid,ppv) ) 
+
+#define IPropertyDescriptionAliasInfo_GetAdditionalSortByAliases(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetAdditionalSortByAliases(This,riid,ppv) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__
+#define __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__
+
+/* interface IPropertyDescriptionSearchInfo */
+/* [unique][object][uuid] */ 
+
+/* [v1_enum] */ 
+enum tagPROPDESC_SEARCHINFO_FLAGS
+    {	PDSIF_DEFAULT	= 0,
+	PDSIF_ININVERTEDINDEX	= 0x1,
+	PDSIF_ISCOLUMN	= 0x2,
+	PDSIF_ISCOLUMNSPARSE	= 0x4
+    } ;
+typedef int PROPDESC_SEARCHINFO_FLAGS;
+
+typedef /* [v1_enum] */ 
+enum tagPROPDESC_COLUMNINDEX_TYPE
+    {	PDCIT_NONE	= 0,
+	PDCIT_ONDISK	= 1,
+	PDCIT_INMEMORY	= 2
+    } 	PROPDESC_COLUMNINDEX_TYPE;
+
+
+EXTERN_C const IID IID_IPropertyDescriptionSearchInfo;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("078f91bd-29a2-440f-924e-46a291524520")
+    IPropertyDescriptionSearchInfo : public IPropertyDescription
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetSearchInfoFlags( 
+            /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetColumnIndexType( 
+            /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetProjectionString( 
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetMaxSize( 
+            /* [out] */ __RPC__out UINT *pcbMaxSize) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyDescriptionSearchInfoVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyDescriptionSearchInfo * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyDescriptionSearchInfo * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPERTYKEY *pkey);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out VARTYPE *pvartype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ PROPDESC_TYPE_FLAGS mask,
+            /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out UINT *pcxChars);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetColumnState )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ BOOL fDescending,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+            /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out][in] */ PROPVARIANT *ppropvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSearchInfoFlags )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetColumnIndexType )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetProjectionString )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetMaxSize )( 
+            IPropertyDescriptionSearchInfo * This,
+            /* [out] */ __RPC__out UINT *pcbMaxSize);
+        
+        END_INTERFACE
+    } IPropertyDescriptionSearchInfoVtbl;
+
+    interface IPropertyDescriptionSearchInfo
+    {
+        CONST_VTBL struct IPropertyDescriptionSearchInfoVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescriptionSearchInfo_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyDescriptionSearchInfo_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyDescriptionSearchInfo_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyDescriptionSearchInfo_GetPropertyKey(This,pkey)	\
+    ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) 
+
+#define IPropertyDescriptionSearchInfo_GetCanonicalName(This,ppszName)	\
+    ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) 
+
+#define IPropertyDescriptionSearchInfo_GetPropertyType(This,pvartype)	\
+    ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) 
+
+#define IPropertyDescriptionSearchInfo_GetDisplayName(This,ppszName)	\
+    ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) 
+
+#define IPropertyDescriptionSearchInfo_GetEditInvitation(This,ppszInvite)	\
+    ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) 
+
+#define IPropertyDescriptionSearchInfo_GetTypeFlags(This,mask,ppdtFlags)	\
+    ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) 
+
+#define IPropertyDescriptionSearchInfo_GetViewFlags(This,ppdvFlags)	\
+    ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) 
+
+#define IPropertyDescriptionSearchInfo_GetDefaultColumnWidth(This,pcxChars)	\
+    ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) 
+
+#define IPropertyDescriptionSearchInfo_GetDisplayType(This,pdisplaytype)	\
+    ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) 
+
+#define IPropertyDescriptionSearchInfo_GetColumnState(This,pcsFlags)	\
+    ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) 
+
+#define IPropertyDescriptionSearchInfo_GetGroupingRange(This,pgr)	\
+    ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) 
+
+#define IPropertyDescriptionSearchInfo_GetRelativeDescriptionType(This,prdt)	\
+    ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) 
+
+#define IPropertyDescriptionSearchInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2)	\
+    ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) 
+
+#define IPropertyDescriptionSearchInfo_GetSortDescription(This,psd)	\
+    ( (This)->lpVtbl -> GetSortDescription(This,psd) ) 
+
+#define IPropertyDescriptionSearchInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription)	\
+    ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) 
+
+#define IPropertyDescriptionSearchInfo_GetAggregationType(This,paggtype)	\
+    ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) 
+
+#define IPropertyDescriptionSearchInfo_GetConditionType(This,pcontype,popDefault)	\
+    ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) 
+
+#define IPropertyDescriptionSearchInfo_GetEnumTypeList(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) 
+
+#define IPropertyDescriptionSearchInfo_CoerceToCanonicalValue(This,ppropvar)	\
+    ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) 
+
+#define IPropertyDescriptionSearchInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay)	\
+    ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) 
+
+#define IPropertyDescriptionSearchInfo_IsValueCanonical(This,propvar)	\
+    ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) 
+
+
+#define IPropertyDescriptionSearchInfo_GetSearchInfoFlags(This,ppdsiFlags)	\
+    ( (This)->lpVtbl -> GetSearchInfoFlags(This,ppdsiFlags) ) 
+
+#define IPropertyDescriptionSearchInfo_GetColumnIndexType(This,ppdciType)	\
+    ( (This)->lpVtbl -> GetColumnIndexType(This,ppdciType) ) 
+
+#define IPropertyDescriptionSearchInfo_GetProjectionString(This,ppszProjection)	\
+    ( (This)->lpVtbl -> GetProjectionString(This,ppszProjection) ) 
+
+#define IPropertyDescriptionSearchInfo_GetMaxSize(This,pcbMaxSize)	\
+    ( (This)->lpVtbl -> GetMaxSize(This,pcbMaxSize) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0014 */
+/* [local] */ 
+
+/* [v1_enum] */ 
+enum tagPROPDESC_ENUMFILTER
+    {	PDEF_ALL	= 0,
+	PDEF_SYSTEM	= 1,
+	PDEF_NONSYSTEM	= 2,
+	PDEF_VIEWABLE	= 3,
+	PDEF_QUERYABLE	= 4,
+	PDEF_INFULLTEXTQUERY	= 5,
+	PDEF_COLUMN	= 6
+    } ;
+typedef enum tagPROPDESC_ENUMFILTER PROPDESC_ENUMFILTER;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_s_ifspec;
+
+#ifndef __IPropertySystem_INTERFACE_DEFINED__
+#define __IPropertySystem_INTERFACE_DEFINED__
+
+/* interface IPropertySystem */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertySystem;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("ca724e8a-c3e6-442b-88a4-6fb0db8035a3")
+    IPropertySystem : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescription( 
+            /* [in] */ __RPC__in REFPROPERTYKEY propkey,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionByName( 
+            /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionListFromString( 
+            /* [string][in] */ __RPC__in LPCWSTR pszPropList,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE EnumeratePropertyDescriptions( 
+            /* [in] */ PROPDESC_ENUMFILTER filterOn,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+            /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,
+            /* [in] */ DWORD cchText) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE FormatForDisplayAlloc( 
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RegisterPropertySchema( 
+            /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE UnregisterPropertySchema( 
+            /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RefreshPropertySchema( void) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertySystemVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertySystem * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertySystem * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertySystem * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescription )( 
+            IPropertySystem * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY propkey,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionByName )( 
+            IPropertySystem * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionListFromString )( 
+            IPropertySystem * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszPropList,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumeratePropertyDescriptions )( 
+            IPropertySystem * This,
+            /* [in] */ PROPDESC_ENUMFILTER filterOn,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( 
+            IPropertySystem * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+            /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,
+            /* [in] */ DWORD cchText);
+        
+        HRESULT ( STDMETHODCALLTYPE *FormatForDisplayAlloc )( 
+            IPropertySystem * This,
+            /* [in] */ __RPC__in REFPROPERTYKEY key,
+            /* [in] */ __RPC__in REFPROPVARIANT propvar,
+            /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+            /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterPropertySchema )( 
+            IPropertySystem * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszPath);
+        
+        HRESULT ( STDMETHODCALLTYPE *UnregisterPropertySchema )( 
+            IPropertySystem * This,
+            /* [string][in] */ __RPC__in LPCWSTR pszPath);
+        
+        HRESULT ( STDMETHODCALLTYPE *RefreshPropertySchema )( 
+            IPropertySystem * This);
+        
+        END_INTERFACE
+    } IPropertySystemVtbl;
+
+    interface IPropertySystem
+    {
+        CONST_VTBL struct IPropertySystemVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertySystem_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertySystem_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertySystem_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertySystem_GetPropertyDescription(This,propkey,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyDescription(This,propkey,riid,ppv) ) 
+
+#define IPropertySystem_GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) ) 
+
+#define IPropertySystem_GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) ) 
+
+#define IPropertySystem_EnumeratePropertyDescriptions(This,filterOn,riid,ppv)	\
+    ( (This)->lpVtbl -> EnumeratePropertyDescriptions(This,filterOn,riid,ppv) ) 
+
+#define IPropertySystem_FormatForDisplay(This,key,propvar,pdff,pszText,cchText)	\
+    ( (This)->lpVtbl -> FormatForDisplay(This,key,propvar,pdff,pszText,cchText) ) 
+
+#define IPropertySystem_FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay)	\
+    ( (This)->lpVtbl -> FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) ) 
+
+#define IPropertySystem_RegisterPropertySchema(This,pszPath)	\
+    ( (This)->lpVtbl -> RegisterPropertySchema(This,pszPath) ) 
+
+#define IPropertySystem_UnregisterPropertySchema(This,pszPath)	\
+    ( (This)->lpVtbl -> UnregisterPropertySchema(This,pszPath) ) 
+
+#define IPropertySystem_RefreshPropertySchema(This)	\
+    ( (This)->lpVtbl -> RefreshPropertySchema(This) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertySystem_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionList_INTERFACE_DEFINED__
+#define __IPropertyDescriptionList_INTERFACE_DEFINED__
+
+/* interface IPropertyDescriptionList */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyDescriptionList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("1f9fc1d0-c39b-4b26-817f-011967d3440e")
+    IPropertyDescriptionList : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetCount( 
+            /* [out] */ __RPC__out UINT *pcElem) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetAt( 
+            /* [in] */ UINT iElem,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyDescriptionListVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyDescriptionList * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyDescriptionList * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyDescriptionList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCount )( 
+            IPropertyDescriptionList * This,
+            /* [out] */ __RPC__out UINT *pcElem);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAt )( 
+            IPropertyDescriptionList * This,
+            /* [in] */ UINT iElem,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        END_INTERFACE
+    } IPropertyDescriptionListVtbl;
+
+    interface IPropertyDescriptionList
+    {
+        CONST_VTBL struct IPropertyDescriptionListVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescriptionList_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyDescriptionList_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyDescriptionList_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyDescriptionList_GetCount(This,pcElem)	\
+    ( (This)->lpVtbl -> GetCount(This,pcElem) ) 
+
+#define IPropertyDescriptionList_GetAt(This,iElem,riid,ppv)	\
+    ( (This)->lpVtbl -> GetAt(This,iElem,riid,ppv) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyDescriptionList_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStoreFactory_INTERFACE_DEFINED__
+#define __IPropertyStoreFactory_INTERFACE_DEFINED__
+
+/* interface IPropertyStoreFactory */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertyStoreFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("bc110b6d-57e8-4148-a9c6-91015ab2f3a5")
+    IPropertyStoreFactory : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyStore( 
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyStoreForKeys( 
+            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
+            /* [in] */ UINT cKeys,
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertyStoreFactoryVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertyStoreFactory * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertyStoreFactory * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertyStoreFactory * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( 
+            IPropertyStoreFactory * This,
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( 
+            IPropertyStoreFactory * This,
+            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
+            /* [in] */ UINT cKeys,
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        END_INTERFACE
+    } IPropertyStoreFactoryVtbl;
+
+    interface IPropertyStoreFactory
+    {
+        CONST_VTBL struct IPropertyStoreFactoryVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStoreFactory_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertyStoreFactory_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertyStoreFactory_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) 
+
+#define IPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertyStoreFactory_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__
+#define __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__
+
+/* interface IDelayedPropertyStoreFactory */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IDelayedPropertyStoreFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("40d4577f-e237-4bdb-bd69-58f089431b6a")
+    IDelayedPropertyStoreFactory : public IPropertyStoreFactory
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetDelayedPropertyStore( 
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [in] */ DWORD dwStoreId,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IDelayedPropertyStoreFactoryVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDelayedPropertyStoreFactory * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDelayedPropertyStoreFactory * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDelayedPropertyStoreFactory * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( 
+            IDelayedPropertyStoreFactory * This,
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( 
+            IDelayedPropertyStoreFactory * This,
+            /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
+            /* [in] */ UINT cKeys,
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDelayedPropertyStore )( 
+            IDelayedPropertyStoreFactory * This,
+            /* [in] */ GETPROPERTYSTOREFLAGS flags,
+            /* [in] */ DWORD dwStoreId,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        END_INTERFACE
+    } IDelayedPropertyStoreFactoryVtbl;
+
+    interface IDelayedPropertyStoreFactory
+    {
+        CONST_VTBL struct IDelayedPropertyStoreFactoryVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDelayedPropertyStoreFactory_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDelayedPropertyStoreFactory_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDelayedPropertyStoreFactory_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDelayedPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) 
+
+#define IDelayedPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv)	\
+    ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) 
+
+
+#define IDelayedPropertyStoreFactory_GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv)	\
+    ( (This)->lpVtbl -> GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0018 */
+/* [local] */ 
+
+/* [v1_enum] */ 
+enum tagPERSIST_SPROPSTORE_FLAGS
+    {	FPSPS_READONLY	= 0x1
+    } ;
+typedef int PERSIST_SPROPSTORE_FLAGS;
+
+typedef struct tagSERIALIZEDPROPSTORAGE SERIALIZEDPROPSTORAGE;
+
+typedef SERIALIZEDPROPSTORAGE __unaligned *PUSERIALIZEDPROPSTORAGE;
+
+typedef const SERIALIZEDPROPSTORAGE __unaligned *PCUSERIALIZEDPROPSTORAGE;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_s_ifspec;
+
+#ifndef __IPersistSerializedPropStorage_INTERFACE_DEFINED__
+#define __IPersistSerializedPropStorage_INTERFACE_DEFINED__
+
+/* interface IPersistSerializedPropStorage */
+/* [object][local][unique][uuid] */ 
+
+
+EXTERN_C const IID IID_IPersistSerializedPropStorage;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("e318ad57-0aa0-450f-aca5-6fab7103d917")
+    IPersistSerializedPropStorage : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE SetFlags( 
+            /* [in] */ PERSIST_SPROPSTORE_FLAGS flags) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetPropertyStorage( 
+            /* [in] */ 
+            __in_bcount(cb)  PCUSERIALIZEDPROPSTORAGE psps,
+            /* [in] */ 
+            __in  DWORD cb) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetPropertyStorage( 
+            /* [out] */ 
+            __deref_out_bcount(*pcb)  SERIALIZEDPROPSTORAGE **ppsps,
+            /* [out] */ 
+            __out  DWORD *pcb) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPersistSerializedPropStorageVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPersistSerializedPropStorage * This,
+            /* [in] */ REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPersistSerializedPropStorage * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPersistSerializedPropStorage * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetFlags )( 
+            IPersistSerializedPropStorage * This,
+            /* [in] */ PERSIST_SPROPSTORE_FLAGS flags);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPropertyStorage )( 
+            IPersistSerializedPropStorage * This,
+            /* [in] */ 
+            __in_bcount(cb)  PCUSERIALIZEDPROPSTORAGE psps,
+            /* [in] */ 
+            __in  DWORD cb);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPropertyStorage )( 
+            IPersistSerializedPropStorage * This,
+            /* [out] */ 
+            __deref_out_bcount(*pcb)  SERIALIZEDPROPSTORAGE **ppsps,
+            /* [out] */ 
+            __out  DWORD *pcb);
+        
+        END_INTERFACE
+    } IPersistSerializedPropStorageVtbl;
+
+    interface IPersistSerializedPropStorage
+    {
+        CONST_VTBL struct IPersistSerializedPropStorageVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPersistSerializedPropStorage_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPersistSerializedPropStorage_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPersistSerializedPropStorage_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPersistSerializedPropStorage_SetFlags(This,flags)	\
+    ( (This)->lpVtbl -> SetFlags(This,flags) ) 
+
+#define IPersistSerializedPropStorage_SetPropertyStorage(This,psps,cb)	\
+    ( (This)->lpVtbl -> SetPropertyStorage(This,psps,cb) ) 
+
+#define IPersistSerializedPropStorage_GetPropertyStorage(This,ppsps,pcb)	\
+    ( (This)->lpVtbl -> GetPropertyStorage(This,ppsps,pcb) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPersistSerializedPropStorage_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertySystemChangeNotify_INTERFACE_DEFINED__
+#define __IPropertySystemChangeNotify_INTERFACE_DEFINED__
+
+/* interface IPropertySystemChangeNotify */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IPropertySystemChangeNotify;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("fa955fd9-38be-4879-a6ce-824cf52d609f")
+    IPropertySystemChangeNotify : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE SchemaRefreshed( void) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IPropertySystemChangeNotifyVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IPropertySystemChangeNotify * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IPropertySystemChangeNotify * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IPropertySystemChangeNotify * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SchemaRefreshed )( 
+            IPropertySystemChangeNotify * This);
+        
+        END_INTERFACE
+    } IPropertySystemChangeNotifyVtbl;
+
+    interface IPropertySystemChangeNotify
+    {
+        CONST_VTBL struct IPropertySystemChangeNotifyVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IPropertySystemChangeNotify_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IPropertySystemChangeNotify_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IPropertySystemChangeNotify_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IPropertySystemChangeNotify_SchemaRefreshed(This)	\
+    ( (This)->lpVtbl -> SchemaRefreshed(This) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IPropertySystemChangeNotify_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICreateObject_INTERFACE_DEFINED__
+#define __ICreateObject_INTERFACE_DEFINED__
+
+/* interface ICreateObject */
+/* [object][unique][uuid] */ 
+
+
+EXTERN_C const IID IID_ICreateObject;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("75121952-e0d0-43e5-9380-1d80483acf72")
+    ICreateObject : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE CreateObject( 
+            /* [in] */ __RPC__in REFCLSID clsid,
+            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct ICreateObjectVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ICreateObject * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ICreateObject * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ICreateObject * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateObject )( 
+            ICreateObject * This,
+            /* [in] */ __RPC__in REFCLSID clsid,
+            /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+        
+        END_INTERFACE
+    } ICreateObjectVtbl;
+
+    interface ICreateObject
+    {
+        CONST_VTBL struct ICreateObjectVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ICreateObject_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ICreateObject_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ICreateObject_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ICreateObject_CreateObject(This,clsid,pUnkOuter,riid,ppv)	\
+    ( (This)->lpVtbl -> CreateObject(This,clsid,pUnkOuter,riid,ppv) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ICreateObject_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0021 */
+/* [local] */ 
+
+// Format a property value for display purposes
+PSSTDAPI PSFormatForDisplay(
+    __in REFPROPERTYKEY propkey,
+    __in REFPROPVARIANT propvar,
+    __in PROPDESC_FORMAT_FLAGS pdfFlags,
+    __out_ecount(cchText) LPWSTR pwszText,
+    __in DWORD cchText);
+
+PSSTDAPI PSFormatForDisplayAlloc(
+    __in REFPROPERTYKEY key,
+    __in REFPROPVARIANT propvar,
+    __in PROPDESC_FORMAT_FLAGS pdff,
+    __deref_out PWSTR *ppszDisplay);
+
+PSSTDAPI PSFormatPropertyValue(
+    __in IPropertyStore *pps,
+    __in IPropertyDescription *ppd,
+    __in PROPDESC_FORMAT_FLAGS pdff,
+    __deref_out LPWSTR *ppszDisplay);
+
+
+#define PKEY_PIDSTR_MAX     10   // will take care of any long integer value
+#define GUIDSTRING_MAX      (1 + 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)  // "{12345678-1234-1234-1234-123456789012}"
+#define PKEYSTR_MAX         (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)
+
+// Convert a PROPERTYKEY to and from a PWSTR
+PSSTDAPI PSStringFromPropertyKey(
+    __in REFPROPERTYKEY pkey,
+    __out_ecount(cch) LPWSTR psz,
+    __in UINT cch);
+
+PSSTDAPI PSPropertyKeyFromString(
+    __in LPCWSTR pszString,
+    __out PROPERTYKEY *pkey);
+
+
+// Creates an in-memory property store
+// Returns an IPropertyStore, IPersistSerializedPropStorage, and related interfaces interface
+PSSTDAPI PSCreateMemoryPropertyStore(
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Create a read-only, delay-bind multiplexing property store
+// Returns an IPropertyStore interface or related interfaces
+PSSTDAPI PSCreateDelayedMultiplexPropertyStore(
+    __in GETPROPERTYSTOREFLAGS flags,
+    __in IDelayedPropertyStoreFactory *pdpsf,
+    __in_ecount(cStores) const DWORD *rgStoreIds,
+    __in DWORD cStores,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Create a read-only property store from one or more sources (which each must support either IPropertyStore or IPropertySetStorage)
+// Returns an IPropertyStore interface or related interfaces
+PSSTDAPI PSCreateMultiplexPropertyStore(
+    __in_ecount(cStores) IUnknown **prgpunkStores,
+    __in DWORD cStores,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Create a container for IPropertyChanges
+// Returns an IPropertyChangeArray interface
+PSSTDAPI PSCreatePropertyChangeArray(
+    __in_ecount_opt(cChanges) const PROPERTYKEY *rgpropkey,
+    __in_ecount_opt(cChanges) const PKA_FLAGS *rgflags,
+    __in_ecount_opt(cChanges) const PROPVARIANT *rgpropvar,
+    __in UINT cChanges,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Create a simple property change
+// Returns an IPropertyChange interface
+PSSTDAPI PSCreateSimplePropertyChange(
+    __in PKA_FLAGS flags,
+    __in REFPROPERTYKEY key,
+    __in REFPROPVARIANT propvar,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Get a property description
+// Returns an IPropertyDescription interface
+PSSTDAPI PSGetPropertyDescription(
+    __in REFPROPERTYKEY propkey,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+PSSTDAPI PSGetPropertyDescriptionByName(
+    __in LPCWSTR pszCanonicalName,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Lookup a per-machine registered file property handler
+PSSTDAPI PSLookupPropertyHandlerCLSID(
+    __in PCWSTR pszFilePath,
+    __out CLSID *pclsid);
+// Get a property handler, on Vista or downlevel to XP
+// punkItem is a shell item created with an SHCreateItemXXX API
+// Returns an IPropertyStore
+PSSTDAPI PSGetItemPropertyHandler(
+    __in IUnknown *punkItem,
+    __in BOOL fReadWrite,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Get a property handler, on Vista or downlevel to XP
+// punkItem is a shell item created with an SHCreateItemXXX API
+// punkCreateObject supports ICreateObject
+// Returns an IPropertyStore
+PSSTDAPI PSGetItemPropertyHandlerWithCreateObject(
+    __in IUnknown *punkItem,
+    __in BOOL fReadWrite,
+    __in IUnknown *punkCreateObject,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Get or set a property value from a store
+PSSTDAPI PSGetPropertyValue(
+    __in IPropertyStore *pps,
+    __in IPropertyDescription *ppd,
+    __out PROPVARIANT *ppropvar);
+
+PSSTDAPI PSSetPropertyValue(
+    __in IPropertyStore *pps,
+    __in IPropertyDescription *ppd,
+    __in REFPROPVARIANT propvar);
+
+
+// Interact with the set of property descriptions
+PSSTDAPI PSRegisterPropertySchema(
+    __in PCWSTR pszPath);
+
+PSSTDAPI PSUnregisterPropertySchema(
+    __in PCWSTR pszPath);
+
+PSSTDAPI PSRefreshPropertySchema();
+
+// Returns either: IPropertyDescriptionList or IEnumUnknown interfaces
+PSSTDAPI PSEnumeratePropertyDescriptions(
+    __in PROPDESC_ENUMFILTER filterOn,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Convert between a PROPERTYKEY and its canonical name
+PSSTDAPI PSGetPropertyKeyFromName(
+    __in PCWSTR pszName,
+    __out PROPERTYKEY *ppropkey);
+
+PSSTDAPI PSGetNameFromPropertyKey(
+    __in REFPROPERTYKEY propkey,
+    __deref_out PWSTR *ppszCanonicalName);
+
+
+// Coerce and canonicalize a property value
+PSSTDAPI PSCoerceToCanonicalValue(
+    __in REFPROPERTYKEY key,
+    __inout PROPVARIANT *ppropvar);
+
+
+// Convert a 'prop:' string into a list of property descriptions
+// Returns an IPropertyDescriptionList interface
+PSSTDAPI PSGetPropertyDescriptionListFromString(
+    __in LPCWSTR pszPropList,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Wrap an IPropertySetStorage interface in an IPropertyStore interface
+// Returns an IPropertyStore or related interface
+PSSTDAPI PSCreatePropertyStoreFromPropertySetStorage(
+    __in IPropertySetStorage *ppss,
+    DWORD grfMode,
+    REFIID riid,
+    __deref_out void **ppv);
+
+
+// punkSource must support IPropertyStore or IPropertySetStorage
+// On success, the returned ppv is guaranteed to support IPropertyStore.
+// If punkSource already supports IPropertyStore, no wrapper is created.
+PSSTDAPI PSCreatePropertyStoreFromObject(
+    __in IUnknown *punk,
+    __in DWORD grfMode,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// punkSource must support IPropertyStore
+// riid may be IPropertyStore, IPropertySetStorage, IPropertyStoreCapabilities, or IObjectProvider
+PSSTDAPI PSCreateAdapterFromPropertyStore(
+    __in IPropertyStore *pps,
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Talk to the property system using an interface
+// Returns an IPropertySystem interface
+PSSTDAPI PSGetPropertySystem(
+    __in REFIID riid,
+    __deref_out void **ppv);
+
+
+// Obtain a value from serialized property storage
+PSSTDAPI PSGetPropertyFromPropertyStorage(
+    __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, 
+    __in DWORD cb, 
+    __in REFPROPERTYKEY rpkey, 
+    __out PROPVARIANT *ppropvar);
+
+
+// Obtain a named value from serialized property storage
+PSSTDAPI PSGetNamedPropertyFromPropertyStorage(
+    __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, 
+    __in DWORD cb, 
+    __in LPCWSTR pszName, 
+    __out PROPVARIANT *ppropvar);
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_s_ifspec;
+
+
+#ifndef __PropSysObjects_LIBRARY_DEFINED__
+#define __PropSysObjects_LIBRARY_DEFINED__
+
+/* library PropSysObjects */
+/* [version][lcid][uuid] */ 
+
+
+EXTERN_C const IID LIBID_PropSysObjects;
+
+EXTERN_C const CLSID CLSID_InMemoryPropertyStore;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("9a02e012-6303-4e1e-b9a1-630f802592c5")
+InMemoryPropertyStore;
+#endif
+
+EXTERN_C const CLSID CLSID_PropertySystem;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("b8967f85-58ae-4f46-9fb2-5d7904798f4b")
+PropertySystem;
+#endif
+#endif /* __PropSysObjects_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); 
+unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); 
+unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); 
+void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); 
+
+unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
+unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
+unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
+void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); 
+
+unsigned long             __RPC_USER  BSTR_UserSize64(     unsigned long *, unsigned long            , BSTR * ); 
+unsigned char * __RPC_USER  BSTR_UserMarshal64(  unsigned long *, unsigned char *, BSTR * ); 
+unsigned char * __RPC_USER  BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * ); 
+void                      __RPC_USER  BSTR_UserFree64(     unsigned long *, BSTR * ); 
+
+unsigned long             __RPC_USER  LPSAFEARRAY_UserSize64(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
+unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal64(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
+unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
+void                      __RPC_USER  LPSAFEARRAY_UserFree64(     unsigned long *, LPSAFEARRAY * ); 
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Proxy( 
+    IInitializeWithStream * This,
+    /* [in] */ IStream *pstream,
+    /* [in] */ DWORD grfMode);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Stub( 
+    IInitializeWithStream * This,
+    /* [in] */ __RPC__in_opt IStream *pstream,
+    /* [in] */ DWORD grfMode);
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Proxy( 
+    IPropertyDescription * This,
+    /* [out][in] */ PROPVARIANT *ppropvar);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Stub( 
+    IPropertyDescription * This,
+    /* [in] */ __RPC__in REFPROPVARIANT propvar,
+    /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+
+
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/rpcsal.h b/portaudio/src/hostapi/wasapi/mingw-include/rpcsal.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/rpcsal.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/rpcsal.h
@@ -1,113 +1,113 @@
-#pragma once
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define RPC_range(min,max)
-
-#define __RPC__in           
-#define __RPC__in_string
-#define __RPC__in_opt_string
-#define __RPC__deref_opt_in_opt
-#define __RPC__opt_in_opt_string
-#define __RPC__in_ecount(size) 
-#define __RPC__in_ecount_full(size)
-#define __RPC__in_ecount_full_string(size)
-#define __RPC__in_ecount_part(size, length)
-#define __RPC__in_ecount_full_opt(size)
-#define __RPC__in_ecount_full_opt_string(size)
-#define __RPC__inout_ecount_full_opt_string(size)
-#define __RPC__in_ecount_part_opt(size, length)
-
-#define __RPC__deref_in 
-#define __RPC__deref_in_string
-#define __RPC__deref_opt_in
-#define __RPC__deref_in_opt
-#define __RPC__deref_in_ecount(size) 
-#define __RPC__deref_in_ecount_part(size, length) 
-#define __RPC__deref_in_ecount_full(size) 
-#define __RPC__deref_in_ecount_full_opt(size)
-#define __RPC__deref_in_ecount_full_string(size)
-#define __RPC__deref_in_ecount_full_opt_string(size)
-#define __RPC__deref_in_ecount_opt(size) 
-#define __RPC__deref_in_ecount_opt_string(size)
-#define __RPC__deref_in_ecount_part_opt(size, length) 
-
-// [out]
-#define __RPC__out     
-#define __RPC__out_ecount(size) 
-#define __RPC__out_ecount_part(size, length) 
-#define __RPC__out_ecount_full(size)
-#define __RPC__out_ecount_full_string(size)
-
-// [in,out] 
-#define __RPC__inout                                   
-#define __RPC__inout_string
-#define __RPC__opt_inout
-#define __RPC__inout_ecount(size)                     
-#define __RPC__inout_ecount_part(size, length)    
-#define __RPC__inout_ecount_full(size)          
-#define __RPC__inout_ecount_full_string(size)          
-
-// [in,unique] 
-#define __RPC__in_opt       
-#define __RPC__in_ecount_opt(size)   
-
-
-// [in,out,unique] 
-#define __RPC__inout_opt    
-#define __RPC__inout_ecount_opt(size)  
-#define __RPC__inout_ecount_part_opt(size, length) 
-#define __RPC__inout_ecount_full_opt(size)     
-#define __RPC__inout_ecount_full_string(size)
-
-// [out] **
-#define __RPC__deref_out   
-#define __RPC__deref_out_string
-#define __RPC__deref_out_opt 
-#define __RPC__deref_out_opt_string
-#define __RPC__deref_out_ecount(size) 
-#define __RPC__deref_out_ecount_part(size, length) 
-#define __RPC__deref_out_ecount_full(size)  
-#define __RPC__deref_out_ecount_full_string(size)
-
-
-// [in,out] **, second pointer decoration. 
-#define __RPC__deref_inout    
-#define __RPC__deref_inout_string
-#define __RPC__deref_inout_opt 
-#define __RPC__deref_inout_opt_string
-#define __RPC__deref_inout_ecount_full(size)
-#define __RPC__deref_inout_ecount_full_string(size)
-#define __RPC__deref_inout_ecount_opt(size) 
-#define __RPC__deref_inout_ecount_part_opt(size, length) 
-#define __RPC__deref_inout_ecount_full_opt(size) 
-#define __RPC__deref_inout_ecount_full_opt_string(size) 
-
-// #define __RPC_out_opt    out_opt is not allowed in rpc
-
-// [in,out,unique] 
-#define __RPC__deref_opt_inout  
-#define __RPC__deref_opt_inout_string
-#define __RPC__deref_opt_inout_ecount(size)     
-#define __RPC__deref_opt_inout_ecount_part(size, length) 
-#define __RPC__deref_opt_inout_ecount_full(size) 
-#define __RPC__deref_opt_inout_ecount_full_string(size)
-
-#define __RPC__deref_out_ecount_opt(size) 
-#define __RPC__deref_out_ecount_part_opt(size, length) 
-#define __RPC__deref_out_ecount_full_opt(size) 
-#define __RPC__deref_out_ecount_full_opt_string(size)
-
-#define __RPC__deref_opt_inout_opt      
-#define __RPC__deref_opt_inout_opt_string
-#define __RPC__deref_opt_inout_ecount_opt(size)   
-#define __RPC__deref_opt_inout_ecount_part_opt(size, length) 
-#define __RPC__deref_opt_inout_ecount_full_opt(size) 
-#define __RPC__deref_opt_inout_ecount_full_opt_string(size) 
-
-#define __RPC_full_pointer  
-#define __RPC_unique_pointer
-#define __RPC_ref_pointer
-#define __RPC_string                               
+#pragma once
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#define RPC_range(min,max)
+
+#define __RPC__in           
+#define __RPC__in_string
+#define __RPC__in_opt_string
+#define __RPC__deref_opt_in_opt
+#define __RPC__opt_in_opt_string
+#define __RPC__in_ecount(size) 
+#define __RPC__in_ecount_full(size)
+#define __RPC__in_ecount_full_string(size)
+#define __RPC__in_ecount_part(size, length)
+#define __RPC__in_ecount_full_opt(size)
+#define __RPC__in_ecount_full_opt_string(size)
+#define __RPC__inout_ecount_full_opt_string(size)
+#define __RPC__in_ecount_part_opt(size, length)
+
+#define __RPC__deref_in 
+#define __RPC__deref_in_string
+#define __RPC__deref_opt_in
+#define __RPC__deref_in_opt
+#define __RPC__deref_in_ecount(size) 
+#define __RPC__deref_in_ecount_part(size, length) 
+#define __RPC__deref_in_ecount_full(size) 
+#define __RPC__deref_in_ecount_full_opt(size)
+#define __RPC__deref_in_ecount_full_string(size)
+#define __RPC__deref_in_ecount_full_opt_string(size)
+#define __RPC__deref_in_ecount_opt(size) 
+#define __RPC__deref_in_ecount_opt_string(size)
+#define __RPC__deref_in_ecount_part_opt(size, length) 
+
+// [out]
+#define __RPC__out     
+#define __RPC__out_ecount(size) 
+#define __RPC__out_ecount_part(size, length) 
+#define __RPC__out_ecount_full(size)
+#define __RPC__out_ecount_full_string(size)
+
+// [in,out] 
+#define __RPC__inout                                   
+#define __RPC__inout_string
+#define __RPC__opt_inout
+#define __RPC__inout_ecount(size)                     
+#define __RPC__inout_ecount_part(size, length)    
+#define __RPC__inout_ecount_full(size)          
+#define __RPC__inout_ecount_full_string(size)          
+
+// [in,unique] 
+#define __RPC__in_opt       
+#define __RPC__in_ecount_opt(size)   
+
+
+// [in,out,unique] 
+#define __RPC__inout_opt    
+#define __RPC__inout_ecount_opt(size)  
+#define __RPC__inout_ecount_part_opt(size, length) 
+#define __RPC__inout_ecount_full_opt(size)     
+#define __RPC__inout_ecount_full_string(size)
+
+// [out] **
+#define __RPC__deref_out   
+#define __RPC__deref_out_string
+#define __RPC__deref_out_opt 
+#define __RPC__deref_out_opt_string
+#define __RPC__deref_out_ecount(size) 
+#define __RPC__deref_out_ecount_part(size, length) 
+#define __RPC__deref_out_ecount_full(size)  
+#define __RPC__deref_out_ecount_full_string(size)
+
+
+// [in,out] **, second pointer decoration. 
+#define __RPC__deref_inout    
+#define __RPC__deref_inout_string
+#define __RPC__deref_inout_opt 
+#define __RPC__deref_inout_opt_string
+#define __RPC__deref_inout_ecount_full(size)
+#define __RPC__deref_inout_ecount_full_string(size)
+#define __RPC__deref_inout_ecount_opt(size) 
+#define __RPC__deref_inout_ecount_part_opt(size, length) 
+#define __RPC__deref_inout_ecount_full_opt(size) 
+#define __RPC__deref_inout_ecount_full_opt_string(size) 
+
+// #define __RPC_out_opt    out_opt is not allowed in rpc
+
+// [in,out,unique] 
+#define __RPC__deref_opt_inout  
+#define __RPC__deref_opt_inout_string
+#define __RPC__deref_opt_inout_ecount(size)     
+#define __RPC__deref_opt_inout_ecount_part(size, length) 
+#define __RPC__deref_opt_inout_ecount_full(size) 
+#define __RPC__deref_opt_inout_ecount_full_string(size)
+
+#define __RPC__deref_out_ecount_opt(size) 
+#define __RPC__deref_out_ecount_part_opt(size, length) 
+#define __RPC__deref_out_ecount_full_opt(size) 
+#define __RPC__deref_out_ecount_full_opt_string(size)
+
+#define __RPC__deref_opt_inout_opt      
+#define __RPC__deref_opt_inout_opt_string
+#define __RPC__deref_opt_inout_ecount_opt(size)   
+#define __RPC__deref_opt_inout_ecount_part_opt(size, length) 
+#define __RPC__deref_opt_inout_ecount_full_opt(size) 
+#define __RPC__deref_opt_inout_ecount_full_opt_string(size) 
+
+#define __RPC_full_pointer  
+#define __RPC_unique_pointer
+#define __RPC_ref_pointer
+#define __RPC_string                               
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/sal.h b/portaudio/src/hostapi/wasapi/mingw-include/sal.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/sal.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/sal.h
@@ -1,252 +1,252 @@
-#pragma once
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-/*#define __null*/ // << Conflicts with GCC internal type __null
-#define __notnull
-#define __maybenull
-#define __readonly
-#define __notreadonly
-#define __maybereadonly
-#define __valid
-#define __notvalid
-#define __maybevalid
-#define __readableTo(extent)
-#define __elem_readableTo(size)
-#define __byte_readableTo(size)
-#define __writableTo(size)
-#define __elem_writableTo(size)
-#define __byte_writableTo(size)
-#define __deref
-#define __pre
-#define __post
-#define __precond(expr)
-#define __postcond(expr)
-#define __exceptthat
-#define __execeptthat
-#define __inner_success(expr)
-#define __inner_checkReturn
-#define __inner_typefix(ctype)
-#define __inner_override
-#define __inner_callback
-#define __inner_blocksOn(resource)
-#define __inner_fallthrough_dec
-#define __inner_fallthrough
-#define __refparam
-#define __inner_control_entrypoint(category)
-#define __inner_data_entrypoint(category)
-
-#define __ecount(size)
-#define __bcount(size)
-#define __in
-#define __in_ecount(size)
-#define __in_bcount(size)
-#define __in_z
-#define __in_ecount_z(size)
-#define __in_bcount_z(size)
-#define __in_nz
-#define __in_ecount_nz(size)
-#define __in_bcount_nz(size)
-#define __out
-#define __out_ecount(size)
-#define __out_bcount(size)
-#define __out_ecount_part(size,length)
-#define __out_bcount_part(size,length)
-#define __out_ecount_full(size)
-#define __out_bcount_full(size)
-#define __out_z
-#define __out_z_opt
-#define __out_ecount_z(size)
-#define __out_bcount_z(size)
-#define __out_ecount_part_z(size,length)
-#define __out_bcount_part_z(size,length)
-#define __out_ecount_full_z(size)
-#define __out_bcount_full_z(size)
-#define __out_nz
-#define __out_nz_opt
-#define __out_ecount_nz(size)
-#define __out_bcount_nz(size)
-#define __inout
-#define __inout_ecount(size)
-#define __inout_bcount(size)
-#define __inout_ecount_part(size,length)
-#define __inout_bcount_part(size,length)
-#define __inout_ecount_full(size)
-#define __inout_bcount_full(size)
-#define __inout_z
-#define __inout_ecount_z(size)
-#define __inout_bcount_z(size)
-#define __inout_nz
-#define __inout_ecount_nz(size)
-#define __inout_bcount_nz(size)
-#define __ecount_opt(size)
-#define __bcount_opt(size)
-#define __in_opt
-#define __in_ecount_opt(size)
-#define __in_bcount_opt(size)
-#define __in_z_opt
-#define __in_ecount_z_opt(size)
-#define __in_bcount_z_opt(size)
-#define __in_nz_opt
-#define __in_ecount_nz_opt(size)
-#define __in_bcount_nz_opt(size)
-#define __out_opt
-#define __out_ecount_opt(size)
-#define __out_bcount_opt(size)
-#define __out_ecount_part_opt(size,length)
-#define __out_bcount_part_opt(size,length)
-#define __out_ecount_full_opt(size)
-#define __out_bcount_full_opt(size)
-#define __out_ecount_z_opt(size)
-#define __out_bcount_z_opt(size)
-#define __out_ecount_part_z_opt(size,length)
-#define __out_bcount_part_z_opt(size,length)
-#define __out_ecount_full_z_opt(size)
-#define __out_bcount_full_z_opt(size)
-#define __out_ecount_nz_opt(size)
-#define __out_bcount_nz_opt(size)
-#define __inout_opt
-#define __inout_ecount_opt(size)
-#define __inout_bcount_opt(size)
-#define __inout_ecount_part_opt(size,length)
-#define __inout_bcount_part_opt(size,length)
-#define __inout_ecount_full_opt(size)
-#define __inout_bcount_full_opt(size)
-#define __inout_z_opt
-#define __inout_ecount_z_opt(size)
-#define __inout_ecount_z_opt(size)
-#define __inout_bcount_z_opt(size)
-#define __inout_nz_opt
-#define __inout_ecount_nz_opt(size)
-#define __inout_bcount_nz_opt(size)
-#define __deref_ecount(size)
-#define __deref_bcount(size)
-#define __deref_out
-#define __deref_out_ecount(size)
-#define __deref_out_bcount(size)
-#define __deref_out_ecount_part(size,length)
-#define __deref_out_bcount_part(size,length)
-#define __deref_out_ecount_full(size)
-#define __deref_out_bcount_full(size)
-#define __deref_out_z
-#define __deref_out_ecount_z(size)
-#define __deref_out_bcount_z(size)
-#define __deref_out_nz
-#define __deref_out_ecount_nz(size)
-#define __deref_out_bcount_nz(size)
-#define __deref_inout
-#define __deref_inout_z
-#define __deref_inout_ecount(size)
-#define __deref_inout_bcount(size)
-#define __deref_inout_ecount_part(size,length)
-#define __deref_inout_bcount_part(size,length)
-#define __deref_inout_ecount_full(size)
-#define __deref_inout_bcount_full(size)
-#define __deref_inout_z
-#define __deref_inout_ecount_z(size)
-#define __deref_inout_bcount_z(size)
-#define __deref_inout_nz
-#define __deref_inout_ecount_nz(size)
-#define __deref_inout_bcount_nz(size)
-#define __deref_ecount_opt(size)
-#define __deref_bcount_opt(size)
-#define __deref_out_opt
-#define __deref_out_ecount_opt(size)
-#define __deref_out_bcount_opt(size)
-#define __deref_out_ecount_part_opt(size,length)
-#define __deref_out_bcount_part_opt(size,length)
-#define __deref_out_ecount_full_opt(size)
-#define __deref_out_bcount_full_opt(size)
-#define __deref_out_z_opt
-#define __deref_out_ecount_z_opt(size)
-#define __deref_out_bcount_z_opt(size)
-#define __deref_out_nz_opt
-#define __deref_out_ecount_nz_opt(size)
-#define __deref_out_bcount_nz_opt(size)
-#define __deref_inout_opt
-#define __deref_inout_ecount_opt(size)
-#define __deref_inout_bcount_opt(size)
-#define __deref_inout_ecount_part_opt(size,length)
-#define __deref_inout_bcount_part_opt(size,length)
-#define __deref_inout_ecount_full_opt(size)
-#define __deref_inout_bcount_full_opt(size)
-#define __deref_inout_z_opt
-#define __deref_inout_ecount_z_opt(size)
-#define __deref_inout_bcount_z_opt(size)
-#define __deref_inout_nz_opt
-#define __deref_inout_ecount_nz_opt(size)
-#define __deref_inout_bcount_nz_opt(size)
-#define __deref_opt_ecount(size)
-#define __deref_opt_bcount(size)
-#define __deref_opt_out
-#define __deref_opt_out_z
-#define __deref_opt_out_ecount(size)
-#define __deref_opt_out_bcount(size)
-#define __deref_opt_out_ecount_part(size,length)
-#define __deref_opt_out_bcount_part(size,length)
-#define __deref_opt_out_ecount_full(size)
-#define __deref_opt_out_bcount_full(size)
-#define __deref_opt_inout
-#define __deref_opt_inout_ecount(size)
-#define __deref_opt_inout_bcount(size)
-#define __deref_opt_inout_ecount_part(size,length)
-#define __deref_opt_inout_bcount_part(size,length)
-#define __deref_opt_inout_ecount_full(size)
-#define __deref_opt_inout_bcount_full(size)
-#define __deref_opt_inout_z
-#define __deref_opt_inout_ecount_z(size)
-#define __deref_opt_inout_bcount_z(size)
-#define __deref_opt_inout_nz
-#define __deref_opt_inout_ecount_nz(size)
-#define __deref_opt_inout_bcount_nz(size)
-#define __deref_opt_ecount_opt(size)
-#define __deref_opt_bcount_opt(size)
-#define __deref_opt_out_opt
-#define __deref_opt_out_ecount_opt(size)
-#define __deref_opt_out_bcount_opt(size)
-#define __deref_opt_out_ecount_part_opt(size,length)
-#define __deref_opt_out_bcount_part_opt(size,length)
-#define __deref_opt_out_ecount_full_opt(size)
-#define __deref_opt_out_bcount_full_opt(size)
-#define __deref_opt_out_z_opt
-#define __deref_opt_out_ecount_z_opt(size)
-#define __deref_opt_out_bcount_z_opt(size)
-#define __deref_opt_out_nz_opt
-#define __deref_opt_out_ecount_nz_opt(size)
-#define __deref_opt_out_bcount_nz_opt(size)
-#define __deref_opt_inout_opt
-#define __deref_opt_inout_ecount_opt(size)
-#define __deref_opt_inout_bcount_opt(size)
-#define __deref_opt_inout_ecount_part_opt(size,length)
-#define __deref_opt_inout_bcount_part_opt(size,length)
-#define __deref_opt_inout_ecount_full_opt(size)
-#define __deref_opt_inout_bcount_full_opt(size)
-#define __deref_opt_inout_z_opt
-#define __deref_opt_inout_ecount_z_opt(size)
-#define __deref_opt_inout_bcount_z_opt(size)
-#define __deref_opt_inout_nz_opt
-#define __deref_opt_inout_ecount_nz_opt(size)
-#define __deref_opt_inout_bcount_nz_opt(size)
-
-#define __success(expr)
-#define __nullterminated
-#define __nullnullterminated
-#define __reserved
-#define __checkReturn
-#define __typefix(ctype)
-#define __override
-#define __callback
-#define __format_string
-#define __blocksOn(resource)
-#define __control_entrypoint(category)
-#define __data_entrypoint(category)
-
-#ifndef __fallthrough
-    #define __fallthrough __inner_fallthrough
-#endif
-
-#ifndef __analysis_assume
-    #define __analysis_assume(expr)
-#endif
+#pragma once
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+/*#define __null*/ // << Conflicts with GCC internal type __null
+#define __notnull
+#define __maybenull
+#define __readonly
+#define __notreadonly
+#define __maybereadonly
+#define __valid
+#define __notvalid
+#define __maybevalid
+#define __readableTo(extent)
+#define __elem_readableTo(size)
+#define __byte_readableTo(size)
+#define __writableTo(size)
+#define __elem_writableTo(size)
+#define __byte_writableTo(size)
+#define __deref
+#define __pre
+#define __post
+#define __precond(expr)
+#define __postcond(expr)
+#define __exceptthat
+#define __execeptthat
+#define __inner_success(expr)
+#define __inner_checkReturn
+#define __inner_typefix(ctype)
+#define __inner_override
+#define __inner_callback
+#define __inner_blocksOn(resource)
+#define __inner_fallthrough_dec
+#define __inner_fallthrough
+#define __refparam
+#define __inner_control_entrypoint(category)
+#define __inner_data_entrypoint(category)
+
+#define __ecount(size)
+#define __bcount(size)
+#define __in
+#define __in_ecount(size)
+#define __in_bcount(size)
+#define __in_z
+#define __in_ecount_z(size)
+#define __in_bcount_z(size)
+#define __in_nz
+#define __in_ecount_nz(size)
+#define __in_bcount_nz(size)
+#define __out
+#define __out_ecount(size)
+#define __out_bcount(size)
+#define __out_ecount_part(size,length)
+#define __out_bcount_part(size,length)
+#define __out_ecount_full(size)
+#define __out_bcount_full(size)
+#define __out_z
+#define __out_z_opt
+#define __out_ecount_z(size)
+#define __out_bcount_z(size)
+#define __out_ecount_part_z(size,length)
+#define __out_bcount_part_z(size,length)
+#define __out_ecount_full_z(size)
+#define __out_bcount_full_z(size)
+#define __out_nz
+#define __out_nz_opt
+#define __out_ecount_nz(size)
+#define __out_bcount_nz(size)
+#define __inout
+#define __inout_ecount(size)
+#define __inout_bcount(size)
+#define __inout_ecount_part(size,length)
+#define __inout_bcount_part(size,length)
+#define __inout_ecount_full(size)
+#define __inout_bcount_full(size)
+#define __inout_z
+#define __inout_ecount_z(size)
+#define __inout_bcount_z(size)
+#define __inout_nz
+#define __inout_ecount_nz(size)
+#define __inout_bcount_nz(size)
+#define __ecount_opt(size)
+#define __bcount_opt(size)
+#define __in_opt
+#define __in_ecount_opt(size)
+#define __in_bcount_opt(size)
+#define __in_z_opt
+#define __in_ecount_z_opt(size)
+#define __in_bcount_z_opt(size)
+#define __in_nz_opt
+#define __in_ecount_nz_opt(size)
+#define __in_bcount_nz_opt(size)
+#define __out_opt
+#define __out_ecount_opt(size)
+#define __out_bcount_opt(size)
+#define __out_ecount_part_opt(size,length)
+#define __out_bcount_part_opt(size,length)
+#define __out_ecount_full_opt(size)
+#define __out_bcount_full_opt(size)
+#define __out_ecount_z_opt(size)
+#define __out_bcount_z_opt(size)
+#define __out_ecount_part_z_opt(size,length)
+#define __out_bcount_part_z_opt(size,length)
+#define __out_ecount_full_z_opt(size)
+#define __out_bcount_full_z_opt(size)
+#define __out_ecount_nz_opt(size)
+#define __out_bcount_nz_opt(size)
+#define __inout_opt
+#define __inout_ecount_opt(size)
+#define __inout_bcount_opt(size)
+#define __inout_ecount_part_opt(size,length)
+#define __inout_bcount_part_opt(size,length)
+#define __inout_ecount_full_opt(size)
+#define __inout_bcount_full_opt(size)
+#define __inout_z_opt
+#define __inout_ecount_z_opt(size)
+#define __inout_ecount_z_opt(size)
+#define __inout_bcount_z_opt(size)
+#define __inout_nz_opt
+#define __inout_ecount_nz_opt(size)
+#define __inout_bcount_nz_opt(size)
+#define __deref_ecount(size)
+#define __deref_bcount(size)
+#define __deref_out
+#define __deref_out_ecount(size)
+#define __deref_out_bcount(size)
+#define __deref_out_ecount_part(size,length)
+#define __deref_out_bcount_part(size,length)
+#define __deref_out_ecount_full(size)
+#define __deref_out_bcount_full(size)
+#define __deref_out_z
+#define __deref_out_ecount_z(size)
+#define __deref_out_bcount_z(size)
+#define __deref_out_nz
+#define __deref_out_ecount_nz(size)
+#define __deref_out_bcount_nz(size)
+#define __deref_inout
+#define __deref_inout_z
+#define __deref_inout_ecount(size)
+#define __deref_inout_bcount(size)
+#define __deref_inout_ecount_part(size,length)
+#define __deref_inout_bcount_part(size,length)
+#define __deref_inout_ecount_full(size)
+#define __deref_inout_bcount_full(size)
+#define __deref_inout_z
+#define __deref_inout_ecount_z(size)
+#define __deref_inout_bcount_z(size)
+#define __deref_inout_nz
+#define __deref_inout_ecount_nz(size)
+#define __deref_inout_bcount_nz(size)
+#define __deref_ecount_opt(size)
+#define __deref_bcount_opt(size)
+#define __deref_out_opt
+#define __deref_out_ecount_opt(size)
+#define __deref_out_bcount_opt(size)
+#define __deref_out_ecount_part_opt(size,length)
+#define __deref_out_bcount_part_opt(size,length)
+#define __deref_out_ecount_full_opt(size)
+#define __deref_out_bcount_full_opt(size)
+#define __deref_out_z_opt
+#define __deref_out_ecount_z_opt(size)
+#define __deref_out_bcount_z_opt(size)
+#define __deref_out_nz_opt
+#define __deref_out_ecount_nz_opt(size)
+#define __deref_out_bcount_nz_opt(size)
+#define __deref_inout_opt
+#define __deref_inout_ecount_opt(size)
+#define __deref_inout_bcount_opt(size)
+#define __deref_inout_ecount_part_opt(size,length)
+#define __deref_inout_bcount_part_opt(size,length)
+#define __deref_inout_ecount_full_opt(size)
+#define __deref_inout_bcount_full_opt(size)
+#define __deref_inout_z_opt
+#define __deref_inout_ecount_z_opt(size)
+#define __deref_inout_bcount_z_opt(size)
+#define __deref_inout_nz_opt
+#define __deref_inout_ecount_nz_opt(size)
+#define __deref_inout_bcount_nz_opt(size)
+#define __deref_opt_ecount(size)
+#define __deref_opt_bcount(size)
+#define __deref_opt_out
+#define __deref_opt_out_z
+#define __deref_opt_out_ecount(size)
+#define __deref_opt_out_bcount(size)
+#define __deref_opt_out_ecount_part(size,length)
+#define __deref_opt_out_bcount_part(size,length)
+#define __deref_opt_out_ecount_full(size)
+#define __deref_opt_out_bcount_full(size)
+#define __deref_opt_inout
+#define __deref_opt_inout_ecount(size)
+#define __deref_opt_inout_bcount(size)
+#define __deref_opt_inout_ecount_part(size,length)
+#define __deref_opt_inout_bcount_part(size,length)
+#define __deref_opt_inout_ecount_full(size)
+#define __deref_opt_inout_bcount_full(size)
+#define __deref_opt_inout_z
+#define __deref_opt_inout_ecount_z(size)
+#define __deref_opt_inout_bcount_z(size)
+#define __deref_opt_inout_nz
+#define __deref_opt_inout_ecount_nz(size)
+#define __deref_opt_inout_bcount_nz(size)
+#define __deref_opt_ecount_opt(size)
+#define __deref_opt_bcount_opt(size)
+#define __deref_opt_out_opt
+#define __deref_opt_out_ecount_opt(size)
+#define __deref_opt_out_bcount_opt(size)
+#define __deref_opt_out_ecount_part_opt(size,length)
+#define __deref_opt_out_bcount_part_opt(size,length)
+#define __deref_opt_out_ecount_full_opt(size)
+#define __deref_opt_out_bcount_full_opt(size)
+#define __deref_opt_out_z_opt
+#define __deref_opt_out_ecount_z_opt(size)
+#define __deref_opt_out_bcount_z_opt(size)
+#define __deref_opt_out_nz_opt
+#define __deref_opt_out_ecount_nz_opt(size)
+#define __deref_opt_out_bcount_nz_opt(size)
+#define __deref_opt_inout_opt
+#define __deref_opt_inout_ecount_opt(size)
+#define __deref_opt_inout_bcount_opt(size)
+#define __deref_opt_inout_ecount_part_opt(size,length)
+#define __deref_opt_inout_bcount_part_opt(size,length)
+#define __deref_opt_inout_ecount_full_opt(size)
+#define __deref_opt_inout_bcount_full_opt(size)
+#define __deref_opt_inout_z_opt
+#define __deref_opt_inout_ecount_z_opt(size)
+#define __deref_opt_inout_bcount_z_opt(size)
+#define __deref_opt_inout_nz_opt
+#define __deref_opt_inout_ecount_nz_opt(size)
+#define __deref_opt_inout_bcount_nz_opt(size)
+
+#define __success(expr)
+#define __nullterminated
+#define __nullnullterminated
+#define __reserved
+#define __checkReturn
+#define __typefix(ctype)
+#define __override
+#define __callback
+#define __format_string
+#define __blocksOn(resource)
+#define __control_entrypoint(category)
+#define __data_entrypoint(category)
+
+#ifndef __fallthrough
+    #define __fallthrough __inner_fallthrough
+#endif
+
+#ifndef __analysis_assume
+    #define __analysis_assume(expr)
+#endif
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/sdkddkver.h b/portaudio/src/hostapi/wasapi/mingw-include/sdkddkver.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/sdkddkver.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/sdkddkver.h
@@ -1,225 +1,225 @@
-/*
-
-Copyright (c) Microsoft Corporation. All rights reserved.
-
-Module Name:
-
-    sdkddkver.h
-
-Abstract:
-
-    Master include file for versioning windows SDK/DDK.
-
-*/
-
-#ifndef _INC_SDKDDKVER
-#define _INC_SDKDDKVER
-
-#pragma once
-
-//
-// _WIN32_WINNT version constants
-//
-#define _WIN32_WINNT_NT4                    0x0400
-#define _WIN32_WINNT_WIN2K                  0x0500
-#define _WIN32_WINNT_WINXP                  0x0501
-#define _WIN32_WINNT_WS03                   0x0502
-#define _WIN32_WINNT_LONGHORN               0x0600
-
-//
-// _WIN32_IE_ version constants
-//
-#define _WIN32_IE_IE20                      0x0200
-#define _WIN32_IE_IE30                      0x0300
-#define _WIN32_IE_IE302                     0x0302
-#define _WIN32_IE_IE40                      0x0400
-#define _WIN32_IE_IE401                     0x0401
-#define _WIN32_IE_IE50                      0x0500
-#define _WIN32_IE_IE501                     0x0501
-#define _WIN32_IE_IE55                      0x0550
-#define _WIN32_IE_IE60                      0x0600
-#define _WIN32_IE_IE60SP1                   0x0601
-#define _WIN32_IE_IE60SP2                   0x0603
-#define _WIN32_IE_IE70                      0x0700
-
-//
-// IE <-> OS version mapping
-//
-// NT4 supports IE versions 2.0 -> 6.0 SP1
-#define _WIN32_IE_NT4                       _WIN32_IE_IE20
-#define _WIN32_IE_NT4SP1                    _WIN32_IE_IE20
-#define _WIN32_IE_NT4SP2                    _WIN32_IE_IE20
-#define _WIN32_IE_NT4SP3                    _WIN32_IE_IE302
-#define _WIN32_IE_NT4SP4                    _WIN32_IE_IE401
-#define _WIN32_IE_NT4SP5                    _WIN32_IE_IE401
-#define _WIN32_IE_NT4SP6                    _WIN32_IE_IE50
-// Win98 supports IE versions 4.01 -> 6.0 SP1
-#define _WIN32_IE_WIN98                     _WIN32_IE_IE401
-// Win98SE supports IE versions 5.0 -> 6.0 SP1
-#define _WIN32_IE_WIN98SE                   _WIN32_IE_IE50
-// WinME supports IE versions 5.5 -> 6.0 SP1
-#define _WIN32_IE_WINME                     _WIN32_IE_IE55
-// Win2k supports IE versions 5.01 -> 6.0 SP1
-#define _WIN32_IE_WIN2K                     _WIN32_IE_IE501
-#define _WIN32_IE_WIN2KSP1                  _WIN32_IE_IE501
-#define _WIN32_IE_WIN2KSP2                  _WIN32_IE_IE501
-#define _WIN32_IE_WIN2KSP3                  _WIN32_IE_IE501
-#define _WIN32_IE_WIN2KSP4                  _WIN32_IE_IE501
-#define _WIN32_IE_XP                        _WIN32_IE_IE60
-#define _WIN32_IE_XPSP1                     _WIN32_IE_IE60SP1
-#define _WIN32_IE_XPSP2                     _WIN32_IE_IE60SP2
-#define _WIN32_IE_WS03                      0x0602
-#define _WIN32_IE_WS03SP1                   _WIN32_IE_IE60SP2
-#define _WIN32_IE_LONGHORN                  _WIN32_IE_IE70
-
-
-//
-// NTDDI version constants
-//
-#define NTDDI_WIN2K                         0x05000000
-#define NTDDI_WIN2KSP1                      0x05000100
-#define NTDDI_WIN2KSP2                      0x05000200
-#define NTDDI_WIN2KSP3                      0x05000300
-#define NTDDI_WIN2KSP4                      0x05000400
-
-#define NTDDI_WINXP                         0x05010000
-#define NTDDI_WINXPSP1                      0x05010100
-#define NTDDI_WINXPSP2                      0x05010200
-
-#define NTDDI_WS03                          0x05020000
-#define NTDDI_WS03SP1                       0x05020100
-
-#define NTDDI_LONGHORN                      0x06000000
-
-//
-// masks for version macros
-//
-#define OSVERSION_MASK      0xFFFF0000
-#define SPVERSION_MASK      0x0000FF00
-#define SUBVERSION_MASK     0x000000FF
-
-
-//
-// macros to extract various version fields from the NTDDI version
-//
-#define OSVER(Version)  ((Version) & OSVERSION_MASK)
-#define SPVER(Version)  (((Version) & SPVERSION_MASK) >> 8)
-#define SUBVER(Version) (((Version) & SUBVERSION_MASK) )
-
-
-#if defined(DECLSPEC_DEPRECATED_DDK)
-
-// deprecate in 2k or later
-#if (NTDDI_VERSION >= NTDDI_WIN2K)
-#define DECLSPEC_DEPRECATED_DDK_WIN2K DECLSPEC_DEPRECATED_DDK
-#else
-#define DECLSPEC_DEPRECATED_DDK_WIN2K
-#endif
-
-// deprecate in XP or later
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-#define DECLSPEC_DEPRECATED_DDK_WINXP DECLSPEC_DEPRECATED_DDK
-#else
-#define DECLSPEC_DEPRECATED_DDK_WINXP
-#endif
-
-// deprecate in WS03 or later
-#if (NTDDI_VERSION >= NTDDI_WS03)
-#define DECLSPEC_DEPRECATED_DDK_WIN2003 DECLSPEC_DEPRECATED_DDK
-#else
-#define DECLSPEC_DEPRECATED_DDK_WIN2003
-#endif
-
-// deprecate in WS03 or later
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-#define DECLSPEC_DEPRECATED_DDK_LONGHORN DECLSPEC_DEPRECATED_DDK
-#else
-#define DECLSPEC_DEPRECATED_DDK_LONGHORN
-#endif
-
-#endif // defined(DECLSPEC_DEPRECATED_DDK)
-
-
-//
-// if versions aren't already defined, default to most current
-//
-
-#define NTDDI_VERSION_FROM_WIN32_WINNT2(ver)    ver##0000
-#define NTDDI_VERSION_FROM_WIN32_WINNT(ver)     NTDDI_VERSION_FROM_WIN32_WINNT2(ver)
-
-#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
-#define  _WIN32_WINNT   0x0600
-#endif
-
-#ifndef NTDDI_VERSION
-#ifdef _WIN32_WINNT
-// set NTDDI_VERSION based on _WIN32_WINNT
-#define NTDDI_VERSION   NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
-#else
-#define NTDDI_VERSION   0x06000000
-#endif
-#endif
-
-#ifndef WINVER
-#ifdef _WIN32_WINNT
-// set WINVER based on _WIN32_WINNT
-#define WINVER          _WIN32_WINNT
-#else
-#define WINVER          0x0600
-#endif
-#endif
-
-#ifndef _WIN32_IE
-#ifdef _WIN32_WINNT
-// set _WIN32_IE based on _WIN32_WINNT
-#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
-#define _WIN32_IE       _WIN32_IE_IE50
-#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
-#define _WIN32_IE       _WIN32_IE_IE501
-#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
-#define _WIN32_IE       _WIN32_IE_IE60
-#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
-#define _WIN32_IE       0x0602
-#else
-#define _WIN32_IE       0x0700
-#endif
-#else
-#define _WIN32_IE       0x0700
-#endif
-#endif
-
-//
-// Sanity check for compatible versions
-//
-#if defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
-
-#if (defined(WINVER) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400))
-#error WINVER setting conflicts with _WIN32_WINNT setting
-#endif
-
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K))
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
-#endif
-
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
-#endif
-
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
-#endif
-
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_LONGHORN) && (_WIN32_WINNT != _WIN32_WINNT_LONGHORN))
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
-#endif
-
-#if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1))
-#error _WIN32_WINNT settings conflicts with _WIN32_IE setting
-#endif
-
-#endif  // defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(_WINRESRC_)
-
-
-#endif  // !_INC_SDKDDKVER
-
-
+/*
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+    sdkddkver.h
+
+Abstract:
+
+    Master include file for versioning windows SDK/DDK.
+
+*/
+
+#ifndef _INC_SDKDDKVER
+#define _INC_SDKDDKVER
+
+#pragma once
+
+//
+// _WIN32_WINNT version constants
+//
+#define _WIN32_WINNT_NT4                    0x0400
+#define _WIN32_WINNT_WIN2K                  0x0500
+#define _WIN32_WINNT_WINXP                  0x0501
+#define _WIN32_WINNT_WS03                   0x0502
+#define _WIN32_WINNT_LONGHORN               0x0600
+
+//
+// _WIN32_IE_ version constants
+//
+#define _WIN32_IE_IE20                      0x0200
+#define _WIN32_IE_IE30                      0x0300
+#define _WIN32_IE_IE302                     0x0302
+#define _WIN32_IE_IE40                      0x0400
+#define _WIN32_IE_IE401                     0x0401
+#define _WIN32_IE_IE50                      0x0500
+#define _WIN32_IE_IE501                     0x0501
+#define _WIN32_IE_IE55                      0x0550
+#define _WIN32_IE_IE60                      0x0600
+#define _WIN32_IE_IE60SP1                   0x0601
+#define _WIN32_IE_IE60SP2                   0x0603
+#define _WIN32_IE_IE70                      0x0700
+
+//
+// IE <-> OS version mapping
+//
+// NT4 supports IE versions 2.0 -> 6.0 SP1
+#define _WIN32_IE_NT4                       _WIN32_IE_IE20
+#define _WIN32_IE_NT4SP1                    _WIN32_IE_IE20
+#define _WIN32_IE_NT4SP2                    _WIN32_IE_IE20
+#define _WIN32_IE_NT4SP3                    _WIN32_IE_IE302
+#define _WIN32_IE_NT4SP4                    _WIN32_IE_IE401
+#define _WIN32_IE_NT4SP5                    _WIN32_IE_IE401
+#define _WIN32_IE_NT4SP6                    _WIN32_IE_IE50
+// Win98 supports IE versions 4.01 -> 6.0 SP1
+#define _WIN32_IE_WIN98                     _WIN32_IE_IE401
+// Win98SE supports IE versions 5.0 -> 6.0 SP1
+#define _WIN32_IE_WIN98SE                   _WIN32_IE_IE50
+// WinME supports IE versions 5.5 -> 6.0 SP1
+#define _WIN32_IE_WINME                     _WIN32_IE_IE55
+// Win2k supports IE versions 5.01 -> 6.0 SP1
+#define _WIN32_IE_WIN2K                     _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP1                  _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP2                  _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP3                  _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP4                  _WIN32_IE_IE501
+#define _WIN32_IE_XP                        _WIN32_IE_IE60
+#define _WIN32_IE_XPSP1                     _WIN32_IE_IE60SP1
+#define _WIN32_IE_XPSP2                     _WIN32_IE_IE60SP2
+#define _WIN32_IE_WS03                      0x0602
+#define _WIN32_IE_WS03SP1                   _WIN32_IE_IE60SP2
+#define _WIN32_IE_LONGHORN                  _WIN32_IE_IE70
+
+
+//
+// NTDDI version constants
+//
+#define NTDDI_WIN2K                         0x05000000
+#define NTDDI_WIN2KSP1                      0x05000100
+#define NTDDI_WIN2KSP2                      0x05000200
+#define NTDDI_WIN2KSP3                      0x05000300
+#define NTDDI_WIN2KSP4                      0x05000400
+
+#define NTDDI_WINXP                         0x05010000
+#define NTDDI_WINXPSP1                      0x05010100
+#define NTDDI_WINXPSP2                      0x05010200
+
+#define NTDDI_WS03                          0x05020000
+#define NTDDI_WS03SP1                       0x05020100
+
+#define NTDDI_LONGHORN                      0x06000000
+
+//
+// masks for version macros
+//
+#define OSVERSION_MASK      0xFFFF0000
+#define SPVERSION_MASK      0x0000FF00
+#define SUBVERSION_MASK     0x000000FF
+
+
+//
+// macros to extract various version fields from the NTDDI version
+//
+#define OSVER(Version)  ((Version) & OSVERSION_MASK)
+#define SPVER(Version)  (((Version) & SPVERSION_MASK) >> 8)
+#define SUBVER(Version) (((Version) & SUBVERSION_MASK) )
+
+
+#if defined(DECLSPEC_DEPRECATED_DDK)
+
+// deprecate in 2k or later
+#if (NTDDI_VERSION >= NTDDI_WIN2K)
+#define DECLSPEC_DEPRECATED_DDK_WIN2K DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_WIN2K
+#endif
+
+// deprecate in XP or later
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+#define DECLSPEC_DEPRECATED_DDK_WINXP DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_WINXP
+#endif
+
+// deprecate in WS03 or later
+#if (NTDDI_VERSION >= NTDDI_WS03)
+#define DECLSPEC_DEPRECATED_DDK_WIN2003 DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_WIN2003
+#endif
+
+// deprecate in WS03 or later
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+#define DECLSPEC_DEPRECATED_DDK_LONGHORN DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_LONGHORN
+#endif
+
+#endif // defined(DECLSPEC_DEPRECATED_DDK)
+
+
+//
+// if versions aren't already defined, default to most current
+//
+
+#define NTDDI_VERSION_FROM_WIN32_WINNT2(ver)    ver##0000
+#define NTDDI_VERSION_FROM_WIN32_WINNT(ver)     NTDDI_VERSION_FROM_WIN32_WINNT2(ver)
+
+#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
+#define  _WIN32_WINNT   0x0600
+#endif
+
+#ifndef NTDDI_VERSION
+#ifdef _WIN32_WINNT
+// set NTDDI_VERSION based on _WIN32_WINNT
+#define NTDDI_VERSION   NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
+#else
+#define NTDDI_VERSION   0x06000000
+#endif
+#endif
+
+#ifndef WINVER
+#ifdef _WIN32_WINNT
+// set WINVER based on _WIN32_WINNT
+#define WINVER          _WIN32_WINNT
+#else
+#define WINVER          0x0600
+#endif
+#endif
+
+#ifndef _WIN32_IE
+#ifdef _WIN32_WINNT
+// set _WIN32_IE based on _WIN32_WINNT
+#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
+#define _WIN32_IE       _WIN32_IE_IE50
+#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
+#define _WIN32_IE       _WIN32_IE_IE501
+#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
+#define _WIN32_IE       _WIN32_IE_IE60
+#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
+#define _WIN32_IE       0x0602
+#else
+#define _WIN32_IE       0x0700
+#endif
+#else
+#define _WIN32_IE       0x0700
+#endif
+#endif
+
+//
+// Sanity check for compatible versions
+//
+#if defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
+
+#if (defined(WINVER) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400))
+#error WINVER setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_LONGHORN) && (_WIN32_WINNT != _WIN32_WINNT_LONGHORN))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1))
+#error _WIN32_WINNT settings conflicts with _WIN32_IE setting
+#endif
+
+#endif  // defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(_WINRESRC_)
+
+
+#endif  // !_INC_SDKDDKVER
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/shtypes.h b/portaudio/src/hostapi/wasapi/mingw-include/shtypes.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/shtypes.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/shtypes.h
@@ -1,468 +1,468 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for shtypes.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 500
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-
-#ifndef __shtypes_h__
-#define __shtypes_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-/* header files for imported files */
-#include "wtypes.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_shtypes_0000_0000 */
-/* [local] */ 
-
-//+-------------------------------------------------------------------------
-//
-//  Microsoft Windows
-//  Copyright (c) Microsoft Corporation. All rights reserved.
-//
-//--------------------------------------------------------------------------
-//===========================================================================
-//
-// Object identifiers in the explorer's name space (ItemID and IDList)
-//
-//  All the items that the user can browse with the explorer (such as files,
-// directories, servers, work-groups, etc.) has an identifier which is unique
-// among items within the parent folder. Those identifiers are called item
-// IDs (SHITEMID). Since all its parent folders have their own item IDs,
-// any items can be uniquely identified by a list of item IDs, which is called
-// an ID list (ITEMIDLIST).
-//
-//  ID lists are almost always allocated by the task allocator (see some
-// description below as well as OLE 2.0 SDK) and may be passed across
-// some of shell interfaces (such as IShellFolder). Each item ID in an ID list
-// is only meaningful to its parent folder (which has generated it), and all
-// the clients must treat it as an opaque binary data except the first two
-// bytes, which indicates the size of the item ID.
-//
-//  When a shell extension -- which implements the IShellFolder interace --
-// generates an item ID, it may put any information in it, not only the data
-// with that it needs to identifies the item, but also some additional
-// information, which would help implementing some other functions efficiently.
-// For example, the shell's IShellFolder implementation of file system items
-// stores the primary (long) name of a file or a directory as the item
-// identifier, but it also stores its alternative (short) name, size and date
-// etc.
-//
-//  When an ID list is passed to one of shell APIs (such as SHGetPathFromIDList),
-// it is always an absolute path -- relative from the root of the name space,
-// which is the desktop folder. When an ID list is passed to one of IShellFolder
-// member function, it is always a relative path from the folder (unless it
-// is explicitly specified).
-//
-//===========================================================================
-//
-// SHITEMID -- Item ID  (mkid)
-//     USHORT      cb;             // Size of the ID (including cb itself)
-//     BYTE        abID[];         // The item ID (variable length)
-//
-#include <pshpack1.h>
-typedef struct _SHITEMID
-    {
-    USHORT cb;
-    BYTE abID[ 1 ];
-    } 	SHITEMID;
-
-#include <poppack.h>
-#if defined(_M_IX86)
-#define __unaligned
-#endif // __unaligned
-typedef SHITEMID __unaligned *LPSHITEMID;
-
-typedef const SHITEMID __unaligned *LPCSHITEMID;
-
-//
-// ITEMIDLIST -- List if item IDs (combined with 0-terminator)
-//
-#include <pshpack1.h>
-typedef struct _ITEMIDLIST
-    {
-    SHITEMID mkid;
-    } 	ITEMIDLIST;
-
-#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
-typedef struct _ITEMIDLIST_RELATIVE : ITEMIDLIST {} ITEMIDLIST_RELATIVE;
-typedef struct _ITEMID_CHILD : ITEMIDLIST_RELATIVE {} ITEMID_CHILD;
-typedef struct _ITEMIDLIST_ABSOLUTE : ITEMIDLIST_RELATIVE {} ITEMIDLIST_ABSOLUTE;
-#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
-typedef ITEMIDLIST ITEMIDLIST_RELATIVE;
-
-typedef ITEMIDLIST ITEMID_CHILD;
-
-typedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;
-
-#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
-#include <poppack.h>
-typedef /* [unique] */  __RPC_unique_pointer BYTE_BLOB *wirePIDL;
-
-typedef /* [wire_marshal] */ ITEMIDLIST __unaligned *LPITEMIDLIST;
-
-typedef /* [wire_marshal] */ const ITEMIDLIST __unaligned *LPCITEMIDLIST;
-
-#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
-typedef /* [wire_marshal] */ ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;
-
-typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;
-
-typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE __unaligned *PCUIDLIST_ABSOLUTE;
-
-typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;
-
-typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;
-
-typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE __unaligned *PUIDLIST_RELATIVE;
-
-typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE __unaligned *PCUIDLIST_RELATIVE;
-
-typedef /* [wire_marshal] */ ITEMID_CHILD *PITEMID_CHILD;
-
-typedef /* [wire_marshal] */ const ITEMID_CHILD *PCITEMID_CHILD;
-
-typedef /* [wire_marshal] */ ITEMID_CHILD __unaligned *PUITEMID_CHILD;
-
-typedef /* [wire_marshal] */ const ITEMID_CHILD __unaligned *PCUITEMID_CHILD;
-
-typedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;
-
-typedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;
-
-typedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;
-
-typedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;
-
-#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
-#define PIDLIST_ABSOLUTE         LPITEMIDLIST
-#define PCIDLIST_ABSOLUTE        LPCITEMIDLIST
-#define PCUIDLIST_ABSOLUTE       LPCITEMIDLIST
-#define PIDLIST_RELATIVE         LPITEMIDLIST
-#define PCIDLIST_RELATIVE        LPCITEMIDLIST
-#define PUIDLIST_RELATIVE        LPITEMIDLIST
-#define PCUIDLIST_RELATIVE       LPCITEMIDLIST
-#define PITEMID_CHILD            LPITEMIDLIST
-#define PCITEMID_CHILD           LPCITEMIDLIST
-#define PUITEMID_CHILD           LPITEMIDLIST
-#define PCUITEMID_CHILD          LPCITEMIDLIST
-#define PCUITEMID_CHILD_ARRAY    LPCITEMIDLIST *
-#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *
-#define PCIDLIST_ABSOLUTE_ARRAY  LPCITEMIDLIST *
-#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *
-#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
-#ifdef MIDL_PASS
-typedef struct _WIN32_FIND_DATAA
-    {
-    DWORD dwFileAttributes;
-    FILETIME ftCreationTime;
-    FILETIME ftLastAccessTime;
-    FILETIME ftLastWriteTime;
-    DWORD nFileSizeHigh;
-    DWORD nFileSizeLow;
-    DWORD dwReserved0;
-    DWORD dwReserved1;
-    CHAR cFileName[ 260 ];
-    CHAR cAlternateFileName[ 14 ];
-    } 	WIN32_FIND_DATAA;
-
-typedef struct _WIN32_FIND_DATAA *PWIN32_FIND_DATAA;
-
-typedef struct _WIN32_FIND_DATAA *LPWIN32_FIND_DATAA;
-
-typedef struct _WIN32_FIND_DATAW
-    {
-    DWORD dwFileAttributes;
-    FILETIME ftCreationTime;
-    FILETIME ftLastAccessTime;
-    FILETIME ftLastWriteTime;
-    DWORD nFileSizeHigh;
-    DWORD nFileSizeLow;
-    DWORD dwReserved0;
-    DWORD dwReserved1;
-    WCHAR cFileName[ 260 ];
-    WCHAR cAlternateFileName[ 14 ];
-    } 	WIN32_FIND_DATAW;
-
-typedef struct _WIN32_FIND_DATAW *PWIN32_FIND_DATAW;
-
-typedef struct _WIN32_FIND_DATAW *LPWIN32_FIND_DATAW;
-
-#endif // MIDL_PASS
-//-------------------------------------------------------------------------
-//
-// struct STRRET
-//
-// structure for returning strings from IShellFolder member functions
-//
-//-------------------------------------------------------------------------
-//
-//  uType indicate which union member to use 
-//    STRRET_WSTR    Use STRRET.pOleStr     must be freed by caller of GetDisplayNameOf
-//    STRRET_OFFSET  Use STRRET.uOffset     Offset into SHITEMID for ANSI string 
-//    STRRET_CSTR    Use STRRET.cStr        ANSI Buffer
-//
-typedef /* [v1_enum] */ 
-enum tagSTRRET_TYPE
-    {	STRRET_WSTR	= 0,
-	STRRET_OFFSET	= 0x1,
-	STRRET_CSTR	= 0x2
-    } 	STRRET_TYPE;
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-#pragma warning(push)
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
-#pragma once
-#endif
-#include <pshpack8.h>
-typedef struct _STRRET
-    {
-    UINT uType;
-    union 
-        {
-        LPWSTR pOleStr;
-        UINT uOffset;
-        char cStr[ 260 ];
-        } 	DUMMYUNIONNAME;
-    } 	STRRET;
-
-#include <poppack.h>
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-#pragma warning(pop)
-#endif
-typedef STRRET *LPSTRRET;
-
-//-------------------------------------------------------------------------
-//
-// struct SHELLDETAILS
-//
-// structure for returning strings from IShellDetails
-//
-//-------------------------------------------------------------------------
-//
-//  fmt;            // LVCFMT_* value (header only)
-//  cxChar;         // Number of 'average' characters (header only)
-//  str;            // String information
-//
-#include <pshpack1.h>
-typedef struct _SHELLDETAILS
-    {
-    int fmt;
-    int cxChar;
-    STRRET str;
-    } 	SHELLDETAILS;
-
-typedef struct _SHELLDETAILS *LPSHELLDETAILS;
-
-#include <poppack.h>
-
-#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
-typedef /* [v1_enum] */ 
-enum tagPERCEIVED
-    {	PERCEIVED_TYPE_FIRST	= -3,
-	PERCEIVED_TYPE_CUSTOM	= -3,
-	PERCEIVED_TYPE_UNSPECIFIED	= -2,
-	PERCEIVED_TYPE_FOLDER	= -1,
-	PERCEIVED_TYPE_UNKNOWN	= 0,
-	PERCEIVED_TYPE_TEXT	= 1,
-	PERCEIVED_TYPE_IMAGE	= 2,
-	PERCEIVED_TYPE_AUDIO	= 3,
-	PERCEIVED_TYPE_VIDEO	= 4,
-	PERCEIVED_TYPE_COMPRESSED	= 5,
-	PERCEIVED_TYPE_DOCUMENT	= 6,
-	PERCEIVED_TYPE_SYSTEM	= 7,
-	PERCEIVED_TYPE_APPLICATION	= 8,
-	PERCEIVED_TYPE_GAMEMEDIA	= 9,
-	PERCEIVED_TYPE_CONTACTS	= 10,
-	PERCEIVED_TYPE_LAST	= 10
-    } 	PERCEIVED;
-
-#define PERCEIVEDFLAG_UNDEFINED     0x0000
-#define PERCEIVEDFLAG_SOFTCODED     0x0001
-#define PERCEIVEDFLAG_HARDCODED     0x0002
-#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004
-#define PERCEIVEDFLAG_GDIPLUS       0x0010
-#define PERCEIVEDFLAG_WMSDK         0x0020
-#define PERCEIVEDFLAG_ZIPFOLDER     0x0040
-typedef DWORD PERCEIVEDFLAG;
-
-#endif  // _WIN32_IE_IE60SP2
-
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
-typedef struct _COMDLG_FILTERSPEC
-    {
-    LPCWSTR pszName;
-    LPCWSTR pszSpec;
-    } 	COMDLG_FILTERSPEC;
-
-typedef struct tagMACHINE_ID
-    {
-    char szName[ 16 ];
-    } 	MACHINE_ID;
-
-typedef struct tagDOMAIN_RELATIVE_OBJECTID
-    {
-    GUID guidVolume;
-    GUID guidObject;
-    } 	DOMAIN_RELATIVE_OBJECTID;
-
-typedef GUID KNOWNFOLDERID;
-
-#if 0
-typedef KNOWNFOLDERID *REFKNOWNFOLDERID;
-
-#endif // 0
-#ifdef __cplusplus
-#define REFKNOWNFOLDERID const KNOWNFOLDERID &
-#else // !__cplusplus
-#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST
-#endif // __cplusplus
-#endif  // NTDDI_LONGHORN
-typedef GUID FOLDERTYPEID;
-
-#if 0
-typedef FOLDERTYPEID *REFFOLDERTYPEID;
-
-#endif // 0
-#ifdef __cplusplus
-#define REFFOLDERTYPEID const FOLDERTYPEID &
-#else // !__cplusplus
-#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST
-#endif // __cplusplus
-typedef GUID TASKOWNERID;
-
-#if 0
-typedef TASKOWNERID *REFTASKOWNERID;
-
-#endif // 0
-#ifdef __cplusplus
-#define REFTASKOWNERID const TASKOWNERID &
-#else // !__cplusplus
-#define REFTASKOWNERID const TASKOWNERID * __MIDL_CONST
-#endif // __cplusplus
-#ifndef LF_FACESIZE
-typedef struct tagLOGFONTA
-    {
-    LONG lfHeight;
-    LONG lfWidth;
-    LONG lfEscapement;
-    LONG lfOrientation;
-    LONG lfWeight;
-    BYTE lfItalic;
-    BYTE lfUnderline;
-    BYTE lfStrikeOut;
-    BYTE lfCharSet;
-    BYTE lfOutPrecision;
-    BYTE lfClipPrecision;
-    BYTE lfQuality;
-    BYTE lfPitchAndFamily;
-    CHAR lfFaceName[ 32 ];
-    } 	LOGFONTA;
-
-typedef struct tagLOGFONTW
-    {
-    LONG lfHeight;
-    LONG lfWidth;
-    LONG lfEscapement;
-    LONG lfOrientation;
-    LONG lfWeight;
-    BYTE lfItalic;
-    BYTE lfUnderline;
-    BYTE lfStrikeOut;
-    BYTE lfCharSet;
-    BYTE lfOutPrecision;
-    BYTE lfClipPrecision;
-    BYTE lfQuality;
-    BYTE lfPitchAndFamily;
-    WCHAR lfFaceName[ 32 ];
-    } 	LOGFONTW;
-
-typedef LOGFONTA LOGFONT;
-
-#endif // LF_FACESIZE
-typedef /* [v1_enum] */ 
-enum tagSHCOLSTATE
-    {	SHCOLSTATE_TYPE_STR	= 0x1,
-	SHCOLSTATE_TYPE_INT	= 0x2,
-	SHCOLSTATE_TYPE_DATE	= 0x3,
-	SHCOLSTATE_TYPEMASK	= 0xf,
-	SHCOLSTATE_ONBYDEFAULT	= 0x10,
-	SHCOLSTATE_SLOW	= 0x20,
-	SHCOLSTATE_EXTENDED	= 0x40,
-	SHCOLSTATE_SECONDARYUI	= 0x80,
-	SHCOLSTATE_HIDDEN	= 0x100,
-	SHCOLSTATE_PREFER_VARCMP	= 0x200,
-	SHCOLSTATE_PREFER_FMTCMP	= 0x400,
-	SHCOLSTATE_NOSORTBYFOLDERNESS	= 0x800,
-	SHCOLSTATE_VIEWONLY	= 0x10000,
-	SHCOLSTATE_BATCHREAD	= 0x20000,
-	SHCOLSTATE_NO_GROUPBY	= 0x40000,
-	SHCOLSTATE_FIXED_WIDTH	= 0x1000,
-	SHCOLSTATE_NODPISCALE	= 0x2000,
-	SHCOLSTATE_FIXED_RATIO	= 0x4000,
-	SHCOLSTATE_DISPLAYMASK	= 0xf000
-    } 	SHCOLSTATE;
-
-typedef DWORD SHCOLSTATEF;
-
-typedef PROPERTYKEY SHCOLUMNID;
-
-typedef const SHCOLUMNID *LPCSHCOLUMNID;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_s_ifspec;
-
-/* Additional Prototypes for ALL interfaces */
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for shtypes.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+
+#ifndef __shtypes_h__
+#define __shtypes_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+/* header files for imported files */
+#include "wtypes.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_shtypes_0000_0000 */
+/* [local] */ 
+
+//+-------------------------------------------------------------------------
+//
+//  Microsoft Windows
+//  Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//--------------------------------------------------------------------------
+//===========================================================================
+//
+// Object identifiers in the explorer's name space (ItemID and IDList)
+//
+//  All the items that the user can browse with the explorer (such as files,
+// directories, servers, work-groups, etc.) has an identifier which is unique
+// among items within the parent folder. Those identifiers are called item
+// IDs (SHITEMID). Since all its parent folders have their own item IDs,
+// any items can be uniquely identified by a list of item IDs, which is called
+// an ID list (ITEMIDLIST).
+//
+//  ID lists are almost always allocated by the task allocator (see some
+// description below as well as OLE 2.0 SDK) and may be passed across
+// some of shell interfaces (such as IShellFolder). Each item ID in an ID list
+// is only meaningful to its parent folder (which has generated it), and all
+// the clients must treat it as an opaque binary data except the first two
+// bytes, which indicates the size of the item ID.
+//
+//  When a shell extension -- which implements the IShellFolder interace --
+// generates an item ID, it may put any information in it, not only the data
+// with that it needs to identifies the item, but also some additional
+// information, which would help implementing some other functions efficiently.
+// For example, the shell's IShellFolder implementation of file system items
+// stores the primary (long) name of a file or a directory as the item
+// identifier, but it also stores its alternative (short) name, size and date
+// etc.
+//
+//  When an ID list is passed to one of shell APIs (such as SHGetPathFromIDList),
+// it is always an absolute path -- relative from the root of the name space,
+// which is the desktop folder. When an ID list is passed to one of IShellFolder
+// member function, it is always a relative path from the folder (unless it
+// is explicitly specified).
+//
+//===========================================================================
+//
+// SHITEMID -- Item ID  (mkid)
+//     USHORT      cb;             // Size of the ID (including cb itself)
+//     BYTE        abID[];         // The item ID (variable length)
+//
+#include <pshpack1.h>
+typedef struct _SHITEMID
+    {
+    USHORT cb;
+    BYTE abID[ 1 ];
+    } 	SHITEMID;
+
+#include <poppack.h>
+#if defined(_M_IX86)
+#define __unaligned
+#endif // __unaligned
+typedef SHITEMID __unaligned *LPSHITEMID;
+
+typedef const SHITEMID __unaligned *LPCSHITEMID;
+
+//
+// ITEMIDLIST -- List if item IDs (combined with 0-terminator)
+//
+#include <pshpack1.h>
+typedef struct _ITEMIDLIST
+    {
+    SHITEMID mkid;
+    } 	ITEMIDLIST;
+
+#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+typedef struct _ITEMIDLIST_RELATIVE : ITEMIDLIST {} ITEMIDLIST_RELATIVE;
+typedef struct _ITEMID_CHILD : ITEMIDLIST_RELATIVE {} ITEMID_CHILD;
+typedef struct _ITEMIDLIST_ABSOLUTE : ITEMIDLIST_RELATIVE {} ITEMIDLIST_ABSOLUTE;
+#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
+typedef ITEMIDLIST ITEMIDLIST_RELATIVE;
+
+typedef ITEMIDLIST ITEMID_CHILD;
+
+typedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;
+
+#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+#include <poppack.h>
+typedef /* [unique] */  __RPC_unique_pointer BYTE_BLOB *wirePIDL;
+
+typedef /* [wire_marshal] */ ITEMIDLIST __unaligned *LPITEMIDLIST;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST __unaligned *LPCITEMIDLIST;
+
+#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+typedef /* [wire_marshal] */ ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE __unaligned *PCUIDLIST_ABSOLUTE;
+
+typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE __unaligned *PUIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE __unaligned *PCUIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ ITEMID_CHILD *PITEMID_CHILD;
+
+typedef /* [wire_marshal] */ const ITEMID_CHILD *PCITEMID_CHILD;
+
+typedef /* [wire_marshal] */ ITEMID_CHILD __unaligned *PUITEMID_CHILD;
+
+typedef /* [wire_marshal] */ const ITEMID_CHILD __unaligned *PCUITEMID_CHILD;
+
+typedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;
+
+typedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;
+
+typedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;
+
+typedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;
+
+#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
+#define PIDLIST_ABSOLUTE         LPITEMIDLIST
+#define PCIDLIST_ABSOLUTE        LPCITEMIDLIST
+#define PCUIDLIST_ABSOLUTE       LPCITEMIDLIST
+#define PIDLIST_RELATIVE         LPITEMIDLIST
+#define PCIDLIST_RELATIVE        LPCITEMIDLIST
+#define PUIDLIST_RELATIVE        LPITEMIDLIST
+#define PCUIDLIST_RELATIVE       LPCITEMIDLIST
+#define PITEMID_CHILD            LPITEMIDLIST
+#define PCITEMID_CHILD           LPCITEMIDLIST
+#define PUITEMID_CHILD           LPITEMIDLIST
+#define PCUITEMID_CHILD          LPCITEMIDLIST
+#define PCUITEMID_CHILD_ARRAY    LPCITEMIDLIST *
+#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *
+#define PCIDLIST_ABSOLUTE_ARRAY  LPCITEMIDLIST *
+#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *
+#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+#ifdef MIDL_PASS
+typedef struct _WIN32_FIND_DATAA
+    {
+    DWORD dwFileAttributes;
+    FILETIME ftCreationTime;
+    FILETIME ftLastAccessTime;
+    FILETIME ftLastWriteTime;
+    DWORD nFileSizeHigh;
+    DWORD nFileSizeLow;
+    DWORD dwReserved0;
+    DWORD dwReserved1;
+    CHAR cFileName[ 260 ];
+    CHAR cAlternateFileName[ 14 ];
+    } 	WIN32_FIND_DATAA;
+
+typedef struct _WIN32_FIND_DATAA *PWIN32_FIND_DATAA;
+
+typedef struct _WIN32_FIND_DATAA *LPWIN32_FIND_DATAA;
+
+typedef struct _WIN32_FIND_DATAW
+    {
+    DWORD dwFileAttributes;
+    FILETIME ftCreationTime;
+    FILETIME ftLastAccessTime;
+    FILETIME ftLastWriteTime;
+    DWORD nFileSizeHigh;
+    DWORD nFileSizeLow;
+    DWORD dwReserved0;
+    DWORD dwReserved1;
+    WCHAR cFileName[ 260 ];
+    WCHAR cAlternateFileName[ 14 ];
+    } 	WIN32_FIND_DATAW;
+
+typedef struct _WIN32_FIND_DATAW *PWIN32_FIND_DATAW;
+
+typedef struct _WIN32_FIND_DATAW *LPWIN32_FIND_DATAW;
+
+#endif // MIDL_PASS
+//-------------------------------------------------------------------------
+//
+// struct STRRET
+//
+// structure for returning strings from IShellFolder member functions
+//
+//-------------------------------------------------------------------------
+//
+//  uType indicate which union member to use 
+//    STRRET_WSTR    Use STRRET.pOleStr     must be freed by caller of GetDisplayNameOf
+//    STRRET_OFFSET  Use STRRET.uOffset     Offset into SHITEMID for ANSI string 
+//    STRRET_CSTR    Use STRRET.cStr        ANSI Buffer
+//
+typedef /* [v1_enum] */ 
+enum tagSTRRET_TYPE
+    {	STRRET_WSTR	= 0,
+	STRRET_OFFSET	= 0x1,
+	STRRET_CSTR	= 0x2
+    } 	STRRET_TYPE;
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(push)
+#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
+#pragma once
+#endif
+#include <pshpack8.h>
+typedef struct _STRRET
+    {
+    UINT uType;
+    union 
+        {
+        LPWSTR pOleStr;
+        UINT uOffset;
+        char cStr[ 260 ];
+        } 	DUMMYUNIONNAME;
+    } 	STRRET;
+
+#include <poppack.h>
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif
+typedef STRRET *LPSTRRET;
+
+//-------------------------------------------------------------------------
+//
+// struct SHELLDETAILS
+//
+// structure for returning strings from IShellDetails
+//
+//-------------------------------------------------------------------------
+//
+//  fmt;            // LVCFMT_* value (header only)
+//  cxChar;         // Number of 'average' characters (header only)
+//  str;            // String information
+//
+#include <pshpack1.h>
+typedef struct _SHELLDETAILS
+    {
+    int fmt;
+    int cxChar;
+    STRRET str;
+    } 	SHELLDETAILS;
+
+typedef struct _SHELLDETAILS *LPSHELLDETAILS;
+
+#include <poppack.h>
+
+#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
+typedef /* [v1_enum] */ 
+enum tagPERCEIVED
+    {	PERCEIVED_TYPE_FIRST	= -3,
+	PERCEIVED_TYPE_CUSTOM	= -3,
+	PERCEIVED_TYPE_UNSPECIFIED	= -2,
+	PERCEIVED_TYPE_FOLDER	= -1,
+	PERCEIVED_TYPE_UNKNOWN	= 0,
+	PERCEIVED_TYPE_TEXT	= 1,
+	PERCEIVED_TYPE_IMAGE	= 2,
+	PERCEIVED_TYPE_AUDIO	= 3,
+	PERCEIVED_TYPE_VIDEO	= 4,
+	PERCEIVED_TYPE_COMPRESSED	= 5,
+	PERCEIVED_TYPE_DOCUMENT	= 6,
+	PERCEIVED_TYPE_SYSTEM	= 7,
+	PERCEIVED_TYPE_APPLICATION	= 8,
+	PERCEIVED_TYPE_GAMEMEDIA	= 9,
+	PERCEIVED_TYPE_CONTACTS	= 10,
+	PERCEIVED_TYPE_LAST	= 10
+    } 	PERCEIVED;
+
+#define PERCEIVEDFLAG_UNDEFINED     0x0000
+#define PERCEIVEDFLAG_SOFTCODED     0x0001
+#define PERCEIVEDFLAG_HARDCODED     0x0002
+#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004
+#define PERCEIVEDFLAG_GDIPLUS       0x0010
+#define PERCEIVEDFLAG_WMSDK         0x0020
+#define PERCEIVEDFLAG_ZIPFOLDER     0x0040
+typedef DWORD PERCEIVEDFLAG;
+
+#endif  // _WIN32_IE_IE60SP2
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef struct _COMDLG_FILTERSPEC
+    {
+    LPCWSTR pszName;
+    LPCWSTR pszSpec;
+    } 	COMDLG_FILTERSPEC;
+
+typedef struct tagMACHINE_ID
+    {
+    char szName[ 16 ];
+    } 	MACHINE_ID;
+
+typedef struct tagDOMAIN_RELATIVE_OBJECTID
+    {
+    GUID guidVolume;
+    GUID guidObject;
+    } 	DOMAIN_RELATIVE_OBJECTID;
+
+typedef GUID KNOWNFOLDERID;
+
+#if 0
+typedef KNOWNFOLDERID *REFKNOWNFOLDERID;
+
+#endif // 0
+#ifdef __cplusplus
+#define REFKNOWNFOLDERID const KNOWNFOLDERID &
+#else // !__cplusplus
+#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST
+#endif // __cplusplus
+#endif  // NTDDI_LONGHORN
+typedef GUID FOLDERTYPEID;
+
+#if 0
+typedef FOLDERTYPEID *REFFOLDERTYPEID;
+
+#endif // 0
+#ifdef __cplusplus
+#define REFFOLDERTYPEID const FOLDERTYPEID &
+#else // !__cplusplus
+#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST
+#endif // __cplusplus
+typedef GUID TASKOWNERID;
+
+#if 0
+typedef TASKOWNERID *REFTASKOWNERID;
+
+#endif // 0
+#ifdef __cplusplus
+#define REFTASKOWNERID const TASKOWNERID &
+#else // !__cplusplus
+#define REFTASKOWNERID const TASKOWNERID * __MIDL_CONST
+#endif // __cplusplus
+#ifndef LF_FACESIZE
+typedef struct tagLOGFONTA
+    {
+    LONG lfHeight;
+    LONG lfWidth;
+    LONG lfEscapement;
+    LONG lfOrientation;
+    LONG lfWeight;
+    BYTE lfItalic;
+    BYTE lfUnderline;
+    BYTE lfStrikeOut;
+    BYTE lfCharSet;
+    BYTE lfOutPrecision;
+    BYTE lfClipPrecision;
+    BYTE lfQuality;
+    BYTE lfPitchAndFamily;
+    CHAR lfFaceName[ 32 ];
+    } 	LOGFONTA;
+
+typedef struct tagLOGFONTW
+    {
+    LONG lfHeight;
+    LONG lfWidth;
+    LONG lfEscapement;
+    LONG lfOrientation;
+    LONG lfWeight;
+    BYTE lfItalic;
+    BYTE lfUnderline;
+    BYTE lfStrikeOut;
+    BYTE lfCharSet;
+    BYTE lfOutPrecision;
+    BYTE lfClipPrecision;
+    BYTE lfQuality;
+    BYTE lfPitchAndFamily;
+    WCHAR lfFaceName[ 32 ];
+    } 	LOGFONTW;
+
+typedef LOGFONTA LOGFONT;
+
+#endif // LF_FACESIZE
+typedef /* [v1_enum] */ 
+enum tagSHCOLSTATE
+    {	SHCOLSTATE_TYPE_STR	= 0x1,
+	SHCOLSTATE_TYPE_INT	= 0x2,
+	SHCOLSTATE_TYPE_DATE	= 0x3,
+	SHCOLSTATE_TYPEMASK	= 0xf,
+	SHCOLSTATE_ONBYDEFAULT	= 0x10,
+	SHCOLSTATE_SLOW	= 0x20,
+	SHCOLSTATE_EXTENDED	= 0x40,
+	SHCOLSTATE_SECONDARYUI	= 0x80,
+	SHCOLSTATE_HIDDEN	= 0x100,
+	SHCOLSTATE_PREFER_VARCMP	= 0x200,
+	SHCOLSTATE_PREFER_FMTCMP	= 0x400,
+	SHCOLSTATE_NOSORTBYFOLDERNESS	= 0x800,
+	SHCOLSTATE_VIEWONLY	= 0x10000,
+	SHCOLSTATE_BATCHREAD	= 0x20000,
+	SHCOLSTATE_NO_GROUPBY	= 0x40000,
+	SHCOLSTATE_FIXED_WIDTH	= 0x1000,
+	SHCOLSTATE_NODPISCALE	= 0x2000,
+	SHCOLSTATE_FIXED_RATIO	= 0x4000,
+	SHCOLSTATE_DISPLAYMASK	= 0xf000
+    } 	SHCOLSTATE;
+
+typedef DWORD SHCOLSTATEF;
+
+typedef PROPERTYKEY SHCOLUMNID;
+
+typedef const SHCOLUMNID *LPCSHCOLUMNID;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/mingw-include/structuredquery.h b/portaudio/src/hostapi/wasapi/mingw-include/structuredquery.h
--- a/portaudio/src/hostapi/wasapi/mingw-include/structuredquery.h
+++ b/portaudio/src/hostapi/wasapi/mingw-include/structuredquery.h
@@ -1,2478 +1,2478 @@
-
-
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */
-
-
- /* File created by MIDL compiler version 7.00.0499 */
-/* Compiler settings for structuredquery.idl:
-    Oicf, W1, Zp8, env=Win32 (32b run)
-    protocol : dce , ms_ext, c_ext, robust
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
-         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
-         DECLSPEC_UUID(), MIDL_INTERFACE()
-*/
-//@@MIDL_FILE_HEADING(  )
-
-#pragma warning( disable: 4049 )  /* more than 64k source lines */
-
-
-/* verify that the <rpcndr.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCNDR_H_VERSION__
-#define __REQUIRED_RPCNDR_H_VERSION__ 475
-#endif
-
-/* verify that the <rpcsal.h> version is high enough to compile this file*/
-#ifndef __REQUIRED_RPCSAL_H_VERSION__
-#define __REQUIRED_RPCSAL_H_VERSION__ 100
-#endif
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#ifndef __RPCNDR_H_VERSION__
-#error this stub requires an updated version of <rpcndr.h>
-#endif // __RPCNDR_H_VERSION__
-
-#ifndef COM_NO_WINDOWS_H
-#include "windows.h"
-#include "ole2.h"
-#endif /*COM_NO_WINDOWS_H*/
-
-#ifndef __structuredquery_h__
-#define __structuredquery_h__
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-#pragma once
-#endif
-
-/* Forward Declarations */ 
-
-#ifndef __IQueryParser_FWD_DEFINED__
-#define __IQueryParser_FWD_DEFINED__
-typedef interface IQueryParser IQueryParser;
-#endif 	/* __IQueryParser_FWD_DEFINED__ */
-
-
-#ifndef __IConditionFactory_FWD_DEFINED__
-#define __IConditionFactory_FWD_DEFINED__
-typedef interface IConditionFactory IConditionFactory;
-#endif 	/* __IConditionFactory_FWD_DEFINED__ */
-
-
-#ifndef __IQuerySolution_FWD_DEFINED__
-#define __IQuerySolution_FWD_DEFINED__
-typedef interface IQuerySolution IQuerySolution;
-#endif 	/* __IQuerySolution_FWD_DEFINED__ */
-
-
-#ifndef __ICondition_FWD_DEFINED__
-#define __ICondition_FWD_DEFINED__
-typedef interface ICondition ICondition;
-#endif 	/* __ICondition_FWD_DEFINED__ */
-
-
-#ifndef __IConditionGenerator_FWD_DEFINED__
-#define __IConditionGenerator_FWD_DEFINED__
-typedef interface IConditionGenerator IConditionGenerator;
-#endif 	/* __IConditionGenerator_FWD_DEFINED__ */
-
-
-#ifndef __IRichChunk_FWD_DEFINED__
-#define __IRichChunk_FWD_DEFINED__
-typedef interface IRichChunk IRichChunk;
-#endif 	/* __IRichChunk_FWD_DEFINED__ */
-
-
-#ifndef __IInterval_FWD_DEFINED__
-#define __IInterval_FWD_DEFINED__
-typedef interface IInterval IInterval;
-#endif 	/* __IInterval_FWD_DEFINED__ */
-
-
-#ifndef __IMetaData_FWD_DEFINED__
-#define __IMetaData_FWD_DEFINED__
-typedef interface IMetaData IMetaData;
-#endif 	/* __IMetaData_FWD_DEFINED__ */
-
-
-#ifndef __IEntity_FWD_DEFINED__
-#define __IEntity_FWD_DEFINED__
-typedef interface IEntity IEntity;
-#endif 	/* __IEntity_FWD_DEFINED__ */
-
-
-#ifndef __IRelationship_FWD_DEFINED__
-#define __IRelationship_FWD_DEFINED__
-typedef interface IRelationship IRelationship;
-#endif 	/* __IRelationship_FWD_DEFINED__ */
-
-
-#ifndef __INamedEntity_FWD_DEFINED__
-#define __INamedEntity_FWD_DEFINED__
-typedef interface INamedEntity INamedEntity;
-#endif 	/* __INamedEntity_FWD_DEFINED__ */
-
-
-#ifndef __ISchemaProvider_FWD_DEFINED__
-#define __ISchemaProvider_FWD_DEFINED__
-typedef interface ISchemaProvider ISchemaProvider;
-#endif 	/* __ISchemaProvider_FWD_DEFINED__ */
-
-
-#ifndef __ITokenCollection_FWD_DEFINED__
-#define __ITokenCollection_FWD_DEFINED__
-typedef interface ITokenCollection ITokenCollection;
-#endif 	/* __ITokenCollection_FWD_DEFINED__ */
-
-
-#ifndef __INamedEntityCollector_FWD_DEFINED__
-#define __INamedEntityCollector_FWD_DEFINED__
-typedef interface INamedEntityCollector INamedEntityCollector;
-#endif 	/* __INamedEntityCollector_FWD_DEFINED__ */
-
-
-#ifndef __ISchemaLocalizerSupport_FWD_DEFINED__
-#define __ISchemaLocalizerSupport_FWD_DEFINED__
-typedef interface ISchemaLocalizerSupport ISchemaLocalizerSupport;
-#endif 	/* __ISchemaLocalizerSupport_FWD_DEFINED__ */
-
-
-#ifndef __IQueryParserManager_FWD_DEFINED__
-#define __IQueryParserManager_FWD_DEFINED__
-typedef interface IQueryParserManager IQueryParserManager;
-#endif 	/* __IQueryParserManager_FWD_DEFINED__ */
-
-
-#ifndef __QueryParser_FWD_DEFINED__
-#define __QueryParser_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class QueryParser QueryParser;
-#else
-typedef struct QueryParser QueryParser;
-#endif /* __cplusplus */
-
-#endif 	/* __QueryParser_FWD_DEFINED__ */
-
-
-#ifndef __NegationCondition_FWD_DEFINED__
-#define __NegationCondition_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class NegationCondition NegationCondition;
-#else
-typedef struct NegationCondition NegationCondition;
-#endif /* __cplusplus */
-
-#endif 	/* __NegationCondition_FWD_DEFINED__ */
-
-
-#ifndef __CompoundCondition_FWD_DEFINED__
-#define __CompoundCondition_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class CompoundCondition CompoundCondition;
-#else
-typedef struct CompoundCondition CompoundCondition;
-#endif /* __cplusplus */
-
-#endif 	/* __CompoundCondition_FWD_DEFINED__ */
-
-
-#ifndef __LeafCondition_FWD_DEFINED__
-#define __LeafCondition_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class LeafCondition LeafCondition;
-#else
-typedef struct LeafCondition LeafCondition;
-#endif /* __cplusplus */
-
-#endif 	/* __LeafCondition_FWD_DEFINED__ */
-
-
-#ifndef __ConditionFactory_FWD_DEFINED__
-#define __ConditionFactory_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class ConditionFactory ConditionFactory;
-#else
-typedef struct ConditionFactory ConditionFactory;
-#endif /* __cplusplus */
-
-#endif 	/* __ConditionFactory_FWD_DEFINED__ */
-
-
-#ifndef __Interval_FWD_DEFINED__
-#define __Interval_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class Interval Interval;
-#else
-typedef struct Interval Interval;
-#endif /* __cplusplus */
-
-#endif 	/* __Interval_FWD_DEFINED__ */
-
-
-#ifndef __QueryParserManager_FWD_DEFINED__
-#define __QueryParserManager_FWD_DEFINED__
-
-#ifdef __cplusplus
-typedef class QueryParserManager QueryParserManager;
-#else
-typedef struct QueryParserManager QueryParserManager;
-#endif /* __cplusplus */
-
-#endif 	/* __QueryParserManager_FWD_DEFINED__ */
-
-
-/* header files for imported files */
-#include "oaidl.h"
-#include "ocidl.h"
-#include "propidl.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif 
-
-
-/* interface __MIDL_itf_structuredquery_0000_0000 */
-/* [local] */ 
-
-
-
-
-
-
-
-
-
-
-
-typedef /* [v1_enum] */ 
-enum tagCONDITION_TYPE
-    {	CT_AND_CONDITION	= 0,
-	CT_OR_CONDITION	= ( CT_AND_CONDITION + 1 ) ,
-	CT_NOT_CONDITION	= ( CT_OR_CONDITION + 1 ) ,
-	CT_LEAF_CONDITION	= ( CT_NOT_CONDITION + 1 ) 
-    } 	CONDITION_TYPE;
-
-typedef /* [v1_enum] */ 
-enum tagCONDITION_OPERATION
-    {	COP_IMPLICIT	= 0,
-	COP_EQUAL	= ( COP_IMPLICIT + 1 ) ,
-	COP_NOTEQUAL	= ( COP_EQUAL + 1 ) ,
-	COP_LESSTHAN	= ( COP_NOTEQUAL + 1 ) ,
-	COP_GREATERTHAN	= ( COP_LESSTHAN + 1 ) ,
-	COP_LESSTHANOREQUAL	= ( COP_GREATERTHAN + 1 ) ,
-	COP_GREATERTHANOREQUAL	= ( COP_LESSTHANOREQUAL + 1 ) ,
-	COP_VALUE_STARTSWITH	= ( COP_GREATERTHANOREQUAL + 1 ) ,
-	COP_VALUE_ENDSWITH	= ( COP_VALUE_STARTSWITH + 1 ) ,
-	COP_VALUE_CONTAINS	= ( COP_VALUE_ENDSWITH + 1 ) ,
-	COP_VALUE_NOTCONTAINS	= ( COP_VALUE_CONTAINS + 1 ) ,
-	COP_DOSWILDCARDS	= ( COP_VALUE_NOTCONTAINS + 1 ) ,
-	COP_WORD_EQUAL	= ( COP_DOSWILDCARDS + 1 ) ,
-	COP_WORD_STARTSWITH	= ( COP_WORD_EQUAL + 1 ) ,
-	COP_APPLICATION_SPECIFIC	= ( COP_WORD_STARTSWITH + 1 ) 
-    } 	CONDITION_OPERATION;
-
-typedef /* [v1_enum] */ 
-enum tagSTRUCTURED_QUERY_SINGLE_OPTION
-    {	SQSO_SCHEMA	= 0,
-	SQSO_LOCALE_WORD_BREAKING	= ( SQSO_SCHEMA + 1 ) ,
-	SQSO_WORD_BREAKER	= ( SQSO_LOCALE_WORD_BREAKING + 1 ) ,
-	SQSO_NATURAL_SYNTAX	= ( SQSO_WORD_BREAKER + 1 ) ,
-	SQSO_AUTOMATIC_WILDCARD	= ( SQSO_NATURAL_SYNTAX + 1 ) ,
-	SQSO_TRACE_LEVEL	= ( SQSO_AUTOMATIC_WILDCARD + 1 ) ,
-	SQSO_LANGUAGE_KEYWORDS	= ( SQSO_TRACE_LEVEL + 1 ) 
-    } 	STRUCTURED_QUERY_SINGLE_OPTION;
-
-typedef /* [v1_enum] */ 
-enum tagSTRUCTURED_QUERY_MULTIOPTION
-    {	SQMO_VIRTUAL_PROPERTY	= 0,
-	SQMO_DEFAULT_PROPERTY	= ( SQMO_VIRTUAL_PROPERTY + 1 ) ,
-	SQMO_GENERATOR_FOR_TYPE	= ( SQMO_DEFAULT_PROPERTY + 1 ) 
-    } 	STRUCTURED_QUERY_MULTIOPTION;
-
-typedef /* [v1_enum] */ 
-enum tagSTRUCTURED_QUERY_PARSE_ERROR
-    {	SQPE_NONE	= 0,
-	SQPE_EXTRA_OPENING_PARENTHESIS	= ( SQPE_NONE + 1 ) ,
-	SQPE_EXTRA_CLOSING_PARENTHESIS	= ( SQPE_EXTRA_OPENING_PARENTHESIS + 1 ) ,
-	SQPE_IGNORED_MODIFIER	= ( SQPE_EXTRA_CLOSING_PARENTHESIS + 1 ) ,
-	SQPE_IGNORED_CONNECTOR	= ( SQPE_IGNORED_MODIFIER + 1 ) ,
-	SQPE_IGNORED_KEYWORD	= ( SQPE_IGNORED_CONNECTOR + 1 ) ,
-	SQPE_UNHANDLED	= ( SQPE_IGNORED_KEYWORD + 1 ) 
-    } 	STRUCTURED_QUERY_PARSE_ERROR;
-
-/* [v1_enum] */ 
-enum tagSTRUCTURED_QUERY_RESOLVE_OPTION
-    {	SQRO_DONT_RESOLVE_DATETIME	= 0x1,
-	SQRO_ALWAYS_ONE_INTERVAL	= 0x2,
-	SQRO_DONT_SIMPLIFY_CONDITION_TREES	= 0x4,
-	SQRO_DONT_MAP_RELATIONS	= 0x8,
-	SQRO_DONT_RESOLVE_RANGES	= 0x10,
-	SQRO_DONT_REMOVE_UNRESTRICTED_KEYWORDS	= 0x20,
-	SQRO_DONT_SPLIT_WORDS	= 0x40,
-	SQRO_IGNORE_PHRASE_ORDER	= 0x80
-    } ;
-typedef int STRUCTURED_QUERY_RESOLVE_OPTION;
-
-typedef /* [v1_enum] */ 
-enum tagINTERVAL_LIMIT_KIND
-    {	ILK_EXPLICIT_INCLUDED	= 0,
-	ILK_EXPLICIT_EXCLUDED	= ( ILK_EXPLICIT_INCLUDED + 1 ) ,
-	ILK_NEGATIVE_INFINITY	= ( ILK_EXPLICIT_EXCLUDED + 1 ) ,
-	ILK_POSITIVE_INFINITY	= ( ILK_NEGATIVE_INFINITY + 1 ) 
-    } 	INTERVAL_LIMIT_KIND;
-
-typedef /* [v1_enum] */ 
-enum tagQUERY_PARSER_MANAGER_OPTION
-    {	QPMO_SCHEMA_BINARY_NAME	= 0,
-	QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH	= ( QPMO_SCHEMA_BINARY_NAME + 1 ) ,
-	QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH	= ( QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
-	QPMO_LOCALIZED_SCHEMA_BINARY_PATH	= ( QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
-	QPMO_APPEND_LCID_TO_LOCALIZED_PATH	= ( QPMO_LOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
-	QPMO_LOCALIZER_SUPPORT	= ( QPMO_APPEND_LCID_TO_LOCALIZED_PATH + 1 ) 
-    } 	QUERY_PARSER_MANAGER_OPTION;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_s_ifspec;
-
-#ifndef __IQueryParser_INTERFACE_DEFINED__
-#define __IQueryParser_INTERFACE_DEFINED__
-
-/* interface IQueryParser */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IQueryParser;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("2EBDEE67-3505-43f8-9946-EA44ABC8E5B0")
-    IQueryParser : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Parse( 
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,
-            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetOption( 
-            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
-            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetOption( 
-            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
-            /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetMultiOption( 
-            /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,
-            /* [in] */ __RPC__in LPCWSTR pszOptionKey,
-            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetSchemaProvider( 
-            /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RestateToString( 
-            /* [in] */ __RPC__in_opt ICondition *pCondition,
-            /* [in] */ BOOL fUseEnglish,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE ParsePropertyValue( 
-            /* [in] */ __RPC__in LPCWSTR pszPropertyName,
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RestatePropertyValueToString( 
-            /* [in] */ __RPC__in_opt ICondition *pCondition,
-            /* [in] */ BOOL fUseEnglish,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IQueryParserVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IQueryParser * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IQueryParser * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IQueryParser * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Parse )( 
-            IQueryParser * This,
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,
-            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetOption )( 
-            IQueryParser * This,
-            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
-            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetOption )( 
-            IQueryParser * This,
-            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
-            /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetMultiOption )( 
-            IQueryParser * This,
-            /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,
-            /* [in] */ __RPC__in LPCWSTR pszOptionKey,
-            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSchemaProvider )( 
-            IQueryParser * This,
-            /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider);
-        
-        HRESULT ( STDMETHODCALLTYPE *RestateToString )( 
-            IQueryParser * This,
-            /* [in] */ __RPC__in_opt ICondition *pCondition,
-            /* [in] */ BOOL fUseEnglish,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);
-        
-        HRESULT ( STDMETHODCALLTYPE *ParsePropertyValue )( 
-            IQueryParser * This,
-            /* [in] */ __RPC__in LPCWSTR pszPropertyName,
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);
-        
-        HRESULT ( STDMETHODCALLTYPE *RestatePropertyValueToString )( 
-            IQueryParser * This,
-            /* [in] */ __RPC__in_opt ICondition *pCondition,
-            /* [in] */ BOOL fUseEnglish,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);
-        
-        END_INTERFACE
-    } IQueryParserVtbl;
-
-    interface IQueryParser
-    {
-        CONST_VTBL struct IQueryParserVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IQueryParser_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IQueryParser_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IQueryParser_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IQueryParser_Parse(This,pszInputString,pCustomProperties,ppSolution)	\
-    ( (This)->lpVtbl -> Parse(This,pszInputString,pCustomProperties,ppSolution) ) 
-
-#define IQueryParser_SetOption(This,option,pOptionValue)	\
-    ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) 
-
-#define IQueryParser_GetOption(This,option,pOptionValue)	\
-    ( (This)->lpVtbl -> GetOption(This,option,pOptionValue) ) 
-
-#define IQueryParser_SetMultiOption(This,option,pszOptionKey,pOptionValue)	\
-    ( (This)->lpVtbl -> SetMultiOption(This,option,pszOptionKey,pOptionValue) ) 
-
-#define IQueryParser_GetSchemaProvider(This,ppSchemaProvider)	\
-    ( (This)->lpVtbl -> GetSchemaProvider(This,ppSchemaProvider) ) 
-
-#define IQueryParser_RestateToString(This,pCondition,fUseEnglish,ppszQueryString)	\
-    ( (This)->lpVtbl -> RestateToString(This,pCondition,fUseEnglish,ppszQueryString) ) 
-
-#define IQueryParser_ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution)	\
-    ( (This)->lpVtbl -> ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) ) 
-
-#define IQueryParser_RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString)	\
-    ( (This)->lpVtbl -> RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IQueryParser_INTERFACE_DEFINED__ */
-
-
-#ifndef __IConditionFactory_INTERFACE_DEFINED__
-#define __IConditionFactory_INTERFACE_DEFINED__
-
-/* interface IConditionFactory */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IConditionFactory;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A5EFE073-B16F-474f-9F3E-9F8B497A3E08")
-    IConditionFactory : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE MakeNot( 
-            /* [in] */ __RPC__in_opt ICondition *pSubCondition,
-            /* [in] */ BOOL simplify,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE MakeAndOr( 
-            /* [in] */ CONDITION_TYPE nodeType,
-            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
-            /* [in] */ BOOL simplify,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE MakeLeaf( 
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
-            /* [in] */ CONDITION_OPERATION op,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
-            /* [in] */ __RPC__in const PROPVARIANT *pValue,
-            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
-            /* [in] */ BOOL expand,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Resolve( 
-            /* [in] */ 
-            __in  ICondition *pConditionTree,
-            /* [in] */ 
-            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,
-            /* [ref][in] */ 
-            __in_opt  const SYSTEMTIME *pstReferenceTime,
-            /* [retval][out] */ 
-            __out  ICondition **ppResolvedConditionTree) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IConditionFactoryVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IConditionFactory * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IConditionFactory * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IConditionFactory * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *MakeNot )( 
-            IConditionFactory * This,
-            /* [in] */ __RPC__in_opt ICondition *pSubCondition,
-            /* [in] */ BOOL simplify,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
-        
-        HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( 
-            IConditionFactory * This,
-            /* [in] */ CONDITION_TYPE nodeType,
-            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
-            /* [in] */ BOOL simplify,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
-        
-        HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( 
-            IConditionFactory * This,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
-            /* [in] */ CONDITION_OPERATION op,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
-            /* [in] */ __RPC__in const PROPVARIANT *pValue,
-            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
-            /* [in] */ BOOL expand,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( 
-            IConditionFactory * This,
-            /* [in] */ 
-            __in  ICondition *pConditionTree,
-            /* [in] */ 
-            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,
-            /* [ref][in] */ 
-            __in_opt  const SYSTEMTIME *pstReferenceTime,
-            /* [retval][out] */ 
-            __out  ICondition **ppResolvedConditionTree);
-        
-        END_INTERFACE
-    } IConditionFactoryVtbl;
-
-    interface IConditionFactory
-    {
-        CONST_VTBL struct IConditionFactoryVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IConditionFactory_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IConditionFactory_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IConditionFactory_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IConditionFactory_MakeNot(This,pSubCondition,simplify,ppResultQuery)	\
-    ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) 
-
-#define IConditionFactory_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery)	\
-    ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) 
-
-#define IConditionFactory_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery)	\
-    ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) 
-
-#define IConditionFactory_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree)	\
-    ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IConditionFactory_INTERFACE_DEFINED__ */
-
-
-#ifndef __IQuerySolution_INTERFACE_DEFINED__
-#define __IQuerySolution_INTERFACE_DEFINED__
-
-/* interface IQuerySolution */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IQuerySolution;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("D6EBC66B-8921-4193-AFDD-A1789FB7FF57")
-    IQuerySolution : public IConditionFactory
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetQuery( 
-            /* [out] */ 
-            __out_opt  ICondition **ppQueryNode,
-            /* [out] */ 
-            __out_opt  IEntity **ppMainType) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetErrors( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetLexicalData( 
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszInputString,
-            /* [out] */ 
-            __out_opt  ITokenCollection **ppTokens,
-            /* [out] */ 
-            __out_opt  LCID *pLocale,
-            /* [out] */ 
-            __out_opt  IUnknown **ppWordBreaker) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IQuerySolutionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IQuerySolution * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IQuerySolution * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IQuerySolution * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *MakeNot )( 
-            IQuerySolution * This,
-            /* [in] */ __RPC__in_opt ICondition *pSubCondition,
-            /* [in] */ BOOL simplify,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
-        
-        HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( 
-            IQuerySolution * This,
-            /* [in] */ CONDITION_TYPE nodeType,
-            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
-            /* [in] */ BOOL simplify,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
-        
-        HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( 
-            IQuerySolution * This,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
-            /* [in] */ CONDITION_OPERATION op,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
-            /* [in] */ __RPC__in const PROPVARIANT *pValue,
-            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
-            /* [in] */ BOOL expand,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( 
-            IQuerySolution * This,
-            /* [in] */ 
-            __in  ICondition *pConditionTree,
-            /* [in] */ 
-            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,
-            /* [ref][in] */ 
-            __in_opt  const SYSTEMTIME *pstReferenceTime,
-            /* [retval][out] */ 
-            __out  ICondition **ppResolvedConditionTree);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )( 
-            IQuerySolution * This,
-            /* [out] */ 
-            __out_opt  ICondition **ppQueryNode,
-            /* [out] */ 
-            __out_opt  IEntity **ppMainType);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetErrors )( 
-            IQuerySolution * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetLexicalData )( 
-            IQuerySolution * This,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszInputString,
-            /* [out] */ 
-            __out_opt  ITokenCollection **ppTokens,
-            /* [out] */ 
-            __out_opt  LCID *pLocale,
-            /* [out] */ 
-            __out_opt  IUnknown **ppWordBreaker);
-        
-        END_INTERFACE
-    } IQuerySolutionVtbl;
-
-    interface IQuerySolution
-    {
-        CONST_VTBL struct IQuerySolutionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IQuerySolution_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IQuerySolution_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IQuerySolution_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IQuerySolution_MakeNot(This,pSubCondition,simplify,ppResultQuery)	\
-    ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) 
-
-#define IQuerySolution_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery)	\
-    ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) 
-
-#define IQuerySolution_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery)	\
-    ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) 
-
-#define IQuerySolution_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree)	\
-    ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) 
-
-
-#define IQuerySolution_GetQuery(This,ppQueryNode,ppMainType)	\
-    ( (This)->lpVtbl -> GetQuery(This,ppQueryNode,ppMainType) ) 
-
-#define IQuerySolution_GetErrors(This,riid,ppParseErrors)	\
-    ( (This)->lpVtbl -> GetErrors(This,riid,ppParseErrors) ) 
-
-#define IQuerySolution_GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker)	\
-    ( (This)->lpVtbl -> GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IQuerySolution_INTERFACE_DEFINED__ */
-
-
-#ifndef __ICondition_INTERFACE_DEFINED__
-#define __ICondition_INTERFACE_DEFINED__
-
-/* interface ICondition */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_ICondition;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("0FC988D4-C935-4b97-A973-46282EA175C8")
-    ICondition : public IPersistStream
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetConditionType( 
-            /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetSubConditions( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetComparisonInfo( 
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszPropertyName,
-            /* [out] */ 
-            __out_opt  CONDITION_OPERATION *pOperation,
-            /* [out] */ 
-            __out_opt  PROPVARIANT *pValue) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetValueType( 
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetValueNormalization( 
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetInputTerms( 
-            /* [out] */ 
-            __out_opt  IRichChunk **ppPropertyTerm,
-            /* [out] */ 
-            __out_opt  IRichChunk **ppOperationTerm,
-            /* [out] */ 
-            __out_opt  IRichChunk **ppValueTerm) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Clone( 
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IConditionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ICondition * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ICondition * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ICondition * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetClassID )( 
-            ICondition * This,
-            /* [out] */ __RPC__out CLSID *pClassID);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsDirty )( 
-            ICondition * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Load )( 
-            ICondition * This,
-            /* [unique][in] */ __RPC__in_opt IStream *pStm);
-        
-        HRESULT ( STDMETHODCALLTYPE *Save )( 
-            ICondition * This,
-            /* [unique][in] */ __RPC__in_opt IStream *pStm,
-            /* [in] */ BOOL fClearDirty);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( 
-            ICondition * This,
-            /* [out] */ __RPC__out ULARGE_INTEGER *pcbSize);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
-            ICondition * This,
-            /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetSubConditions )( 
-            ICondition * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetComparisonInfo )( 
-            ICondition * This,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszPropertyName,
-            /* [out] */ 
-            __out_opt  CONDITION_OPERATION *pOperation,
-            /* [out] */ 
-            __out_opt  PROPVARIANT *pValue);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValueType )( 
-            ICondition * This,
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValueNormalization )( 
-            ICondition * This,
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetInputTerms )( 
-            ICondition * This,
-            /* [out] */ 
-            __out_opt  IRichChunk **ppPropertyTerm,
-            /* [out] */ 
-            __out_opt  IRichChunk **ppOperationTerm,
-            /* [out] */ 
-            __out_opt  IRichChunk **ppValueTerm);
-        
-        HRESULT ( STDMETHODCALLTYPE *Clone )( 
-            ICondition * This,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc);
-        
-        END_INTERFACE
-    } IConditionVtbl;
-
-    interface ICondition
-    {
-        CONST_VTBL struct IConditionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ICondition_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ICondition_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ICondition_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define ICondition_GetClassID(This,pClassID)	\
-    ( (This)->lpVtbl -> GetClassID(This,pClassID) ) 
-
-
-#define ICondition_IsDirty(This)	\
-    ( (This)->lpVtbl -> IsDirty(This) ) 
-
-#define ICondition_Load(This,pStm)	\
-    ( (This)->lpVtbl -> Load(This,pStm) ) 
-
-#define ICondition_Save(This,pStm,fClearDirty)	\
-    ( (This)->lpVtbl -> Save(This,pStm,fClearDirty) ) 
-
-#define ICondition_GetSizeMax(This,pcbSize)	\
-    ( (This)->lpVtbl -> GetSizeMax(This,pcbSize) ) 
-
-
-#define ICondition_GetConditionType(This,pNodeType)	\
-    ( (This)->lpVtbl -> GetConditionType(This,pNodeType) ) 
-
-#define ICondition_GetSubConditions(This,riid,ppv)	\
-    ( (This)->lpVtbl -> GetSubConditions(This,riid,ppv) ) 
-
-#define ICondition_GetComparisonInfo(This,ppszPropertyName,pOperation,pValue)	\
-    ( (This)->lpVtbl -> GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) ) 
-
-#define ICondition_GetValueType(This,ppszValueTypeName)	\
-    ( (This)->lpVtbl -> GetValueType(This,ppszValueTypeName) ) 
-
-#define ICondition_GetValueNormalization(This,ppszNormalization)	\
-    ( (This)->lpVtbl -> GetValueNormalization(This,ppszNormalization) ) 
-
-#define ICondition_GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm)	\
-    ( (This)->lpVtbl -> GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) ) 
-
-#define ICondition_Clone(This,ppc)	\
-    ( (This)->lpVtbl -> Clone(This,ppc) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ICondition_INTERFACE_DEFINED__ */
-
-
-#ifndef __IConditionGenerator_INTERFACE_DEFINED__
-#define __IConditionGenerator_INTERFACE_DEFINED__
-
-/* interface IConditionGenerator */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IConditionGenerator;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("92D2CC58-4386-45a3-B98C-7E0CE64A4117")
-    IConditionGenerator : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Initialize( 
-            /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RecognizeNamedEntities( 
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [in] */ LCID lcid,
-            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
-            /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GenerateForLeaf( 
-            /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
-            /* [in] */ CONDITION_OPERATION op,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
-            /* [in] */ __RPC__in LPCWSTR pszValue,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,
-            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
-            /* [in] */ BOOL automaticWildcard,
-            /* [out] */ __RPC__out BOOL *pNoStringQuery,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
-            /* [unique][in] */ LPCWSTR pszValueType,
-            /* [in] */ const PROPVARIANT *ppropvar,
-            /* [in] */ BOOL fUseEnglish,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IConditionGeneratorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IConditionGenerator * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IConditionGenerator * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IConditionGenerator * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Initialize )( 
-            IConditionGenerator * This,
-            /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider);
-        
-        HRESULT ( STDMETHODCALLTYPE *RecognizeNamedEntities )( 
-            IConditionGenerator * This,
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [in] */ LCID lcid,
-            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
-            /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities);
-        
-        HRESULT ( STDMETHODCALLTYPE *GenerateForLeaf )( 
-            IConditionGenerator * This,
-            /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
-            /* [in] */ CONDITION_OPERATION op,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
-            /* [in] */ __RPC__in LPCWSTR pszValue,
-            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,
-            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
-            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
-            /* [in] */ BOOL automaticWildcard,
-            /* [out] */ __RPC__out BOOL *pNoStringQuery,
-            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
-            IConditionGenerator * This,
-            /* [unique][in] */ LPCWSTR pszValueType,
-            /* [in] */ const PROPVARIANT *ppropvar,
-            /* [in] */ BOOL fUseEnglish,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase);
-        
-        END_INTERFACE
-    } IConditionGeneratorVtbl;
-
-    interface IConditionGenerator
-    {
-        CONST_VTBL struct IConditionGeneratorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IConditionGenerator_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IConditionGenerator_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IConditionGenerator_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IConditionGenerator_Initialize(This,pSchemaProvider)	\
-    ( (This)->lpVtbl -> Initialize(This,pSchemaProvider) ) 
-
-#define IConditionGenerator_RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities)	\
-    ( (This)->lpVtbl -> RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) ) 
-
-#define IConditionGenerator_GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression)	\
-    ( (This)->lpVtbl -> GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) ) 
-
-#define IConditionGenerator_DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase)	\
-    ( (This)->lpVtbl -> DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IConditionGenerator_INTERFACE_DEFINED__ */
-
-
-#ifndef __IRichChunk_INTERFACE_DEFINED__
-#define __IRichChunk_INTERFACE_DEFINED__
-
-/* interface IRichChunk */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IRichChunk;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("4FDEF69C-DBC9-454e-9910-B34F3C64B510")
-    IRichChunk : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( 
-            /* [out] */ 
-            __out_opt  ULONG *pFirstPos,
-            /* [out] */ 
-            __out_opt  ULONG *pLength,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppsz,
-            /* [out] */ 
-            __out_opt  PROPVARIANT *pValue) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IRichChunkVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IRichChunk * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IRichChunk * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IRichChunk * This);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( 
-            IRichChunk * This,
-            /* [out] */ 
-            __out_opt  ULONG *pFirstPos,
-            /* [out] */ 
-            __out_opt  ULONG *pLength,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppsz,
-            /* [out] */ 
-            __out_opt  PROPVARIANT *pValue);
-        
-        END_INTERFACE
-    } IRichChunkVtbl;
-
-    interface IRichChunk
-    {
-        CONST_VTBL struct IRichChunkVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IRichChunk_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IRichChunk_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IRichChunk_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IRichChunk_GetData(This,pFirstPos,pLength,ppsz,pValue)	\
-    ( (This)->lpVtbl -> GetData(This,pFirstPos,pLength,ppsz,pValue) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IRichChunk_INTERFACE_DEFINED__ */
-
-
-#ifndef __IInterval_INTERFACE_DEFINED__
-#define __IInterval_INTERFACE_DEFINED__
-
-/* interface IInterval */
-/* [unique][uuid][object] */ 
-
-
-EXTERN_C const IID IID_IInterval;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("6BF0A714-3C18-430b-8B5D-83B1C234D3DB")
-    IInterval : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetLimits( 
-            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,
-            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IIntervalVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IInterval * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IInterval * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IInterval * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetLimits )( 
-            IInterval * This,
-            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,
-            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,
-            /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper);
-        
-        END_INTERFACE
-    } IIntervalVtbl;
-
-    interface IInterval
-    {
-        CONST_VTBL struct IIntervalVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IInterval_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IInterval_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IInterval_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IInterval_GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper)	\
-    ( (This)->lpVtbl -> GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IInterval_INTERFACE_DEFINED__ */
-
-
-#ifndef __IMetaData_INTERFACE_DEFINED__
-#define __IMetaData_INTERFACE_DEFINED__
-
-/* interface IMetaData */
-/* [unique][uuid][object][helpstring] */ 
-
-
-EXTERN_C const IID IID_IMetaData;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("780102B0-C43B-4876-BC7B-5E9BA5C88794")
-    IMetaData : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( 
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszKey,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszValue) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IMetaDataVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IMetaData * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IMetaData * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IMetaData * This);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( 
-            IMetaData * This,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszKey,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppszValue);
-        
-        END_INTERFACE
-    } IMetaDataVtbl;
-
-    interface IMetaData
-    {
-        CONST_VTBL struct IMetaDataVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IMetaData_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IMetaData_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IMetaData_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IMetaData_GetData(This,ppszKey,ppszValue)	\
-    ( (This)->lpVtbl -> GetData(This,ppszKey,ppszValue) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IMetaData_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_structuredquery_0000_0008 */
-/* [local] */ 
-
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_s_ifspec;
-
-#ifndef __IEntity_INTERFACE_DEFINED__
-#define __IEntity_INTERFACE_DEFINED__
-
-/* interface IEntity */
-/* [unique][object][uuid][helpstring] */ 
-
-
-EXTERN_C const IID IID_IEntity;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("24264891-E80B-4fd3-B7CE-4FF2FAE8931F")
-    IEntity : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( 
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszName) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Base( 
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Relationships( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetRelationship( 
-            /* [in] */ __RPC__in LPCWSTR pszRelationName,
-            /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE MetaData( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE NamedEntities( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetNamedEntity( 
-            /* [in] */ __RPC__in LPCWSTR pszValue,
-            /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IEntityVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IEntity * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IEntity * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IEntity * This);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( 
-            IEntity * This,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *Base )( 
-            IEntity * This,
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity);
-        
-        HRESULT ( STDMETHODCALLTYPE *Relationships )( 
-            IEntity * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetRelationship )( 
-            IEntity * This,
-            /* [in] */ __RPC__in LPCWSTR pszRelationName,
-            /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship);
-        
-        HRESULT ( STDMETHODCALLTYPE *MetaData )( 
-            IEntity * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
-        
-        HRESULT ( STDMETHODCALLTYPE *NamedEntities )( 
-            IEntity * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetNamedEntity )( 
-            IEntity * This,
-            /* [in] */ __RPC__in LPCWSTR pszValue,
-            /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
-            IEntity * This,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase);
-        
-        END_INTERFACE
-    } IEntityVtbl;
-
-    interface IEntity
-    {
-        CONST_VTBL struct IEntityVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IEntity_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IEntity_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IEntity_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IEntity_Name(This,ppszName)	\
-    ( (This)->lpVtbl -> Name(This,ppszName) ) 
-
-#define IEntity_Base(This,pBaseEntity)	\
-    ( (This)->lpVtbl -> Base(This,pBaseEntity) ) 
-
-#define IEntity_Relationships(This,riid,pRelationships)	\
-    ( (This)->lpVtbl -> Relationships(This,riid,pRelationships) ) 
-
-#define IEntity_GetRelationship(This,pszRelationName,pRelationship)	\
-    ( (This)->lpVtbl -> GetRelationship(This,pszRelationName,pRelationship) ) 
-
-#define IEntity_MetaData(This,riid,pMetaData)	\
-    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) 
-
-#define IEntity_NamedEntities(This,riid,pNamedEntities)	\
-    ( (This)->lpVtbl -> NamedEntities(This,riid,pNamedEntities) ) 
-
-#define IEntity_GetNamedEntity(This,pszValue,ppNamedEntity)	\
-    ( (This)->lpVtbl -> GetNamedEntity(This,pszValue,ppNamedEntity) ) 
-
-#define IEntity_DefaultPhrase(This,ppszPhrase)	\
-    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IEntity_INTERFACE_DEFINED__ */
-
-
-#ifndef __IRelationship_INTERFACE_DEFINED__
-#define __IRelationship_INTERFACE_DEFINED__
-
-/* interface IRelationship */
-/* [unique][object][uuid][helpstring] */ 
-
-
-EXTERN_C const IID IID_IRelationship;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("2769280B-5108-498c-9C7F-A51239B63147")
-    IRelationship : public IUnknown
-    {
-    public:
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( 
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszName) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE IsReal( 
-            /* [retval][out] */ __RPC__out BOOL *pIsReal) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Destination( 
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE MetaData( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IRelationshipVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IRelationship * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IRelationship * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IRelationship * This);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( 
-            IRelationship * This,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszName);
-        
-        HRESULT ( STDMETHODCALLTYPE *IsReal )( 
-            IRelationship * This,
-            /* [retval][out] */ __RPC__out BOOL *pIsReal);
-        
-        HRESULT ( STDMETHODCALLTYPE *Destination )( 
-            IRelationship * This,
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity);
-        
-        HRESULT ( STDMETHODCALLTYPE *MetaData )( 
-            IRelationship * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
-            IRelationship * This,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase);
-        
-        END_INTERFACE
-    } IRelationshipVtbl;
-
-    interface IRelationship
-    {
-        CONST_VTBL struct IRelationshipVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IRelationship_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IRelationship_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IRelationship_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IRelationship_Name(This,ppszName)	\
-    ( (This)->lpVtbl -> Name(This,ppszName) ) 
-
-#define IRelationship_IsReal(This,pIsReal)	\
-    ( (This)->lpVtbl -> IsReal(This,pIsReal) ) 
-
-#define IRelationship_Destination(This,pDestinationEntity)	\
-    ( (This)->lpVtbl -> Destination(This,pDestinationEntity) ) 
-
-#define IRelationship_MetaData(This,riid,pMetaData)	\
-    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) 
-
-#define IRelationship_DefaultPhrase(This,ppszPhrase)	\
-    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IRelationship_INTERFACE_DEFINED__ */
-
-
-#ifndef __INamedEntity_INTERFACE_DEFINED__
-#define __INamedEntity_INTERFACE_DEFINED__
-
-/* interface INamedEntity */
-/* [unique][uuid][object][helpstring] */ 
-
-
-EXTERN_C const IID IID_INamedEntity;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("ABDBD0B1-7D54-49fb-AB5C-BFF4130004CD")
-    INamedEntity : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE GetValue( 
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct INamedEntityVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            INamedEntity * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            INamedEntity * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            INamedEntity * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
-            INamedEntity * This,
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
-            INamedEntity * This,
-            /* [retval][out] */ 
-            __deref_opt_out  LPWSTR *ppszPhrase);
-        
-        END_INTERFACE
-    } INamedEntityVtbl;
-
-    interface INamedEntity
-    {
-        CONST_VTBL struct INamedEntityVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define INamedEntity_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define INamedEntity_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define INamedEntity_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define INamedEntity_GetValue(This,ppszValue)	\
-    ( (This)->lpVtbl -> GetValue(This,ppszValue) ) 
-
-#define INamedEntity_DefaultPhrase(This,ppszPhrase)	\
-    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __INamedEntity_INTERFACE_DEFINED__ */
-
-
-#ifndef __ISchemaProvider_INTERFACE_DEFINED__
-#define __ISchemaProvider_INTERFACE_DEFINED__
-
-/* interface ISchemaProvider */
-/* [unique][object][uuid][helpstring] */ 
-
-
-EXTERN_C const IID IID_ISchemaProvider;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("8CF89BCB-394C-49b2-AE28-A59DD4ED7F68")
-    ISchemaProvider : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Entities( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE RootEntity( 
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE GetEntity( 
-            /* [in] */ __RPC__in LPCWSTR pszEntityName,
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE MetaData( 
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE Localize( 
-            /* [in] */ LCID lcid,
-            /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SaveBinary( 
-            /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE LookupAuthoredNamedEntity( 
-            /* [in] */ __RPC__in_opt IEntity *pEntity,
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
-            /* [in] */ ULONG cTokensBegin,
-            /* [out] */ __RPC__out ULONG *pcTokensLength,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct ISchemaProviderVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ISchemaProvider * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ISchemaProvider * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ISchemaProvider * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Entities )( 
-            ISchemaProvider * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities);
-        
-        HRESULT ( STDMETHODCALLTYPE *RootEntity )( 
-            ISchemaProvider * This,
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity);
-        
-        HRESULT ( STDMETHODCALLTYPE *GetEntity )( 
-            ISchemaProvider * This,
-            /* [in] */ __RPC__in LPCWSTR pszEntityName,
-            /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity);
-        
-        HRESULT ( STDMETHODCALLTYPE *MetaData )( 
-            ISchemaProvider * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
-        
-        HRESULT ( STDMETHODCALLTYPE *Localize )( 
-            ISchemaProvider * This,
-            /* [in] */ LCID lcid,
-            /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport);
-        
-        HRESULT ( STDMETHODCALLTYPE *SaveBinary )( 
-            ISchemaProvider * This,
-            /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath);
-        
-        HRESULT ( STDMETHODCALLTYPE *LookupAuthoredNamedEntity )( 
-            ISchemaProvider * This,
-            /* [in] */ __RPC__in_opt IEntity *pEntity,
-            /* [in] */ __RPC__in LPCWSTR pszInputString,
-            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
-            /* [in] */ ULONG cTokensBegin,
-            /* [out] */ __RPC__out ULONG *pcTokensLength,
-            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue);
-        
-        END_INTERFACE
-    } ISchemaProviderVtbl;
-
-    interface ISchemaProvider
-    {
-        CONST_VTBL struct ISchemaProviderVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ISchemaProvider_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ISchemaProvider_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ISchemaProvider_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define ISchemaProvider_Entities(This,riid,pEntities)	\
-    ( (This)->lpVtbl -> Entities(This,riid,pEntities) ) 
-
-#define ISchemaProvider_RootEntity(This,pRootEntity)	\
-    ( (This)->lpVtbl -> RootEntity(This,pRootEntity) ) 
-
-#define ISchemaProvider_GetEntity(This,pszEntityName,pEntity)	\
-    ( (This)->lpVtbl -> GetEntity(This,pszEntityName,pEntity) ) 
-
-#define ISchemaProvider_MetaData(This,riid,pMetaData)	\
-    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) 
-
-#define ISchemaProvider_Localize(This,lcid,pSchemaLocalizerSupport)	\
-    ( (This)->lpVtbl -> Localize(This,lcid,pSchemaLocalizerSupport) ) 
-
-#define ISchemaProvider_SaveBinary(This,pszSchemaBinaryPath)	\
-    ( (This)->lpVtbl -> SaveBinary(This,pszSchemaBinaryPath) ) 
-
-#define ISchemaProvider_LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue)	\
-    ( (This)->lpVtbl -> LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ISchemaProvider_INTERFACE_DEFINED__ */
-
-
-#ifndef __ITokenCollection_INTERFACE_DEFINED__
-#define __ITokenCollection_INTERFACE_DEFINED__
-
-/* interface ITokenCollection */
-/* [unique][object][uuid][helpstring] */ 
-
-
-EXTERN_C const IID IID_ITokenCollection;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("22D8B4F2-F577-4adb-A335-C2AE88416FAB")
-    ITokenCollection : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE NumberOfTokens( 
-            __RPC__in ULONG *pCount) = 0;
-        
-        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetToken( 
-            /* [in] */ ULONG i,
-            /* [out] */ 
-            __out_opt  ULONG *pBegin,
-            /* [out] */ 
-            __out_opt  ULONG *pLength,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppsz) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct ITokenCollectionVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ITokenCollection * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ITokenCollection * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ITokenCollection * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *NumberOfTokens )( 
-            ITokenCollection * This,
-            __RPC__in ULONG *pCount);
-        
-        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetToken )( 
-            ITokenCollection * This,
-            /* [in] */ ULONG i,
-            /* [out] */ 
-            __out_opt  ULONG *pBegin,
-            /* [out] */ 
-            __out_opt  ULONG *pLength,
-            /* [out] */ 
-            __deref_opt_out  LPWSTR *ppsz);
-        
-        END_INTERFACE
-    } ITokenCollectionVtbl;
-
-    interface ITokenCollection
-    {
-        CONST_VTBL struct ITokenCollectionVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ITokenCollection_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ITokenCollection_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ITokenCollection_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define ITokenCollection_NumberOfTokens(This,pCount)	\
-    ( (This)->lpVtbl -> NumberOfTokens(This,pCount) ) 
-
-#define ITokenCollection_GetToken(This,i,pBegin,pLength,ppsz)	\
-    ( (This)->lpVtbl -> GetToken(This,i,pBegin,pLength,ppsz) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ITokenCollection_INTERFACE_DEFINED__ */
-
-
-/* interface __MIDL_itf_structuredquery_0000_0013 */
-/* [local] */ 
-
-typedef /* [public][public][v1_enum] */ 
-enum __MIDL___MIDL_itf_structuredquery_0000_0013_0001
-    {	NEC_LOW	= 0,
-	NEC_MEDIUM	= ( NEC_LOW + 1 ) ,
-	NEC_HIGH	= ( NEC_MEDIUM + 1 ) 
-    } 	NAMED_ENTITY_CERTAINTY;
-
-
-
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_s_ifspec;
-
-#ifndef __INamedEntityCollector_INTERFACE_DEFINED__
-#define __INamedEntityCollector_INTERFACE_DEFINED__
-
-/* interface INamedEntityCollector */
-/* [unique][object][uuid][helpstring] */ 
-
-
-EXTERN_C const IID IID_INamedEntityCollector;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("AF2440F6-8AFC-47d0-9A7F-396A0ACFB43D")
-    INamedEntityCollector : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Add( 
-            /* [in] */ ULONG beginSpan,
-            /* [in] */ ULONG endSpan,
-            /* [in] */ ULONG beginActual,
-            /* [in] */ ULONG endActual,
-            /* [in] */ __RPC__in_opt IEntity *pType,
-            /* [in] */ __RPC__in LPCWSTR pszValue,
-            /* [in] */ NAMED_ENTITY_CERTAINTY certainty) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct INamedEntityCollectorVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            INamedEntityCollector * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            INamedEntityCollector * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            INamedEntityCollector * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Add )( 
-            INamedEntityCollector * This,
-            /* [in] */ ULONG beginSpan,
-            /* [in] */ ULONG endSpan,
-            /* [in] */ ULONG beginActual,
-            /* [in] */ ULONG endActual,
-            /* [in] */ __RPC__in_opt IEntity *pType,
-            /* [in] */ __RPC__in LPCWSTR pszValue,
-            /* [in] */ NAMED_ENTITY_CERTAINTY certainty);
-        
-        END_INTERFACE
-    } INamedEntityCollectorVtbl;
-
-    interface INamedEntityCollector
-    {
-        CONST_VTBL struct INamedEntityCollectorVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define INamedEntityCollector_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define INamedEntityCollector_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define INamedEntityCollector_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define INamedEntityCollector_Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty)	\
-    ( (This)->lpVtbl -> Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __INamedEntityCollector_INTERFACE_DEFINED__ */
-
-
-#ifndef __ISchemaLocalizerSupport_INTERFACE_DEFINED__
-#define __ISchemaLocalizerSupport_INTERFACE_DEFINED__
-
-/* interface ISchemaLocalizerSupport */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_ISchemaLocalizerSupport;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("CA3FDCA2-BFBE-4eed-90D7-0CAEF0A1BDA1")
-    ISchemaLocalizerSupport : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE Localize( 
-            /* [in] */ __RPC__in LPCWSTR pszGlobalString,
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct ISchemaLocalizerSupportVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            ISchemaLocalizerSupport * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            ISchemaLocalizerSupport * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            ISchemaLocalizerSupport * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *Localize )( 
-            ISchemaLocalizerSupport * This,
-            /* [in] */ __RPC__in LPCWSTR pszGlobalString,
-            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString);
-        
-        END_INTERFACE
-    } ISchemaLocalizerSupportVtbl;
-
-    interface ISchemaLocalizerSupport
-    {
-        CONST_VTBL struct ISchemaLocalizerSupportVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define ISchemaLocalizerSupport_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define ISchemaLocalizerSupport_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define ISchemaLocalizerSupport_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define ISchemaLocalizerSupport_Localize(This,pszGlobalString,ppszLocalString)	\
-    ( (This)->lpVtbl -> Localize(This,pszGlobalString,ppszLocalString) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __ISchemaLocalizerSupport_INTERFACE_DEFINED__ */
-
-
-#ifndef __IQueryParserManager_INTERFACE_DEFINED__
-#define __IQueryParserManager_INTERFACE_DEFINED__
-
-/* interface IQueryParserManager */
-/* [unique][object][uuid] */ 
-
-
-EXTERN_C const IID IID_IQueryParserManager;
-
-#if defined(__cplusplus) && !defined(CINTERFACE)
-    
-    MIDL_INTERFACE("A879E3C4-AF77-44fb-8F37-EBD1487CF920")
-    IQueryParserManager : public IUnknown
-    {
-    public:
-        virtual HRESULT STDMETHODCALLTYPE CreateLoadedParser( 
-            /* [in] */ __RPC__in LPCWSTR pszCatalog,
-            /* [in] */ LANGID langidForKeywords,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE InitializeOptions( 
-            /* [in] */ BOOL fUnderstandNQS,
-            /* [in] */ BOOL fAutoWildCard,
-            /* [in] */ __RPC__in_opt IQueryParser *pQueryParser) = 0;
-        
-        virtual HRESULT STDMETHODCALLTYPE SetOption( 
-            /* [in] */ QUERY_PARSER_MANAGER_OPTION option,
-            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
-        
-    };
-    
-#else 	/* C style interface */
-
-    typedef struct IQueryParserManagerVtbl
-    {
-        BEGIN_INTERFACE
-        
-        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
-            IQueryParserManager * This,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][out] */ 
-            __RPC__deref_out  void **ppvObject);
-        
-        ULONG ( STDMETHODCALLTYPE *AddRef )( 
-            IQueryParserManager * This);
-        
-        ULONG ( STDMETHODCALLTYPE *Release )( 
-            IQueryParserManager * This);
-        
-        HRESULT ( STDMETHODCALLTYPE *CreateLoadedParser )( 
-            IQueryParserManager * This,
-            /* [in] */ __RPC__in LPCWSTR pszCatalog,
-            /* [in] */ LANGID langidForKeywords,
-            /* [in] */ __RPC__in REFIID riid,
-            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser);
-        
-        HRESULT ( STDMETHODCALLTYPE *InitializeOptions )( 
-            IQueryParserManager * This,
-            /* [in] */ BOOL fUnderstandNQS,
-            /* [in] */ BOOL fAutoWildCard,
-            /* [in] */ __RPC__in_opt IQueryParser *pQueryParser);
-        
-        HRESULT ( STDMETHODCALLTYPE *SetOption )( 
-            IQueryParserManager * This,
-            /* [in] */ QUERY_PARSER_MANAGER_OPTION option,
-            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
-        
-        END_INTERFACE
-    } IQueryParserManagerVtbl;
-
-    interface IQueryParserManager
-    {
-        CONST_VTBL struct IQueryParserManagerVtbl *lpVtbl;
-    };
-
-    
-
-#ifdef COBJMACROS
-
-
-#define IQueryParserManager_QueryInterface(This,riid,ppvObject)	\
-    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
-
-#define IQueryParserManager_AddRef(This)	\
-    ( (This)->lpVtbl -> AddRef(This) ) 
-
-#define IQueryParserManager_Release(This)	\
-    ( (This)->lpVtbl -> Release(This) ) 
-
-
-#define IQueryParserManager_CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser)	\
-    ( (This)->lpVtbl -> CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) ) 
-
-#define IQueryParserManager_InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser)	\
-    ( (This)->lpVtbl -> InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) ) 
-
-#define IQueryParserManager_SetOption(This,option,pOptionValue)	\
-    ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) 
-
-#endif /* COBJMACROS */
-
-
-#endif 	/* C style interface */
-
-
-
-
-#endif 	/* __IQueryParserManager_INTERFACE_DEFINED__ */
-
-
-
-#ifndef __StructuredQuery1_LIBRARY_DEFINED__
-#define __StructuredQuery1_LIBRARY_DEFINED__
-
-/* library StructuredQuery1 */
-/* [version][uuid] */ 
-
-
-EXTERN_C const IID LIBID_StructuredQuery1;
-
-EXTERN_C const CLSID CLSID_QueryParser;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("B72F8FD8-0FAB-4dd9-BDBF-245A6CE1485B")
-QueryParser;
-#endif
-
-EXTERN_C const CLSID CLSID_NegationCondition;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("8DE9C74C-605A-4acd-BEE3-2B222AA2D23D")
-NegationCondition;
-#endif
-
-EXTERN_C const CLSID CLSID_CompoundCondition;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("116F8D13-101E-4fa5-84D4-FF8279381935")
-CompoundCondition;
-#endif
-
-EXTERN_C const CLSID CLSID_LeafCondition;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("52F15C89-5A17-48e1-BBCD-46A3F89C7CC2")
-LeafCondition;
-#endif
-
-EXTERN_C const CLSID CLSID_ConditionFactory;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("E03E85B0-7BE3-4000-BA98-6C13DE9FA486")
-ConditionFactory;
-#endif
-
-EXTERN_C const CLSID CLSID_Interval;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("D957171F-4BF9-4de2-BCD5-C70A7CA55836")
-Interval;
-#endif
-
-EXTERN_C const CLSID CLSID_QueryParserManager;
-
-#ifdef __cplusplus
-
-class DECLSPEC_UUID("5088B39A-29B4-4d9d-8245-4EE289222F66")
-QueryParserManager;
-#endif
-#endif /* __StructuredQuery1_LIBRARY_DEFINED__ */
-
-/* Additional Prototypes for ALL interfaces */
-
-unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); 
-unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); 
-unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); 
-void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); 
-
-unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
-unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
-unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
-void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); 
-
-/* end of Additional Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for structuredquery.idl:
+    Oicf, W1, Zp8, env=Win32 (32b run)
+    protocol : dce , ms_ext, c_ext, robust
+    error checks: allocation ref bounds_check enum stub_data 
+    VC __declspec() decoration level: 
+         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+         DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING(  )
+
+#pragma warning( disable: 4049 )  /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 475
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __structuredquery_h__
+#define __structuredquery_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IQueryParser_FWD_DEFINED__
+#define __IQueryParser_FWD_DEFINED__
+typedef interface IQueryParser IQueryParser;
+#endif 	/* __IQueryParser_FWD_DEFINED__ */
+
+
+#ifndef __IConditionFactory_FWD_DEFINED__
+#define __IConditionFactory_FWD_DEFINED__
+typedef interface IConditionFactory IConditionFactory;
+#endif 	/* __IConditionFactory_FWD_DEFINED__ */
+
+
+#ifndef __IQuerySolution_FWD_DEFINED__
+#define __IQuerySolution_FWD_DEFINED__
+typedef interface IQuerySolution IQuerySolution;
+#endif 	/* __IQuerySolution_FWD_DEFINED__ */
+
+
+#ifndef __ICondition_FWD_DEFINED__
+#define __ICondition_FWD_DEFINED__
+typedef interface ICondition ICondition;
+#endif 	/* __ICondition_FWD_DEFINED__ */
+
+
+#ifndef __IConditionGenerator_FWD_DEFINED__
+#define __IConditionGenerator_FWD_DEFINED__
+typedef interface IConditionGenerator IConditionGenerator;
+#endif 	/* __IConditionGenerator_FWD_DEFINED__ */
+
+
+#ifndef __IRichChunk_FWD_DEFINED__
+#define __IRichChunk_FWD_DEFINED__
+typedef interface IRichChunk IRichChunk;
+#endif 	/* __IRichChunk_FWD_DEFINED__ */
+
+
+#ifndef __IInterval_FWD_DEFINED__
+#define __IInterval_FWD_DEFINED__
+typedef interface IInterval IInterval;
+#endif 	/* __IInterval_FWD_DEFINED__ */
+
+
+#ifndef __IMetaData_FWD_DEFINED__
+#define __IMetaData_FWD_DEFINED__
+typedef interface IMetaData IMetaData;
+#endif 	/* __IMetaData_FWD_DEFINED__ */
+
+
+#ifndef __IEntity_FWD_DEFINED__
+#define __IEntity_FWD_DEFINED__
+typedef interface IEntity IEntity;
+#endif 	/* __IEntity_FWD_DEFINED__ */
+
+
+#ifndef __IRelationship_FWD_DEFINED__
+#define __IRelationship_FWD_DEFINED__
+typedef interface IRelationship IRelationship;
+#endif 	/* __IRelationship_FWD_DEFINED__ */
+
+
+#ifndef __INamedEntity_FWD_DEFINED__
+#define __INamedEntity_FWD_DEFINED__
+typedef interface INamedEntity INamedEntity;
+#endif 	/* __INamedEntity_FWD_DEFINED__ */
+
+
+#ifndef __ISchemaProvider_FWD_DEFINED__
+#define __ISchemaProvider_FWD_DEFINED__
+typedef interface ISchemaProvider ISchemaProvider;
+#endif 	/* __ISchemaProvider_FWD_DEFINED__ */
+
+
+#ifndef __ITokenCollection_FWD_DEFINED__
+#define __ITokenCollection_FWD_DEFINED__
+typedef interface ITokenCollection ITokenCollection;
+#endif 	/* __ITokenCollection_FWD_DEFINED__ */
+
+
+#ifndef __INamedEntityCollector_FWD_DEFINED__
+#define __INamedEntityCollector_FWD_DEFINED__
+typedef interface INamedEntityCollector INamedEntityCollector;
+#endif 	/* __INamedEntityCollector_FWD_DEFINED__ */
+
+
+#ifndef __ISchemaLocalizerSupport_FWD_DEFINED__
+#define __ISchemaLocalizerSupport_FWD_DEFINED__
+typedef interface ISchemaLocalizerSupport ISchemaLocalizerSupport;
+#endif 	/* __ISchemaLocalizerSupport_FWD_DEFINED__ */
+
+
+#ifndef __IQueryParserManager_FWD_DEFINED__
+#define __IQueryParserManager_FWD_DEFINED__
+typedef interface IQueryParserManager IQueryParserManager;
+#endif 	/* __IQueryParserManager_FWD_DEFINED__ */
+
+
+#ifndef __QueryParser_FWD_DEFINED__
+#define __QueryParser_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class QueryParser QueryParser;
+#else
+typedef struct QueryParser QueryParser;
+#endif /* __cplusplus */
+
+#endif 	/* __QueryParser_FWD_DEFINED__ */
+
+
+#ifndef __NegationCondition_FWD_DEFINED__
+#define __NegationCondition_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class NegationCondition NegationCondition;
+#else
+typedef struct NegationCondition NegationCondition;
+#endif /* __cplusplus */
+
+#endif 	/* __NegationCondition_FWD_DEFINED__ */
+
+
+#ifndef __CompoundCondition_FWD_DEFINED__
+#define __CompoundCondition_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class CompoundCondition CompoundCondition;
+#else
+typedef struct CompoundCondition CompoundCondition;
+#endif /* __cplusplus */
+
+#endif 	/* __CompoundCondition_FWD_DEFINED__ */
+
+
+#ifndef __LeafCondition_FWD_DEFINED__
+#define __LeafCondition_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class LeafCondition LeafCondition;
+#else
+typedef struct LeafCondition LeafCondition;
+#endif /* __cplusplus */
+
+#endif 	/* __LeafCondition_FWD_DEFINED__ */
+
+
+#ifndef __ConditionFactory_FWD_DEFINED__
+#define __ConditionFactory_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class ConditionFactory ConditionFactory;
+#else
+typedef struct ConditionFactory ConditionFactory;
+#endif /* __cplusplus */
+
+#endif 	/* __ConditionFactory_FWD_DEFINED__ */
+
+
+#ifndef __Interval_FWD_DEFINED__
+#define __Interval_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class Interval Interval;
+#else
+typedef struct Interval Interval;
+#endif /* __cplusplus */
+
+#endif 	/* __Interval_FWD_DEFINED__ */
+
+
+#ifndef __QueryParserManager_FWD_DEFINED__
+#define __QueryParserManager_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class QueryParserManager QueryParserManager;
+#else
+typedef struct QueryParserManager QueryParserManager;
+#endif /* __cplusplus */
+
+#endif 	/* __QueryParserManager_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "propidl.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_structuredquery_0000_0000 */
+/* [local] */ 
+
+
+
+
+
+
+
+
+
+
+
+typedef /* [v1_enum] */ 
+enum tagCONDITION_TYPE
+    {	CT_AND_CONDITION	= 0,
+	CT_OR_CONDITION	= ( CT_AND_CONDITION + 1 ) ,
+	CT_NOT_CONDITION	= ( CT_OR_CONDITION + 1 ) ,
+	CT_LEAF_CONDITION	= ( CT_NOT_CONDITION + 1 ) 
+    } 	CONDITION_TYPE;
+
+typedef /* [v1_enum] */ 
+enum tagCONDITION_OPERATION
+    {	COP_IMPLICIT	= 0,
+	COP_EQUAL	= ( COP_IMPLICIT + 1 ) ,
+	COP_NOTEQUAL	= ( COP_EQUAL + 1 ) ,
+	COP_LESSTHAN	= ( COP_NOTEQUAL + 1 ) ,
+	COP_GREATERTHAN	= ( COP_LESSTHAN + 1 ) ,
+	COP_LESSTHANOREQUAL	= ( COP_GREATERTHAN + 1 ) ,
+	COP_GREATERTHANOREQUAL	= ( COP_LESSTHANOREQUAL + 1 ) ,
+	COP_VALUE_STARTSWITH	= ( COP_GREATERTHANOREQUAL + 1 ) ,
+	COP_VALUE_ENDSWITH	= ( COP_VALUE_STARTSWITH + 1 ) ,
+	COP_VALUE_CONTAINS	= ( COP_VALUE_ENDSWITH + 1 ) ,
+	COP_VALUE_NOTCONTAINS	= ( COP_VALUE_CONTAINS + 1 ) ,
+	COP_DOSWILDCARDS	= ( COP_VALUE_NOTCONTAINS + 1 ) ,
+	COP_WORD_EQUAL	= ( COP_DOSWILDCARDS + 1 ) ,
+	COP_WORD_STARTSWITH	= ( COP_WORD_EQUAL + 1 ) ,
+	COP_APPLICATION_SPECIFIC	= ( COP_WORD_STARTSWITH + 1 ) 
+    } 	CONDITION_OPERATION;
+
+typedef /* [v1_enum] */ 
+enum tagSTRUCTURED_QUERY_SINGLE_OPTION
+    {	SQSO_SCHEMA	= 0,
+	SQSO_LOCALE_WORD_BREAKING	= ( SQSO_SCHEMA + 1 ) ,
+	SQSO_WORD_BREAKER	= ( SQSO_LOCALE_WORD_BREAKING + 1 ) ,
+	SQSO_NATURAL_SYNTAX	= ( SQSO_WORD_BREAKER + 1 ) ,
+	SQSO_AUTOMATIC_WILDCARD	= ( SQSO_NATURAL_SYNTAX + 1 ) ,
+	SQSO_TRACE_LEVEL	= ( SQSO_AUTOMATIC_WILDCARD + 1 ) ,
+	SQSO_LANGUAGE_KEYWORDS	= ( SQSO_TRACE_LEVEL + 1 ) 
+    } 	STRUCTURED_QUERY_SINGLE_OPTION;
+
+typedef /* [v1_enum] */ 
+enum tagSTRUCTURED_QUERY_MULTIOPTION
+    {	SQMO_VIRTUAL_PROPERTY	= 0,
+	SQMO_DEFAULT_PROPERTY	= ( SQMO_VIRTUAL_PROPERTY + 1 ) ,
+	SQMO_GENERATOR_FOR_TYPE	= ( SQMO_DEFAULT_PROPERTY + 1 ) 
+    } 	STRUCTURED_QUERY_MULTIOPTION;
+
+typedef /* [v1_enum] */ 
+enum tagSTRUCTURED_QUERY_PARSE_ERROR
+    {	SQPE_NONE	= 0,
+	SQPE_EXTRA_OPENING_PARENTHESIS	= ( SQPE_NONE + 1 ) ,
+	SQPE_EXTRA_CLOSING_PARENTHESIS	= ( SQPE_EXTRA_OPENING_PARENTHESIS + 1 ) ,
+	SQPE_IGNORED_MODIFIER	= ( SQPE_EXTRA_CLOSING_PARENTHESIS + 1 ) ,
+	SQPE_IGNORED_CONNECTOR	= ( SQPE_IGNORED_MODIFIER + 1 ) ,
+	SQPE_IGNORED_KEYWORD	= ( SQPE_IGNORED_CONNECTOR + 1 ) ,
+	SQPE_UNHANDLED	= ( SQPE_IGNORED_KEYWORD + 1 ) 
+    } 	STRUCTURED_QUERY_PARSE_ERROR;
+
+/* [v1_enum] */ 
+enum tagSTRUCTURED_QUERY_RESOLVE_OPTION
+    {	SQRO_DONT_RESOLVE_DATETIME	= 0x1,
+	SQRO_ALWAYS_ONE_INTERVAL	= 0x2,
+	SQRO_DONT_SIMPLIFY_CONDITION_TREES	= 0x4,
+	SQRO_DONT_MAP_RELATIONS	= 0x8,
+	SQRO_DONT_RESOLVE_RANGES	= 0x10,
+	SQRO_DONT_REMOVE_UNRESTRICTED_KEYWORDS	= 0x20,
+	SQRO_DONT_SPLIT_WORDS	= 0x40,
+	SQRO_IGNORE_PHRASE_ORDER	= 0x80
+    } ;
+typedef int STRUCTURED_QUERY_RESOLVE_OPTION;
+
+typedef /* [v1_enum] */ 
+enum tagINTERVAL_LIMIT_KIND
+    {	ILK_EXPLICIT_INCLUDED	= 0,
+	ILK_EXPLICIT_EXCLUDED	= ( ILK_EXPLICIT_INCLUDED + 1 ) ,
+	ILK_NEGATIVE_INFINITY	= ( ILK_EXPLICIT_EXCLUDED + 1 ) ,
+	ILK_POSITIVE_INFINITY	= ( ILK_NEGATIVE_INFINITY + 1 ) 
+    } 	INTERVAL_LIMIT_KIND;
+
+typedef /* [v1_enum] */ 
+enum tagQUERY_PARSER_MANAGER_OPTION
+    {	QPMO_SCHEMA_BINARY_NAME	= 0,
+	QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH	= ( QPMO_SCHEMA_BINARY_NAME + 1 ) ,
+	QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH	= ( QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
+	QPMO_LOCALIZED_SCHEMA_BINARY_PATH	= ( QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
+	QPMO_APPEND_LCID_TO_LOCALIZED_PATH	= ( QPMO_LOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
+	QPMO_LOCALIZER_SUPPORT	= ( QPMO_APPEND_LCID_TO_LOCALIZED_PATH + 1 ) 
+    } 	QUERY_PARSER_MANAGER_OPTION;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IQueryParser_INTERFACE_DEFINED__
+#define __IQueryParser_INTERFACE_DEFINED__
+
+/* interface IQueryParser */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IQueryParser;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("2EBDEE67-3505-43f8-9946-EA44ABC8E5B0")
+    IQueryParser : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Parse( 
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,
+            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetOption( 
+            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetOption( 
+            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+            /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetMultiOption( 
+            /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,
+            /* [in] */ __RPC__in LPCWSTR pszOptionKey,
+            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetSchemaProvider( 
+            /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RestateToString( 
+            /* [in] */ __RPC__in_opt ICondition *pCondition,
+            /* [in] */ BOOL fUseEnglish,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE ParsePropertyValue( 
+            /* [in] */ __RPC__in LPCWSTR pszPropertyName,
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RestatePropertyValueToString( 
+            /* [in] */ __RPC__in_opt ICondition *pCondition,
+            /* [in] */ BOOL fUseEnglish,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IQueryParserVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IQueryParser * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IQueryParser * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IQueryParser * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Parse )( 
+            IQueryParser * This,
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,
+            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetOption )( 
+            IQueryParser * This,
+            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetOption )( 
+            IQueryParser * This,
+            /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+            /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetMultiOption )( 
+            IQueryParser * This,
+            /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,
+            /* [in] */ __RPC__in LPCWSTR pszOptionKey,
+            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSchemaProvider )( 
+            IQueryParser * This,
+            /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider);
+        
+        HRESULT ( STDMETHODCALLTYPE *RestateToString )( 
+            IQueryParser * This,
+            /* [in] */ __RPC__in_opt ICondition *pCondition,
+            /* [in] */ BOOL fUseEnglish,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);
+        
+        HRESULT ( STDMETHODCALLTYPE *ParsePropertyValue )( 
+            IQueryParser * This,
+            /* [in] */ __RPC__in LPCWSTR pszPropertyName,
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);
+        
+        HRESULT ( STDMETHODCALLTYPE *RestatePropertyValueToString )( 
+            IQueryParser * This,
+            /* [in] */ __RPC__in_opt ICondition *pCondition,
+            /* [in] */ BOOL fUseEnglish,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);
+        
+        END_INTERFACE
+    } IQueryParserVtbl;
+
+    interface IQueryParser
+    {
+        CONST_VTBL struct IQueryParserVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IQueryParser_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IQueryParser_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IQueryParser_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IQueryParser_Parse(This,pszInputString,pCustomProperties,ppSolution)	\
+    ( (This)->lpVtbl -> Parse(This,pszInputString,pCustomProperties,ppSolution) ) 
+
+#define IQueryParser_SetOption(This,option,pOptionValue)	\
+    ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) 
+
+#define IQueryParser_GetOption(This,option,pOptionValue)	\
+    ( (This)->lpVtbl -> GetOption(This,option,pOptionValue) ) 
+
+#define IQueryParser_SetMultiOption(This,option,pszOptionKey,pOptionValue)	\
+    ( (This)->lpVtbl -> SetMultiOption(This,option,pszOptionKey,pOptionValue) ) 
+
+#define IQueryParser_GetSchemaProvider(This,ppSchemaProvider)	\
+    ( (This)->lpVtbl -> GetSchemaProvider(This,ppSchemaProvider) ) 
+
+#define IQueryParser_RestateToString(This,pCondition,fUseEnglish,ppszQueryString)	\
+    ( (This)->lpVtbl -> RestateToString(This,pCondition,fUseEnglish,ppszQueryString) ) 
+
+#define IQueryParser_ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution)	\
+    ( (This)->lpVtbl -> ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) ) 
+
+#define IQueryParser_RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString)	\
+    ( (This)->lpVtbl -> RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IQueryParser_INTERFACE_DEFINED__ */
+
+
+#ifndef __IConditionFactory_INTERFACE_DEFINED__
+#define __IConditionFactory_INTERFACE_DEFINED__
+
+/* interface IConditionFactory */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IConditionFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("A5EFE073-B16F-474f-9F3E-9F8B497A3E08")
+    IConditionFactory : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE MakeNot( 
+            /* [in] */ __RPC__in_opt ICondition *pSubCondition,
+            /* [in] */ BOOL simplify,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE MakeAndOr( 
+            /* [in] */ CONDITION_TYPE nodeType,
+            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
+            /* [in] */ BOOL simplify,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE MakeLeaf( 
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+            /* [in] */ CONDITION_OPERATION op,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+            /* [in] */ __RPC__in const PROPVARIANT *pValue,
+            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+            /* [in] */ BOOL expand,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Resolve( 
+            /* [in] */ 
+            __in  ICondition *pConditionTree,
+            /* [in] */ 
+            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,
+            /* [ref][in] */ 
+            __in_opt  const SYSTEMTIME *pstReferenceTime,
+            /* [retval][out] */ 
+            __out  ICondition **ppResolvedConditionTree) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IConditionFactoryVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IConditionFactory * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IConditionFactory * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IConditionFactory * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeNot )( 
+            IConditionFactory * This,
+            /* [in] */ __RPC__in_opt ICondition *pSubCondition,
+            /* [in] */ BOOL simplify,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( 
+            IConditionFactory * This,
+            /* [in] */ CONDITION_TYPE nodeType,
+            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
+            /* [in] */ BOOL simplify,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( 
+            IConditionFactory * This,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+            /* [in] */ CONDITION_OPERATION op,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+            /* [in] */ __RPC__in const PROPVARIANT *pValue,
+            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+            /* [in] */ BOOL expand,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( 
+            IConditionFactory * This,
+            /* [in] */ 
+            __in  ICondition *pConditionTree,
+            /* [in] */ 
+            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,
+            /* [ref][in] */ 
+            __in_opt  const SYSTEMTIME *pstReferenceTime,
+            /* [retval][out] */ 
+            __out  ICondition **ppResolvedConditionTree);
+        
+        END_INTERFACE
+    } IConditionFactoryVtbl;
+
+    interface IConditionFactory
+    {
+        CONST_VTBL struct IConditionFactoryVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IConditionFactory_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IConditionFactory_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IConditionFactory_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IConditionFactory_MakeNot(This,pSubCondition,simplify,ppResultQuery)	\
+    ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) 
+
+#define IConditionFactory_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery)	\
+    ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) 
+
+#define IConditionFactory_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery)	\
+    ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) 
+
+#define IConditionFactory_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree)	\
+    ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IConditionFactory_INTERFACE_DEFINED__ */
+
+
+#ifndef __IQuerySolution_INTERFACE_DEFINED__
+#define __IQuerySolution_INTERFACE_DEFINED__
+
+/* interface IQuerySolution */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IQuerySolution;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("D6EBC66B-8921-4193-AFDD-A1789FB7FF57")
+    IQuerySolution : public IConditionFactory
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetQuery( 
+            /* [out] */ 
+            __out_opt  ICondition **ppQueryNode,
+            /* [out] */ 
+            __out_opt  IEntity **ppMainType) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetErrors( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetLexicalData( 
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszInputString,
+            /* [out] */ 
+            __out_opt  ITokenCollection **ppTokens,
+            /* [out] */ 
+            __out_opt  LCID *pLocale,
+            /* [out] */ 
+            __out_opt  IUnknown **ppWordBreaker) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IQuerySolutionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IQuerySolution * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IQuerySolution * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IQuerySolution * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeNot )( 
+            IQuerySolution * This,
+            /* [in] */ __RPC__in_opt ICondition *pSubCondition,
+            /* [in] */ BOOL simplify,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( 
+            IQuerySolution * This,
+            /* [in] */ CONDITION_TYPE nodeType,
+            /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
+            /* [in] */ BOOL simplify,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( 
+            IQuerySolution * This,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+            /* [in] */ CONDITION_OPERATION op,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+            /* [in] */ __RPC__in const PROPVARIANT *pValue,
+            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+            /* [in] */ BOOL expand,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( 
+            IQuerySolution * This,
+            /* [in] */ 
+            __in  ICondition *pConditionTree,
+            /* [in] */ 
+            __in  STRUCTURED_QUERY_RESOLVE_OPTION sqro,
+            /* [ref][in] */ 
+            __in_opt  const SYSTEMTIME *pstReferenceTime,
+            /* [retval][out] */ 
+            __out  ICondition **ppResolvedConditionTree);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )( 
+            IQuerySolution * This,
+            /* [out] */ 
+            __out_opt  ICondition **ppQueryNode,
+            /* [out] */ 
+            __out_opt  IEntity **ppMainType);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetErrors )( 
+            IQuerySolution * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetLexicalData )( 
+            IQuerySolution * This,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszInputString,
+            /* [out] */ 
+            __out_opt  ITokenCollection **ppTokens,
+            /* [out] */ 
+            __out_opt  LCID *pLocale,
+            /* [out] */ 
+            __out_opt  IUnknown **ppWordBreaker);
+        
+        END_INTERFACE
+    } IQuerySolutionVtbl;
+
+    interface IQuerySolution
+    {
+        CONST_VTBL struct IQuerySolutionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IQuerySolution_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IQuerySolution_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IQuerySolution_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IQuerySolution_MakeNot(This,pSubCondition,simplify,ppResultQuery)	\
+    ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) 
+
+#define IQuerySolution_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery)	\
+    ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) 
+
+#define IQuerySolution_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery)	\
+    ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) 
+
+#define IQuerySolution_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree)	\
+    ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) 
+
+
+#define IQuerySolution_GetQuery(This,ppQueryNode,ppMainType)	\
+    ( (This)->lpVtbl -> GetQuery(This,ppQueryNode,ppMainType) ) 
+
+#define IQuerySolution_GetErrors(This,riid,ppParseErrors)	\
+    ( (This)->lpVtbl -> GetErrors(This,riid,ppParseErrors) ) 
+
+#define IQuerySolution_GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker)	\
+    ( (This)->lpVtbl -> GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IQuerySolution_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICondition_INTERFACE_DEFINED__
+#define __ICondition_INTERFACE_DEFINED__
+
+/* interface ICondition */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_ICondition;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("0FC988D4-C935-4b97-A973-46282EA175C8")
+    ICondition : public IPersistStream
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetConditionType( 
+            /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetSubConditions( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetComparisonInfo( 
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszPropertyName,
+            /* [out] */ 
+            __out_opt  CONDITION_OPERATION *pOperation,
+            /* [out] */ 
+            __out_opt  PROPVARIANT *pValue) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetValueType( 
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetValueNormalization( 
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetInputTerms( 
+            /* [out] */ 
+            __out_opt  IRichChunk **ppPropertyTerm,
+            /* [out] */ 
+            __out_opt  IRichChunk **ppOperationTerm,
+            /* [out] */ 
+            __out_opt  IRichChunk **ppValueTerm) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Clone( 
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IConditionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ICondition * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ICondition * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ICondition * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetClassID )( 
+            ICondition * This,
+            /* [out] */ __RPC__out CLSID *pClassID);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsDirty )( 
+            ICondition * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Load )( 
+            ICondition * This,
+            /* [unique][in] */ __RPC__in_opt IStream *pStm);
+        
+        HRESULT ( STDMETHODCALLTYPE *Save )( 
+            ICondition * This,
+            /* [unique][in] */ __RPC__in_opt IStream *pStm,
+            /* [in] */ BOOL fClearDirty);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( 
+            ICondition * This,
+            /* [out] */ __RPC__out ULARGE_INTEGER *pcbSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetConditionType )( 
+            ICondition * This,
+            /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSubConditions )( 
+            ICondition * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetComparisonInfo )( 
+            ICondition * This,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszPropertyName,
+            /* [out] */ 
+            __out_opt  CONDITION_OPERATION *pOperation,
+            /* [out] */ 
+            __out_opt  PROPVARIANT *pValue);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValueType )( 
+            ICondition * This,
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValueNormalization )( 
+            ICondition * This,
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetInputTerms )( 
+            ICondition * This,
+            /* [out] */ 
+            __out_opt  IRichChunk **ppPropertyTerm,
+            /* [out] */ 
+            __out_opt  IRichChunk **ppOperationTerm,
+            /* [out] */ 
+            __out_opt  IRichChunk **ppValueTerm);
+        
+        HRESULT ( STDMETHODCALLTYPE *Clone )( 
+            ICondition * This,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc);
+        
+        END_INTERFACE
+    } IConditionVtbl;
+
+    interface ICondition
+    {
+        CONST_VTBL struct IConditionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ICondition_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ICondition_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ICondition_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ICondition_GetClassID(This,pClassID)	\
+    ( (This)->lpVtbl -> GetClassID(This,pClassID) ) 
+
+
+#define ICondition_IsDirty(This)	\
+    ( (This)->lpVtbl -> IsDirty(This) ) 
+
+#define ICondition_Load(This,pStm)	\
+    ( (This)->lpVtbl -> Load(This,pStm) ) 
+
+#define ICondition_Save(This,pStm,fClearDirty)	\
+    ( (This)->lpVtbl -> Save(This,pStm,fClearDirty) ) 
+
+#define ICondition_GetSizeMax(This,pcbSize)	\
+    ( (This)->lpVtbl -> GetSizeMax(This,pcbSize) ) 
+
+
+#define ICondition_GetConditionType(This,pNodeType)	\
+    ( (This)->lpVtbl -> GetConditionType(This,pNodeType) ) 
+
+#define ICondition_GetSubConditions(This,riid,ppv)	\
+    ( (This)->lpVtbl -> GetSubConditions(This,riid,ppv) ) 
+
+#define ICondition_GetComparisonInfo(This,ppszPropertyName,pOperation,pValue)	\
+    ( (This)->lpVtbl -> GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) ) 
+
+#define ICondition_GetValueType(This,ppszValueTypeName)	\
+    ( (This)->lpVtbl -> GetValueType(This,ppszValueTypeName) ) 
+
+#define ICondition_GetValueNormalization(This,ppszNormalization)	\
+    ( (This)->lpVtbl -> GetValueNormalization(This,ppszNormalization) ) 
+
+#define ICondition_GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm)	\
+    ( (This)->lpVtbl -> GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) ) 
+
+#define ICondition_Clone(This,ppc)	\
+    ( (This)->lpVtbl -> Clone(This,ppc) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ICondition_INTERFACE_DEFINED__ */
+
+
+#ifndef __IConditionGenerator_INTERFACE_DEFINED__
+#define __IConditionGenerator_INTERFACE_DEFINED__
+
+/* interface IConditionGenerator */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IConditionGenerator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("92D2CC58-4386-45a3-B98C-7E0CE64A4117")
+    IConditionGenerator : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Initialize( 
+            /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RecognizeNamedEntities( 
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [in] */ LCID lcid,
+            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+            /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GenerateForLeaf( 
+            /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+            /* [in] */ CONDITION_OPERATION op,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+            /* [in] */ __RPC__in LPCWSTR pszValue,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,
+            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+            /* [in] */ BOOL automaticWildcard,
+            /* [out] */ __RPC__out BOOL *pNoStringQuery,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
+            /* [unique][in] */ LPCWSTR pszValueType,
+            /* [in] */ const PROPVARIANT *ppropvar,
+            /* [in] */ BOOL fUseEnglish,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IConditionGeneratorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IConditionGenerator * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IConditionGenerator * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IConditionGenerator * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Initialize )( 
+            IConditionGenerator * This,
+            /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider);
+        
+        HRESULT ( STDMETHODCALLTYPE *RecognizeNamedEntities )( 
+            IConditionGenerator * This,
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [in] */ LCID lcid,
+            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+            /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities);
+        
+        HRESULT ( STDMETHODCALLTYPE *GenerateForLeaf )( 
+            IConditionGenerator * This,
+            /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+            /* [in] */ CONDITION_OPERATION op,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+            /* [in] */ __RPC__in LPCWSTR pszValue,
+            /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,
+            /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+            /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+            /* [in] */ BOOL automaticWildcard,
+            /* [out] */ __RPC__out BOOL *pNoStringQuery,
+            /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
+            IConditionGenerator * This,
+            /* [unique][in] */ LPCWSTR pszValueType,
+            /* [in] */ const PROPVARIANT *ppropvar,
+            /* [in] */ BOOL fUseEnglish,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase);
+        
+        END_INTERFACE
+    } IConditionGeneratorVtbl;
+
+    interface IConditionGenerator
+    {
+        CONST_VTBL struct IConditionGeneratorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IConditionGenerator_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IConditionGenerator_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IConditionGenerator_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IConditionGenerator_Initialize(This,pSchemaProvider)	\
+    ( (This)->lpVtbl -> Initialize(This,pSchemaProvider) ) 
+
+#define IConditionGenerator_RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities)	\
+    ( (This)->lpVtbl -> RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) ) 
+
+#define IConditionGenerator_GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression)	\
+    ( (This)->lpVtbl -> GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) ) 
+
+#define IConditionGenerator_DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase)	\
+    ( (This)->lpVtbl -> DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IConditionGenerator_INTERFACE_DEFINED__ */
+
+
+#ifndef __IRichChunk_INTERFACE_DEFINED__
+#define __IRichChunk_INTERFACE_DEFINED__
+
+/* interface IRichChunk */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IRichChunk;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("4FDEF69C-DBC9-454e-9910-B34F3C64B510")
+    IRichChunk : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( 
+            /* [out] */ 
+            __out_opt  ULONG *pFirstPos,
+            /* [out] */ 
+            __out_opt  ULONG *pLength,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppsz,
+            /* [out] */ 
+            __out_opt  PROPVARIANT *pValue) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IRichChunkVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IRichChunk * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IRichChunk * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IRichChunk * This);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( 
+            IRichChunk * This,
+            /* [out] */ 
+            __out_opt  ULONG *pFirstPos,
+            /* [out] */ 
+            __out_opt  ULONG *pLength,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppsz,
+            /* [out] */ 
+            __out_opt  PROPVARIANT *pValue);
+        
+        END_INTERFACE
+    } IRichChunkVtbl;
+
+    interface IRichChunk
+    {
+        CONST_VTBL struct IRichChunkVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IRichChunk_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IRichChunk_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IRichChunk_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IRichChunk_GetData(This,pFirstPos,pLength,ppsz,pValue)	\
+    ( (This)->lpVtbl -> GetData(This,pFirstPos,pLength,ppsz,pValue) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IRichChunk_INTERFACE_DEFINED__ */
+
+
+#ifndef __IInterval_INTERFACE_DEFINED__
+#define __IInterval_INTERFACE_DEFINED__
+
+/* interface IInterval */
+/* [unique][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IInterval;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("6BF0A714-3C18-430b-8B5D-83B1C234D3DB")
+    IInterval : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetLimits( 
+            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,
+            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IIntervalVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IInterval * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IInterval * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IInterval * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetLimits )( 
+            IInterval * This,
+            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,
+            /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,
+            /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper);
+        
+        END_INTERFACE
+    } IIntervalVtbl;
+
+    interface IInterval
+    {
+        CONST_VTBL struct IIntervalVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IInterval_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IInterval_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IInterval_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IInterval_GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper)	\
+    ( (This)->lpVtbl -> GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IInterval_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMetaData_INTERFACE_DEFINED__
+#define __IMetaData_INTERFACE_DEFINED__
+
+/* interface IMetaData */
+/* [unique][uuid][object][helpstring] */ 
+
+
+EXTERN_C const IID IID_IMetaData;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("780102B0-C43B-4876-BC7B-5E9BA5C88794")
+    IMetaData : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( 
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszKey,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszValue) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IMetaDataVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IMetaData * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IMetaData * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IMetaData * This);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( 
+            IMetaData * This,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszKey,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppszValue);
+        
+        END_INTERFACE
+    } IMetaDataVtbl;
+
+    interface IMetaData
+    {
+        CONST_VTBL struct IMetaDataVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IMetaData_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IMetaData_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IMetaData_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IMetaData_GetData(This,ppszKey,ppszValue)	\
+    ( (This)->lpVtbl -> GetData(This,ppszKey,ppszValue) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IMetaData_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_structuredquery_0000_0008 */
+/* [local] */ 
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_s_ifspec;
+
+#ifndef __IEntity_INTERFACE_DEFINED__
+#define __IEntity_INTERFACE_DEFINED__
+
+/* interface IEntity */
+/* [unique][object][uuid][helpstring] */ 
+
+
+EXTERN_C const IID IID_IEntity;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("24264891-E80B-4fd3-B7CE-4FF2FAE8931F")
+    IEntity : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( 
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszName) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Base( 
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Relationships( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetRelationship( 
+            /* [in] */ __RPC__in LPCWSTR pszRelationName,
+            /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE MetaData( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE NamedEntities( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetNamedEntity( 
+            /* [in] */ __RPC__in LPCWSTR pszValue,
+            /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IEntityVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IEntity * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IEntity * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IEntity * This);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( 
+            IEntity * This,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *Base )( 
+            IEntity * This,
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity);
+        
+        HRESULT ( STDMETHODCALLTYPE *Relationships )( 
+            IEntity * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetRelationship )( 
+            IEntity * This,
+            /* [in] */ __RPC__in LPCWSTR pszRelationName,
+            /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship);
+        
+        HRESULT ( STDMETHODCALLTYPE *MetaData )( 
+            IEntity * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
+        
+        HRESULT ( STDMETHODCALLTYPE *NamedEntities )( 
+            IEntity * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetNamedEntity )( 
+            IEntity * This,
+            /* [in] */ __RPC__in LPCWSTR pszValue,
+            /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
+            IEntity * This,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase);
+        
+        END_INTERFACE
+    } IEntityVtbl;
+
+    interface IEntity
+    {
+        CONST_VTBL struct IEntityVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IEntity_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IEntity_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IEntity_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IEntity_Name(This,ppszName)	\
+    ( (This)->lpVtbl -> Name(This,ppszName) ) 
+
+#define IEntity_Base(This,pBaseEntity)	\
+    ( (This)->lpVtbl -> Base(This,pBaseEntity) ) 
+
+#define IEntity_Relationships(This,riid,pRelationships)	\
+    ( (This)->lpVtbl -> Relationships(This,riid,pRelationships) ) 
+
+#define IEntity_GetRelationship(This,pszRelationName,pRelationship)	\
+    ( (This)->lpVtbl -> GetRelationship(This,pszRelationName,pRelationship) ) 
+
+#define IEntity_MetaData(This,riid,pMetaData)	\
+    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) 
+
+#define IEntity_NamedEntities(This,riid,pNamedEntities)	\
+    ( (This)->lpVtbl -> NamedEntities(This,riid,pNamedEntities) ) 
+
+#define IEntity_GetNamedEntity(This,pszValue,ppNamedEntity)	\
+    ( (This)->lpVtbl -> GetNamedEntity(This,pszValue,ppNamedEntity) ) 
+
+#define IEntity_DefaultPhrase(This,ppszPhrase)	\
+    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IEntity_INTERFACE_DEFINED__ */
+
+
+#ifndef __IRelationship_INTERFACE_DEFINED__
+#define __IRelationship_INTERFACE_DEFINED__
+
+/* interface IRelationship */
+/* [unique][object][uuid][helpstring] */ 
+
+
+EXTERN_C const IID IID_IRelationship;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("2769280B-5108-498c-9C7F-A51239B63147")
+    IRelationship : public IUnknown
+    {
+    public:
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( 
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszName) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE IsReal( 
+            /* [retval][out] */ __RPC__out BOOL *pIsReal) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Destination( 
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE MetaData( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IRelationshipVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IRelationship * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IRelationship * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IRelationship * This);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( 
+            IRelationship * This,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszName);
+        
+        HRESULT ( STDMETHODCALLTYPE *IsReal )( 
+            IRelationship * This,
+            /* [retval][out] */ __RPC__out BOOL *pIsReal);
+        
+        HRESULT ( STDMETHODCALLTYPE *Destination )( 
+            IRelationship * This,
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity);
+        
+        HRESULT ( STDMETHODCALLTYPE *MetaData )( 
+            IRelationship * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
+            IRelationship * This,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase);
+        
+        END_INTERFACE
+    } IRelationshipVtbl;
+
+    interface IRelationship
+    {
+        CONST_VTBL struct IRelationshipVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IRelationship_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IRelationship_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IRelationship_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IRelationship_Name(This,ppszName)	\
+    ( (This)->lpVtbl -> Name(This,ppszName) ) 
+
+#define IRelationship_IsReal(This,pIsReal)	\
+    ( (This)->lpVtbl -> IsReal(This,pIsReal) ) 
+
+#define IRelationship_Destination(This,pDestinationEntity)	\
+    ( (This)->lpVtbl -> Destination(This,pDestinationEntity) ) 
+
+#define IRelationship_MetaData(This,riid,pMetaData)	\
+    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) 
+
+#define IRelationship_DefaultPhrase(This,ppszPhrase)	\
+    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IRelationship_INTERFACE_DEFINED__ */
+
+
+#ifndef __INamedEntity_INTERFACE_DEFINED__
+#define __INamedEntity_INTERFACE_DEFINED__
+
+/* interface INamedEntity */
+/* [unique][uuid][object][helpstring] */ 
+
+
+EXTERN_C const IID IID_INamedEntity;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("ABDBD0B1-7D54-49fb-AB5C-BFF4130004CD")
+    INamedEntity : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetValue( 
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( 
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct INamedEntityVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            INamedEntity * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            INamedEntity * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            INamedEntity * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetValue )( 
+            INamedEntity * This,
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( 
+            INamedEntity * This,
+            /* [retval][out] */ 
+            __deref_opt_out  LPWSTR *ppszPhrase);
+        
+        END_INTERFACE
+    } INamedEntityVtbl;
+
+    interface INamedEntity
+    {
+        CONST_VTBL struct INamedEntityVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define INamedEntity_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define INamedEntity_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define INamedEntity_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define INamedEntity_GetValue(This,ppszValue)	\
+    ( (This)->lpVtbl -> GetValue(This,ppszValue) ) 
+
+#define INamedEntity_DefaultPhrase(This,ppszPhrase)	\
+    ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __INamedEntity_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISchemaProvider_INTERFACE_DEFINED__
+#define __ISchemaProvider_INTERFACE_DEFINED__
+
+/* interface ISchemaProvider */
+/* [unique][object][uuid][helpstring] */ 
+
+
+EXTERN_C const IID IID_ISchemaProvider;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("8CF89BCB-394C-49b2-AE28-A59DD4ED7F68")
+    ISchemaProvider : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Entities( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE RootEntity( 
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetEntity( 
+            /* [in] */ __RPC__in LPCWSTR pszEntityName,
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE MetaData( 
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Localize( 
+            /* [in] */ LCID lcid,
+            /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SaveBinary( 
+            /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE LookupAuthoredNamedEntity( 
+            /* [in] */ __RPC__in_opt IEntity *pEntity,
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+            /* [in] */ ULONG cTokensBegin,
+            /* [out] */ __RPC__out ULONG *pcTokensLength,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct ISchemaProviderVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ISchemaProvider * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ISchemaProvider * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ISchemaProvider * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Entities )( 
+            ISchemaProvider * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities);
+        
+        HRESULT ( STDMETHODCALLTYPE *RootEntity )( 
+            ISchemaProvider * This,
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetEntity )( 
+            ISchemaProvider * This,
+            /* [in] */ __RPC__in LPCWSTR pszEntityName,
+            /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity);
+        
+        HRESULT ( STDMETHODCALLTYPE *MetaData )( 
+            ISchemaProvider * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
+        
+        HRESULT ( STDMETHODCALLTYPE *Localize )( 
+            ISchemaProvider * This,
+            /* [in] */ LCID lcid,
+            /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport);
+        
+        HRESULT ( STDMETHODCALLTYPE *SaveBinary )( 
+            ISchemaProvider * This,
+            /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath);
+        
+        HRESULT ( STDMETHODCALLTYPE *LookupAuthoredNamedEntity )( 
+            ISchemaProvider * This,
+            /* [in] */ __RPC__in_opt IEntity *pEntity,
+            /* [in] */ __RPC__in LPCWSTR pszInputString,
+            /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+            /* [in] */ ULONG cTokensBegin,
+            /* [out] */ __RPC__out ULONG *pcTokensLength,
+            /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue);
+        
+        END_INTERFACE
+    } ISchemaProviderVtbl;
+
+    interface ISchemaProvider
+    {
+        CONST_VTBL struct ISchemaProviderVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ISchemaProvider_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ISchemaProvider_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ISchemaProvider_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ISchemaProvider_Entities(This,riid,pEntities)	\
+    ( (This)->lpVtbl -> Entities(This,riid,pEntities) ) 
+
+#define ISchemaProvider_RootEntity(This,pRootEntity)	\
+    ( (This)->lpVtbl -> RootEntity(This,pRootEntity) ) 
+
+#define ISchemaProvider_GetEntity(This,pszEntityName,pEntity)	\
+    ( (This)->lpVtbl -> GetEntity(This,pszEntityName,pEntity) ) 
+
+#define ISchemaProvider_MetaData(This,riid,pMetaData)	\
+    ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) 
+
+#define ISchemaProvider_Localize(This,lcid,pSchemaLocalizerSupport)	\
+    ( (This)->lpVtbl -> Localize(This,lcid,pSchemaLocalizerSupport) ) 
+
+#define ISchemaProvider_SaveBinary(This,pszSchemaBinaryPath)	\
+    ( (This)->lpVtbl -> SaveBinary(This,pszSchemaBinaryPath) ) 
+
+#define ISchemaProvider_LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue)	\
+    ( (This)->lpVtbl -> LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ISchemaProvider_INTERFACE_DEFINED__ */
+
+
+#ifndef __ITokenCollection_INTERFACE_DEFINED__
+#define __ITokenCollection_INTERFACE_DEFINED__
+
+/* interface ITokenCollection */
+/* [unique][object][uuid][helpstring] */ 
+
+
+EXTERN_C const IID IID_ITokenCollection;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("22D8B4F2-F577-4adb-A335-C2AE88416FAB")
+    ITokenCollection : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE NumberOfTokens( 
+            __RPC__in ULONG *pCount) = 0;
+        
+        virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetToken( 
+            /* [in] */ ULONG i,
+            /* [out] */ 
+            __out_opt  ULONG *pBegin,
+            /* [out] */ 
+            __out_opt  ULONG *pLength,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppsz) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct ITokenCollectionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ITokenCollection * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ITokenCollection * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ITokenCollection * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *NumberOfTokens )( 
+            ITokenCollection * This,
+            __RPC__in ULONG *pCount);
+        
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetToken )( 
+            ITokenCollection * This,
+            /* [in] */ ULONG i,
+            /* [out] */ 
+            __out_opt  ULONG *pBegin,
+            /* [out] */ 
+            __out_opt  ULONG *pLength,
+            /* [out] */ 
+            __deref_opt_out  LPWSTR *ppsz);
+        
+        END_INTERFACE
+    } ITokenCollectionVtbl;
+
+    interface ITokenCollection
+    {
+        CONST_VTBL struct ITokenCollectionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ITokenCollection_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ITokenCollection_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ITokenCollection_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ITokenCollection_NumberOfTokens(This,pCount)	\
+    ( (This)->lpVtbl -> NumberOfTokens(This,pCount) ) 
+
+#define ITokenCollection_GetToken(This,i,pBegin,pLength,ppsz)	\
+    ( (This)->lpVtbl -> GetToken(This,i,pBegin,pLength,ppsz) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ITokenCollection_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_structuredquery_0000_0013 */
+/* [local] */ 
+
+typedef /* [public][public][v1_enum] */ 
+enum __MIDL___MIDL_itf_structuredquery_0000_0013_0001
+    {	NEC_LOW	= 0,
+	NEC_MEDIUM	= ( NEC_LOW + 1 ) ,
+	NEC_HIGH	= ( NEC_MEDIUM + 1 ) 
+    } 	NAMED_ENTITY_CERTAINTY;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_s_ifspec;
+
+#ifndef __INamedEntityCollector_INTERFACE_DEFINED__
+#define __INamedEntityCollector_INTERFACE_DEFINED__
+
+/* interface INamedEntityCollector */
+/* [unique][object][uuid][helpstring] */ 
+
+
+EXTERN_C const IID IID_INamedEntityCollector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("AF2440F6-8AFC-47d0-9A7F-396A0ACFB43D")
+    INamedEntityCollector : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Add( 
+            /* [in] */ ULONG beginSpan,
+            /* [in] */ ULONG endSpan,
+            /* [in] */ ULONG beginActual,
+            /* [in] */ ULONG endActual,
+            /* [in] */ __RPC__in_opt IEntity *pType,
+            /* [in] */ __RPC__in LPCWSTR pszValue,
+            /* [in] */ NAMED_ENTITY_CERTAINTY certainty) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct INamedEntityCollectorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            INamedEntityCollector * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            INamedEntityCollector * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            INamedEntityCollector * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Add )( 
+            INamedEntityCollector * This,
+            /* [in] */ ULONG beginSpan,
+            /* [in] */ ULONG endSpan,
+            /* [in] */ ULONG beginActual,
+            /* [in] */ ULONG endActual,
+            /* [in] */ __RPC__in_opt IEntity *pType,
+            /* [in] */ __RPC__in LPCWSTR pszValue,
+            /* [in] */ NAMED_ENTITY_CERTAINTY certainty);
+        
+        END_INTERFACE
+    } INamedEntityCollectorVtbl;
+
+    interface INamedEntityCollector
+    {
+        CONST_VTBL struct INamedEntityCollectorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define INamedEntityCollector_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define INamedEntityCollector_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define INamedEntityCollector_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define INamedEntityCollector_Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty)	\
+    ( (This)->lpVtbl -> Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __INamedEntityCollector_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISchemaLocalizerSupport_INTERFACE_DEFINED__
+#define __ISchemaLocalizerSupport_INTERFACE_DEFINED__
+
+/* interface ISchemaLocalizerSupport */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ISchemaLocalizerSupport;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("CA3FDCA2-BFBE-4eed-90D7-0CAEF0A1BDA1")
+    ISchemaLocalizerSupport : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Localize( 
+            /* [in] */ __RPC__in LPCWSTR pszGlobalString,
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct ISchemaLocalizerSupportVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ISchemaLocalizerSupport * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ISchemaLocalizerSupport * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ISchemaLocalizerSupport * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Localize )( 
+            ISchemaLocalizerSupport * This,
+            /* [in] */ __RPC__in LPCWSTR pszGlobalString,
+            /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString);
+        
+        END_INTERFACE
+    } ISchemaLocalizerSupportVtbl;
+
+    interface ISchemaLocalizerSupport
+    {
+        CONST_VTBL struct ISchemaLocalizerSupportVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ISchemaLocalizerSupport_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ISchemaLocalizerSupport_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ISchemaLocalizerSupport_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ISchemaLocalizerSupport_Localize(This,pszGlobalString,ppszLocalString)	\
+    ( (This)->lpVtbl -> Localize(This,pszGlobalString,ppszLocalString) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ISchemaLocalizerSupport_INTERFACE_DEFINED__ */
+
+
+#ifndef __IQueryParserManager_INTERFACE_DEFINED__
+#define __IQueryParserManager_INTERFACE_DEFINED__
+
+/* interface IQueryParserManager */
+/* [unique][object][uuid] */ 
+
+
+EXTERN_C const IID IID_IQueryParserManager;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("A879E3C4-AF77-44fb-8F37-EBD1487CF920")
+    IQueryParserManager : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE CreateLoadedParser( 
+            /* [in] */ __RPC__in LPCWSTR pszCatalog,
+            /* [in] */ LANGID langidForKeywords,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE InitializeOptions( 
+            /* [in] */ BOOL fUnderstandNQS,
+            /* [in] */ BOOL fAutoWildCard,
+            /* [in] */ __RPC__in_opt IQueryParser *pQueryParser) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetOption( 
+            /* [in] */ QUERY_PARSER_MANAGER_OPTION option,
+            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
+        
+    };
+    
+#else 	/* C style interface */
+
+    typedef struct IQueryParserManagerVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IQueryParserManager * This,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][out] */ 
+            __RPC__deref_out  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IQueryParserManager * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IQueryParserManager * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateLoadedParser )( 
+            IQueryParserManager * This,
+            /* [in] */ __RPC__in LPCWSTR pszCatalog,
+            /* [in] */ LANGID langidForKeywords,
+            /* [in] */ __RPC__in REFIID riid,
+            /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser);
+        
+        HRESULT ( STDMETHODCALLTYPE *InitializeOptions )( 
+            IQueryParserManager * This,
+            /* [in] */ BOOL fUnderstandNQS,
+            /* [in] */ BOOL fAutoWildCard,
+            /* [in] */ __RPC__in_opt IQueryParser *pQueryParser);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetOption )( 
+            IQueryParserManager * This,
+            /* [in] */ QUERY_PARSER_MANAGER_OPTION option,
+            /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
+        
+        END_INTERFACE
+    } IQueryParserManagerVtbl;
+
+    interface IQueryParserManager
+    {
+        CONST_VTBL struct IQueryParserManagerVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IQueryParserManager_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IQueryParserManager_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IQueryParserManager_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IQueryParserManager_CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser)	\
+    ( (This)->lpVtbl -> CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) ) 
+
+#define IQueryParserManager_InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser)	\
+    ( (This)->lpVtbl -> InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) ) 
+
+#define IQueryParserManager_SetOption(This,option,pOptionValue)	\
+    ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IQueryParserManager_INTERFACE_DEFINED__ */
+
+
+
+#ifndef __StructuredQuery1_LIBRARY_DEFINED__
+#define __StructuredQuery1_LIBRARY_DEFINED__
+
+/* library StructuredQuery1 */
+/* [version][uuid] */ 
+
+
+EXTERN_C const IID LIBID_StructuredQuery1;
+
+EXTERN_C const CLSID CLSID_QueryParser;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("B72F8FD8-0FAB-4dd9-BDBF-245A6CE1485B")
+QueryParser;
+#endif
+
+EXTERN_C const CLSID CLSID_NegationCondition;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("8DE9C74C-605A-4acd-BEE3-2B222AA2D23D")
+NegationCondition;
+#endif
+
+EXTERN_C const CLSID CLSID_CompoundCondition;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("116F8D13-101E-4fa5-84D4-FF8279381935")
+CompoundCondition;
+#endif
+
+EXTERN_C const CLSID CLSID_LeafCondition;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("52F15C89-5A17-48e1-BBCD-46A3F89C7CC2")
+LeafCondition;
+#endif
+
+EXTERN_C const CLSID CLSID_ConditionFactory;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("E03E85B0-7BE3-4000-BA98-6C13DE9FA486")
+ConditionFactory;
+#endif
+
+EXTERN_C const CLSID CLSID_Interval;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("D957171F-4BF9-4de2-BCD5-C70A7CA55836")
+Interval;
+#endif
+
+EXTERN_C const CLSID CLSID_QueryParserManager;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("5088B39A-29B4-4d9d-8245-4EE289222F66")
+QueryParserManager;
+#endif
+#endif /* __StructuredQuery1_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); 
+unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); 
+unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); 
+void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); 
+
+unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
+unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
+unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
+void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); 
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/portaudio/src/hostapi/wasapi/pa_win_wasapi.c b/portaudio/src/hostapi/wasapi/pa_win_wasapi.c
--- a/portaudio/src/hostapi/wasapi/pa_win_wasapi.c
+++ b/portaudio/src/hostapi/wasapi/pa_win_wasapi.c
@@ -1,5181 +1,5738 @@
-/*
- * Portable Audio I/O Library WASAPI implementation
- * Copyright (c) 2006-2010 David Viens, Dmitry Kostjuchenko
- *
- * Based on the Open Source API proposed by Ross Bencina
- * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however,
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also
- * requested that these non-binding requests be included along with the
- * license above.
- */
-
-/** @file
- @ingroup hostapi_src
- @brief WASAPI implementation of support for a host API.
- @note pa_wasapi currently requires minimum VC 2005, and the latest Vista SDK
-*/
-
-#define WIN32_LEAN_AND_MEAN // exclude rare headers
-#include <windows.h>
-#include <stdio.h>
-#include <process.h>
-#include <assert.h>
-#include <mmsystem.h>
-#include <mmreg.h>  // must be before other Wasapi headers
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-	#include <Avrt.h>
-	#define COBJMACROS
-	#include <Audioclient.h>
-	#include <endpointvolume.h>
-	#define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
-	#include <mmdeviceapi.h>
-	#include <functiondiscoverykeys.h>
-    #include <devicetopology.h>	// Used to get IKsJackDescription interface
-	#undef INITGUID
-#endif
-#ifndef __MWERKS__
-#include <malloc.h>
-#include <memory.h>
-#endif /* __MWERKS__ */
-
-#include "pa_util.h"
-#include "pa_allocation.h"
-#include "pa_hostapi.h"
-#include "pa_stream.h"
-#include "pa_cpuload.h"
-#include "pa_process.h"
-#include "pa_win_wasapi.h"
-#include "pa_debugprint.h"
-#include "pa_ringbuffer.h"
-
-#include "pa_win_coinitialize.h"
-
-#ifndef NTDDI_VERSION
- 
-    #undef WINVER
-    #undef _WIN32_WINNT
-    #define WINVER       0x0600 // VISTA
-	#define _WIN32_WINNT WINVER
-
-	#ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY
-        typedef enum _AVRT_PRIORITY
-        {
-            AVRT_PRIORITY_LOW = -1,
-            AVRT_PRIORITY_NORMAL,
-            AVRT_PRIORITY_HIGH,
-            AVRT_PRIORITY_CRITICAL
-        } AVRT_PRIORITY, *PAVRT_PRIORITY;
-	#endif
-
-	#include <basetyps.h> // << for IID/CLSID
-    #include <rpcsal.h>
-    #include <sal.h>
-
-	#ifndef __LPCGUID_DEFINED__
-		#define __LPCGUID_DEFINED__
-		typedef const GUID *LPCGUID;
-	#endif
-
-    #ifndef PROPERTYKEY_DEFINED
-        #define PROPERTYKEY_DEFINED
-        typedef struct _tagpropertykey
-        {
-            GUID fmtid;
-            DWORD pid;
-        } 	PROPERTYKEY;
-    #endif
-
-    #ifdef __midl_proxy
-        #define __MIDL_CONST
-    #else
-        #define __MIDL_CONST const
-    #endif
-
-    #ifdef WIN64
-        #include <wtypes.h>
-        typedef LONG NTSTATUS;
-        #define FASTCALL
-        #include <oleidl.h>
-        #include <objidl.h>
-     #else
-        typedef struct _BYTE_BLOB
-        {
-            unsigned long clSize;
-            unsigned char abData[ 1 ];
-        } 	BYTE_BLOB;
-        typedef /* [unique] */  __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;
-        typedef LONGLONG REFERENCE_TIME;
-        #define NONAMELESSUNION
-    #endif
-    
-    #ifndef WAVE_FORMAT_IEEE_FLOAT
-        #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point
-    #endif    
-    
-    #ifndef __MINGW_EXTENSION
-        #if defined(__GNUC__) || defined(__GNUG__)
-            #define __MINGW_EXTENSION __extension__
-        #else
-            #define __MINGW_EXTENSION
-        #endif
-    #endif 
-
-    #include <sdkddkver.h>
-    #include <propkeydef.h>
-    #define COBJMACROS
-    #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
-    #include <audioclient.h>
-    #include <mmdeviceapi.h>
-    #include <endpointvolume.h>
-    #include <functiondiscoverykeys.h>
-	#include <devicetopology.h>	// Used to get IKsJackDescription interface
-    #undef INITGUID
-
-#endif // NTDDI_VERSION
-
-#ifndef GUID_SECT
-    #define GUID_SECT
-#endif
-
-#define __DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#define __DEFINE_IID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const IID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#define __DEFINE_CLSID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const CLSID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#define PA_DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
-    __DEFINE_CLSID(pa_CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
-#define PA_DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
-    __DEFINE_IID(pa_IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
-
-// "1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"
-PA_DEFINE_IID(IAudioClient,         1cb9ad4c, dbfa, 4c32, b1, 78, c2, f5, 68, a7, 03, b2);
-// "1BE09788-6894-4089-8586-9A2A6C265AC5"
-PA_DEFINE_IID(IMMEndpoint,          1be09788, 6894, 4089, 85, 86, 9a, 2a, 6c, 26, 5a, c5);
-// "A95664D2-9614-4F35-A746-DE8DB63617E6"
-PA_DEFINE_IID(IMMDeviceEnumerator,  a95664d2, 9614, 4f35, a7, 46, de, 8d, b6, 36, 17, e6);
-// "BCDE0395-E52F-467C-8E3D-C4579291692E"
-PA_DEFINE_CLSID(IMMDeviceEnumerator,bcde0395, e52f, 467c, 8e, 3d, c4, 57, 92, 91, 69, 2e);
-// "F294ACFC-3146-4483-A7BF-ADDCA7C260E2"
-PA_DEFINE_IID(IAudioRenderClient,   f294acfc, 3146, 4483, a7, bf, ad, dc, a7, c2, 60, e2);
-// "C8ADBD64-E71E-48a0-A4DE-185C395CD317"
-PA_DEFINE_IID(IAudioCaptureClient,  c8adbd64, e71e, 48a0, a4, de, 18, 5c, 39, 5c, d3, 17);
-// *2A07407E-6497-4A18-9787-32F79BD0D98F*  Or this??
-PA_DEFINE_IID(IDeviceTopology,      2A07407E, 6497, 4A18, 97, 87, 32, f7, 9b, d0, d9, 8f);
-// *AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9*
-PA_DEFINE_IID(IPart,                AE2DE0E4, 5BCA, 4F2D, aa, 46, 5d, 13, f8, fd, b3, a9);
-// *4509F757-2D46-4637-8E62-CE7DB944F57B*
-PA_DEFINE_IID(IKsJackDescription,   4509F757, 2D46, 4637, 8e, 62, ce, 7d, b9, 44, f5, 7b);
-// Media formats:
-__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_PCM,        0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
-__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_ADPCM,      0x00000002, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
-__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
-
-/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */
-#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)
-	#define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
-	#define PA_THREAD_FUNC static unsigned WINAPI
-	#define PA_THREAD_ID unsigned
-#else
-	#define CREATE_THREAD(PROC) CreateThread( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
-	#define PA_THREAD_FUNC static DWORD WINAPI
-	#define PA_THREAD_ID DWORD
-#endif
-
-// Thread function forward decl.
-PA_THREAD_FUNC ProcThreadEvent(void *param);
-PA_THREAD_FUNC ProcThreadPoll(void *param);
-
-// Availabe from Windows 7
-#ifndef AUDCLNT_E_BUFFER_ERROR
-	#define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x018)
-#endif
-#ifndef AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED
-	#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x019)
-#endif
-#ifndef AUDCLNT_E_INVALID_DEVICE_PERIOD
-	#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x020)
-#endif
-
-#define MAX_STR_LEN 512
-
-enum { S_INPUT = 0, S_OUTPUT = 1, S_COUNT = 2, S_FULLDUPLEX = 0 };
-
-// Number of packets which compose single contignous buffer. With trial and error it was calculated
-// that WASAPI Input sub-system uses 6 packets per whole buffer. Please provide more information
-// or corrections if available.
-enum { WASAPI_PACKETS_PER_INPUT_BUFFER = 6 };
-
-#define STATIC_ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))
-
-#define PRINT(x) PA_DEBUG(x);
-
-#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \
-    PaUtil_SetLastHostErrorInfo( paWASAPI, errorCode, errorText )
-
-#define PA_WASAPI__IS_FULLDUPLEX(STREAM) ((STREAM)->in.clientProc && (STREAM)->out.clientProc)
-
-#ifndef IF_FAILED_JUMP
-#define IF_FAILED_JUMP(hr, label) if(FAILED(hr)) goto label;
-#endif
-
-#ifndef IF_FAILED_INTERNAL_ERROR_JUMP
-#define IF_FAILED_INTERNAL_ERROR_JUMP(hr, error, label) if(FAILED(hr)) { error = paInternalError; goto label; }
-#endif
-
-#define SAFE_CLOSE(h) if ((h) != NULL) { CloseHandle((h)); (h) = NULL; }
-#define SAFE_RELEASE(punk) if ((punk) != NULL) { (punk)->lpVtbl->Release((punk)); (punk) = NULL; }
-
-// Mixer function
-typedef void (*MixMonoToStereoF) (void *__to, void *__from, UINT32 count);
-
-// AVRT is the new "multimedia schedulling stuff"
-typedef BOOL   (WINAPI *FAvRtCreateThreadOrderingGroup)  (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);
-typedef BOOL   (WINAPI *FAvRtDeleteThreadOrderingGroup)  (HANDLE);
-typedef BOOL   (WINAPI *FAvRtWaitOnThreadOrderingGroup)  (HANDLE);
-typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics)   (LPCSTR,LPDWORD);
-typedef BOOL   (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE);
-typedef BOOL   (WINAPI *FAvSetMmThreadPriority)          (HANDLE,AVRT_PRIORITY);
-
-static HMODULE hDInputDLL = 0;
-FAvRtCreateThreadOrderingGroup   pAvRtCreateThreadOrderingGroup = NULL;
-FAvRtDeleteThreadOrderingGroup   pAvRtDeleteThreadOrderingGroup = NULL;
-FAvRtWaitOnThreadOrderingGroup   pAvRtWaitOnThreadOrderingGroup = NULL;
-FAvSetMmThreadCharacteristics    pAvSetMmThreadCharacteristics = NULL;
-FAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics = NULL;
-FAvSetMmThreadPriority           pAvSetMmThreadPriority = NULL;
-
-#define _GetProc(fun, type, name)  {                                                        \
-                                        fun = (type) GetProcAddress(hDInputDLL,name);       \
-                                        if (fun == NULL) {                                  \
-                                            PRINT(("GetProcAddr failed for %s" ,name));     \
-                                            return FALSE;                                   \
-                                        }                                                   \
-                                    }                                                       \
-
-// ------------------------------------------------------------------------------------------
-/* prototypes for functions declared in this file */
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-// dummy entry point for other compilers and sdks
-// currently built using RC1 SDK (5600)
-//#if _MSC_VER < 1400
-//PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
-//{
-    //return paNoError;
-//}
-//#else
-
-// ------------------------------------------------------------------------------------------
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
-                                  const PaStreamParameters *inputParameters,
-                                  const PaStreamParameters *outputParameters,
-                                  double sampleRate );
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
-                           PaStream** s,
-                           const PaStreamParameters *inputParameters,
-                           const PaStreamParameters *outputParameters,
-                           double sampleRate,
-                           unsigned long framesPerBuffer,
-                           PaStreamFlags streamFlags,
-                           PaStreamCallback *streamCallback,
-                           void *userData );
-static PaError CloseStream( PaStream* stream );
-static PaError StartStream( PaStream *stream );
-static PaError StopStream( PaStream *stream );
-static PaError AbortStream( PaStream *stream );
-static PaError IsStreamStopped( PaStream *s );
-static PaError IsStreamActive( PaStream *stream );
-static PaTime GetStreamTime( PaStream *stream );
-static double GetStreamCpuLoad( PaStream* stream );
-static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
-static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
-static signed long GetStreamReadAvailable( PaStream* stream );
-static signed long GetStreamWriteAvailable( PaStream* stream );
-
-// ------------------------------------------------------------------------------------------
-/*
- These are fields that can be gathered from IDevice and IAudioDevice PRIOR to Initialize, and
- done in first pass i assume that neither of these will cause the Driver to "load", but again,
- who knows how they implement their stuff
- */
-typedef struct PaWasapiDeviceInfo
-{
-    // Device
-    IMMDevice *device;
-
-	// from GetId
-    WCHAR szDeviceID[MAX_STR_LEN];
-
-	// from GetState
-    DWORD state;
-
-    // Fields filled from IMMEndpoint'sGetDataFlow
-    EDataFlow flow;
-
-    // Fields filled from IAudioDevice (_prior_ to Initialize)
-    // from GetDevicePeriod(
-    REFERENCE_TIME DefaultDevicePeriod;
-    REFERENCE_TIME MinimumDevicePeriod;
-
-    // from GetMixFormat
-    // WAVEFORMATEX *MixFormat;//needs to be CoTaskMemFree'd after use!
-
-	// Default format (setup through Control Panel by user)
-	WAVEFORMATEXTENSIBLE DefaultFormat;
-
-	// Formfactor
-	EndpointFormFactor formFactor;
-}
-PaWasapiDeviceInfo;
-
-// ------------------------------------------------------------------------------------------
-/* PaWasapiHostApiRepresentation - host api datastructure specific to this implementation */
-typedef struct
-{
-    PaUtilHostApiRepresentation inheritedHostApiRep;
-    PaUtilStreamInterface       callbackStreamInterface;
-    PaUtilStreamInterface       blockingStreamInterface;
-
-    PaUtilAllocationGroup      *allocations;
-
-    /* implementation specific data goes here */
-
-    PaWinUtilComInitializationResult comInitializationResult;
-
-    //in case we later need the synch
-    IMMDeviceEnumerator *enumerator;
-
-    //this is the REAL number of devices, whether they are usefull to PA or not!
-    UINT32 deviceCount;
-
-    WCHAR defaultRenderer [MAX_STR_LEN];
-    WCHAR defaultCapturer [MAX_STR_LEN];
-
-    PaWasapiDeviceInfo *devInfo;
-
-	// Is true when WOW64 Vista/7 Workaround is needed
-	BOOL useWOW64Workaround;
-}
-PaWasapiHostApiRepresentation;
-
-// ------------------------------------------------------------------------------------------
-/* PaWasapiAudioClientParams - audio client parameters */
-typedef struct PaWasapiAudioClientParams
-{
-	PaWasapiDeviceInfo *device_info;
-	PaStreamParameters  stream_params;
-	PaWasapiStreamInfo  wasapi_params;
-	UINT32              frames_per_buffer;
-	double              sample_rate;
-	BOOL                blocking;
-	BOOL                full_duplex;
-	BOOL                wow64_workaround;
-}
-PaWasapiAudioClientParams;
-
-// ------------------------------------------------------------------------------------------
-/* PaWasapiStream - a stream data structure specifically for this implementation */
-typedef struct PaWasapiSubStream
-{
-    IAudioClient        *clientParent;
-	IStream				*clientStream;
-	IAudioClient		*clientProc;
-
-    WAVEFORMATEXTENSIBLE wavex;
-    UINT32               bufferSize;
-    REFERENCE_TIME       deviceLatency;
-    REFERENCE_TIME       period;
-	double				 latencySeconds;
-    UINT32				 framesPerHostCallback;
-	AUDCLNT_SHAREMODE    shareMode;
-	UINT32               streamFlags; // AUDCLNT_STREAMFLAGS_EVENTCALLBACK, ...
-	UINT32               flags;
-	PaWasapiAudioClientParams params; //!< parameters
-
-	// Buffers
-	UINT32               buffers;			//!< number of buffers used (from host side)
-	UINT32               framesPerBuffer;	//!< number of frames per 1 buffer
-	BOOL                 userBufferAndHostMatch;
-
-	// Used for Mono >> Stereo workaround, if driver does not support it
-	// (in Exclusive mode WASAPI usually refuses to operate with Mono (1-ch)
-	void                *monoBuffer;	 //!< pointer to buffer
-	UINT32               monoBufferSize; //!< buffer size in bytes
-	MixMonoToStereoF     monoMixer;		 //!< pointer to mixer function
-
-	PaUtilRingBuffer    *tailBuffer;       //!< buffer with trailing sample for blocking mode operations (only for Input)
-	void                *tailBufferMemory; //!< tail buffer memory region
-}
-PaWasapiSubStream;
-
-// ------------------------------------------------------------------------------------------
-/* PaWasapiHostProcessor - redirects processing data */
-typedef struct PaWasapiHostProcessor
-{
-    PaWasapiHostProcessorCallback processor;
-    void *userData;
-}
-PaWasapiHostProcessor;
-
-// ------------------------------------------------------------------------------------------
-typedef struct PaWasapiStream
-{
-	/* IMPLEMENT ME: rename this */
-    PaUtilStreamRepresentation streamRepresentation;
-    PaUtilCpuLoadMeasurer      cpuLoadMeasurer;
-    PaUtilBufferProcessor      bufferProcessor;
-
-    // input
-	PaWasapiSubStream          in;
-    IAudioCaptureClient       *captureClientParent;
-	IStream                   *captureClientStream;
-	IAudioCaptureClient       *captureClient;
-    IAudioEndpointVolume      *inVol;
-
-	// output
-	PaWasapiSubStream          out;
-    IAudioRenderClient        *renderClientParent;
-	IStream                   *renderClientStream;
-	IAudioRenderClient        *renderClient;
-	IAudioEndpointVolume      *outVol;
-
-	// event handles for event-driven processing mode
-	HANDLE event[S_COUNT];
-
-	// buffer mode
-	PaUtilHostBufferSizeMode bufferMode;
-
-	// must be volatile to avoid race condition on user query while
-	// thread is being started
-    volatile BOOL running;
-
-    PA_THREAD_ID dwThreadId;
-    HANDLE hThread;
-	HANDLE hCloseRequest;
-	HANDLE hThreadStart;        //!< signalled by thread on start
-	HANDLE hThreadExit;         //!< signalled by thread on exit
-	HANDLE hBlockingOpStreamRD;
-	HANDLE hBlockingOpStreamWR;
-
-    // Host callback Output overrider
-	PaWasapiHostProcessor hostProcessOverrideOutput;
-
-    // Host callback Input overrider
-	PaWasapiHostProcessor hostProcessOverrideInput;
-
-	// Defines blocking/callback interface used
-	BOOL bBlocking;
-
-	// Av Task (MM thread management)
-	HANDLE hAvTask;
-
-	// Thread priority level
-	PaWasapiThreadPriority nThreadPriority;
-}
-PaWasapiStream;
-
-// Local stream methods
-void _StreamOnStop(PaWasapiStream *stream);
-void _StreamFinish(PaWasapiStream *stream);
-void _StreamCleanup(PaWasapiStream *stream);
-HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available);
-HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available);
-void *PaWasapi_ReallocateMemory(void *ptr, size_t size);
-void PaWasapi_FreeMemory(void *ptr);
-
-// Local statics
-
-// ------------------------------------------------------------------------------------------
-#define LogHostError(HRES) __LogHostError(HRES, __FUNCTION__, __FILE__, __LINE__)
-static HRESULT __LogHostError(HRESULT res, const char *func, const char *file, int line)
-{
-    const char *text = NULL;
-    switch (res)
-	{
-	case S_OK: return res;
-	case E_POINTER                              :text ="E_POINTER"; break;
-	case E_INVALIDARG                           :text ="E_INVALIDARG"; break;
-
-	case AUDCLNT_E_NOT_INITIALIZED              :text ="AUDCLNT_E_NOT_INITIALIZED"; break;
-	case AUDCLNT_E_ALREADY_INITIALIZED          :text ="AUDCLNT_E_ALREADY_INITIALIZED"; break;
-	case AUDCLNT_E_WRONG_ENDPOINT_TYPE          :text ="AUDCLNT_E_WRONG_ENDPOINT_TYPE"; break;
-	case AUDCLNT_E_DEVICE_INVALIDATED           :text ="AUDCLNT_E_DEVICE_INVALIDATED"; break;
-	case AUDCLNT_E_NOT_STOPPED                  :text ="AUDCLNT_E_NOT_STOPPED"; break;
-	case AUDCLNT_E_BUFFER_TOO_LARGE             :text ="AUDCLNT_E_BUFFER_TOO_LARGE"; break;
-	case AUDCLNT_E_OUT_OF_ORDER                 :text ="AUDCLNT_E_OUT_OF_ORDER"; break;
-	case AUDCLNT_E_UNSUPPORTED_FORMAT           :text ="AUDCLNT_E_UNSUPPORTED_FORMAT"; break;
-	case AUDCLNT_E_INVALID_SIZE                 :text ="AUDCLNT_E_INVALID_SIZE"; break;
-	case AUDCLNT_E_DEVICE_IN_USE                :text ="AUDCLNT_E_DEVICE_IN_USE"; break;
-	case AUDCLNT_E_BUFFER_OPERATION_PENDING     :text ="AUDCLNT_E_BUFFER_OPERATION_PENDING"; break;
-	case AUDCLNT_E_THREAD_NOT_REGISTERED        :text ="AUDCLNT_E_THREAD_NOT_REGISTERED"; break;
-	case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED   :text ="AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED"; break;
-	case AUDCLNT_E_ENDPOINT_CREATE_FAILED       :text ="AUDCLNT_E_ENDPOINT_CREATE_FAILED"; break;
-	case AUDCLNT_E_SERVICE_NOT_RUNNING          :text ="AUDCLNT_E_SERVICE_NOT_RUNNING"; break;
-	case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     :text ="AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED"; break;
-	case AUDCLNT_E_EXCLUSIVE_MODE_ONLY          :text ="AUDCLNT_E_EXCLUSIVE_MODE_ONLY"; break;
-	case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :text ="AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL"; break;
-	case AUDCLNT_E_EVENTHANDLE_NOT_SET          :text ="AUDCLNT_E_EVENTHANDLE_NOT_SET"; break;
-	case AUDCLNT_E_INCORRECT_BUFFER_SIZE        :text ="AUDCLNT_E_INCORRECT_BUFFER_SIZE"; break;
-	case AUDCLNT_E_BUFFER_SIZE_ERROR            :text ="AUDCLNT_E_BUFFER_SIZE_ERROR"; break;
-	case AUDCLNT_E_CPUUSAGE_EXCEEDED            :text ="AUDCLNT_E_CPUUSAGE_EXCEEDED"; break;
-	case AUDCLNT_E_BUFFER_ERROR					:text ="AUDCLNT_E_BUFFER_ERROR"; break;
-	case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED		:text ="AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED"; break;
-	case AUDCLNT_E_INVALID_DEVICE_PERIOD		:text ="AUDCLNT_E_INVALID_DEVICE_PERIOD"; break;
-
-	case AUDCLNT_S_BUFFER_EMPTY                 :text ="AUDCLNT_S_BUFFER_EMPTY"; break;
-	case AUDCLNT_S_THREAD_ALREADY_REGISTERED    :text ="AUDCLNT_S_THREAD_ALREADY_REGISTERED"; break;
-	case AUDCLNT_S_POSITION_STALLED				:text ="AUDCLNT_S_POSITION_STALLED"; break;
-
-	// other windows common errors:
-	case CO_E_NOTINITIALIZED                    :text ="CO_E_NOTINITIALIZED: you must call CoInitialize() before Pa_OpenStream()"; break;
-
-	default:
-		text = "UNKNOWN ERROR";
-    }
-	PRINT(("WASAPI ERROR HRESULT: 0x%X : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", res, text, func, file, line));
-	PA_SKELETON_SET_LAST_HOST_ERROR(res, text);
-	return res;
-}
-
-// ------------------------------------------------------------------------------------------
-#define LogPaError(PAERR) __LogPaError(PAERR, __FUNCTION__, __FILE__, __LINE__)
-static PaError __LogPaError(PaError err, const char *func, const char *file, int line)
-{
-	if (err == paNoError)
-		return err;
-	PRINT(("WASAPI ERROR PAERROR: %i : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", err, Pa_GetErrorText(err), func, file, line));
-	return err;
-}
-
-// ------------------------------------------------------------------------------------------
-/*! \class ThreadSleepScheduler
-           Allows to emulate thread sleep of less than 1 millisecond under Windows. Scheduler
-		   calculates number of times the thread must run untill next sleep of 1 millisecond.
-		   It does not make thread sleeping for real number of microseconds but rather controls
-		   how many of imaginary microseconds the thread task can allow thread to sleep.
-*/
-typedef struct ThreadIdleScheduler
-{
-	UINT32 m_idle_microseconds; //!< number of microseconds to sleep
-	UINT32 m_next_sleep;        //!< next sleep round
-	UINT32 m_i;					//!< current round iterator position
-	UINT32 m_resolution;		//!< resolution in number of milliseconds
-}
-ThreadIdleScheduler;
-//! Setup scheduler.
-static void ThreadIdleScheduler_Setup(ThreadIdleScheduler *sched, UINT32 resolution, UINT32 microseconds)
-{
-	assert(microseconds != 0);
-	assert(resolution != 0);
-	assert((resolution * 1000) >= microseconds);
-
-	memset(sched, 0, sizeof(*sched));
-
-	sched->m_idle_microseconds = microseconds;
-	sched->m_resolution        = resolution;
-	sched->m_next_sleep        = (resolution * 1000) / microseconds;
-}
-//! Iterate and check if can sleep.
-static UINT32 ThreadIdleScheduler_NextSleep(ThreadIdleScheduler *sched)
-{
-	// advance and check if thread can sleep
-	if (++ sched->m_i == sched->m_next_sleep)
-	{
-		sched->m_i = 0;
-		return sched->m_resolution;
-	}
-	return 0;
-}
-
-// ------------------------------------------------------------------------------------------
-/*static double nano100ToMillis(REFERENCE_TIME ref)
-{
-    //  1 nano = 0.000000001 seconds
-    //100 nano = 0.0000001   seconds
-    //100 nano = 0.0001   milliseconds
-    return ((double)ref)*0.0001;
-}*/
-
-// ------------------------------------------------------------------------------------------
-static double nano100ToSeconds(REFERENCE_TIME ref)
-{
-    //  1 nano = 0.000000001 seconds
-    //100 nano = 0.0000001   seconds
-    //100 nano = 0.0001   milliseconds
-    return ((double)ref)*0.0000001;
-}
-
-// ------------------------------------------------------------------------------------------
-/*static REFERENCE_TIME MillisTonano100(double ref)
-{
-    //  1 nano = 0.000000001 seconds
-    //100 nano = 0.0000001   seconds
-    //100 nano = 0.0001   milliseconds
-    return (REFERENCE_TIME)(ref/0.0001);
-}*/
-
-// ------------------------------------------------------------------------------------------
-static REFERENCE_TIME SecondsTonano100(double ref)
-{
-    //  1 nano = 0.000000001 seconds
-    //100 nano = 0.0000001   seconds
-    //100 nano = 0.0001   milliseconds
-    return (REFERENCE_TIME)(ref/0.0000001);
-}
-
-// ------------------------------------------------------------------------------------------
-// Makes Hns period from frames and sample rate
-static REFERENCE_TIME MakeHnsPeriod(UINT32 nFrames, DWORD nSamplesPerSec)
-{
-	return (REFERENCE_TIME)((10000.0 * 1000 / nSamplesPerSec * nFrames) + 0.5);
-}
-
-// ------------------------------------------------------------------------------------------
-// Converts PaSampleFormat to bits per sample value
-static WORD PaSampleFormatToBitsPerSample(PaSampleFormat format_id)
-{
-	switch (format_id & ~paNonInterleaved)
-	{
-		case paFloat32:
-		case paInt32: return 32;
-		case paInt24: return 24;
-		case paInt16: return 16;
-		case paInt8:
-		case paUInt8: return 8;
-	}
-	return 0;
-}
-
-// ------------------------------------------------------------------------------------------
-// Converts PaSampleFormat to bits per sample value
-/*static WORD PaSampleFormatToBytesPerSample(PaSampleFormat format_id)
-{
-	return PaSampleFormatToBitsPerSample(format_id) >> 3; // 'bits/8'
-}*/
-
-// ------------------------------------------------------------------------------------------
-// Converts Hns period into number of frames
-static UINT32 MakeFramesFromHns(REFERENCE_TIME hnsPeriod, UINT32 nSamplesPerSec)
-{
-    UINT32 nFrames = (UINT32)(	// frames =
-        1.0 * hnsPeriod *		// hns *
-        nSamplesPerSec /		// (frames / s) /
-        1000 /					// (ms / s) /
-        10000					// (hns / s) /
-        + 0.5					// rounding
-    );
-	return nFrames;
-}
-
-// Aligning function type
-typedef UINT32 (*ALIGN_FUNC) (UINT32 v, UINT32 align);
-
-// ------------------------------------------------------------------------------------------
-// Aligns 'v' backwards
-static UINT32 ALIGN_BWD(UINT32 v, UINT32 align)
-{
-	return ((v - (align ? v % align : 0)));
-}
-
-// ------------------------------------------------------------------------------------------
-// Aligns 'v' forward
-static UINT32 ALIGN_FWD(UINT32 v, UINT32 align)
-{
-	UINT32 remainder = (align ? (v % align) : 0);
-	if (remainder == 0)
-		return v;
-	return v + (align - remainder);
-}
-
-// ------------------------------------------------------------------------------------------
-// Get next value power of 2
-UINT32 ALIGN_NEXT_POW2(UINT32 v)
-{
-	UINT32 v2 = 1;
-	while (v > (v2 <<= 1)) { }
-	v = v2;
-	return v;
-}
-
-// ------------------------------------------------------------------------------------------
-// Aligns WASAPI buffer to 128 byte packet boundary. HD Audio will fail to play if buffer
-// is misaligned. This problem was solved in Windows 7 were AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED
-// is thrown although we must align for Vista anyway.
-static UINT32 AlignFramesPerBuffer(UINT32 nFrames, UINT32 nSamplesPerSec, UINT32 nBlockAlign,
-								   ALIGN_FUNC pAlignFunc)
-{
-#define HDA_PACKET_SIZE (128)
-
-	long frame_bytes = nFrames * nBlockAlign;
-	long packets;
-
-	// align to packet size
-	frame_bytes  = pAlignFunc(frame_bytes, HDA_PACKET_SIZE); // use ALIGN_FWD if bigger but safer period is more desired
-
-	// atlest 1 frame must be available
-	if (frame_bytes < HDA_PACKET_SIZE)
-		frame_bytes = HDA_PACKET_SIZE;
-
-	nFrames      = frame_bytes / nBlockAlign;
-	packets      = frame_bytes / HDA_PACKET_SIZE;
-
-	frame_bytes = packets * HDA_PACKET_SIZE;
-	nFrames     = frame_bytes / nBlockAlign;
-
-	return nFrames;
-
-#undef HDA_PACKET_SIZE
-}
-
-// ------------------------------------------------------------------------------------------
-static UINT32 GetFramesSleepTime(UINT32 nFrames, UINT32 nSamplesPerSec)
-{
-	REFERENCE_TIME nDuration;
-	if (nSamplesPerSec == 0)
-		return 0;
-#define REFTIMES_PER_SEC  10000000
-#define REFTIMES_PER_MILLISEC  10000
-	// Calculate the actual duration of the allocated buffer.
-	nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);
-	return (UINT32)(nDuration/REFTIMES_PER_MILLISEC/2);
-}
-
-// ------------------------------------------------------------------------------------------
-static UINT32 GetFramesSleepTimeMicroseconds(UINT32 nFrames, UINT32 nSamplesPerSec)
-{
-	REFERENCE_TIME nDuration;
-	if (nSamplesPerSec == 0)
-		return 0;
-#define REFTIMES_PER_SEC  10000000
-#define REFTIMES_PER_MILLISEC  10000
-	// Calculate the actual duration of the allocated buffer.
-	nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);
-	return (UINT32)(nDuration/10/2);
-}
-
-// ------------------------------------------------------------------------------------------
-static BOOL SetupAVRT()
-{
-    hDInputDLL = LoadLibraryA("avrt.dll");
-    if (hDInputDLL == NULL)
-        return FALSE;
-
-    _GetProc(pAvRtCreateThreadOrderingGroup,  FAvRtCreateThreadOrderingGroup,  "AvRtCreateThreadOrderingGroup");
-    _GetProc(pAvRtDeleteThreadOrderingGroup,  FAvRtDeleteThreadOrderingGroup,  "AvRtDeleteThreadOrderingGroup");
-    _GetProc(pAvRtWaitOnThreadOrderingGroup,  FAvRtWaitOnThreadOrderingGroup,  "AvRtWaitOnThreadOrderingGroup");
-    _GetProc(pAvSetMmThreadCharacteristics,   FAvSetMmThreadCharacteristics,   "AvSetMmThreadCharacteristicsA");
-	_GetProc(pAvRevertMmThreadCharacteristics,FAvRevertMmThreadCharacteristics,"AvRevertMmThreadCharacteristics");
-    _GetProc(pAvSetMmThreadPriority,          FAvSetMmThreadPriority,          "AvSetMmThreadPriority");
-
-	return pAvRtCreateThreadOrderingGroup &&
-		pAvRtDeleteThreadOrderingGroup &&
-		pAvRtWaitOnThreadOrderingGroup &&
-		pAvSetMmThreadCharacteristics &&
-		pAvRevertMmThreadCharacteristics &&
-		pAvSetMmThreadPriority;
-}
-
-// ------------------------------------------------------------------------------------------
-static void CloseAVRT()
-{
-	if (hDInputDLL != NULL)
-		FreeLibrary(hDInputDLL);
-	hDInputDLL = NULL;
-}
-
-// ------------------------------------------------------------------------------------------
-static BOOL IsWow64()
-{
-	// http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx
-
-	typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
-	LPFN_ISWOW64PROCESS fnIsWow64Process;
-
-    BOOL bIsWow64 = FALSE;
-
-    // IsWow64Process is not available on all supported versions of Windows.
-    // Use GetModuleHandle to get a handle to the DLL that contains the function
-    // and GetProcAddress to get a pointer to the function if available.
-
-    fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
-        GetModuleHandleA("kernel32"), "IsWow64Process");
-
-    if (fnIsWow64Process == NULL)
-		return FALSE;
-
-    if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
-		return FALSE;
-
-    return bIsWow64;
-}
-
-// ------------------------------------------------------------------------------------------
-typedef enum EWindowsVersion
-{
-	WINDOWS_UNKNOWN			 = 0,
-	WINDOWS_VISTA_SERVER2008 = (1 << 0),
-	WINDOWS_7_SERVER2008R2	 = (1 << 1),
-	WINDOWS_FUTURE           = (1 << 2)
-}
-EWindowsVersion;
-// Defines Windows 7/Windows Server 2008 R2 and up (future versions)
-#define WINDOWS_7_SERVER2008R2_AND_UP (WINDOWS_7_SERVER2008R2|WINDOWS_FUTURE)
-// The function is limited to Vista/7 mostly as we need just to find out Vista/WOW64 combination
-// in order to use WASAPI WOW64 workarounds.
-static UINT32 GetWindowsVersion()
-{
-	static UINT32 version = WINDOWS_UNKNOWN;
-
-	if (version == WINDOWS_UNKNOWN)
-	{
-		DWORD dwVersion = 0;
-		DWORD dwMajorVersion = 0;
-		DWORD dwMinorVersion = 0;
-		DWORD dwBuild = 0;
-
-		typedef DWORD (WINAPI *LPFN_GETVERSION)(VOID);
-		LPFN_GETVERSION fnGetVersion;
-
-		fnGetVersion = (LPFN_GETVERSION) GetProcAddress(GetModuleHandleA("kernel32"), "GetVersion");
-		if (fnGetVersion == NULL)
-			return WINDOWS_UNKNOWN;
-
-		dwVersion = fnGetVersion();
-
-		// Get the Windows version
-		dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
-		dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
-
-		// Get the build number
-		if (dwVersion < 0x80000000)
-			dwBuild = (DWORD)(HIWORD(dwVersion));
-
-		switch (dwMajorVersion)
-		{
-		case 0:
-		case 1:
-		case 2:
-		case 3:
-		case 4:
-		case 5:
-			break; // skip lower
-		case 6:
-			switch (dwMinorVersion)
-			{
-			case 0:
-				version |= WINDOWS_VISTA_SERVER2008;
-				break;
-			case 1:
-				version |= WINDOWS_7_SERVER2008R2;
-				break;
-			default:
-				version |= WINDOWS_FUTURE;
-			}
-			break;
-		default:
-			version |= WINDOWS_FUTURE;
-		}
-	}
-
-	return version;
-}
-
-// ------------------------------------------------------------------------------------------
-static BOOL UseWOW64Workaround()
-{
-	// note: WOW64 bug is common to Windows Vista x64, thus we fall back to safe Poll-driven
-	//       method. Windows 7 x64 seems has WOW64 bug fixed.
-
-	return (IsWow64() && (GetWindowsVersion() & WINDOWS_VISTA_SERVER2008));
-}
-
-// ------------------------------------------------------------------------------------------
-typedef enum EMixerDir { MIX_DIR__1TO2, MIX_DIR__2TO1, MIX_DIR__2TO1_L } EMixerDir;
-
-// ------------------------------------------------------------------------------------------
-#define _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(TYPE)\
-	TYPE * __restrict to   = __to;\
-	TYPE * __restrict from = __from;\
-	TYPE * __restrict end  = from + count;\
-	while (from != end)\
-	{\
-		*to ++ = *from;\
-		*to ++ = *from;\
-		++ from;\
-	}
-
-// ------------------------------------------------------------------------------------------
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(TYPE)\
-	TYPE * __restrict to   = (TYPE *)__to;\
-	TYPE * __restrict from = (TYPE *)__from;\
-	TYPE * __restrict end  = to + count;\
-	while (to != end)\
-	{\
-		*to ++ = (TYPE)((float)(from[0] + from[1]) * 0.5f);\
-		from += 2;\
-	}
-
-// ------------------------------------------------------------------------------------------
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(TYPE)\
-	TYPE * __restrict to   = (TYPE *)__to;\
-	TYPE * __restrict from = (TYPE *)__from;\
-	TYPE * __restrict end  = to + count;\
-	while (to != end)\
-	{\
-		*to ++ = (TYPE)(((INT32)from[0] + (INT32)from[1]) >> 1);\
-		from += 2;\
-	}
-
-// ------------------------------------------------------------------------------------------
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(TYPE)\
-	TYPE * __restrict to   = (TYPE *)__to;\
-	TYPE * __restrict from = (TYPE *)__from;\
-	TYPE * __restrict end  = to + count;\
-	while (to != end)\
-	{\
-		*to ++ = (TYPE)(((INT64)from[0] + (INT64)from[1]) >> 1);\
-		from += 2;\
-	}
-
-// ------------------------------------------------------------------------------------------
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(TYPE)\
-	TYPE * __restrict to   = (TYPE *)__to;\
-	TYPE * __restrict from = (TYPE *)__from;\
-	TYPE * __restrict end  = to + count;\
-	while (to != end)\
-	{\
-		*to ++ = from[0];\
-		from += 2;\
-	}
-
-// ------------------------------------------------------------------------------------------
-static void _MixMonoToStereo_1TO2_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(BYTE); }
-static void _MixMonoToStereo_1TO2_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(short); }
-static void _MixMonoToStereo_1TO2_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); /* !!! int24 data is contained in 32-bit containers*/ }
-static void _MixMonoToStereo_1TO2_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); }
-static void _MixMonoToStereo_1TO2_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(float); }
-
-// ------------------------------------------------------------------------------------------
-static void _MixMonoToStereo_2TO1_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(BYTE); }
-static void _MixMonoToStereo_2TO1_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(short); }
-static void _MixMonoToStereo_2TO1_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(int); /* !!! int24 data is contained in 32-bit containers*/ }
-static void _MixMonoToStereo_2TO1_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(int); }
-static void _MixMonoToStereo_2TO1_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(float); }
-
-// ------------------------------------------------------------------------------------------
-static void _MixMonoToStereo_2TO1_8_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(BYTE); }
-static void _MixMonoToStereo_2TO1_16_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(short); }
-static void _MixMonoToStereo_2TO1_24_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); /* !!! int24 data is contained in 32-bit containers*/ }
-static void _MixMonoToStereo_2TO1_32_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); }
-static void _MixMonoToStereo_2TO1_32f_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(float); }
-
-// ------------------------------------------------------------------------------------------
-static MixMonoToStereoF _GetMonoToStereoMixer(PaSampleFormat format, EMixerDir dir)
-{
-	switch (dir)
-	{
-	case MIX_DIR__1TO2:
-		switch (format & ~paNonInterleaved)
-		{
-		case paUInt8:	return _MixMonoToStereo_1TO2_8;
-		case paInt16:	return _MixMonoToStereo_1TO2_16;
-		case paInt24:	return _MixMonoToStereo_1TO2_24;
-		case paInt32:	return _MixMonoToStereo_1TO2_32;
-		case paFloat32: return _MixMonoToStereo_1TO2_32f;
-		}
-		break;
-
-	case MIX_DIR__2TO1:
-		switch (format & ~paNonInterleaved)
-		{
-		case paUInt8:	return _MixMonoToStereo_2TO1_8;
-		case paInt16:	return _MixMonoToStereo_2TO1_16;
-		case paInt24:	return _MixMonoToStereo_2TO1_24;
-		case paInt32:	return _MixMonoToStereo_2TO1_32;
-		case paFloat32: return _MixMonoToStereo_2TO1_32f;
-		}
-		break;
-
-	case MIX_DIR__2TO1_L:
-		switch (format & ~paNonInterleaved)
-		{
-		case paUInt8:	return _MixMonoToStereo_2TO1_8_L;
-		case paInt16:	return _MixMonoToStereo_2TO1_16_L;
-		case paInt24:	return _MixMonoToStereo_2TO1_24_L;
-		case paInt32:	return _MixMonoToStereo_2TO1_32_L;
-		case paFloat32: return _MixMonoToStereo_2TO1_32f_L;
-		}
-		break;
-	}
-
-	return NULL;
-}
-
-// ------------------------------------------------------------------------------------------
-PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
-{
-    PaError result = paNoError;
-    PaWasapiHostApiRepresentation *paWasapi;
-    PaDeviceInfo *deviceInfoArray;
-    HRESULT hr = S_OK;
-    IMMDeviceCollection* pEndPoints = NULL;
-	UINT i;
-
-    if (!SetupAVRT())
-	{
-        PRINT(("WASAPI: No AVRT! (not VISTA?)"));
-        return paNoError;
-    }
-
-    paWasapi = (PaWasapiHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaWasapiHostApiRepresentation) );
-    if (paWasapi == NULL)
-	{
-        result = paInsufficientMemory;
-        goto error;
-    }
-	
-    memset( paWasapi, 0, sizeof(PaWasapiHostApiRepresentation) ); /* ensure all fields are zeroed. especially paWasapi->allocations */
-
-    result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );
-    if( result != paNoError )
-    {
-        goto error;
-    }
-
-    paWasapi->allocations = PaUtil_CreateAllocationGroup();
-    if (paWasapi->allocations == NULL)
-	{
-        result = paInsufficientMemory;
-        goto error;
-    }
-
-    *hostApi                             = &paWasapi->inheritedHostApiRep;
-    (*hostApi)->info.structVersion		 = 1;
-    (*hostApi)->info.type				 = paWASAPI;
-    (*hostApi)->info.name				 = "Windows WASAPI";
-    (*hostApi)->info.deviceCount		 = 0;
-    (*hostApi)->info.defaultInputDevice	 = paNoDevice;
-    (*hostApi)->info.defaultOutputDevice = paNoDevice;
-
-    paWasapi->enumerator = NULL;
-    hr = CoCreateInstance(&pa_CLSID_IMMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER,
-             &pa_IID_IMMDeviceEnumerator, (void **)&paWasapi->enumerator);
-    
-	// We need to set the result to a value otherwise we will return paNoError
-	// [IF_FAILED_JUMP(hResult, error);]
-	IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-    // getting default device ids in the eMultimedia "role"
-    {
-        {
-            IMMDevice *defaultRenderer = NULL;
-            hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eRender, eMultimedia, &defaultRenderer);
-            if (hr != S_OK)
-			{
-				if (hr != E_NOTFOUND) {
-					// We need to set the result to a value otherwise we will return paNoError
-					// [IF_FAILED_JUMP(hResult, error);]
-					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-				}
-			}
-			else
-			{
-				WCHAR *pszDeviceId = NULL;
-				hr = IMMDevice_GetId(defaultRenderer, &pszDeviceId);
-				// We need to set the result to a value otherwise we will return paNoError
-				// [IF_FAILED_JUMP(hResult, error);]
-				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-				wcsncpy(paWasapi->defaultRenderer, pszDeviceId, MAX_STR_LEN-1);
-				CoTaskMemFree(pszDeviceId);
-				IMMDevice_Release(defaultRenderer);
-			}
-        }
-
-        {
-            IMMDevice *defaultCapturer = NULL;
-            hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eCapture, eMultimedia, &defaultCapturer);
-            if (hr != S_OK)
-			{
-				if (hr != E_NOTFOUND) {
-					// We need to set the result to a value otherwise we will return paNoError
-					// [IF_FAILED_JUMP(hResult, error);]
-					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-				}
-			}
-			else
-			{
-				WCHAR *pszDeviceId = NULL;
-				hr = IMMDevice_GetId(defaultCapturer, &pszDeviceId);
-				// We need to set the result to a value otherwise we will return paNoError
-				// [IF_FAILED_JUMP(hResult, error);]
-				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-				wcsncpy(paWasapi->defaultCapturer, pszDeviceId, MAX_STR_LEN-1);
-				CoTaskMemFree(pszDeviceId);
-				IMMDevice_Release(defaultCapturer);
-			}
-        }
-    }
-
-    hr = IMMDeviceEnumerator_EnumAudioEndpoints(paWasapi->enumerator, eAll, DEVICE_STATE_ACTIVE, &pEndPoints);
-	// We need to set the result to a value otherwise we will return paNoError
-	// [IF_FAILED_JUMP(hResult, error);]
-	IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-    hr = IMMDeviceCollection_GetCount(pEndPoints, &paWasapi->deviceCount);
-	// We need to set the result to a value otherwise we will return paNoError
-	// [IF_FAILED_JUMP(hResult, error);]
-	IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-    paWasapi->devInfo = (PaWasapiDeviceInfo *)PaUtil_AllocateMemory(sizeof(PaWasapiDeviceInfo) * paWasapi->deviceCount);
-	for (i = 0; i < paWasapi->deviceCount; ++i)
-		memset(&paWasapi->devInfo[i], 0, sizeof(PaWasapiDeviceInfo));
-
-    if (paWasapi->deviceCount > 0)
-    {
-        (*hostApi)->deviceInfos = (PaDeviceInfo **)PaUtil_GroupAllocateMemory(
-                paWasapi->allocations, sizeof(PaDeviceInfo *) * paWasapi->deviceCount);
-        if ((*hostApi)->deviceInfos == NULL)
-		{
-            result = paInsufficientMemory;
-            goto error;
-        }
-
-        /* allocate all device info structs in a contiguous block */
-        deviceInfoArray = (PaDeviceInfo *)PaUtil_GroupAllocateMemory(
-                paWasapi->allocations, sizeof(PaDeviceInfo) * paWasapi->deviceCount);
-        if (deviceInfoArray == NULL)
-		{
-            result = paInsufficientMemory;
-            goto error;
-        }
-
-        for (i = 0; i < paWasapi->deviceCount; ++i)
-		{
-			DWORD state				  = 0;
-            PaDeviceInfo *deviceInfo  = &deviceInfoArray[i];
-            deviceInfo->structVersion = 2;
-            deviceInfo->hostApi       = hostApiIndex;
-
-			PA_DEBUG(("WASAPI: device idx: %02d\n", i));
-			PA_DEBUG(("WASAPI: ---------------\n"));
-
-            hr = IMMDeviceCollection_Item(pEndPoints, i, &paWasapi->devInfo[i].device);
-			// We need to set the result to a value otherwise we will return paNoError
-			// [IF_FAILED_JUMP(hResult, error);]
-			IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-            // getting ID
-            {
-                WCHAR *pszDeviceId = NULL;
-                hr = IMMDevice_GetId(paWasapi->devInfo[i].device, &pszDeviceId);
-				// We need to set the result to a value otherwise we will return paNoError
-				// [IF_FAILED_JUMP(hr, error);]
-				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-                wcsncpy(paWasapi->devInfo[i].szDeviceID, pszDeviceId, MAX_STR_LEN-1);
-                CoTaskMemFree(pszDeviceId);
-
-                if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultCapturer) == 0)
-				{// we found the default input!
-                    (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
-                }
-                if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultRenderer) == 0)
-				{// we found the default output!
-                    (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
-                }
-            }
-
-            hr = IMMDevice_GetState(paWasapi->devInfo[i].device, &paWasapi->devInfo[i].state);
-			// We need to set the result to a value otherwise we will return paNoError
-			// [IF_FAILED_JUMP(hResult, error);]
-			IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-            if (paWasapi->devInfo[i].state != DEVICE_STATE_ACTIVE)
-			{
-                PRINT(("WASAPI device: %d is not currently available (state:%d)\n",i,state));
-            }
-
-            {
-                IPropertyStore *pProperty;
-                hr = IMMDevice_OpenPropertyStore(paWasapi->devInfo[i].device, STGM_READ, &pProperty);
-				// We need to set the result to a value otherwise we will return paNoError
-				// [IF_FAILED_JUMP(hResult, error);]
-				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-                // "Friendly" Name
-                {
-					char *deviceName;
-                    PROPVARIANT value;
-                    PropVariantInit(&value);
-                    hr = IPropertyStore_GetValue(pProperty, &PKEY_Device_FriendlyName, &value);
-					// We need to set the result to a value otherwise we will return paNoError
-					// [IF_FAILED_JUMP(hResult, error);]
-					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-                    deviceInfo->name = NULL;
-                    deviceName = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, MAX_STR_LEN + 1);
-                    if (deviceName == NULL)
-					{
-                        result = paInsufficientMemory;
-                        goto error;
-                    }
-					if (value.pwszVal)
-						WideCharToMultiByte(CP_UTF8, 0, value.pwszVal, (int)wcslen(value.pwszVal), deviceName, MAX_STR_LEN-1, 0, 0);
-					else
-						_snprintf(deviceName, MAX_STR_LEN-1, "baddev%d", i);
-                    deviceInfo->name = deviceName;
-                    PropVariantClear(&value);
-					PA_DEBUG(("WASAPI:%d| name[%s]\n", i, deviceInfo->name));
-                }
-
-                // Default format
-                {
-                    PROPVARIANT value;
-                    PropVariantInit(&value);
-                    hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEngine_DeviceFormat, &value);
-					// We need to set the result to a value otherwise we will return paNoError
-					// [IF_FAILED_JUMP(hResult, error);]
-					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-					memcpy(&paWasapi->devInfo[i].DefaultFormat, value.blob.pBlobData, min(sizeof(paWasapi->devInfo[i].DefaultFormat), value.blob.cbSize));
-                    // cleanup
-                    PropVariantClear(&value);
-                }
-
-                // Formfactor
-                {
-                    PROPVARIANT value;
-                    PropVariantInit(&value);
-                    hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEndpoint_FormFactor, &value);
-					// We need to set the result to a value otherwise we will return paNoError
-					// [IF_FAILED_JUMP(hResult, error);]
-					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-					// set
-					#if defined(DUMMYUNIONNAME) && defined(NONAMELESSUNION)
-						// avoid breaking strict-aliasing rules in such line: (EndpointFormFactor)(*((UINT *)(((WORD *)&value.wReserved3)+1)));
-						UINT v;
-						memcpy(&v, (((WORD *)&value.wReserved3)+1), sizeof(v));
-						paWasapi->devInfo[i].formFactor = (EndpointFormFactor)v;
-					#else
-						paWasapi->devInfo[i].formFactor = (EndpointFormFactor)value.uintVal;
-					#endif
-					PA_DEBUG(("WASAPI:%d| form-factor[%d]\n", i, paWasapi->devInfo[i].formFactor));
-                    // cleanup
-                    PropVariantClear(&value);
-                }
-
-				SAFE_RELEASE(pProperty);
-            }
-
-
-            // Endpoint data
-            {
-                IMMEndpoint *endpoint = NULL;
-                hr = IMMDevice_QueryInterface(paWasapi->devInfo[i].device, &pa_IID_IMMEndpoint, (void **)&endpoint);
-                if (SUCCEEDED(hr))
-				{
-                    hr = IMMEndpoint_GetDataFlow(endpoint, &paWasapi->devInfo[i].flow);
-                    SAFE_RELEASE(endpoint);
-                }
-            }
-
-            // Getting a temporary IAudioClient for more fields
-            // we make sure NOT to call Initialize yet!
-            {
-                IAudioClient *tmpClient = NULL;
-
-                hr = IMMDevice_Activate(paWasapi->devInfo[i].device, &pa_IID_IAudioClient,
-					CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);
-				// We need to set the result to a value otherwise we will return paNoError
-				// [IF_FAILED_JUMP(hResult, error);]
-				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-                hr = IAudioClient_GetDevicePeriod(tmpClient,
-                    &paWasapi->devInfo[i].DefaultDevicePeriod,
-                    &paWasapi->devInfo[i].MinimumDevicePeriod);
-				// We need to set the result to a value otherwise we will return paNoError
-				// [IF_FAILED_JUMP(hResult, error);]
-				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
-
-                //hr = tmpClient->GetMixFormat(&paWasapi->devInfo[i].MixFormat);
-
-				// Release client
-				SAFE_RELEASE(tmpClient);
-
-				if (hr != S_OK)
-				{
-					//davidv: this happened with my hardware, previously for that same device in DirectSound:
-					//Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f}
-					//so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat
-					LogHostError(hr);
-					// We need to set the result to a value otherwise we will return paNoError
-					result = paInternalError;
-					goto error;
-				}
-            }
-
-            // we can now fill in portaudio device data
-            deviceInfo->maxInputChannels  = 0;
-            deviceInfo->maxOutputChannels = 0;
-			deviceInfo->defaultSampleRate = paWasapi->devInfo[i].DefaultFormat.Format.nSamplesPerSec;
-            switch (paWasapi->devInfo[i].flow)
-			{
-			case eRender: {
-                deviceInfo->maxOutputChannels		 = paWasapi->devInfo[i].DefaultFormat.Format.nChannels;
-                deviceInfo->defaultHighOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
-                deviceInfo->defaultLowOutputLatency  = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
-				PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,
-					deviceInfo->maxOutputChannels, (float)deviceInfo->defaultHighOutputLatency, (float)deviceInfo->defaultLowOutputLatency));
-				break;}
-			case eCapture: {
-                deviceInfo->maxInputChannels		= paWasapi->devInfo[i].DefaultFormat.Format.nChannels;
-                deviceInfo->defaultHighInputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
-                deviceInfo->defaultLowInputLatency  = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
-				PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,
-					deviceInfo->maxInputChannels, (float)deviceInfo->defaultHighInputLatency, (float)deviceInfo->defaultLowInputLatency));
-				break; }
-            default:
-                PRINT(("WASAPI:%d| bad Data Flow!\n", i));
-				// We need to set the result to a value otherwise we will return paNoError
-				result = paInternalError;
-                //continue; // do not skip from list, allow to initialize
-            break;
-            }
-
-            (*hostApi)->deviceInfos[i] = deviceInfo;
-            ++(*hostApi)->info.deviceCount;
-        }
-    }
-
-    (*hostApi)->Terminate = Terminate;
-    (*hostApi)->OpenStream = OpenStream;
-    (*hostApi)->IsFormatSupported = IsFormatSupported;
-
-    PaUtil_InitializeStreamInterface( &paWasapi->callbackStreamInterface, CloseStream, StartStream,
-                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
-                                      GetStreamTime, GetStreamCpuLoad,
-                                      PaUtil_DummyRead, PaUtil_DummyWrite,
-                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
-
-    PaUtil_InitializeStreamInterface( &paWasapi->blockingStreamInterface, CloseStream, StartStream,
-                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
-                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
-                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
-
-
-	// findout if platform workaround is required
-	paWasapi->useWOW64Workaround = UseWOW64Workaround();
-
-    SAFE_RELEASE(pEndPoints);
-
-	PRINT(("WASAPI: initialized ok\n"));
-
-    return paNoError;
-
-error:
-
-	PRINT(("WASAPI: failed %s error[%d|%s]\n", __FUNCTION__, result, Pa_GetErrorText(result)));
-
-    SAFE_RELEASE(pEndPoints);
-
-	Terminate((PaUtilHostApiRepresentation *)paWasapi);
-
-	// Safety if error was not set so that we do not think initialize was a success
-	if (result == paNoError) {
-		result = paInternalError;
-	}
-
-    return result;
-}
-
-// ------------------------------------------------------------------------------------------
-static void Terminate( PaUtilHostApiRepresentation *hostApi )
-{
-	UINT i;
-    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
-	if (paWasapi == NULL)
-		return;
-
-	// Release IMMDeviceEnumerator
-    SAFE_RELEASE(paWasapi->enumerator);
-
-    for (i = 0; i < paWasapi->deviceCount; ++i)
-	{
-        PaWasapiDeviceInfo *info = &paWasapi->devInfo[i];
-        SAFE_RELEASE(info->device);
-
-		//if (info->MixFormat)
-        //    CoTaskMemFree(info->MixFormat);
-    }
-    PaUtil_FreeMemory(paWasapi->devInfo);
-
-    if (paWasapi->allocations)
-	{
-        PaUtil_FreeAllAllocations(paWasapi->allocations);
-        PaUtil_DestroyAllocationGroup(paWasapi->allocations);
-    }
-
-    PaWinUtil_CoUninitialize( paWASAPI, &paWasapi->comInitializationResult );
-
-    PaUtil_FreeMemory(paWasapi);
-
-	// Close AVRT
-	CloseAVRT();
-}
-
-// ------------------------------------------------------------------------------------------
-static PaWasapiHostApiRepresentation *_GetHostApi(PaError *_error)
-{
-	PaError error;
-
-	PaUtilHostApiRepresentation *pApi;
-	if ((error = PaUtil_GetHostApiRepresentation(&pApi, paWASAPI)) != paNoError)
-	{
-		if (_error != NULL)
-			(*_error) = error;
-
-		return NULL;
-	}
-	return (PaWasapiHostApiRepresentation *)pApi;
-}
-
-// ------------------------------------------------------------------------------------------
-int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice )
-{
-	PaError ret;
-	PaWasapiHostApiRepresentation *paWasapi;
-	UINT32 size;
-	PaDeviceIndex index;
-
-	if (pFormat == NULL)
-		return paBadBufferPtr;
-	if (nFormatSize <= 0)
-		return paBufferTooSmall;
-
-	// Get API
-	paWasapi = _GetHostApi(&ret);
-	if (paWasapi == NULL)
-		return ret;
-
-	// Get device index
-	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
-    if (ret != paNoError)
-        return ret;
-
-	// Validate index
-	if ((UINT32)index >= paWasapi->deviceCount)
-		return paInvalidDevice;
-
-	size = min(nFormatSize, (UINT32)sizeof(paWasapi->devInfo[ index ].DefaultFormat));
-	memcpy(pFormat, &paWasapi->devInfo[ index ].DefaultFormat, size);
-
-	return size;
-}
-
-// ------------------------------------------------------------------------------------------
-int PaWasapi_GetDeviceRole( PaDeviceIndex nDevice )
-{
-	PaError ret;
-	PaDeviceIndex index;
-
-	// Get API
-	PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
-	if (paWasapi == NULL)
-		return paNotInitialized;
-
-	// Get device index
-	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
-    if (ret != paNoError)
-        return ret;
-
-	// Validate index
-	if ((UINT32)index >= paWasapi->deviceCount)
-		return paInvalidDevice;
-
-	return paWasapi->devInfo[ index ].formFactor;
-}
-
-// ------------------------------------------------------------------------------------------
-PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput )
-{
-    PaWasapiStream *stream = (PaWasapiStream *)pStream;
-	if (stream == NULL)
-		return paBadStreamPtr;
-
-	if (nInput != NULL)
-		(*nInput) = stream->in.framesPerHostCallback;
-
-	if (nOutput != NULL)
-		(*nOutput) = stream->out.framesPerHostCallback;
-
-	return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-static void LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in)
-{
-    const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
-	switch (old->wFormatTag)
-	{
-	case WAVE_FORMAT_EXTENSIBLE: {
-
-		PRINT(("wFormatTag     =WAVE_FORMAT_EXTENSIBLE\n"));
-
-		if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
-		{
-			PRINT(("SubFormat      =KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n"));
-		}
-		else
-		if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))
-		{
-			PRINT(("SubFormat      =KSDATAFORMAT_SUBTYPE_PCM\n"));
-		}
-		else
-		{
-			PRINT(("SubFormat      =CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\n",
-										in->SubFormat.Data1,
-										in->SubFormat.Data2,
-										in->SubFormat.Data3,
-										(int)in->SubFormat.Data4[0],
-										(int)in->SubFormat.Data4[1],
-										(int)in->SubFormat.Data4[2],
-										(int)in->SubFormat.Data4[3],
-										(int)in->SubFormat.Data4[4],
-										(int)in->SubFormat.Data4[5],
-										(int)in->SubFormat.Data4[6],
-										(int)in->SubFormat.Data4[7]));
-		}
-		PRINT(("Samples.wValidBitsPerSample =%d\n",  in->Samples.wValidBitsPerSample));
-		PRINT(("dwChannelMask  =0x%X\n",in->dwChannelMask));
-
-		break; }
-
-	case WAVE_FORMAT_PCM:        PRINT(("wFormatTag     =WAVE_FORMAT_PCM\n")); break;
-	case WAVE_FORMAT_IEEE_FLOAT: PRINT(("wFormatTag     =WAVE_FORMAT_IEEE_FLOAT\n")); break;
-	default: 
-		PRINT(("wFormatTag     =UNKNOWN(%d)\n",old->wFormatTag)); break;
-	}
-
-	PRINT(("nChannels      =%d\n",old->nChannels));
-	PRINT(("nSamplesPerSec =%d\n",old->nSamplesPerSec));
-	PRINT(("nAvgBytesPerSec=%d\n",old->nAvgBytesPerSec));
-	PRINT(("nBlockAlign    =%d\n",old->nBlockAlign));
-	PRINT(("wBitsPerSample =%d\n",old->wBitsPerSample));
-	PRINT(("cbSize         =%d\n",old->cbSize));
-}
-
-// ------------------------------------------------------------------------------------------
-static PaSampleFormat WaveToPaFormat(const WAVEFORMATEXTENSIBLE *in)
-{
-    const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
-
-    switch (old->wFormatTag)
-	{
-    case WAVE_FORMAT_EXTENSIBLE: {
-        if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
-		{
-            if (in->Samples.wValidBitsPerSample == 32)
-                return paFloat32;
-        }
-        else
-		if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))
-		{
-            switch (old->wBitsPerSample)
-			{
-                case 32: return paInt32;
-                case 24: return paInt24;
-                case  8: return paUInt8;
-                case 16: return paInt16;
-            }
-        }
-		break; }
-
-    case WAVE_FORMAT_IEEE_FLOAT:
-		return paFloat32;
-
-    case WAVE_FORMAT_PCM: {
-        switch (old->wBitsPerSample)
-		{
-            case 32: return paInt32;
-            case 24: return paInt24;
-            case  8: return paUInt8;
-            case 16: return paInt16;
-        }
-		break; }
-    }
-
-    return paCustomFormat;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError MakeWaveFormatFromParams(WAVEFORMATEXTENSIBLE *wavex, const PaStreamParameters *params,
-									double sampleRate)
-{
-	WORD bitsPerSample;
-	WAVEFORMATEX *old;
-	DWORD channelMask = 0;
-	PaWasapiStreamInfo *streamInfo = (PaWasapiStreamInfo *)params->hostApiSpecificStreamInfo;
-
-	// Get user assigned channel mask
-	if ((streamInfo != NULL) && (streamInfo->flags & paWinWasapiUseChannelMask))
-		channelMask = streamInfo->channelMask;
-
-	// Convert PaSampleFormat to bits per sample
-	if ((bitsPerSample = PaSampleFormatToBitsPerSample(params->sampleFormat)) == 0)
-		return paSampleFormatNotSupported;
-
-    memset(wavex, 0, sizeof(*wavex));
-
-    old					 = (WAVEFORMATEX *)wavex;
-    old->nChannels       = (WORD)params->channelCount;
-    old->nSamplesPerSec  = (DWORD)sampleRate;
-	if ((old->wBitsPerSample = bitsPerSample) > 16)
-	{
-		old->wBitsPerSample = 32; // 20 or 24 bits must go in 32 bit containers (ints)
-	}
-    old->nBlockAlign     = (old->nChannels * (old->wBitsPerSample/8));
-    old->nAvgBytesPerSec = (old->nSamplesPerSec * old->nBlockAlign);
-
-    // WAVEFORMATEX
-    if ((params->channelCount <= 2) && ((bitsPerSample == 16) || (bitsPerSample == 8)))
-	{
-        old->cbSize		= 0;
-        old->wFormatTag	= WAVE_FORMAT_PCM;
-    }
-    // WAVEFORMATEXTENSIBLE
-    else
-	{
-        old->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
-        old->cbSize		= sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
-
-        if ((params->sampleFormat & ~paNonInterleaved) == paFloat32)
-            wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
-        else
-            wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
-
-        wavex->Samples.wValidBitsPerSample = bitsPerSample; //no extra padding!
-
-		// Set channel mask
-		if (channelMask != 0)
-		{
-			wavex->dwChannelMask = channelMask;
-		}
-		else
-		{
-			switch (params->channelCount)
-			{
-			case 1:  wavex->dwChannelMask = KSAUDIO_SPEAKER_MONO; break;
-			case 2:  wavex->dwChannelMask = KSAUDIO_SPEAKER_STEREO; break;
-			case 3:  wavex->dwChannelMask = KSAUDIO_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY; break;
-			case 4:  wavex->dwChannelMask = KSAUDIO_SPEAKER_QUAD; break;
-			case 5:  wavex->dwChannelMask = KSAUDIO_SPEAKER_QUAD|SPEAKER_LOW_FREQUENCY; break;
-#ifdef KSAUDIO_SPEAKER_5POINT1_SURROUND
-			case 6:  wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1_SURROUND; break;
-#else
-			case 6:  wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1; break;
-#endif
-#ifdef KSAUDIO_SPEAKER_5POINT1_SURROUND
-			case 7:  wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1_SURROUND|SPEAKER_BACK_CENTER; break;
-#else
-			case 7:  wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1|SPEAKER_BACK_CENTER; break;
-#endif	
-#ifdef KSAUDIO_SPEAKER_7POINT1_SURROUND
-			case 8:  wavex->dwChannelMask = KSAUDIO_SPEAKER_7POINT1_SURROUND; break;
-#else
-			case 8:  wavex->dwChannelMask = KSAUDIO_SPEAKER_7POINT1; break;
-#endif
-
-			default: wavex->dwChannelMask = 0;
-			}
-		}
-	}
-    return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-/*static void wasapiFillWFEXT( WAVEFORMATEXTENSIBLE* pwfext, PaSampleFormat sampleFormat, double sampleRate, int channelCount)
-{
-    PA_DEBUG(( "sampleFormat = %lx\n" , sampleFormat ));
-    PA_DEBUG(( "sampleRate = %f\n" , sampleRate ));
-    PA_DEBUG(( "chanelCount = %d\n", channelCount ));
-
-    pwfext->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
-    pwfext->Format.nChannels = (WORD)channelCount;
-    pwfext->Format.nSamplesPerSec = (DWORD)sampleRate;
-    if(channelCount == 1)
-        pwfext->dwChannelMask = KSAUDIO_SPEAKER_DIRECTOUT;
-    else
-        pwfext->dwChannelMask = KSAUDIO_SPEAKER_STEREO;
-    if(sampleFormat == paFloat32)
-    {
-        pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
-        pwfext->Format.wBitsPerSample = 32;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
-        pwfext->Samples.wValidBitsPerSample = 32;
-        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
-    }
-    else if(sampleFormat == paInt32)
-    {
-        pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
-        pwfext->Format.wBitsPerSample = 32;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
-        pwfext->Samples.wValidBitsPerSample = 32;
-        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
-    }
-    else if(sampleFormat == paInt24)
-    {
-        pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
-        pwfext->Format.wBitsPerSample = 32; // 24-bit in 32-bit int container
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
-        pwfext->Samples.wValidBitsPerSample = 24;
-        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
-    }
-    else if(sampleFormat == paInt16)
-    {
-        pwfext->Format.nBlockAlign = (WORD)(channelCount * 2);
-        pwfext->Format.wBitsPerSample = 16;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
-        pwfext->Samples.wValidBitsPerSample = 16;
-        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
-    }
-    pwfext->Format.nAvgBytesPerSec = pwfext->Format.nSamplesPerSec * pwfext->Format.nBlockAlign;
-}*/
-
-// ------------------------------------------------------------------------------------------
-static PaError GetClosestFormat(IAudioClient *myClient, double sampleRate,
-	const PaStreamParameters *_params, AUDCLNT_SHAREMODE shareMode, WAVEFORMATEXTENSIBLE *outWavex,
-	BOOL output)
-{
-	PaError answer                   = paInvalidSampleRate;
-	WAVEFORMATEX *sharedClosestMatch = NULL;
-	HRESULT hr                       = !S_OK;
-	PaStreamParameters params       = (*_params);
-
-	/* It was not noticed that 24-bit Input producing no output while device accepts this format.
-	   To fix this issue let's ask for 32-bits and let PA converters convert host 32-bit data
-	   to 24-bit for user-space. The bug concerns Vista, if Windows 7 supports 24-bits for Input
-	   please report to PortAudio developers to exclude Windows 7.
-	*/
-	/*if ((params.sampleFormat == paInt24) && (output == FALSE))
-		params.sampleFormat = paFloat32;*/ // <<< The silence was due to missing Int32_To_Int24_Dither implementation
-
-    MakeWaveFormatFromParams(outWavex, &params, sampleRate);
-
-	hr = IAudioClient_IsFormatSupported(myClient, shareMode, &outWavex->Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
-	if (hr == S_OK)
-		answer = paFormatIsSupported;
-    else
-	if (sharedClosestMatch)
-	{
-		WORD bitsPerSample;
-        WAVEFORMATEXTENSIBLE *ext = (WAVEFORMATEXTENSIBLE*)sharedClosestMatch;
-
-		GUID subf_guid = GUID_NULL;
-		if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
-		{
-			memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEXTENSIBLE));
-			subf_guid = ext->SubFormat;
-		}
-		else
-			memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEX));
-
-        CoTaskMemFree(sharedClosestMatch);
-
-		// Make supported by default
-		answer = paFormatIsSupported;
-
-		// Validate SampleRate
-		if ((DWORD)sampleRate != outWavex->Format.nSamplesPerSec)
-			return paInvalidSampleRate;
-
-		// Validate Channel count
-		if ((WORD)params.channelCount != outWavex->Format.nChannels)
-		{
-			// If mono, then driver does not support 1 channel, we use internal workaround
-			// of tiny software mixing functionality, e.g. we provide to user buffer 1 channel
-			// but then mix into 2 for device buffer
-			if ((params.channelCount == 1) && (outWavex->Format.nChannels == 2))
-				return paFormatIsSupported;
-			else
-				return paInvalidChannelCount;
-		}
-
-		// Validate Sample format
-		if ((bitsPerSample = PaSampleFormatToBitsPerSample(params.sampleFormat)) == 0)
-			return paSampleFormatNotSupported;
-
-		// Validate Sample format: bit size (WASAPI does not limit 'bit size')
-		//if (bitsPerSample != outWavex->Format.wBitsPerSample)
-		//	return paSampleFormatNotSupported;
-
-		// Validate Sample format: paFloat32 (WASAPI does not limit 'bit type')
-		//if ((params->sampleFormat == paFloat32) && (subf_guid != KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
-		//	return paSampleFormatNotSupported;
-
-		// Validate Sample format: paInt32 (WASAPI does not limit 'bit type')
-		//if ((params->sampleFormat == paInt32) && (subf_guid != KSDATAFORMAT_SUBTYPE_PCM))
-		//	return paSampleFormatNotSupported;
-	}
-	else
-	{
-		static const int BestToWorst[] = { paFloat32, paInt24, paInt16 };
-		int i;
-
-		// Try combination stereo and we will use built-in mono-stereo mixer then
-		if (params.channelCount == 1)
-		{
-			WAVEFORMATEXTENSIBLE stereo = { 0 };
-
-			PaStreamParameters stereo_params = params;
-			stereo_params.channelCount = 2;
-
-			MakeWaveFormatFromParams(&stereo, &stereo_params, sampleRate);
-
-			hr = IAudioClient_IsFormatSupported(myClient, shareMode, &stereo.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
-			if (hr == S_OK)
-			{
-				memcpy(outWavex, &stereo, sizeof(WAVEFORMATEXTENSIBLE));
-				CoTaskMemFree(sharedClosestMatch);
-				return (answer = paFormatIsSupported);
-			}
-
-			// Try selecting suitable sample type
-			for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)
-			{
-				WAVEFORMATEXTENSIBLE sample = { 0 };
-
-				PaStreamParameters sample_params = stereo_params;
-				sample_params.sampleFormat = BestToWorst[i];
-
-				MakeWaveFormatFromParams(&sample, &sample_params, sampleRate);
-
-				hr = IAudioClient_IsFormatSupported(myClient, shareMode, &sample.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
-				if (hr == S_OK)
-				{
-					memcpy(outWavex, &sample, sizeof(WAVEFORMATEXTENSIBLE));
-					CoTaskMemFree(sharedClosestMatch);
-					return (answer = paFormatIsSupported);
-				}
-			}
-		}
-
-		// Try selecting suitable sample type
-		for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)
-		{
-			WAVEFORMATEXTENSIBLE spfmt = { 0 };
-
-			PaStreamParameters spfmt_params = params;
-			spfmt_params.sampleFormat = BestToWorst[i];
-
-			MakeWaveFormatFromParams(&spfmt, &spfmt_params, sampleRate);
-
-			hr = IAudioClient_IsFormatSupported(myClient, shareMode, &spfmt.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
-			if (hr == S_OK)
-			{
-				memcpy(outWavex, &spfmt, sizeof(WAVEFORMATEXTENSIBLE));
-				CoTaskMemFree(sharedClosestMatch);
-				answer = paFormatIsSupported;
-				break;
-			}
-		}
-
-		// Nothing helped
-		LogHostError(hr);
-	}
-
-	return answer;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError IsStreamParamsValid(struct PaUtilHostApiRepresentation *hostApi,
-                                   const  PaStreamParameters *inputParameters,
-                                   const  PaStreamParameters *outputParameters,
-                                   double sampleRate)
-{
-	if (hostApi == NULL)
-		return paHostApiNotFound;
-	if ((UINT32)sampleRate == 0)
-		return paInvalidSampleRate;
-
-	if (inputParameters != NULL)
-    {
-        /* all standard sample formats are supported by the buffer adapter,
-            this implementation doesn't support any custom sample formats */
-		if (inputParameters->sampleFormat & paCustomFormat)
-            return paSampleFormatNotSupported;
-
-        /* unless alternate device specification is supported, reject the use of
-            paUseHostApiSpecificDeviceSpecification */
-        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
-            return paInvalidDevice;
-
-        /* check that input device can support inputChannelCount */
-        if (inputParameters->channelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)
-            return paInvalidChannelCount;
-
-        /* validate inputStreamInfo */
-        if (inputParameters->hostApiSpecificStreamInfo)
-		{
-			PaWasapiStreamInfo *inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
-	        if ((inputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||
-	            (inputStreamInfo->version != 1) ||
-                (inputStreamInfo->hostApiType != paWASAPI))
-	        {
-	            return paIncompatibleHostApiSpecificStreamInfo;
-	        }
-		}
-
-        return paNoError;
-    }
-
-    if (outputParameters != NULL)
-    {
-        /* all standard sample formats are supported by the buffer adapter,
-            this implementation doesn't support any custom sample formats */
-        if (outputParameters->sampleFormat & paCustomFormat)
-            return paSampleFormatNotSupported;
-
-        /* unless alternate device specification is supported, reject the use of
-            paUseHostApiSpecificDeviceSpecification */
-        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
-            return paInvalidDevice;
-
-        /* check that output device can support outputChannelCount */
-        if (outputParameters->channelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)
-            return paInvalidChannelCount;
-
-        /* validate outputStreamInfo */
-        if(outputParameters->hostApiSpecificStreamInfo)
-        {
-			PaWasapiStreamInfo *outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
-	        if ((outputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||
-	            (outputStreamInfo->version != 1) ||
-                (outputStreamInfo->hostApiType != paWASAPI))
-	        {
-	            return paIncompatibleHostApiSpecificStreamInfo;
-	        }
-        }
-
-		return paNoError;
-    }
-
-	return (inputParameters || outputParameters ? paNoError : paInternalError);
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
-                                  const  PaStreamParameters *inputParameters,
-                                  const  PaStreamParameters *outputParameters,
-                                  double sampleRate )
-{
-	IAudioClient *tmpClient = NULL;
-	PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
-	PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;
-
-	// Validate PaStreamParameters
-	PaError error;
-	if ((error = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)
-		return error;
-
-    if (inputParameters != NULL)
-    {
-		WAVEFORMATEXTENSIBLE wavex;
-		HRESULT hr;
-		PaError answer;
-		AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
-		inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
-
-		if (inputStreamInfo && (inputStreamInfo->flags & paWinWasapiExclusive))
-			shareMode  = AUDCLNT_SHAREMODE_EXCLUSIVE;
-
-		hr = IMMDevice_Activate(paWasapi->devInfo[inputParameters->device].device,
-			&pa_IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);
-		if (hr != S_OK)
-		{
-			LogHostError(hr);
-			return paInvalidDevice;
-		}
-
-		answer = GetClosestFormat(tmpClient, sampleRate, inputParameters, shareMode, &wavex, FALSE);
-		SAFE_RELEASE(tmpClient);
-
-		if (answer != paFormatIsSupported)
-			return answer;
-    }
-
-    if (outputParameters != NULL)
-    {
-		HRESULT hr;
-		WAVEFORMATEXTENSIBLE wavex;
-		PaError answer;
-		AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
-        outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
-
-		if (outputStreamInfo && (outputStreamInfo->flags & paWinWasapiExclusive))
-			shareMode  = AUDCLNT_SHAREMODE_EXCLUSIVE;
-
-		hr = IMMDevice_Activate(paWasapi->devInfo[outputParameters->device].device,
-			&pa_IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);
-		if (hr != S_OK)
-		{
-			LogHostError(hr);
-			return paInvalidDevice;
-		}
-
-		answer = GetClosestFormat(tmpClient, sampleRate, outputParameters, shareMode, &wavex, TRUE);
-		SAFE_RELEASE(tmpClient);
-
-		if (answer != paFormatIsSupported)
-			return answer;
-    }
-
-    return paFormatIsSupported;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaUint32 PaUtil_GetFramesPerHostBuffer(PaUint32 userFramesPerBuffer, PaTime suggestedLatency, double sampleRate, PaUint32 TimerJitterMs)
-{
-	PaUint32 frames = userFramesPerBuffer + max( userFramesPerBuffer, (PaUint32)(suggestedLatency * sampleRate) );
-    frames += (PaUint32)((sampleRate * 0.001) * TimerJitterMs);
-	return frames;
-}
-
-// ------------------------------------------------------------------------------------------
-static void _RecalculateBuffersCount(PaWasapiSubStream *sub, UINT32 userFramesPerBuffer, UINT32 framesPerLatency, BOOL fullDuplex)
-{
-	// Count buffers (must be at least 1)
-	sub->buffers = (userFramesPerBuffer ? framesPerLatency / userFramesPerBuffer : 0);
-	if (sub->buffers == 0)
-		sub->buffers = 1;
-
-	// Determine amount of buffers used:
-	// - Full-duplex mode will lead to period difference, thus only 1.
-	// - Input mode, only 1, as WASAPI allows extraction of only 1 packet.
-	// - For Shared mode we use double buffering.
-	if ((sub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) || fullDuplex)
-	{
-		// Exclusive mode does not allow >1 buffers be used for Event interface, e.g. GetBuffer
-		// call must acquire max buffer size and it all must be processed.
-		if (sub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)
-			sub->userBufferAndHostMatch = 1;
-
-		// Use paUtilBoundedHostBufferSize because exclusive mode will starve and produce
-		// bad quality of audio
-		sub->buffers = 1;
-	}
-}
-
-// ------------------------------------------------------------------------------------------
-static void _CalculateAlignedPeriod(PaWasapiSubStream *pSub, UINT32 *nFramesPerLatency,
-									ALIGN_FUNC pAlignFunc)
-{
-	// Align frames to HD Audio packet size of 128 bytes for Exclusive mode only.
-	// Not aligning on Windows Vista will cause Event timeout, although Windows 7 will
-	// return AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED error to realign buffer. Aligning is necessary
-	// for Exclusive mode only! when audio data is feeded directly to hardware.
-	if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
-	{
-		(*nFramesPerLatency) = AlignFramesPerBuffer((*nFramesPerLatency),
-			pSub->wavex.Format.nSamplesPerSec, pSub->wavex.Format.nBlockAlign, pAlignFunc);
-	}
-
-	// Calculate period
-	pSub->period = MakeHnsPeriod((*nFramesPerLatency), pSub->wavex.Format.nSamplesPerSec);
-}
-
-// ------------------------------------------------------------------------------------------
-static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSub, BOOL output, PaError *pa_error)
-{
-	PaError error;
-    HRESULT hr;
-
-	const PaWasapiDeviceInfo *pInfo  = pSub->params.device_info;
-	const PaStreamParameters *params = &pSub->params.stream_params;
-	UINT32 framesPerLatency          = pSub->params.frames_per_buffer;
-	double sampleRate                = pSub->params.sample_rate;
-	BOOL blocking                    = pSub->params.blocking;
-	BOOL fullDuplex                  = pSub->params.full_duplex;
-
-	const UINT32 userFramesPerBuffer = framesPerLatency;
-    IAudioClient *audioClient	     = NULL;
-
-	// Assume default failure due to some reason
-	(*pa_error) = paInvalidDevice;
-
-	// Validate parameters
-    if (!pSub || !pInfo || !params)
-	{
-		(*pa_error) = paBadStreamPtr;
-        return E_POINTER;
-	}
-	if ((UINT32)sampleRate == 0)
-	{
-		(*pa_error) = paInvalidSampleRate;
-        return E_INVALIDARG;
-	}
-
-    // Get the audio client
-    hr = IMMDevice_Activate(pInfo->device, &pa_IID_IAudioClient, CLSCTX_ALL, NULL, (void **)&audioClient);
-	if (hr != S_OK)
-	{
-		(*pa_error) = paInsufficientMemory;
-		LogHostError(hr);
-		goto done;
-	}
-
-	// Get closest format
-	if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)
-	{
-		(*pa_error) = error;
-		LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
-		goto done; // fail, format not supported
-	}
-
-	// Check for Mono <<>> Stereo workaround
-	if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))
-	{
-		/*if (blocking)
-		{
-			LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
-			goto done; // fail, blocking mode not supported
-		}*/
-
-		// select mixer
-		pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));
-		if (pSub->monoMixer == NULL)
-		{
-			(*pa_error) = paInvalidChannelCount;
-			LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
-			goto done; // fail, no mixer for format
-		}
-	}
-
-#if 0
-	// Add suggestd latency
-	framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);
-#else
-	// Calculate host buffer size
-	if ((pSub->shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE) &&
-		(!pSub->streamFlags || ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))
-	{
-		framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,
-			params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,
-			(pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);
-	}
-	else
-	{
-		REFERENCE_TIME overall;
-
-		// Work 1:1 with user buffer (only polling allows to use >1)
-		framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);
-
-		// Use Polling if overall latency is > 5ms as it allows to use 100% CPU in a callback,
-		// or user specified latency parameter
-		overall = MakeHnsPeriod(framesPerLatency, pSub->wavex.Format.nSamplesPerSec);
-		if ((overall >= (106667*2)/*21.33ms*/) || ((INT32)(params->suggestedLatency*100000.0) != 0/*0.01 msec granularity*/))
-		{
-			framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,
-				params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,
-				(streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);
-
-			// Use Polling interface
-			pSub->streamFlags &= ~AUDCLNT_STREAMFLAGS_EVENTCALLBACK;
-			PRINT(("WASAPI: CreateAudioClient: forcing POLL mode\n"));
-		}
-	}
-#endif
-
-	// For full-duplex output resize buffer to be the same as for input
-	if (output && fullDuplex)
-		framesPerLatency = pStream->in.framesPerHostCallback;
-
-	// Avoid 0 frames
-	if (framesPerLatency == 0)
-		framesPerLatency = MakeFramesFromHns(pInfo->DefaultDevicePeriod, pSub->wavex.Format.nSamplesPerSec);
-
-	// Exclusive Input stream renders data in 6 packets, we must set then the size of
-	// single packet, total buffer size, e.g. required latency will be PacketSize * 6
-	if (!output && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))
-	{
-		// Do it only for Polling mode
-		if ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)
-		{
-			framesPerLatency /= WASAPI_PACKETS_PER_INPUT_BUFFER;
-		}
-	}
-
-	// Calculate aligned period
-	_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
-
-	/*! Enforce min/max period for device in Shared mode to avoid bad audio quality.
-        Avoid doing so for Exclusive mode as alignment will suffer.
-	*/
-	if (pSub->shareMode == AUDCLNT_SHAREMODE_SHARED)
-	{
-		if (pSub->period < pInfo->DefaultDevicePeriod)
-		{
-			pSub->period = pInfo->DefaultDevicePeriod;
-			// Recalculate aligned period
-			framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
-			_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
-		}
-	}
-	else
-	{
-		if (pSub->period < pInfo->MinimumDevicePeriod)
-		{
-			pSub->period = pInfo->MinimumDevicePeriod;
-			// Recalculate aligned period
-			framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
-			_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_FWD);
-		}
-	}
-
-	/*! Windows 7 does not allow to set latency lower than minimal device period and will
-	    return error: AUDCLNT_E_INVALID_DEVICE_PERIOD. Under Vista we enforce the same behavior
-	    manually for unified behavior on all platforms.
-	*/
-	{
-		/*!	AUDCLNT_E_BUFFER_SIZE_ERROR: Applies to Windows 7 and later.
-			Indicates that the buffer duration value requested by an exclusive-mode client is
-			out of range. The requested duration value for pull mode must not be greater than
-			500 milliseconds; for push mode the duration value must not be greater than 2 seconds.
-		*/
-		if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
-		{
-			static const REFERENCE_TIME MAX_BUFFER_EVENT_DURATION = 500  * 10000;
-			static const REFERENCE_TIME MAX_BUFFER_POLL_DURATION  = 2000 * 10000;
-
-			if (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)	// pull mode, max 500ms
-			{
-				if (pSub->period > MAX_BUFFER_EVENT_DURATION)
-				{
-					pSub->period = MAX_BUFFER_EVENT_DURATION;
-					// Recalculate aligned period
-					framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
-					_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
-				}
-			}
-			else														// push mode, max 2000ms
-			{
-				if (pSub->period > MAX_BUFFER_POLL_DURATION)
-				{
-					pSub->period = MAX_BUFFER_POLL_DURATION;
-					// Recalculate aligned period
-					framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
-					_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
-				}
-			}
-		}
-	}
-
-	// Open the stream and associate it with an audio session
-    hr = IAudioClient_Initialize(audioClient,
-        pSub->shareMode,
-        pSub->streamFlags,
-		pSub->period,
-		(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
-		&pSub->wavex.Format,
-        NULL);
-
-	/*! WASAPI is tricky on large device buffer, sometimes 2000ms can be allocated sometimes
-	    less. There is no known guaranteed level thus we make subsequent tries by decreasing
-		buffer by 100ms per try.
-	*/
-	while ((hr == E_OUTOFMEMORY) && (pSub->period > (100 * 10000)))
-	{
-		PRINT(("WASAPI: CreateAudioClient: decreasing buffer size to %d milliseconds\n", (pSub->period / 10000)));
-
-		// Decrease by 100ms and try again
-		pSub->period -= (100 * 10000);
-
-		// Recalculate aligned period
-		framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
-		_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
-
-        // Release the previous allocations
-        SAFE_RELEASE(audioClient);
-
-        // Create a new audio client
-        hr = IMMDevice_Activate(pInfo->device, &pa_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&audioClient);
-    	if (hr != S_OK)
-		{
-			(*pa_error) = paInsufficientMemory;
-			LogHostError(hr);
-			goto done;
-		}
-
-		// Open the stream and associate it with an audio session
-		hr = IAudioClient_Initialize(audioClient,
-			pSub->shareMode,
-			pSub->streamFlags,
-			pSub->period,
-			(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
-			&pSub->wavex.Format,
-			NULL);
-	}
-
-	/*! WASAPI buffer size failure. Fallback to using default size.
-	*/
-	if (hr == AUDCLNT_E_BUFFER_SIZE_ERROR)
-	{
-		// Use default
-		pSub->period = pInfo->DefaultDevicePeriod;
-
-		PRINT(("WASAPI: CreateAudioClient: correcting buffer size to device default\n"));
-
-        // Release the previous allocations
-        SAFE_RELEASE(audioClient);
-
-        // Create a new audio client
-        hr = IMMDevice_Activate(pInfo->device, &pa_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&audioClient);
-    	if (hr != S_OK)
-		{
-			(*pa_error) = paInsufficientMemory;
-			LogHostError(hr);
-			goto done;
-		}
-
-		// Open the stream and associate it with an audio session
-		hr = IAudioClient_Initialize(audioClient,
-			pSub->shareMode,
-			pSub->streamFlags,
-			pSub->period,
-			(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
-			&pSub->wavex.Format,
-			NULL);
-	}
-
-    /*! If the requested buffer size is not aligned. Can be triggered by Windows 7 and up.
-	    Should not be be triggered ever as we do align buffers always with _CalculateAlignedPeriod.
-	*/
-    if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)
-    {
-		UINT32 frames = 0;
-
-        // Get the next aligned frame
-        hr = IAudioClient_GetBufferSize(audioClient, &frames);
-		if (hr != S_OK)
-		{
-			(*pa_error) = paInvalidDevice;
-			LogHostError(hr);
-			goto done;
-		}
-
-		PRINT(("WASAPI: CreateAudioClient: aligning buffer size to % frames\n", frames));
-
-        // Release the previous allocations
-        SAFE_RELEASE(audioClient);
-
-        // Create a new audio client
-        hr = IMMDevice_Activate(pInfo->device, &pa_IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&audioClient);
-    	if (hr != S_OK)
-		{
-			(*pa_error) = paInsufficientMemory;
-			LogHostError(hr);
-			goto done;
-		}
-
-		// Get closest format
-		if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)
-		{
-			(*pa_error) = error;
-			LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT); // fail, format not supported
-			goto done;
-		}
-
-		// Check for Mono >> Stereo workaround
-		if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))
-		{
-			/*if (blocking)
-			{
-				LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
-				goto done; // fail, blocking mode not supported
-			}*/
-
-			// Select mixer
-			pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));
-			if (pSub->monoMixer == NULL)
-			{
-				(*pa_error) = paInvalidChannelCount;
-				LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
-				goto done; // fail, no mixer for format
-			}
-		}
-
-		// Calculate period
-		pSub->period = MakeHnsPeriod(frames, pSub->wavex.Format.nSamplesPerSec);
-
-        // Open the stream and associate it with an audio session
-        hr = IAudioClient_Initialize(audioClient,
-            pSub->shareMode,
-            pSub->streamFlags,
-			pSub->period,
-			(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
-            &pSub->wavex.Format,
-            NULL);
-    	if (hr != S_OK)
-		{
-			(*pa_error) = paInvalidDevice;
-			LogHostError(hr);
-			goto done;
-		}
-    }
-    else
-	if (hr != S_OK)
-    {
-		(*pa_error) = paInvalidDevice;
-		LogHostError(hr);
-		goto done;
-    }
-
-    // Set client
-	pSub->clientParent = audioClient;
-    IAudioClient_AddRef(pSub->clientParent);
-
-	// Recalculate buffers count
-	_RecalculateBuffersCount(pSub,
-		userFramesPerBuffer,
-		MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec),
-		fullDuplex);
-
-	// No error, client is succesfully created
-	(*pa_error) = paNoError;
-
-done:
-
-    // Clean up
-    SAFE_RELEASE(audioClient);
-    return hr;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError ActivateAudioClientOutput(PaWasapiStream *stream)
-{
-	HRESULT hr;
-	PaError result;
-
-	UINT32 maxBufferSize   = 0;
-	PaTime buffer_latency  = 0;
-	UINT32 framesPerBuffer = stream->out.params.frames_per_buffer;
-
-	// Create Audio client
-	hr = CreateAudioClient(stream, &stream->out, TRUE, &result);
-    if (hr != S_OK)
-	{
-		LogPaError(result);
-		goto error;
-    }
-	LogWAVEFORMATEXTENSIBLE(&stream->out.wavex);
-
-	// Activate volume
-	stream->outVol = NULL;
-    /*hr = info->device->Activate(
-        __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
-        (void**)&stream->outVol);
-    if (hr != S_OK)
-        return paInvalidDevice;*/
-
-    // Get max possible buffer size to check if it is not less than that we request
-    hr = IAudioClient_GetBufferSize(stream->out.clientParent, &maxBufferSize);
-    if (hr != S_OK)
-	{
-		LogHostError(hr);
-		LogPaError(result = paInvalidDevice);
-		goto error;
-	}
-
-    // Correct buffer to max size if it maxed out result of GetBufferSize
-	stream->out.bufferSize = maxBufferSize;
-
-	// Get interface latency (actually uneeded as we calculate latency from the size
-	// of maxBufferSize).
-    hr = IAudioClient_GetStreamLatency(stream->out.clientParent, &stream->out.deviceLatency);
-    if (hr != S_OK)
-	{
-		LogHostError(hr);
-		LogPaError(result = paInvalidDevice);
-		goto error;
-	}
-	//stream->out.latencySeconds = nano100ToSeconds(stream->out.deviceLatency);
-
-    // Number of frames that are required at each period
-	stream->out.framesPerHostCallback = maxBufferSize;
-
-	// Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer
-	stream->out.framesPerBuffer =
-		(stream->out.userBufferAndHostMatch ? stream->out.framesPerHostCallback : framesPerBuffer);
-
-	// Calculate buffer latency
-	buffer_latency = (PaTime)maxBufferSize / stream->out.wavex.Format.nSamplesPerSec;
-
-	// Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)
-	stream->out.latencySeconds = buffer_latency;
-
-	PRINT(("WASAPI::OpenStream(output): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->out.framesPerHostCallback, (float)(stream->out.latencySeconds*1000.0f), (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->out.params.wow64_workaround ? "YES" : "NO"), (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));
-
-	return paNoError;
-
-error:
-
-	return result;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError ActivateAudioClientInput(PaWasapiStream *stream)
-{
-	HRESULT hr;
-	PaError result;
-
-	UINT32 maxBufferSize   = 0;
-	PaTime buffer_latency  = 0;
-	UINT32 framesPerBuffer = stream->in.params.frames_per_buffer;
-
-	// Create Audio client
-	hr = CreateAudioClient(stream, &stream->in, FALSE, &result);
-    if (hr != S_OK)
-	{
-		LogPaError(result);
-		goto error;
-    }
-	LogWAVEFORMATEXTENSIBLE(&stream->in.wavex);
-
-	// Create volume mgr
-	stream->inVol = NULL;
-    /*hr = info->device->Activate(
-        __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
-        (void**)&stream->inVol);
-    if (hr != S_OK)
-        return paInvalidDevice;*/
-
-    // Get max possible buffer size to check if it is not less than that we request
-    hr = IAudioClient_GetBufferSize(stream->in.clientParent, &maxBufferSize);
-    if (hr != S_OK)
-	{
-		LogHostError(hr);
-		LogPaError(result = paInvalidDevice);
-		goto error;
-	}
-
-    // Correct buffer to max size if it maxed out result of GetBufferSize
-	stream->in.bufferSize = maxBufferSize;
-
-	// Get interface latency (actually uneeded as we calculate latency from the size
-	// of maxBufferSize).
-    hr = IAudioClient_GetStreamLatency(stream->in.clientParent, &stream->in.deviceLatency);
-    if (hr != S_OK)
-	{
-		LogHostError(hr);
-		LogPaError(result = paInvalidDevice);
-		goto error;
-	}
-	//stream->in.latencySeconds = nano100ToSeconds(stream->in.deviceLatency);
-
-    // Number of frames that are required at each period
-	stream->in.framesPerHostCallback = maxBufferSize;
-
-	// Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer
-	stream->in.framesPerBuffer =
-		(stream->in.userBufferAndHostMatch ? stream->in.framesPerHostCallback : framesPerBuffer);
-
-	// Calculate buffer latency
-	buffer_latency = (PaTime)maxBufferSize / stream->in.wavex.Format.nSamplesPerSec;
-
-	// Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)
-	stream->in.latencySeconds = buffer_latency;
-
-	PRINT(("WASAPI::OpenStream(input): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->in.framesPerHostCallback, (float)(stream->in.latencySeconds*1000.0f), (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->in.params.wow64_workaround ? "YES" : "NO"), (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));
-
-	return paNoError;
-
-error:
-
-	return result;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
-                           PaStream** s,
-                           const PaStreamParameters *inputParameters,
-                           const PaStreamParameters *outputParameters,
-                           double sampleRate,
-                           unsigned long framesPerBuffer,
-                           PaStreamFlags streamFlags,
-                           PaStreamCallback *streamCallback,
-                           void *userData )
-{
-    PaError result = paNoError;
-	HRESULT hr;
-    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
-    PaWasapiStream *stream = NULL;
-    int inputChannelCount, outputChannelCount;
-    PaSampleFormat inputSampleFormat, outputSampleFormat;
-    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
-	PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;
-	PaWasapiDeviceInfo *info = NULL;
-	ULONG framesPerHostCallback;
-	PaUtilHostBufferSizeMode bufferMode;
-	const BOOL fullDuplex = ((inputParameters != NULL) && (outputParameters != NULL));
-
-	// validate PaStreamParameters
-	if ((result = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)
-		return LogPaError(result);
-
-    // Validate platform specific flags
-    if ((streamFlags & paPlatformSpecificFlags) != 0)
-	{
-		LogPaError(result = paInvalidFlag); /* unexpected platform specific flag */
-		goto error;
-	}
-
-	// Allocate memory for PaWasapiStream
-    if ((stream = (PaWasapiStream *)PaUtil_AllocateMemory(sizeof(PaWasapiStream))) == NULL)
-	{
-        LogPaError(result = paInsufficientMemory);
-        goto error;
-    }
-
-	// Default thread priority is Audio: for exclusive mode we will use Pro Audio.
-	stream->nThreadPriority = eThreadPriorityAudio;
-
-	// Set default number of frames: paFramesPerBufferUnspecified
-	if (framesPerBuffer == paFramesPerBufferUnspecified)
-	{
-		UINT32 framesPerBufferIn  = 0, framesPerBufferOut = 0;
-		if (inputParameters != NULL)
-		{
-			info = &paWasapi->devInfo[inputParameters->device];
-			framesPerBufferIn = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);
-		}
-		if (outputParameters != NULL)
-		{
-			info = &paWasapi->devInfo[outputParameters->device];
-			framesPerBufferOut = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);
-		}
-		// choosing maximum default size
-		framesPerBuffer = max(framesPerBufferIn, framesPerBufferOut);
-	}
-	if (framesPerBuffer == 0)
-		framesPerBuffer = ((UINT32)sampleRate / 100) * 2;
-
-	// Try create device: Input
-	if (inputParameters != NULL)
-    {
-        inputChannelCount = inputParameters->channelCount;
-        inputSampleFormat = inputParameters->sampleFormat;
-		inputStreamInfo   = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
-        info              = &paWasapi->devInfo[inputParameters->device];
-		stream->in.flags  = (inputStreamInfo ? inputStreamInfo->flags : 0);
-
-		// Select Exclusive/Shared mode
-		stream->in.shareMode = AUDCLNT_SHAREMODE_SHARED;
-        if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiExclusive))
-		{
-			// Boost thread priority
-			stream->nThreadPriority = eThreadPriorityProAudio;
-			// Make Exclusive
-			stream->in.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
-		}
-
-		// If user provided explicit thread priority level, use it
-        if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiThreadPriority))
-		{
-			if ((inputStreamInfo->threadPriority > eThreadPriorityNone) &&
-				(inputStreamInfo->threadPriority <= eThreadPriorityWindowManager))
-				stream->nThreadPriority = inputStreamInfo->threadPriority;
-		}
-
-		// Choose processing mode
-		stream->in.streamFlags = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);
-		if (paWasapi->useWOW64Workaround)
-			stream->in.streamFlags = 0; // polling interface
-		else
-		if (streamCallback == NULL)
-			stream->in.streamFlags = 0; // polling interface
-		else
-		if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiPolling))
-			stream->in.streamFlags = 0; // polling interface
-		else
-		if (fullDuplex)
-			stream->in.streamFlags = 0; // polling interface is implemented for full-duplex mode also
-
-		// Fill parameters for Audio Client creation
-		stream->in.params.device_info       = info;
-		stream->in.params.stream_params     = (*inputParameters);
-		if (inputStreamInfo != NULL)
-		{
-			stream->in.params.wasapi_params = (*inputStreamInfo);
-			stream->in.params.stream_params.hostApiSpecificStreamInfo = &stream->in.params.wasapi_params;
-		}
-		stream->in.params.frames_per_buffer = framesPerBuffer;
-		stream->in.params.sample_rate       = sampleRate;
-		stream->in.params.blocking          = (streamCallback == NULL);
-		stream->in.params.full_duplex       = fullDuplex;
-		stream->in.params.wow64_workaround  = paWasapi->useWOW64Workaround;
-
-		// Create and activate audio client
-		hr = ActivateAudioClientInput(stream);
-        if (hr != S_OK)
-		{
-			LogPaError(result = paInvalidDevice);
-			goto error;
-        }
-
-		// Get closest format
-        hostInputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->in.wavex), inputSampleFormat );
-
-        // Set user-side custom host processor
-        if ((inputStreamInfo != NULL) &&
-            (inputStreamInfo->flags & paWinWasapiRedirectHostProcessor))
-        {
-            stream->hostProcessOverrideInput.processor = inputStreamInfo->hostProcessorInput;
-            stream->hostProcessOverrideInput.userData = userData;
-        }
-
-		// Only get IAudioCaptureClient input once here instead of getting it at multiple places based on the use
-		hr = IAudioClient_GetService(stream->in.clientParent, &pa_IID_IAudioCaptureClient, (void **)&stream->captureClientParent);
-		if (hr != S_OK)
-		{
-			LogHostError(hr);
-			LogPaError(result = paUnanticipatedHostError);
-			goto error;
-		}
-
-		// Create ring buffer for blocking mode (It is needed because we fetch Input packets, not frames,
-		// and thus we have to save partial packet if such remains unread)
-		if (stream->in.params.blocking == TRUE)
-		{
-			UINT32 bufferFrames = ALIGN_NEXT_POW2((stream->in.framesPerHostCallback / WASAPI_PACKETS_PER_INPUT_BUFFER) * 2);
-			UINT32 frameSize    = stream->in.wavex.Format.nBlockAlign;
-
-			// buffer
-			if ((stream->in.tailBuffer = PaUtil_AllocateMemory(sizeof(PaUtilRingBuffer))) == NULL)
-			{
-				LogPaError(result = paInsufficientMemory);
-				goto error;
-			}
-			memset(stream->in.tailBuffer, 0, sizeof(PaUtilRingBuffer));
-
-			// buffer memory region
-			stream->in.tailBufferMemory = PaUtil_AllocateMemory(frameSize * bufferFrames);
-			if (stream->in.tailBufferMemory == NULL)
-			{
-				LogPaError(result = paInsufficientMemory);
-				goto error;
-			}
-
-			// initialize
-			if (PaUtil_InitializeRingBuffer(stream->in.tailBuffer, frameSize, bufferFrames,	stream->in.tailBufferMemory) != 0)
-			{
-				LogPaError(result = paInternalError);
-				goto error;
-			}
-		}
-	}
-    else
-    {
-        inputChannelCount = 0;
-        inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
-    }
-
-	// Try create device: Output
-    if (outputParameters != NULL)
-    {
-        outputChannelCount = outputParameters->channelCount;
-        outputSampleFormat = outputParameters->sampleFormat;
-		outputStreamInfo   = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
-		info               = &paWasapi->devInfo[outputParameters->device];
-		stream->out.flags  = (outputStreamInfo ? outputStreamInfo->flags : 0);
-
-		// Select Exclusive/Shared mode
-		stream->out.shareMode = AUDCLNT_SHAREMODE_SHARED;
-        if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiExclusive))
-		{
-			// Boost thread priority
-			stream->nThreadPriority = eThreadPriorityProAudio;
-			// Make Exclusive
-			stream->out.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
-		}
-
-		// If user provided explicit thread priority level, use it
-        if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiThreadPriority))
-		{
-			if ((outputStreamInfo->threadPriority > eThreadPriorityNone) &&
-				(outputStreamInfo->threadPriority <= eThreadPriorityWindowManager))
-				stream->nThreadPriority = outputStreamInfo->threadPriority;
-		}
-
-		// Choose processing mode
-		stream->out.streamFlags = (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);
-		if (paWasapi->useWOW64Workaround)
-			stream->out.streamFlags = 0; // polling interface
-		else
-		if (streamCallback == NULL)
-			stream->out.streamFlags = 0; // polling interface
-		else
-		if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiPolling))
-			stream->out.streamFlags = 0; // polling interface
-		else
-		if (fullDuplex)
-			stream->out.streamFlags = 0; // polling interface is implemented for full-duplex mode also
-
-		// Fill parameters for Audio Client creation
-		stream->out.params.device_info       = info;
-		stream->out.params.stream_params     = (*outputParameters);
-		if (inputStreamInfo != NULL)
-		{
-			stream->out.params.wasapi_params = (*outputStreamInfo);
-			stream->out.params.stream_params.hostApiSpecificStreamInfo = &stream->out.params.wasapi_params;
-		}
-		stream->out.params.frames_per_buffer = framesPerBuffer;
-		stream->out.params.sample_rate       = sampleRate;
-		stream->out.params.blocking          = (streamCallback == NULL);
-		stream->out.params.full_duplex       = fullDuplex;
-		stream->out.params.wow64_workaround  = paWasapi->useWOW64Workaround;
-
-		// Create and activate audio client
-		hr = ActivateAudioClientOutput(stream);
-        if (hr != S_OK)
-		{
-			LogPaError(result = paInvalidDevice);
-			goto error;
-        }
-
-		// Get closest format
-        hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->out.wavex), outputSampleFormat );
-
-        // Set user-side custom host processor
-        if ((outputStreamInfo != NULL) &&
-            (outputStreamInfo->flags & paWinWasapiRedirectHostProcessor))
-        {
-            stream->hostProcessOverrideOutput.processor = outputStreamInfo->hostProcessorOutput;
-            stream->hostProcessOverrideOutput.userData = userData;
-        }
-
-		// Only get IAudioCaptureClient output once here instead of getting it at multiple places based on the use
-		hr = IAudioClient_GetService(stream->out.clientParent, &pa_IID_IAudioRenderClient, (void **)&stream->renderClientParent);
-		if (hr != S_OK)
-		{
-			LogHostError(hr);
-			LogPaError(result = paUnanticipatedHostError);
-			goto error;
-		}
-	}
-    else
-    {
-        outputChannelCount = 0;
-        outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
-    }
-
-	// log full-duplex
-	if (fullDuplex)
-		PRINT(("WASAPI::OpenStream: full-duplex mode\n"));
-
-	// paWinWasapiPolling must be on/or not on both streams
-	if ((inputParameters != NULL) && (outputParameters != NULL))
-	{
-		if ((inputStreamInfo != NULL) && (outputStreamInfo != NULL))
-		{
-			if (((inputStreamInfo->flags & paWinWasapiPolling) &&
-				!(outputStreamInfo->flags & paWinWasapiPolling))
-				||
-				(!(inputStreamInfo->flags & paWinWasapiPolling) &&
-				 (outputStreamInfo->flags & paWinWasapiPolling)))
-			{
-				LogPaError(result = paInvalidFlag);
-				goto error;
-			}
-		}
-	}
-
-	// Initialize stream representation
-    if (streamCallback)
-    {
-		stream->bBlocking = FALSE;
-        PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,
-                                              &paWasapi->callbackStreamInterface,
-											  streamCallback, userData);
-    }
-    else
-    {
-		stream->bBlocking = TRUE;
-        PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,
-                                              &paWasapi->blockingStreamInterface,
-											  streamCallback, userData);
-    }
-
-	// Initialize CPU measurer
-    PaUtil_InitializeCpuLoadMeasurer(&stream->cpuLoadMeasurer, sampleRate);
-
-	if (outputParameters && inputParameters)
-	{
-		// serious problem #1 - No, Not a problem, especially concerning Exclusive mode.
-		// Input device in exclusive mode somehow is getting large buffer always, thus we
-		// adjust Output latency to reflect it, thus period will differ but playback will be
-		// normal.
-		/*if (stream->in.period != stream->out.period)
-		{
-			PRINT(("WASAPI: OpenStream: period discrepancy\n"));
-			LogPaError(result = paBadIODeviceCombination);
-			goto error;
-		}*/
-
-		// serious problem #2 - No, Not a problem, as framesPerHostCallback take into account
-		// sample size while it is not a problem for PA full-duplex, we must care of
-		// preriod only!
-		/*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)
-		{
-			PRINT(("WASAPI: OpenStream: framesPerHostCallback discrepancy\n"));
-			goto error;
-		}*/
-	}
-
-	// Calculate frames per host for processor
-	framesPerHostCallback = (outputParameters ? stream->out.framesPerBuffer : stream->in.framesPerBuffer);
-
-	// Choose correct mode of buffer processing:
-	// Exclusive/Shared non paWinWasapiPolling mode: paUtilFixedHostBufferSize - always fixed
-	// Exclusive/Shared paWinWasapiPolling mode: paUtilBoundedHostBufferSize - may vary for Exclusive or Full-duplex
-	bufferMode = paUtilFixedHostBufferSize;
-	if (inputParameters) // !!! WASAPI IAudioCaptureClient::GetBuffer extracts not number of frames but 1 packet, thus we always must adapt
-		bufferMode = paUtilBoundedHostBufferSize;
-	else
-	if (outputParameters)
-	{
-		if ((stream->out.buffers == 1) &&
-			(!stream->out.streamFlags || ((stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))
-			bufferMode = paUtilBoundedHostBufferSize;
-	}
-	stream->bufferMode = bufferMode;
-
-    // Initialize buffer processor
-    result =  PaUtil_InitializeBufferProcessor(
-		&stream->bufferProcessor,
-        inputChannelCount,
-		inputSampleFormat,
-		hostInputSampleFormat,
-        outputChannelCount,
-		outputSampleFormat,
-		hostOutputSampleFormat,
-        sampleRate,
-		streamFlags,
-		framesPerBuffer,
-        framesPerHostCallback,
-		bufferMode,
-        streamCallback,
-		userData);
-    if (result != paNoError)
-	{
-		LogPaError(result);
-        goto error;
-	}
-
-	// Set Input latency
-    stream->streamRepresentation.streamInfo.inputLatency =
-            ((double)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate)
-			+ ((inputParameters)?stream->in.latencySeconds : 0);
-
-	// Set Output latency
-    stream->streamRepresentation.streamInfo.outputLatency =
-            ((double)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate)
-			+ ((outputParameters)?stream->out.latencySeconds : 0);
-
-	// Set SR
-    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
-
-    (*s) = (PaStream *)stream;
-    return result;
-
-error:
-
-    if (stream != NULL)
-		CloseStream(stream);
-
-    return result;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError CloseStream( PaStream* s )
-{
-    PaError result = paNoError;
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-
-	// abort active stream
-	if (IsStreamActive(s))
-	{
-		result = AbortStream(s);
-	}
-
-    SAFE_RELEASE(stream->captureClientParent);
-    SAFE_RELEASE(stream->renderClientParent);
-    SAFE_RELEASE(stream->out.clientParent);
-    SAFE_RELEASE(stream->in.clientParent);
-	SAFE_RELEASE(stream->inVol);
-	SAFE_RELEASE(stream->outVol);
-
-	CloseHandle(stream->event[S_INPUT]);
-	CloseHandle(stream->event[S_OUTPUT]);
-
-	_StreamCleanup(stream);
-
-	PaWasapi_FreeMemory(stream->in.monoBuffer);
-	PaWasapi_FreeMemory(stream->out.monoBuffer);
-
-	PaUtil_FreeMemory(stream->in.tailBuffer);
-	PaUtil_FreeMemory(stream->in.tailBufferMemory);
-
-	PaUtil_FreeMemory(stream->out.tailBuffer);
-	PaUtil_FreeMemory(stream->out.tailBufferMemory);
-
-    PaUtil_TerminateBufferProcessor(&stream->bufferProcessor);
-    PaUtil_TerminateStreamRepresentation(&stream->streamRepresentation);
-    PaUtil_FreeMemory(stream);
-
-    return result;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream) 
-{
-	HRESULT hResult = S_OK;
-	HRESULT hFirstBadResult = S_OK;
-	substream->clientProc = NULL;
-
-	// IAudioClient
-	hResult = CoGetInterfaceAndReleaseStream(substream->clientStream, &pa_IID_IAudioClient, (LPVOID*)&substream->clientProc);
-	substream->clientStream = NULL;
-	if (hResult != S_OK) 
-	{
-		hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
-	}
-
-	return hFirstBadResult;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream) 
-{
-	HRESULT hResult = S_OK;
-	HRESULT hFirstBadResult = S_OK;
-	stream->captureClient = NULL;
-	stream->renderClient = NULL;
-	stream->in.clientProc = NULL;
-	stream->out.clientProc = NULL;
-
-	if (NULL != stream->in.clientParent) 
-	{
-		// SubStream pointers
-		hResult = UnmarshalSubStreamComPointers(&stream->in);
-		if (hResult != S_OK) 
-		{
-			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
-		}
-
-		// IAudioCaptureClient
-		hResult = CoGetInterfaceAndReleaseStream(stream->captureClientStream, &pa_IID_IAudioCaptureClient, (LPVOID*)&stream->captureClient);
-		stream->captureClientStream = NULL;
-		if (hResult != S_OK) 
-		{
-			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
-		}
-	}
-
-	if (NULL != stream->out.clientParent) 
-	{
-		// SubStream pointers
-		hResult = UnmarshalSubStreamComPointers(&stream->out);
-		if (hResult != S_OK) 
-		{
-			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
-		}
-
-		// IAudioRenderClient
-		hResult = CoGetInterfaceAndReleaseStream(stream->renderClientStream, &pa_IID_IAudioRenderClient, (LPVOID*)&stream->renderClient);
-		stream->renderClientStream = NULL;
-		if (hResult != S_OK) 
-		{
-			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
-		}
-	}
-
-	return hFirstBadResult;
-}
-
-// -----------------------------------------------------------------------------------------
-void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream) 
-{
-	SAFE_RELEASE(substream->clientProc);
-}
-
-// -----------------------------------------------------------------------------------------
-void ReleaseUnmarshaledComPointers(PaWasapiStream *stream) 
-{
-	// Release AudioClient services first
-	SAFE_RELEASE(stream->captureClient);
-	SAFE_RELEASE(stream->renderClient);
-
-	// Release AudioClients
-	ReleaseUnmarshaledSubComPointers(&stream->in);
-	ReleaseUnmarshaledSubComPointers(&stream->out);
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream) 
-{
-	HRESULT hResult;
-	substream->clientStream = NULL;
-
-	// IAudioClient
-	hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioClient, (LPUNKNOWN)substream->clientParent, &substream->clientStream);
-	if (hResult != S_OK)
-		goto marshal_sub_error;
-
-	return hResult;
-
-	// If marshaling error occurred, make sure to release everything.
-marshal_sub_error:
-
-	UnmarshalSubStreamComPointers(substream);
-	ReleaseUnmarshaledSubComPointers(substream);
-	return hResult;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT MarshalStreamComPointers(PaWasapiStream *stream) 
-{
-	HRESULT hResult = S_OK;
-	stream->captureClientStream = NULL;
-	stream->in.clientStream = NULL;
-	stream->renderClientStream = NULL;
-	stream->out.clientStream = NULL;
-
-	if (NULL != stream->in.clientParent) 
-	{
-		// SubStream pointers
-		hResult = MarshalSubStreamComPointers(&stream->in);
-		if (hResult != S_OK) 
-			goto marshal_error;
-
-		// IAudioCaptureClient
-		hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioCaptureClient, (LPUNKNOWN)stream->captureClientParent, &stream->captureClientStream);
-		if (hResult != S_OK) 
-			goto marshal_error;
-	}
-
-	if (NULL != stream->out.clientParent) 
-	{
-		// SubStream pointers
-		hResult = MarshalSubStreamComPointers(&stream->out);
-		if (hResult != S_OK) 
-			goto marshal_error;
-
-		// IAudioRenderClient
-		hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioRenderClient, (LPUNKNOWN)stream->renderClientParent, &stream->renderClientStream);
-		if (hResult != S_OK) 
-			goto marshal_error;
-	}
-
-	return hResult;
-
-	// If marshaling error occurred, make sure to release everything.
-marshal_error:
-
-	UnmarshalStreamComPointers(stream);
-	ReleaseUnmarshaledComPointers(stream);
-	return hResult;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError StartStream( PaStream *s )
-{
-	HRESULT hr;
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-	PaError result = paNoError;
-
-	// check if stream is active already
-	if (IsStreamActive(s))
-		return paStreamIsNotStopped;
-
-    PaUtil_ResetBufferProcessor(&stream->bufferProcessor);
-
-	// Cleanup handles (may be necessary if stream was stopped by itself due to error)
-	_StreamCleanup(stream);
-
-	// Create close event
-	if ((stream->hCloseRequest = CreateEvent(NULL, TRUE, FALSE, NULL)) == NULL) 
-	{
-		result = paInsufficientMemory;
-		goto start_error;
-	}
-
-	// Create thread
-	if (!stream->bBlocking)
-	{
-		// Create thread events
-		stream->hThreadStart = CreateEvent(NULL, TRUE, FALSE, NULL);
-		stream->hThreadExit  = CreateEvent(NULL, TRUE, FALSE, NULL);
-		if ((stream->hThreadStart == NULL) || (stream->hThreadExit == NULL))
-		{
-			result = paInsufficientMemory;
-			goto start_error;
-		}
-
-		// Marshal WASAPI interface pointers for safe use in thread created below.
-		if ((hr = MarshalStreamComPointers(stream)) != S_OK) 
-		{
-			PRINT(("Failed marshaling stream COM pointers."));
-			result = paUnanticipatedHostError;
-			goto nonblocking_start_error;
-		}
-
-		if ((stream->in.clientParent  && (stream->in.streamFlags  & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)) ||
-			(stream->out.clientParent && (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)))
-		{
-			if ((stream->hThread = CREATE_THREAD(ProcThreadEvent)) == NULL) 
-			{
-				PRINT(("Failed creating thread: ProcThreadEvent."));
-				result = paUnanticipatedHostError;
-				goto nonblocking_start_error;
-			}
-		}
-		else
-		{
-			if ((stream->hThread = CREATE_THREAD(ProcThreadPoll)) == NULL) 
-			{
-				PRINT(("Failed creating thread: ProcThreadPoll."));
-				result = paUnanticipatedHostError;
-				goto nonblocking_start_error;
-			}
-		}
-
-		// Wait for thread to start
-		if (WaitForSingleObject(stream->hThreadStart, 60*1000) == WAIT_TIMEOUT) 
-		{
-			PRINT(("Failed starting thread: timeout."));
-			result = paUnanticipatedHostError;
-			goto nonblocking_start_error;
-		}
-	}
-	else
-	{
-		// Create blocking operation events (non-signaled event means - blocking operation is pending)
-		if (stream->out.clientParent != NULL) 
-		{
-			if ((stream->hBlockingOpStreamWR = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL) 
-			{
-				result = paInsufficientMemory;
-				goto start_error;
-			}
-		}
-		if (stream->in.clientParent != NULL) 
-		{
-			if ((stream->hBlockingOpStreamRD = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL) 
-			{
-				result = paInsufficientMemory;
-				goto start_error;
-			}
-		}
-
-		// Initialize event & start INPUT stream
-		if (stream->in.clientParent != NULL)
-		{
-			if ((hr = IAudioClient_Start(stream->in.clientParent)) != S_OK)
-			{
-				LogHostError(hr);
-				result = paUnanticipatedHostError;
-				goto start_error;
-			}
-		}
-
-		// Initialize event & start OUTPUT stream
-		if (stream->out.clientParent != NULL)
-		{
-			// Start
-			if ((hr = IAudioClient_Start(stream->out.clientParent)) != S_OK)
-			{
-				LogHostError(hr);
-				result = paUnanticipatedHostError;
-				goto start_error;
-			}
-		}
-
-		// Set parent to working pointers to use shared functions.
-		stream->captureClient  = stream->captureClientParent;
-		stream->renderClient   = stream->renderClientParent;
-		stream->in.clientProc  = stream->in.clientParent;
-		stream->out.clientProc = stream->out.clientParent;
-
-		// Signal: stream running.
-		stream->running = TRUE;
-	}
-
-    return result;
-
-nonblocking_start_error:
-
-	// Set hThreadExit event to prevent blocking during cleanup
-	SetEvent(stream->hThreadExit);
-	UnmarshalStreamComPointers(stream);
-	ReleaseUnmarshaledComPointers(stream);
-
-start_error:
-
-	StopStream(s);
-	return result;
-}
-
-// ------------------------------------------------------------------------------------------
-void _StreamFinish(PaWasapiStream *stream)
-{
-	// Issue command to thread to stop processing and wait for thread exit
-	if (!stream->bBlocking)
-	{
-		SignalObjectAndWait(stream->hCloseRequest, stream->hThreadExit, INFINITE, FALSE);
-	}
-	else
-	// Blocking mode does not own thread
-	{
-		// Signal close event and wait for each of 2 blocking operations to complete
-		if (stream->out.clientParent)
-			SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamWR, INFINITE, TRUE);
-		if (stream->out.clientParent)
-			SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamRD, INFINITE, TRUE);
-
-		// Process stop
-		_StreamOnStop(stream);
-	}
-
-	// Cleanup handles
-	_StreamCleanup(stream);
-
-    stream->running = FALSE;
-}
-
-// ------------------------------------------------------------------------------------------
-void _StreamCleanup(PaWasapiStream *stream)
-{
-	// Close thread handles to allow restart
-	SAFE_CLOSE(stream->hThread);
-	SAFE_CLOSE(stream->hThreadStart);
-	SAFE_CLOSE(stream->hThreadExit);
-	SAFE_CLOSE(stream->hCloseRequest);
-	SAFE_CLOSE(stream->hBlockingOpStreamRD);
-	SAFE_CLOSE(stream->hBlockingOpStreamWR);
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError StopStream( PaStream *s )
-{
-	// Finish stream
-	_StreamFinish((PaWasapiStream *)s);
-    return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError AbortStream( PaStream *s )
-{
-	// Finish stream
-	_StreamFinish((PaWasapiStream *)s);
-    return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError IsStreamStopped( PaStream *s )
-{
-	return !((PaWasapiStream *)s)->running;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError IsStreamActive( PaStream *s )
-{
-    return ((PaWasapiStream *)s)->running;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaTime GetStreamTime( PaStream *s )
-{
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-
-    /* suppress unused variable warnings */
-    (void) stream;
-
-    return PaUtil_GetTime();
-}
-
-// ------------------------------------------------------------------------------------------
-static double GetStreamCpuLoad( PaStream* s )
-{
-	return PaUtil_GetCpuLoad(&((PaWasapiStream *)s)->cpuLoadMeasurer);
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError ReadStream( PaStream* s, void *_buffer, unsigned long frames )
-{
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-
-	HRESULT hr = S_OK;
-	BYTE *user_buffer = (BYTE *)_buffer;
-	BYTE *wasapi_buffer = NULL;
-	DWORD flags = 0;
-	UINT32 i, available, sleep = 0;
-	unsigned long processed;
-	ThreadIdleScheduler sched;
-
-	// validate
-	if (!stream->running)
-		return paStreamIsStopped;
-	if (stream->captureClient == NULL)
-		return paBadStreamPtr;
-
-	// Notify blocking op has begun
-	ResetEvent(stream->hBlockingOpStreamRD);
-
-	// Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than
-	// 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting
-	ThreadIdleScheduler_Setup(&sched, 1, 250/* microseconds */);
-
-    // Make a local copy of the user buffer pointer(s), this is necessary
-	// because PaUtil_CopyOutput() advances these pointers every time it is called
-    if (!stream->bufferProcessor.userInputIsInterleaved)
-    {
-		user_buffer = (BYTE *)alloca(sizeof(BYTE *) * stream->bufferProcessor.inputChannelCount);
-        if (user_buffer == NULL)
-            return paInsufficientMemory;
-
-        for (i = 0; i < stream->bufferProcessor.inputChannelCount; ++i)
-            ((BYTE **)user_buffer)[i] = ((BYTE **)_buffer)[i];
-    }
-
-	// Findout if there are tail frames, flush them all before reading hardware
-	if ((available = PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer)) != 0)
-	{
-		ring_buffer_size_t buf1_size = 0, buf2_size = 0, read, desired;
-		void *buf1 = NULL, *buf2 = NULL;
-
-		// Limit desired to amount of requested frames
-		desired = available;
-		if ((UINT32)desired > frames)
-			desired = frames;
-		
-		// Get pointers to read regions
-		read = PaUtil_GetRingBufferReadRegions(stream->in.tailBuffer, desired, &buf1, &buf1_size, &buf2, &buf2_size);
-
-		if (buf1 != NULL)
-		{
-			// Register available frames to processor
-			PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf1_size);
-
-			// Register host buffer pointer to processor
-			PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf1, stream->bufferProcessor.inputChannelCount);
-
-			// Copy user data to host buffer (with conversion if applicable)
-			processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf1_size);
-			frames -= processed;
-		}
-
-		if (buf2 != NULL)
-		{
-			// Register available frames to processor
-			PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf2_size);
-
-			// Register host buffer pointer to processor
-			PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf2, stream->bufferProcessor.inputChannelCount);
-
-			// Copy user data to host buffer (with conversion if applicable)
-			processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf2_size);
-			frames -= processed;
-		}
-
-		// Advance
-		PaUtil_AdvanceRingBufferReadIndex(stream->in.tailBuffer, read);
-	}
-
-	// Read hardware
-	while (frames != 0)
-	{
-		// Check if blocking call must be interrupted
-		if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)
-			break;
-
-		// Get available frames (must be finding out available frames before call to IAudioCaptureClient_GetBuffer
-		// othervise audio glitches will occur inExclusive mode as it seems that WASAPI has some scheduling/
-		// processing problems when such busy polling with IAudioCaptureClient_GetBuffer occurs)
-		if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)
-		{
-			LogHostError(hr);
-			return paUnanticipatedHostError;
-		}
-
-		// Wait for more frames to become available
-		if (available == 0)
-		{
-			// Exclusive mode may require latency of 1 millisecond, thus we shall sleep
-			// around 500 microseconds (emulated) to collect packets in time
-			if (stream->in.shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE)
-			{
-				UINT32 sleep_frames = (frames < stream->in.framesPerHostCallback ? frames : stream->in.framesPerHostCallback);
-
-				sleep  = GetFramesSleepTime(sleep_frames, stream->in.wavex.Format.nSamplesPerSec);
-				sleep /= 4; // wait only for 1/4 of the buffer
-
-				// WASAPI input provides packets, thus expiring packet will result in bad audio
-				// limit waiting time to 2 seconds (will always work for smallest buffer in Shared)
-				if (sleep > 2)
-					sleep = 2;
-
-				// Avoid busy waiting, schedule next 1 millesecond wait
-				if (sleep == 0)
-					sleep = ThreadIdleScheduler_NextSleep(&sched);
-			}
-			else
-			{
-				if ((sleep = ThreadIdleScheduler_NextSleep(&sched)) != 0)
-				{
-					Sleep(sleep);
-					sleep = 0;
-				}
-			}
-
-			continue;
-		}
-
-		// Get the available data in the shared buffer.
-		if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &wasapi_buffer, &available, &flags, NULL, NULL)) != S_OK)
-		{
-			// Buffer size is too small, waiting
-			if (hr != AUDCLNT_S_BUFFER_EMPTY)
-			{
-				LogHostError(hr);
-				goto end;
-			}
-
-			continue;
-		}
-
-		// Register available frames to processor
-        PaUtil_SetInputFrameCount(&stream->bufferProcessor, available);
-
-		// Register host buffer pointer to processor
-        PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.inputChannelCount);
-
-		// Copy user data to host buffer (with conversion if applicable)
-		processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, frames);
-		frames -= processed;
-
-		// Save tail into buffer
-		if ((frames == 0) && (available > processed))
-		{
-			UINT32 bytes_processed = processed * stream->in.wavex.Format.nBlockAlign;
-			UINT32 frames_to_save  = available - processed;
-
-			PaUtil_WriteRingBuffer(stream->in.tailBuffer, wasapi_buffer + bytes_processed, frames_to_save);
-		}
-
-		// Release host buffer
-		if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, available)) != S_OK)
-		{
-			LogHostError(hr);
-			goto end;
-		}
-	}
-
-end:
-
-	// Notify blocking op has ended
-	SetEvent(stream->hBlockingOpStreamRD);
-
-	return (hr != S_OK ? paUnanticipatedHostError : paNoError);
-}
-
-// ------------------------------------------------------------------------------------------
-static PaError WriteStream( PaStream* s, const void *_buffer, unsigned long frames )
-{
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-
-	//UINT32 frames;
-	const BYTE *user_buffer = (const BYTE *)_buffer;
-	BYTE *wasapi_buffer;
-	HRESULT hr = S_OK;
-	UINT32 i, available, sleep = 0;
-	unsigned long processed;
-	ThreadIdleScheduler sched;
-
-	// validate
-	if (!stream->running)
-		return paStreamIsStopped;
-	if (stream->renderClient == NULL)
-		return paBadStreamPtr;
-
-	// Notify blocking op has begun
-	ResetEvent(stream->hBlockingOpStreamWR);
-
-	// Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than
-	// 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting
-	ThreadIdleScheduler_Setup(&sched, 1, 500/* microseconds */);
-
-    // Make a local copy of the user buffer pointer(s), this is necessary
-	// because PaUtil_CopyOutput() advances these pointers every time it is called
-    if (!stream->bufferProcessor.userOutputIsInterleaved)
-    {
-        user_buffer = (const BYTE *)alloca(sizeof(const BYTE *) * stream->bufferProcessor.outputChannelCount);
-        if (user_buffer == NULL)
-            return paInsufficientMemory;
-
-        for (i = 0; i < stream->bufferProcessor.outputChannelCount; ++i)
-            ((const BYTE **)user_buffer)[i] = ((const BYTE **)_buffer)[i];
-    }
-
-	// Blocking (potentially, untill 'frames' are consumed) loop
-	while (frames != 0)
-	{
-		// Check if blocking call must be interrupted
-		if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)
-			break;
-
-		// Get frames available
-		if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)
-		{
-			LogHostError(hr);
-			goto end;
-		}
-
-		// Wait for more frames to become available
-		if (available == 0)
-		{
-			UINT32 sleep_frames = (frames < stream->out.framesPerHostCallback ? frames : stream->out.framesPerHostCallback);
-
-			sleep  = GetFramesSleepTime(sleep_frames, stream->out.wavex.Format.nSamplesPerSec);
-			sleep /= 2; // wait only for half of the buffer
-
-			// Avoid busy waiting, schedule next 1 millesecond wait
-			if (sleep == 0)
-				sleep = ThreadIdleScheduler_NextSleep(&sched);
-
-			continue;
-		}
-
-		// Keep in 'frmaes' range
-		if (available > frames)
-			available = frames;
-
-		// Get pointer to host buffer
-		if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, available, &wasapi_buffer)) != S_OK)
-		{
-			// Buffer size is too big, waiting
-			if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)
-				continue;
-
-			LogHostError(hr);
-			goto end;
-		}
-
-		// Keep waiting again (on Vista it was noticed that WASAPI could SOMETIMES return NULL pointer 
-		// to buffer without returning AUDCLNT_E_BUFFER_TOO_LARGE instead)
-		if (wasapi_buffer == NULL)
-			continue;
-
-		// Register available frames to processor
-        PaUtil_SetOutputFrameCount(&stream->bufferProcessor, available);
-
-		// Register host buffer pointer to processor
-        PaUtil_SetInterleavedOutputChannels(&stream->bufferProcessor, 0, wasapi_buffer,	stream->bufferProcessor.outputChannelCount);
-
-		// Copy user data to host buffer (with conversion if applicable), this call will advance
-		// pointer 'user_buffer' to consumed portion of data
-		processed = PaUtil_CopyOutput(&stream->bufferProcessor, (const void **)&user_buffer, frames);
-		frames -= processed;
-
-		// Release host buffer
-		if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, available, 0)) != S_OK)
-		{
-			LogHostError(hr);
-			goto end;
-		}
-	}
-
-end:
-
-	// Notify blocking op has ended
-	SetEvent(stream->hBlockingOpStreamWR);
-
-	return (hr != S_OK ? paUnanticipatedHostError : paNoError);
-}
-
-unsigned long PaUtil_GetOutputFrameCount( PaUtilBufferProcessor* bp )
-{
-	return bp->hostOutputFrameCount[0];
-}
-
-// ------------------------------------------------------------------------------------------
-static signed long GetStreamReadAvailable( PaStream* s )
-{
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-
-	HRESULT hr;
-	UINT32  available = 0;
-
-	// validate
-	if (!stream->running)
-		return paStreamIsStopped;
-	if (stream->captureClient == NULL)
-		return paBadStreamPtr;
-
-	// available in hardware buffer
-	if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)
-	{
-		LogHostError(hr);
-		return paUnanticipatedHostError;
-	}
-
-	// available in software tail buffer
-	available += PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer);
-
-    return available;
-}
-
-// ------------------------------------------------------------------------------------------
-static signed long GetStreamWriteAvailable( PaStream* s )
-{
-    PaWasapiStream *stream = (PaWasapiStream*)s;
-	HRESULT hr;
-	UINT32  available = 0;
-
-	// validate
-	if (!stream->running)
-		return paStreamIsStopped;
-	if (stream->renderClient == NULL)
-		return paBadStreamPtr;
-
-	if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)
-	{
-		LogHostError(hr);
-		return paUnanticipatedHostError;
-	}
-
-	return (signed long)available;
-}
-
-
-// ------------------------------------------------------------------------------------------
-static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
-                                     void *outputBuffer, long outputFrames,
-                                     void *userData )
-{
-    PaWasapiStream *stream = (PaWasapiStream*)userData;
-    PaStreamCallbackTimeInfo timeInfo = {0,0,0};
-	PaStreamCallbackFlags flags = 0;
-    int callbackResult;
-    unsigned long framesProcessed;
-	HRESULT hr;
-	UINT32 pending;
-
-    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
-
-    /*
-		Pa_GetStreamTime:
-            - generate timing information
-            - handle buffer slips
-    */
-	timeInfo.currentTime = PaUtil_GetTime();
-	// Query input latency
-	if (stream->in.clientProc != NULL)
-	{
-		PaTime pending_time;
-		if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, &pending)) == S_OK)
-			pending_time = (PaTime)pending / (PaTime)stream->in.wavex.Format.nSamplesPerSec;
-		else
-			pending_time = (PaTime)stream->in.latencySeconds;
-
-		timeInfo.inputBufferAdcTime = timeInfo.currentTime + pending_time;
-	}
-	// Query output current latency
-	if (stream->out.clientProc != NULL)
-	{
-		PaTime pending_time;
-		if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &pending)) == S_OK)
-			pending_time = (PaTime)pending / (PaTime)stream->out.wavex.Format.nSamplesPerSec;
-		else
-			pending_time = (PaTime)stream->out.latencySeconds;
-
-		timeInfo.outputBufferDacTime = timeInfo.currentTime + pending_time;
-	}
-
-    /*
-        If you need to byte swap or shift inputBuffer to convert it into a
-        portaudio format, do it here.
-    */
-
-    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, flags );
-
-    /*
-        depending on whether the host buffers are interleaved, non-interleaved
-        or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),
-        PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.
-    */
-
-    if (stream->bufferProcessor.inputChannelCount > 0)
-    {
-        PaUtil_SetInputFrameCount( &stream->bufferProcessor, inputFrames );
-        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,
-            0, /* first channel of inputBuffer is channel 0 */
-            inputBuffer,
-            0 ); /* 0 - use inputChannelCount passed to init buffer processor */
-    }
-
-    if (stream->bufferProcessor.outputChannelCount > 0)
-    {
-        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, outputFrames);
-        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,
-            0, /* first channel of outputBuffer is channel 0 */
-            outputBuffer,
-            0 ); /* 0 - use outputChannelCount passed to init buffer processor */
-    }
-
-    /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()
-        in general you would pass paContinue for normal operation, and
-        paComplete to drain the buffer processor's internal output buffer.
-        You can check whether the buffer processor's output buffer is empty
-        using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )
-    */
-    callbackResult = paContinue;
-    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
-
-    /*
-        If you need to byte swap or shift outputBuffer to convert it to
-        host format, do it here.
-    */
-
-	PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
-
-    if (callbackResult == paContinue)
-    {
-        /* nothing special to do */
-    }
-    else
-	if (callbackResult == paAbort)
-    {
-		// stop stream
-        SetEvent(stream->hCloseRequest);
-    }
-    else
-    {
-		// stop stream
-        SetEvent(stream->hCloseRequest);
-    }
-}
-
-// ------------------------------------------------------------------------------------------
-HANDLE MMCSS_activate(const char *name)
-{
-    DWORD task_idx = 0;
-    HANDLE hTask = pAvSetMmThreadCharacteristics(name, &task_idx);
-    if (hTask == NULL)
-	{
-        PRINT(("WASAPI: AvSetMmThreadCharacteristics failed!\n"));
-    }
-
-    /*BOOL priority_ok = pAvSetMmThreadPriority(hTask, AVRT_PRIORITY_NORMAL);
-    if (priority_ok == FALSE)
-	{
-        PRINT(("WASAPI: AvSetMmThreadPriority failed!\n"));
-    }*/
-
-	// debug
-    {
-        int    cur_priority		  = GetThreadPriority(GetCurrentThread());
-        DWORD  cur_priority_class = GetPriorityClass(GetCurrentProcess());
-		PRINT(("WASAPI: thread[ priority-0x%X class-0x%X ]\n", cur_priority, cur_priority_class));
-    }
-
-	return hTask;
-}
-
-// ------------------------------------------------------------------------------------------
-void MMCSS_deactivate(HANDLE hTask)
-{
-	if (!hTask)
-		return;
-
-	if (pAvRevertMmThreadCharacteristics(hTask) == FALSE)
-	{
-        PRINT(("WASAPI: AvRevertMmThreadCharacteristics failed!\n"));
-    }
-}
-
-// ------------------------------------------------------------------------------------------
-PaError PaWasapi_ThreadPriorityBoost(void **hTask, PaWasapiThreadPriority nPriorityClass)
-{
-	static const char *mmcs_name[] =
-	{
-		NULL,
-		"Audio",
-		"Capture",
-		"Distribution",
-		"Games",
-		"Playback",
-		"Pro Audio",
-		"Window Manager"
-	};
-	HANDLE task;
-
-	if (hTask == NULL)
-		return paUnanticipatedHostError;
-
-	if ((UINT32)nPriorityClass >= STATIC_ARRAY_SIZE(mmcs_name))
-		return paUnanticipatedHostError;
-
-	task = MMCSS_activate(mmcs_name[nPriorityClass]);
-	if (task == NULL)
-		return paUnanticipatedHostError;
-
-	(*hTask) = task;
-	return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-PaError PaWasapi_ThreadPriorityRevert(void *hTask)
-{
-	if (hTask == NULL)
-		return paUnanticipatedHostError;
-
-	MMCSS_deactivate((HANDLE)hTask);
-
-	return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-// Described at:
-// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx
-
-PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount)
-{
-	PaError ret;
-	HRESULT hr = S_OK;
-	PaDeviceIndex index;
-    IDeviceTopology *pDeviceTopology = NULL;
-    IConnector *pConnFrom = NULL;
-    IConnector *pConnTo = NULL;
-    IPart *pPart = NULL;
-    IKsJackDescription *pJackDesc = NULL;
-	UINT jackCount = 0;
-
-	PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
-	if (paWasapi == NULL)
-		return paNotInitialized;
-
-	// Get device index.
-	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
-    if (ret != paNoError)
-        return ret;
-
-	// Validate index.
-	if ((UINT32)index >= paWasapi->deviceCount)
-		return paInvalidDevice;
-
-	// Get the endpoint device's IDeviceTopology interface.
-	hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,
-		CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);
-	IF_FAILED_JUMP(hr, error);
-
-    // The device topology for an endpoint device always contains just one connector (connector number 0).
-	hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);
-	IF_FAILED_JUMP(hr, error);
-
-    // Step across the connection to the jack on the adapter.
-	hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);
-    if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
-    {
-        // The adapter device is not currently active.
-        hr = E_NOINTERFACE;
-    }
-	IF_FAILED_JUMP(hr, error);
-
-	// Get the connector's IPart interface.
-	hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);
-	IF_FAILED_JUMP(hr, error);
-
-	// Activate the connector's IKsJackDescription interface.
-	hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);
-	IF_FAILED_JUMP(hr, error);
-
-	// Return jack count for this device.
-	hr = IKsJackDescription_GetJackCount(pJackDesc, &jackCount);
-	IF_FAILED_JUMP(hr, error);
-
-	// Set.
-	(*jcount) = jackCount;
-
-	// Ok.
-	ret = paNoError;
-
-error:
-
-	SAFE_RELEASE(pDeviceTopology);
-	SAFE_RELEASE(pConnFrom);
-	SAFE_RELEASE(pConnTo);
-	SAFE_RELEASE(pPart);
-	SAFE_RELEASE(pJackDesc);
-
-	LogHostError(hr);
-	return paNoError;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaWasapiJackConnectionType ConvertJackConnectionTypeWASAPIToPA(int connType)
-{
-	switch (connType)
-	{
-		case eConnTypeUnknown:			return eJackConnTypeUnknown;
-#ifdef _KS_
-		case eConnType3Point5mm:		return eJackConnType3Point5mm;
-#else
-		case eConnTypeEighth:		    return eJackConnType3Point5mm;
-#endif
-		case eConnTypeQuarter:			return eJackConnTypeQuarter;
-		case eConnTypeAtapiInternal:	return eJackConnTypeAtapiInternal;
-		case eConnTypeRCA:				return eJackConnTypeRCA;
-		case eConnTypeOptical:			return eJackConnTypeOptical;
-		case eConnTypeOtherDigital:		return eJackConnTypeOtherDigital;
-		case eConnTypeOtherAnalog:		return eJackConnTypeOtherAnalog;
-		case eConnTypeMultichannelAnalogDIN: return eJackConnTypeMultichannelAnalogDIN;
-		case eConnTypeXlrProfessional:	return eJackConnTypeXlrProfessional;
-		case eConnTypeRJ11Modem:		return eJackConnTypeRJ11Modem;
-		case eConnTypeCombination:		return eJackConnTypeCombination;
-	}
-	return eJackConnTypeUnknown;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaWasapiJackGeoLocation ConvertJackGeoLocationWASAPIToPA(int geoLoc)
-{
-	switch (geoLoc)
-	{
-	case eGeoLocRear:				return eJackGeoLocRear;
-	case eGeoLocFront:				return eJackGeoLocFront;
-	case eGeoLocLeft:				return eJackGeoLocLeft;
-	case eGeoLocRight:				return eJackGeoLocRight;
-	case eGeoLocTop:				return eJackGeoLocTop;
-	case eGeoLocBottom:				return eJackGeoLocBottom;
-#ifdef _KS_
-	case eGeoLocRearPanel:			return eJackGeoLocRearPanel;
-#else
-	case eGeoLocRearOPanel:         return eJackGeoLocRearPanel;
-#endif
-	case eGeoLocRiser:				return eJackGeoLocRiser;
-	case eGeoLocInsideMobileLid:	return eJackGeoLocInsideMobileLid;
-	case eGeoLocDrivebay:			return eJackGeoLocDrivebay;
-	case eGeoLocHDMI:				return eJackGeoLocHDMI;
-	case eGeoLocOutsideMobileLid:	return eJackGeoLocOutsideMobileLid;
-	case eGeoLocATAPI:				return eJackGeoLocATAPI;
-	}
-	return eJackGeoLocUnk;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaWasapiJackGenLocation ConvertJackGenLocationWASAPIToPA(int genLoc)
-{
-	switch (genLoc)
-	{
-	case eGenLocPrimaryBox:	return eJackGenLocPrimaryBox;
-	case eGenLocInternal:	return eJackGenLocInternal;
-#ifdef _KS_
-	case eGenLocSeparate:	return eJackGenLocSeparate;
-#else
-	case eGenLocSeperate:	return eJackGenLocSeparate;
-#endif
-	case eGenLocOther:		return eJackGenLocOther;
-	}
-	return eJackGenLocPrimaryBox;
-}
-
-// ------------------------------------------------------------------------------------------
-static PaWasapiJackPortConnection ConvertJackPortConnectionWASAPIToPA(int portConn)
-{
-	switch (portConn)
-	{
-	case ePortConnJack:					return eJackPortConnJack;
-	case ePortConnIntegratedDevice:		return eJackPortConnIntegratedDevice;
-	case ePortConnBothIntegratedAndJack:return eJackPortConnBothIntegratedAndJack;
-	case ePortConnUnknown:				return eJackPortConnUnknown;
-	}
-	return eJackPortConnJack;
-}
-
-// ------------------------------------------------------------------------------------------
-// Described at:
-// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx
-
-PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription)
-{
-	PaError ret;
-	HRESULT hr = S_OK;
-	PaDeviceIndex index;
-    IDeviceTopology *pDeviceTopology = NULL;
-    IConnector *pConnFrom = NULL;
-    IConnector *pConnTo = NULL;
-    IPart *pPart = NULL;
-    IKsJackDescription *pJackDesc = NULL;
-	KSJACK_DESCRIPTION jack = { 0 };
-
-	PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
-	if (paWasapi == NULL)
-		return paNotInitialized;
-
-	// Get device index.
-	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
-    if (ret != paNoError)
-        return ret;
-
-	// Validate index.
-	if ((UINT32)index >= paWasapi->deviceCount)
-		return paInvalidDevice;
-
-	// Get the endpoint device's IDeviceTopology interface.
-	hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,
-		CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);
-	IF_FAILED_JUMP(hr, error);
-
-    // The device topology for an endpoint device always contains just one connector (connector number 0).
-	hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);
-	IF_FAILED_JUMP(hr, error);
-
-    // Step across the connection to the jack on the adapter.
-	hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);
-    if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
-    {
-        // The adapter device is not currently active.
-        hr = E_NOINTERFACE;
-    }
-	IF_FAILED_JUMP(hr, error);
-
-	// Get the connector's IPart interface.
-	hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);
-	IF_FAILED_JUMP(hr, error);
-
-	// Activate the connector's IKsJackDescription interface.
-	hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);
-	IF_FAILED_JUMP(hr, error);
-
-	// Test to return jack description struct for index 0.
-	hr = IKsJackDescription_GetJackDescription(pJackDesc, jindex, &jack);
-	IF_FAILED_JUMP(hr, error);
-
-	// Convert WASAPI values to PA format.
-	pJackDescription->channelMapping = jack.ChannelMapping;
-	pJackDescription->color          = jack.Color;
-	pJackDescription->connectionType = ConvertJackConnectionTypeWASAPIToPA(jack.ConnectionType);
-	pJackDescription->genLocation    = ConvertJackGenLocationWASAPIToPA(jack.GenLocation);
-	pJackDescription->geoLocation    = ConvertJackGeoLocationWASAPIToPA(jack.GeoLocation);
-	pJackDescription->isConnected    = jack.IsConnected;
-	pJackDescription->portConnection = ConvertJackPortConnectionWASAPIToPA(jack.PortConnection);
-
-	// Ok.
-	ret = paNoError;
-
-error:
-
-	SAFE_RELEASE(pDeviceTopology);
-	SAFE_RELEASE(pConnFrom);
-	SAFE_RELEASE(pConnTo);
-	SAFE_RELEASE(pPart);
-	SAFE_RELEASE(pJackDesc);
-
-	LogHostError(hr);
-	return ret;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available)
-{
-	HRESULT hr;
-	UINT32 frames  = stream->out.framesPerHostCallback,
-		   padding = 0;
-
-	(*available) = 0;
-
-	// get read position
-	if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding)) != S_OK)
-		return LogHostError(hr);
-
-	// get available
-	frames -= padding;
-
-	// set
-	(*available) = frames;
-	return hr;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available)
-{
-	HRESULT hr;
-
-	(*available) = 0;
-
-	// GetCurrentPadding() has opposite meaning to Output stream 
-	if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, available)) != S_OK)
-		return LogHostError(hr);
-
-	return hr;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT ProcessOutputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor, UINT32 frames)
-{
-	HRESULT hr;
-	BYTE *data = NULL;
-
-	// Get buffer
-	if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)
-	{
-		if (stream->out.shareMode == AUDCLNT_SHAREMODE_SHARED)
-		{
-			// Using GetCurrentPadding to overcome AUDCLNT_E_BUFFER_TOO_LARGE in
-			// shared mode results in no sound in Event-driven mode (MSDN does not
-			// document this, or is it WASAPI bug?), thus we better
-			// try to acquire buffer next time when GetBuffer allows to do so.
-#if 0
-			// Get Read position
-			UINT32 padding = 0;
-			hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding);
-			if (hr != S_OK)
-				return LogHostError(hr);
-
-			// Get frames to write
-			frames -= padding;
-			if (frames == 0)
-				return S_OK;
-
-			if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)
-				return LogHostError(hr);
-#else
-			if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)
-				return S_OK; // be silent in shared mode, try again next time
-#endif
-		}
-		else
-			return LogHostError(hr);
-	}
-
-	// Process data
-	if (stream->out.monoMixer != NULL)
-	{
-		// expand buffer
-		UINT32 mono_frames_size = frames * (stream->out.wavex.Format.wBitsPerSample / 8);
-		if (mono_frames_size > stream->out.monoBufferSize)
-			stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
-
-		// process
-		processor[S_OUTPUT].processor(NULL, 0, (BYTE *)stream->out.monoBuffer, frames, processor[S_OUTPUT].userData);
-
-		// mix 1 to 2 channels
-		stream->out.monoMixer(data, stream->out.monoBuffer, frames);
-	}
-	else
-	{
-		processor[S_OUTPUT].processor(NULL, 0, data, frames, processor[S_OUTPUT].userData);
-	}
-
-	// Release buffer
-	if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, frames, 0)) != S_OK)
-		LogHostError(hr);
-
-	return hr;
-}
-
-// ------------------------------------------------------------------------------------------
-HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor)
-{
-	HRESULT hr = S_OK;
-	UINT32 frames;
-	BYTE *data = NULL;
-	DWORD flags = 0;
-
-	for (;;)
-	{
-		// Check if blocking call must be interrupted
-		if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
-			break;
-
-		// Findout if any frames available
-		frames = 0;
-		if ((hr = _PollGetInputFramesAvailable(stream, &frames)) != S_OK)
-			return hr;
-
-		// Empty/consumed buffer
-		if (frames == 0)
-			break;
-
-		// Get the available data in the shared buffer.
-		if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &data, &frames, &flags, NULL, NULL)) != S_OK)
-		{
-			if (hr == AUDCLNT_S_BUFFER_EMPTY)
-			{
-				hr = S_OK;
-				break; // Empty/consumed buffer
-			}
-
-			return LogHostError(hr);
-			break;
-		}
-
-		// Detect silence
-		// if (flags & AUDCLNT_BUFFERFLAGS_SILENT)
-		//	data = NULL;
-
-		// Process data
-		if (stream->in.monoMixer != NULL)
-		{
-			// expand buffer
-			UINT32 mono_frames_size = frames * (stream->in.wavex.Format.wBitsPerSample / 8);
-			if (mono_frames_size > stream->in.monoBufferSize)
-				stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
-
-			// mix 1 to 2 channels
-			stream->in.monoMixer(stream->in.monoBuffer, data, frames);
-
-			// process
-			processor[S_INPUT].processor((BYTE *)stream->in.monoBuffer, frames, NULL, 0, processor[S_INPUT].userData);
-		}
-		else
-		{
-			processor[S_INPUT].processor(data, frames, NULL, 0, processor[S_INPUT].userData);
-		}
-
-		// Release buffer
-		if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, frames)) != S_OK)
-			return LogHostError(hr);
-
-		//break;
-	}
-
-	return hr;
-}
-
-// ------------------------------------------------------------------------------------------
-void _StreamOnStop(PaWasapiStream *stream)
-{
-	// Stop INPUT/OUTPUT clients
-	if (!stream->bBlocking) 
-	{
-		if (stream->in.clientProc != NULL)
-			IAudioClient_Stop(stream->in.clientProc);
-		if (stream->out.clientProc != NULL)
-			IAudioClient_Stop(stream->out.clientProc);
-	} 
-	else 
-	{
-		if (stream->in.clientParent != NULL)
-			IAudioClient_Stop(stream->in.clientParent);
-		if (stream->out.clientParent != NULL)
-			IAudioClient_Stop(stream->out.clientParent);
-	}
-
-	// Restore thread priority
-	if (stream->hAvTask != NULL)
-	{
-		PaWasapi_ThreadPriorityRevert(stream->hAvTask);
-		stream->hAvTask = NULL;
-	}
-
-    // Notify
-    if (stream->streamRepresentation.streamFinishedCallback != NULL)
-        stream->streamRepresentation.streamFinishedCallback(stream->streamRepresentation.userData);
-}
-
-// ------------------------------------------------------------------------------------------
-PA_THREAD_FUNC ProcThreadEvent(void *param)
-{
-    PaWasapiHostProcessor processor[S_COUNT];
-	HRESULT hr;
-	DWORD dwResult;
-    PaWasapiStream *stream = (PaWasapiStream *)param;
-	PaWasapiHostProcessor defaultProcessor;
-	BOOL set_event[S_COUNT] = { FALSE, FALSE };
-	BOOL bWaitAllEvents = FALSE;
-	BOOL bThreadComInitialized = FALSE;
-
-	/*
-	If COM is already initialized CoInitialize will either return
-	FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different
-	threading mode. In either case we shouldn't consider it an error
-	but we need to be careful to not call CoUninitialize() if 
-	RPC_E_CHANGED_MODE was returned.
-	*/
-	hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
-	if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))
-	{
-		PRINT(("WASAPI: failed ProcThreadEvent CoInitialize"));
-		return paUnanticipatedHostError;
-	}
-	if (hr != RPC_E_CHANGED_MODE)
-		bThreadComInitialized = TRUE;
-
-	// Unmarshal stream pointers for safe COM operation
-	hr = UnmarshalStreamComPointers(stream);
-	if (hr != S_OK) {
-		PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));
-		goto thread_end;
-	}
-
-	// Waiting on all events in case of Full-Duplex/Exclusive mode.
-	if ((stream->in.clientProc != NULL) && (stream->out.clientProc != NULL))
-	{
-		bWaitAllEvents = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) &&
-			(stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE);
-	}
-
-    // Setup data processors
-    defaultProcessor.processor = WaspiHostProcessingLoop;
-    defaultProcessor.userData  = stream;
-    processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);
-    processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);
-
-	// Boost thread priority
-	PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
-
-	// Create events
-	if (stream->event[S_OUTPUT] == NULL)
-	{
-		stream->event[S_OUTPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);
-		set_event[S_OUTPUT] = TRUE;
-	}
-	if (stream->event[S_INPUT] == NULL)
-	{
-		stream->event[S_INPUT]  = CreateEvent(NULL, FALSE, FALSE, NULL);
-		set_event[S_INPUT] = TRUE;
-	}
-	if ((stream->event[S_OUTPUT] == NULL) || (stream->event[S_INPUT] == NULL))
-	{
-		PRINT(("WASAPI Thread: failed creating Input/Output event handle\n"));
-		goto thread_error;
-	}
-
-	// Initialize event & start INPUT stream
-	if (stream->in.clientProc)
-	{
-		// Create & set handle
-		if (set_event[S_INPUT])
-		{
-			if ((hr = IAudioClient_SetEventHandle(stream->in.clientProc, stream->event[S_INPUT])) != S_OK)
-			{
-				LogHostError(hr);
-				goto thread_error;
-			}
-		}
-
-		// Start
-		if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)
-		{
-			LogHostError(hr);
-			goto thread_error;
-		}
-	}
-
-	// Initialize event & start OUTPUT stream
-	if (stream->out.clientProc)
-	{
-		// Create & set handle
-		if (set_event[S_OUTPUT])
-		{
-			if ((hr = IAudioClient_SetEventHandle(stream->out.clientProc, stream->event[S_OUTPUT])) != S_OK)
-			{
-				LogHostError(hr);
-				goto thread_error;
-			}
-		}
-
-		// Preload buffer before start
-		if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
-		{
-			LogHostError(hr);
-			goto thread_error;
-		}
-
-		// Start
-		if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)
-		{
-			LogHostError(hr);
-			goto thread_error;
-		}
-
-	}
-
-	// Signal: stream running
-	stream->running = TRUE;
-
-	// Notify: thread started
-	SetEvent(stream->hThreadStart);
-
-	// Processing Loop
-	for (;;)
-    {
-	    // 10 sec timeout (on timeout stream will auto-stop when processed by WAIT_TIMEOUT case)
-        dwResult = WaitForMultipleObjects(S_COUNT, stream->event, bWaitAllEvents, 10*1000);
-
-		// Check for close event (after wait for buffers to avoid any calls to user
-		// callback when hCloseRequest was set)
-		if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
-			break;
-
-		// Process S_INPUT/S_OUTPUT
-		switch (dwResult)
-		{
-		case WAIT_TIMEOUT: {
-			PRINT(("WASAPI Thread: WAIT_TIMEOUT - probably bad audio driver or Vista x64 bug: use paWinWasapiPolling instead\n"));
-			goto thread_end;
-			break; }
-
-		// Input stream
-		case WAIT_OBJECT_0 + S_INPUT: {
-
-            if (stream->captureClient == NULL)
-                break;
-
-			if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
-			{
-				LogHostError(hr);
-				goto thread_error;
-			}
-
-			break; }
-
-		// Output stream
-		case WAIT_OBJECT_0 + S_OUTPUT: {
-
-            if (stream->renderClient == NULL)
-                break;
-
-			if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
-			{
-				LogHostError(hr);
-				goto thread_error;
-			}
-
-			break; }
-		}
-	}
-
-thread_end:
-
-	// Process stop
-	_StreamOnStop(stream);
-
-	// Release unmarshaled COM pointers
-	ReleaseUnmarshaledComPointers(stream);
-
-	// Cleanup COM for this thread
-	if (bThreadComInitialized == TRUE)
-		CoUninitialize();
-
-	// Notify: not running
-	stream->running = FALSE;
-
-	// Notify: thread exited
-	SetEvent(stream->hThreadExit);
-
-	return 0;
-
-thread_error:
-
-	// Prevent deadlocking in Pa_StreamStart
-	SetEvent(stream->hThreadStart);
-
-	// Exit
-	goto thread_end;
-}
-
-// ------------------------------------------------------------------------------------------
-PA_THREAD_FUNC ProcThreadPoll(void *param)
-{
-    PaWasapiHostProcessor processor[S_COUNT];
-	HRESULT hr;
-    PaWasapiStream *stream = (PaWasapiStream *)param;
-	PaWasapiHostProcessor defaultProcessor;
-	INT32 i;
-	ThreadIdleScheduler scheduler;
-
-	// Calculate the actual duration of the allocated buffer.
-	DWORD sleep_ms     = 0;
-	DWORD sleep_ms_in;
-	DWORD sleep_ms_out;
-
-	BOOL bThreadComInitialized = FALSE;
-
-	/*
-	If COM is already initialized CoInitialize will either return
-	FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different
-	threading mode. In either case we shouldn't consider it an error
-	but we need to be careful to not call CoUninitialize() if 
-	RPC_E_CHANGED_MODE was returned.
-	*/
-	hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
-	if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))
-	{
-		PRINT(("WASAPI: failed ProcThreadPoll CoInitialize"));
-		return paUnanticipatedHostError;
-	}
-	if (hr != RPC_E_CHANGED_MODE)
-		bThreadComInitialized = TRUE;
-
-	// Unmarshal stream pointers for safe COM operation
-	hr = UnmarshalStreamComPointers(stream);
-	if (hr != S_OK) 
-	{
-		PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));
-		return 0;
-	}
-
-	// Calculate timeout for next polling attempt.
-	sleep_ms_in  = GetFramesSleepTime(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);
-	sleep_ms_out = GetFramesSleepTime(stream->out.framesPerBuffer, stream->out.wavex.Format.nSamplesPerSec);
-
-	// WASAPI Input packets tend to expire very easily, let's limit sleep time to 2 milliseconds
-	// for all cases. Please propose better solution if any.
-	if (sleep_ms_in > 2)
-		sleep_ms_in = 2;
-
-	// Adjust polling time for non-paUtilFixedHostBufferSize. Input stream is not adjustable as it is being
-	// polled according its packet length.
-	if (stream->bufferMode != paUtilFixedHostBufferSize)
-	{
-		//sleep_ms_in = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->in.wavex.Format.nSamplesPerSec);
-		sleep_ms_out = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);
-	}
-
-	// Choose smallest
-	if ((sleep_ms_in != 0) && (sleep_ms_out != 0))
-		sleep_ms = min(sleep_ms_in, sleep_ms_out);
-	else
-	{
-		sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);
-	}
-	// Make sure not 0, othervise use ThreadIdleScheduler
-	if (sleep_ms == 0)
-	{
-		sleep_ms_in  = GetFramesSleepTimeMicroseconds(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);
-		sleep_ms_out = GetFramesSleepTimeMicroseconds(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);
-
-		// Choose smallest
-		if ((sleep_ms_in != 0) && (sleep_ms_out != 0))
-			sleep_ms = min(sleep_ms_in, sleep_ms_out);
-		else
-		{
-			sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);
-		}
-
-		// Setup thread sleep scheduler
-		ThreadIdleScheduler_Setup(&scheduler, 1, sleep_ms/* microseconds here */);
-		sleep_ms = 0;
-	}
-
-    // Setup data processors
-    defaultProcessor.processor = WaspiHostProcessingLoop;
-    defaultProcessor.userData  = stream;
-    processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);
-    processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);
-
-	// Boost thread priority
-	PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
-
-	// Initialize event & start INPUT stream
-	if (stream->in.clientProc)
-	{
-		if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)
-		{
-			LogHostError(hr);
-			goto thread_error;
-		}
-	}
-
-	// Initialize event & start OUTPUT stream
-	if (stream->out.clientProc)
-	{
-		// Preload buffer (obligatory, othervise ->Start() will fail), avoid processing
-		// when in full-duplex mode as it requires input processing as well
-		if (!PA_WASAPI__IS_FULLDUPLEX(stream))
-		{
-			UINT32 frames = 0;
-			if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) == S_OK)
-            {
-				if (stream->bufferMode == paUtilFixedHostBufferSize)
-				{
-					if (frames >= stream->out.framesPerBuffer)
-					{
-						frames = stream->out.framesPerBuffer;
-
-						if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
-						{
-							LogHostError(hr); // not fatal, just log
-						}
-					}
-				}
-				else
-				{
-					if (frames != 0)
-					{
-						if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
-						{
-							LogHostError(hr); // not fatal, just log
-						}
-					}
-				}
-            }
-            else
-			{
-				LogHostError(hr); // not fatal, just log
-			}
-		}
-
-		// Start
-		if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)
-		{
-			LogHostError(hr);
-			goto thread_error;
-		}
-	}
-
-	// Signal: stream running
-	stream->running = TRUE;
-
-	// Notify: thread started
-	SetEvent(stream->hThreadStart);
-
-	if (!PA_WASAPI__IS_FULLDUPLEX(stream))
-	{
-		// Processing Loop
-		UINT32 next_sleep = sleep_ms;
-		while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)
-		{
-			// Get next sleep time
-			if (sleep_ms == 0)
-			{
-				next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);
-			}
-
-			for (i = 0; i < S_COUNT; ++i)
-			{
-				// Process S_INPUT/S_OUTPUT
-				switch (i)
-				{
-				// Input stream
-				case S_INPUT: {
-
-					if (stream->captureClient == NULL)
-						break;
-
-					if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
-					{
-						LogHostError(hr);
-						goto thread_error;
-					}
-
-					break; }
-
-				// Output stream
-				case S_OUTPUT: {
-
-					UINT32 frames;
-					if (stream->renderClient == NULL)
-						break;
-
-					// get available frames
-					if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) != S_OK)
-					{
-						LogHostError(hr);
-						goto thread_error;
-					}
-
-					// output
-					if (stream->bufferMode == paUtilFixedHostBufferSize)
-					{
-						while (frames >= stream->out.framesPerBuffer)
-						{
-							if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
-							{
-								LogHostError(hr);
-								goto thread_error;
-							}
-
-							frames -= stream->out.framesPerBuffer;
-						}
-					}
-					else
-					{
-						if (frames != 0)
-						{
-							if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
-							{
-								LogHostError(hr);
-								goto thread_error;
-							}
-						}
-					}
-
-					break; }
-				}
-			}
-		}
-	}
-	else
-	{
-#if 0
-		// Processing Loop
-		while (WaitForSingleObject(stream->hCloseRequest, 1) == WAIT_TIMEOUT)
-		{
-			UINT32 i_frames = 0, i_processed = 0;
-			BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;
-			DWORD i_flags = 0;
-			UINT32 o_frames = 0;
-
-			// get host input buffer
-			if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)
-			{
-				if (hr == AUDCLNT_S_BUFFER_EMPTY)
-					continue; // no data in capture buffer
-
-				LogHostError(hr);
-				break;
-			}
-
-			// get available frames
-			if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)
-			{
-				// release input buffer
-				IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
-
-				LogHostError(hr);
-				break;
-			}
-
-			// process equal ammount of frames
-			if (o_frames >= i_frames)
-			{
-				// process input ammount of frames
-				UINT32 o_processed = i_frames;
-
-				// get host output buffer
-				if ((hr = IAudioRenderClient_GetBuffer(stream->procRCClient, o_processed, &o_data)) == S_OK)
-				{
-					// processed amount of i_frames
-					i_processed = i_frames;
-					o_data_host = o_data;
-
-					// convert output mono
-					if (stream->out.monoMixer)
-					{
-						UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);
-						// expand buffer
-						if (mono_frames_size > stream->out.monoBufferSize)
-						{
-							stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
-							if (stream->out.monoBuffer == NULL)
-							{
-								// release input buffer
-								IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
-								// release output buffer
-								IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
-
-								LogPaError(paInsufficientMemory);
-								break;
-							}
-						}
-
-						// replace buffer pointer
-						o_data = (BYTE *)stream->out.monoBuffer;
-					}
-
-					// convert input mono
-					if (stream->in.monoMixer)
-					{
-						UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);
-						// expand buffer
-						if (mono_frames_size > stream->in.monoBufferSize)
-						{
-							stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
-							if (stream->in.monoBuffer == NULL)
-							{
-								// release input buffer
-								IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
-								// release output buffer
-								IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
-
-								LogPaError(paInsufficientMemory);
-								break;
-							}
-						}
-
-						// mix 2 to 1 input channels
-						stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);
-
-						// replace buffer pointer
-						i_data = (BYTE *)stream->in.monoBuffer;
-					}
-
-					// process
-					processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);
-
-					// mix 1 to 2 output channels
-					if (stream->out.monoBuffer)
-						stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);
-
-					// release host output buffer
-					if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)
-						LogHostError(hr);
-				}
-				else
-				{
-					if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)
-						LogHostError(hr); // be silent in shared mode, try again next time
-				}
-			}
-
-			// release host input buffer
-			if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)
-			{
-				LogHostError(hr);
-				break;
-			}
-		}
-#else
-		// Processing Loop
-		UINT32 next_sleep = sleep_ms;
-		while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)
-		{
-			UINT32 i_frames = 0, i_processed = 0;
-			BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;
-			DWORD i_flags = 0;
-			UINT32 o_frames = 0;
-
-			// Get next sleep time
-			if (sleep_ms == 0)
-			{
-				next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);
-			}
-
-			// get available frames
-			if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)
-			{
-				LogHostError(hr);
-				break;
-			}
-
-			while (o_frames != 0)
-			{
-				// get host input buffer
-				if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)
-				{
-					if (hr == AUDCLNT_S_BUFFER_EMPTY)
-						break; // no data in capture buffer
-
-					LogHostError(hr);
-					break;
-				}
-
-				// process equal ammount of frames
-				if (o_frames >= i_frames)
-				{
-					// process input ammount of frames
-					UINT32 o_processed = i_frames;
-
-					// get host output buffer
-					if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, o_processed, &o_data)) == S_OK)
-					{
-						// processed amount of i_frames
-						i_processed = i_frames;
-						o_data_host = o_data;
-
-						// convert output mono
-						if (stream->out.monoMixer)
-						{
-							UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);
-							// expand buffer
-							if (mono_frames_size > stream->out.monoBufferSize)
-							{
-								stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
-								if (stream->out.monoBuffer == NULL)
-								{
-									// release input buffer
-									IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
-									// release output buffer
-									IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
-
-									LogPaError(paInsufficientMemory);
-									goto thread_error;
-								}
-							}
-
-							// replace buffer pointer
-							o_data = (BYTE *)stream->out.monoBuffer;
-						}
-
-						// convert input mono
-						if (stream->in.monoMixer)
-						{
-							UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);
-							// expand buffer
-							if (mono_frames_size > stream->in.monoBufferSize)
-							{
-								stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
-								if (stream->in.monoBuffer == NULL)
-								{
-									// release input buffer
-									IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
-									// release output buffer
-									IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
-
-									LogPaError(paInsufficientMemory);
-									goto thread_error;
-								}
-							}
-
-							// mix 2 to 1 input channels
-							stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);
-
-							// replace buffer pointer
-							i_data = (BYTE *)stream->in.monoBuffer;
-						}
-
-						// process
-						processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);
-
-						// mix 1 to 2 output channels
-						if (stream->out.monoBuffer)
-							stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);
-
-						// release host output buffer
-						if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)
-							LogHostError(hr);
-
-						o_frames -= o_processed;
-					}
-					else
-					{
-						if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)
-							LogHostError(hr); // be silent in shared mode, try again next time
-					}
-				}
-				else
-				{
-					i_processed = 0;
-					goto fd_release_buffer_in;
-				}
-
-fd_release_buffer_in:
-
-				// release host input buffer
-				if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)
-				{
-					LogHostError(hr);
-					break;
-				}
-
-				// break processing, input hasn't been accumulated yet
-				if (i_processed == 0)
-					break;
-			}
-		}
-#endif
-	}
-
-thread_end:
-
-	// Process stop
-	_StreamOnStop(stream);
-
-	// Release unmarshaled COM pointers
-	ReleaseUnmarshaledComPointers(stream);
-
-	// Cleanup COM for this thread
-	if (bThreadComInitialized == TRUE)
-		CoUninitialize();
-
-	// Notify: not running
-	stream->running = FALSE;
-
-	// Notify: thread exited
-	SetEvent(stream->hThreadExit);
-
-	return 0;
-
-thread_error:
-
-	// Prevent deadlocking in Pa_StreamStart
-	SetEvent(stream->hThreadStart);
-
-	// Exit
-	goto thread_end;
-}
-
-// ------------------------------------------------------------------------------------------
-void *PaWasapi_ReallocateMemory(void *ptr, size_t size)
-{
-	return realloc(ptr, size);
-}
-
-// ------------------------------------------------------------------------------------------
-void PaWasapi_FreeMemory(void *ptr)
-{
-	free(ptr);
-}
-
-//#endif //VC 2005
-
-
-
-
-#if 0
-			if(bFirst) {
-				float masteur;
-				hr = stream->outVol->GetMasterVolumeLevelScalar(&masteur);
-				if (hr != S_OK)
-					LogHostError(hr);
-				float chan1, chan2;
-				hr = stream->outVol->GetChannelVolumeLevelScalar(0, &chan1);
-				if (hr != S_OK)
-					LogHostError(hr);
-				hr = stream->outVol->GetChannelVolumeLevelScalar(1, &chan2);
-				if (hr != S_OK)
-					LogHostError(hr);
-
-				BOOL bMute;
-				hr = stream->outVol->GetMute(&bMute);
-				if (hr != S_OK)
-					LogHostError(hr);
-
-				stream->outVol->SetMasterVolumeLevelScalar(0.5, NULL);
-				stream->outVol->SetChannelVolumeLevelScalar(0, 0.5, NULL);
-				stream->outVol->SetChannelVolumeLevelScalar(1, 0.5, NULL);
-				stream->outVol->SetMute(FALSE, NULL);
-				bFirst = FALSE;
-			}
-#endif
+/*
+ * Portable Audio I/O Library WASAPI implementation
+ * Copyright (c) 2006-2010 David Viens, Dmitry Kostjuchenko
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup hostapi_src
+ @brief WASAPI implementation of support for a host API.
+ @note pa_wasapi currently requires minimum VC 2005, and the latest Vista SDK
+*/
+
+#include <windows.h>
+#include <stdio.h>
+#include <process.h>
+#include <assert.h>
+
+// WinRT
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+	#define PA_WINRT
+	#define INITGUID
+#endif
+
+// WASAPI
+#include <mmreg.h>  // must be before other Wasapi headers
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+	#include <Avrt.h>
+	#define COBJMACROS
+	#include <Audioclient.h>
+	#include <endpointvolume.h>
+	#define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
+	#include <mmdeviceapi.h>
+	#include <functiondiscoverykeys.h>
+    #include <devicetopology.h>	// Used to get IKsJackDescription interface
+	#undef INITGUID
+#endif
+#ifndef __MWERKS__
+	#include <malloc.h>
+	#include <memory.h>
+#endif
+
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+#include "pa_win_wasapi.h"
+#include "pa_debugprint.h"
+#include "pa_ringbuffer.h"
+#include "pa_win_coinitialize.h"
+
+#if !defined(NTDDI_VERSION)
+
+    #undef WINVER
+    #undef _WIN32_WINNT
+    #define WINVER       0x0600 // VISTA
+	#define _WIN32_WINNT WINVER
+
+	// #ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY
+        typedef enum _AVRT_PRIORITY
+        {
+            AVRT_PRIORITY_LOW = -1,
+            AVRT_PRIORITY_NORMAL,
+            AVRT_PRIORITY_HIGH,
+            AVRT_PRIORITY_CRITICAL
+        } AVRT_PRIORITY, *PAVRT_PRIORITY;
+	// #endif
+
+	#include <basetyps.h> // << for IID/CLSID
+    #include <rpcsal.h>
+    #include <sal.h>
+
+	#ifndef __LPCGUID_DEFINED__
+		#define __LPCGUID_DEFINED__
+		typedef const GUID *LPCGUID;
+	#endif
+
+    #ifndef PROPERTYKEY_DEFINED
+        #define PROPERTYKEY_DEFINED
+        typedef struct _tagpropertykey
+        {
+            GUID fmtid;
+            DWORD pid;
+        } 	PROPERTYKEY;
+    #endif
+
+    #ifdef __midl_proxy
+        #define __MIDL_CONST
+    #else
+        #define __MIDL_CONST const
+    #endif
+
+    #ifdef WIN64
+        #include <wtypes.h>
+        typedef LONG NTSTATUS;
+        #define FASTCALL
+        #include <oleidl.h>
+        #include <objidl.h>
+     #else
+        typedef struct _BYTE_BLOB
+        {
+            unsigned long clSize;
+            unsigned char abData[ 1 ];
+        } 	BYTE_BLOB;
+        typedef /* [unique] */  __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;
+        typedef LONGLONG REFERENCE_TIME;
+        #define NONAMELESSUNION
+    #endif
+
+    #ifndef WAVE_FORMAT_IEEE_FLOAT
+        #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point
+    #endif
+
+    #ifndef __MINGW_EXTENSION
+        #if defined(__GNUC__) || defined(__GNUG__)
+            #define __MINGW_EXTENSION __extension__
+        #else
+            #define __MINGW_EXTENSION
+        #endif
+    #endif
+
+    #include <sdkddkver.h>
+    #include <propkeydef.h>
+    #define COBJMACROS
+    #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
+    #include <audioclient.h>
+    #include <mmdeviceapi.h>
+    #include <endpointvolume.h>
+    #include <functiondiscoverykeys.h>
+	#include <devicetopology.h>	// Used to get IKsJackDescription interface
+    #undef INITGUID
+
+#endif // NTDDI_VERSION
+
+// Missing declarations for WinRT
+#ifdef PA_WINRT
+
+	#define DEVICE_STATE_ACTIVE 0x00000001
+
+	typedef	enum _EDataFlow
+	{
+		eRender					= 0,
+		eCapture				= ( eRender + 1 ) ,
+		eAll					= ( eCapture + 1 ) ,
+		EDataFlow_enum_count	= ( eAll + 1 )
+	}
+	EDataFlow;
+
+	typedef enum _EndpointFormFactor
+	{
+		RemoteNetworkDevice			= 0,
+		Speakers					= ( RemoteNetworkDevice + 1 ) ,
+		LineLevel					= ( Speakers + 1 ) ,
+		Headphones					= ( LineLevel + 1 ) ,
+		Microphone					= ( Headphones + 1 ) ,
+		Headset						= ( Microphone + 1 ) ,
+		Handset						= ( Headset + 1 ) ,
+		UnknownDigitalPassthrough	= ( Handset + 1 ) ,
+		SPDIF						= ( UnknownDigitalPassthrough + 1 ) ,
+		HDMI						= ( SPDIF + 1 ) ,
+		UnknownFormFactor			= ( HDMI + 1 )
+	}
+	EndpointFormFactor;
+
+#endif
+
+#ifndef GUID_SECT
+    #define GUID_SECT
+#endif
+
+#define __DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define __DEFINE_IID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const IID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define __DEFINE_CLSID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const CLSID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define PA_DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+    __DEFINE_CLSID(pa_CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
+#define PA_DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+    __DEFINE_IID(pa_IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
+
+// "1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"
+PA_DEFINE_IID(IAudioClient,         1cb9ad4c, dbfa, 4c32, b1, 78, c2, f5, 68, a7, 03, b2);
+// "726778CD-F60A-4EDA-82DE-E47610CD78AA"
+PA_DEFINE_IID(IAudioClient2,        726778cd, f60a, 4eda, 82, de, e4, 76, 10, cd, 78, aa);
+// "1BE09788-6894-4089-8586-9A2A6C265AC5"
+PA_DEFINE_IID(IMMEndpoint,          1be09788, 6894, 4089, 85, 86, 9a, 2a, 6c, 26, 5a, c5);
+// "A95664D2-9614-4F35-A746-DE8DB63617E6"
+PA_DEFINE_IID(IMMDeviceEnumerator,  a95664d2, 9614, 4f35, a7, 46, de, 8d, b6, 36, 17, e6);
+// "BCDE0395-E52F-467C-8E3D-C4579291692E"
+PA_DEFINE_CLSID(IMMDeviceEnumerator,bcde0395, e52f, 467c, 8e, 3d, c4, 57, 92, 91, 69, 2e);
+// "F294ACFC-3146-4483-A7BF-ADDCA7C260E2"
+PA_DEFINE_IID(IAudioRenderClient,   f294acfc, 3146, 4483, a7, bf, ad, dc, a7, c2, 60, e2);
+// "C8ADBD64-E71E-48a0-A4DE-185C395CD317"
+PA_DEFINE_IID(IAudioCaptureClient,  c8adbd64, e71e, 48a0, a4, de, 18, 5c, 39, 5c, d3, 17);
+// *2A07407E-6497-4A18-9787-32F79BD0D98F*  Or this??
+PA_DEFINE_IID(IDeviceTopology,      2A07407E, 6497, 4A18, 97, 87, 32, f7, 9b, d0, d9, 8f);
+// *AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9*
+PA_DEFINE_IID(IPart,                AE2DE0E4, 5BCA, 4F2D, aa, 46, 5d, 13, f8, fd, b3, a9);
+// *4509F757-2D46-4637-8E62-CE7DB944F57B*
+PA_DEFINE_IID(IKsJackDescription,   4509F757, 2D46, 4637, 8e, 62, ce, 7d, b9, 44, f5, 7b);
+
+// Media formats:
+__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_PCM,        0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
+__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_ADPCM,      0x00000002, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
+__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
+
+#ifdef __IAudioClient2_INTERFACE_DEFINED__
+typedef enum _pa_AUDCLNT_STREAMOPTIONS {
+	pa_AUDCLNT_STREAMOPTIONS_NONE          = 0x00,
+	pa_AUDCLNT_STREAMOPTIONS_RAW           = 0x01,
+	pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT  = 0x02
+} pa_AUDCLNT_STREAMOPTIONS;
+typedef struct _pa_AudioClientProperties {
+	UINT32                   cbSize;
+	BOOL                     bIsOffload;
+	AUDIO_STREAM_CATEGORY    eCategory;
+	pa_AUDCLNT_STREAMOPTIONS Options;
+} pa_AudioClientProperties;
+#define PA_AUDIOCLIENTPROPERTIES_SIZE_CATEGORY (sizeof(pa_AudioClientProperties) - sizeof(pa_AUDCLNT_STREAMOPTIONS))
+#define PA_AUDIOCLIENTPROPERTIES_SIZE_OPTIONS   sizeof(pa_AudioClientProperties)
+#endif // __IAudioClient2_INTERFACE_DEFINED__
+
+/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */
+#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)
+	#define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
+	#define PA_THREAD_FUNC static unsigned WINAPI
+	#define PA_THREAD_ID unsigned
+#else
+	#define CREATE_THREAD(PROC) CreateThread( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
+	#define PA_THREAD_FUNC static DWORD WINAPI
+	#define PA_THREAD_ID DWORD
+#endif
+
+// Thread function forward decl.
+PA_THREAD_FUNC ProcThreadEvent(void *param);
+PA_THREAD_FUNC ProcThreadPoll(void *param);
+
+// Availabe from Windows 7
+#ifndef AUDCLNT_E_BUFFER_ERROR
+	#define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x018)
+#endif
+#ifndef AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED
+	#define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x019)
+#endif
+#ifndef AUDCLNT_E_INVALID_DEVICE_PERIOD
+	#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x020)
+#endif
+
+#define MAX_STR_LEN 512
+
+enum { S_INPUT = 0, S_OUTPUT = 1, S_COUNT = 2, S_FULLDUPLEX = 0 };
+
+// Number of packets which compose single contignous buffer. With trial and error it was calculated
+// that WASAPI Input sub-system uses 6 packets per whole buffer. Please provide more information
+// or corrections if available.
+enum { WASAPI_PACKETS_PER_INPUT_BUFFER = 6 };
+
+#define STATIC_ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))
+
+#define PRINT(x) PA_DEBUG(x);
+
+#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \
+    PaUtil_SetLastHostErrorInfo( paWASAPI, errorCode, errorText )
+
+#define PA_WASAPI__IS_FULLDUPLEX(STREAM) ((STREAM)->in.clientProc && (STREAM)->out.clientProc)
+
+#ifndef IF_FAILED_JUMP
+#define IF_FAILED_JUMP(hr, label) if(FAILED(hr)) goto label;
+#endif
+
+#ifndef IF_FAILED_INTERNAL_ERROR_JUMP
+#define IF_FAILED_INTERNAL_ERROR_JUMP(hr, error, label) if(FAILED(hr)) { error = paInternalError; goto label; }
+#endif
+
+#define SAFE_CLOSE(h) if ((h) != NULL) { CloseHandle((h)); (h) = NULL; }
+#define SAFE_RELEASE(punk) if ((punk) != NULL) { (punk)->lpVtbl->Release((punk)); (punk) = NULL; }
+
+// Mixer function
+typedef void (*MixMonoToStereoF) (void *__to, void *__from, UINT32 count);
+
+// AVRT is the new "multimedia schedulling stuff"
+#ifndef PA_WINRT
+typedef BOOL   (WINAPI *FAvRtCreateThreadOrderingGroup)  (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);
+typedef BOOL   (WINAPI *FAvRtDeleteThreadOrderingGroup)  (HANDLE);
+typedef BOOL   (WINAPI *FAvRtWaitOnThreadOrderingGroup)  (HANDLE);
+typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics)   (LPCSTR,LPDWORD);
+typedef BOOL   (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE);
+typedef BOOL   (WINAPI *FAvSetMmThreadPriority)          (HANDLE,AVRT_PRIORITY);
+static HMODULE hDInputDLL = 0;
+FAvRtCreateThreadOrderingGroup   pAvRtCreateThreadOrderingGroup = NULL;
+FAvRtDeleteThreadOrderingGroup   pAvRtDeleteThreadOrderingGroup = NULL;
+FAvRtWaitOnThreadOrderingGroup   pAvRtWaitOnThreadOrderingGroup = NULL;
+FAvSetMmThreadCharacteristics    pAvSetMmThreadCharacteristics = NULL;
+FAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics = NULL;
+FAvSetMmThreadPriority           pAvSetMmThreadPriority = NULL;
+#endif
+
+#define _GetProc(fun, type, name)  {                                                        \
+                                        fun = (type) GetProcAddress(hDInputDLL,name);       \
+                                        if (fun == NULL) {                                  \
+                                            PRINT(("GetProcAddr failed for %s" ,name));     \
+                                            return FALSE;                                   \
+                                        }                                                   \
+                                    }                                                       \
+
+// ------------------------------------------------------------------------------------------
+/* prototypes for functions declared in this file */
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+// dummy entry point for other compilers and sdks
+// currently built using RC1 SDK (5600)
+//#if _MSC_VER < 1400
+//PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+//{
+    //return paNoError;
+//}
+//#else
+
+// ------------------------------------------------------------------------------------------
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream* stream );
+static signed long GetStreamWriteAvailable( PaStream* stream );
+
+// ------------------------------------------------------------------------------------------
+/*
+ These are fields that can be gathered from IDevice and IAudioDevice PRIOR to Initialize, and
+ done in first pass i assume that neither of these will cause the Driver to "load", but again,
+ who knows how they implement their stuff
+ */
+typedef struct PaWasapiDeviceInfo
+{
+    // Device
+#ifndef PA_WINRT
+    IMMDevice *device;
+#endif
+
+	// from GetId
+    WCHAR szDeviceID[MAX_STR_LEN];
+
+	// from GetState
+    DWORD state;
+
+    // Fields filled from IAudioDevice (_prior_ to Initialize)
+    // from GetDevicePeriod(
+    REFERENCE_TIME DefaultDevicePeriod;
+    REFERENCE_TIME MinimumDevicePeriod;
+
+	// Default format (setup through Control Panel by user)
+	WAVEFORMATEXTENSIBLE DefaultFormat;
+
+    // Fields filled from IMMEndpoint'sGetDataFlow
+    EDataFlow flow;
+
+	// Formfactor
+	EndpointFormFactor formFactor;
+}
+PaWasapiDeviceInfo;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiHostApiRepresentation - host api datastructure specific to this implementation */
+typedef struct
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface       callbackStreamInterface;
+    PaUtilStreamInterface       blockingStreamInterface;
+
+    PaUtilAllocationGroup      *allocations;
+
+    /* implementation specific data goes here */
+
+    PaWinUtilComInitializationResult comInitializationResult;
+
+    //in case we later need the synch
+#ifndef PA_WINRT
+    IMMDeviceEnumerator *enumerator;
+#endif
+
+    //this is the REAL number of devices, whether they are usefull to PA or not!
+    UINT32 deviceCount;
+
+    WCHAR defaultRenderer [MAX_STR_LEN];
+    WCHAR defaultCapturer [MAX_STR_LEN];
+
+    PaWasapiDeviceInfo *devInfo;
+
+	// Is true when WOW64 Vista/7 Workaround is needed
+	BOOL useWOW64Workaround;
+}
+PaWasapiHostApiRepresentation;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiAudioClientParams - audio client parameters */
+typedef struct PaWasapiAudioClientParams
+{
+	PaWasapiDeviceInfo *device_info;
+	PaStreamParameters  stream_params;
+	PaWasapiStreamInfo  wasapi_params;
+	UINT32              frames_per_buffer;
+	double              sample_rate;
+	BOOL                blocking;
+	BOOL                full_duplex;
+	BOOL                wow64_workaround;
+}
+PaWasapiAudioClientParams;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiStream - a stream data structure specifically for this implementation */
+typedef struct PaWasapiSubStream
+{
+    IAudioClient        *clientParent;
+#ifndef PA_WINRT
+	IStream				*clientStream;
+#endif
+	IAudioClient		*clientProc;
+
+    WAVEFORMATEXTENSIBLE wavex;
+    UINT32               bufferSize;
+    REFERENCE_TIME       deviceLatency;
+    REFERENCE_TIME       period;
+	double				 latencySeconds;
+    UINT32				 framesPerHostCallback;
+	AUDCLNT_SHAREMODE    shareMode;
+	UINT32               streamFlags; // AUDCLNT_STREAMFLAGS_EVENTCALLBACK, ...
+	UINT32               flags;
+	PaWasapiAudioClientParams params; //!< parameters
+
+	// Buffers
+	UINT32               buffers;			//!< number of buffers used (from host side)
+	UINT32               framesPerBuffer;	//!< number of frames per 1 buffer
+	BOOL                 userBufferAndHostMatch;
+
+	// Used for Mono >> Stereo workaround, if driver does not support it
+	// (in Exclusive mode WASAPI usually refuses to operate with Mono (1-ch)
+	void                *monoBuffer;	 //!< pointer to buffer
+	UINT32               monoBufferSize; //!< buffer size in bytes
+	MixMonoToStereoF     monoMixer;		 //!< pointer to mixer function
+
+	PaUtilRingBuffer    *tailBuffer;       //!< buffer with trailing sample for blocking mode operations (only for Input)
+	void                *tailBufferMemory; //!< tail buffer memory region
+}
+PaWasapiSubStream;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiHostProcessor - redirects processing data */
+typedef struct PaWasapiHostProcessor
+{
+    PaWasapiHostProcessorCallback processor;
+    void *userData;
+}
+PaWasapiHostProcessor;
+
+// ------------------------------------------------------------------------------------------
+typedef struct PaWasapiStream
+{
+	/* IMPLEMENT ME: rename this */
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer      cpuLoadMeasurer;
+    PaUtilBufferProcessor      bufferProcessor;
+
+    // input
+	PaWasapiSubStream          in;
+    IAudioCaptureClient       *captureClientParent;
+#ifndef PA_WINRT
+	IStream                   *captureClientStream;
+#endif
+	IAudioCaptureClient       *captureClient;
+    IAudioEndpointVolume      *inVol;
+
+	// output
+	PaWasapiSubStream          out;
+    IAudioRenderClient        *renderClientParent;
+#ifndef PA_WINRT
+	IStream                   *renderClientStream;
+#endif
+	IAudioRenderClient        *renderClient;
+	IAudioEndpointVolume      *outVol;
+
+	// event handles for event-driven processing mode
+	HANDLE event[S_COUNT];
+
+	// buffer mode
+	PaUtilHostBufferSizeMode bufferMode;
+
+	// must be volatile to avoid race condition on user query while
+	// thread is being started
+    volatile BOOL running;
+
+    PA_THREAD_ID dwThreadId;
+    HANDLE hThread;
+	HANDLE hCloseRequest;
+	HANDLE hThreadStart;        //!< signalled by thread on start
+	HANDLE hThreadExit;         //!< signalled by thread on exit
+	HANDLE hBlockingOpStreamRD;
+	HANDLE hBlockingOpStreamWR;
+
+    // Host callback Output overrider
+	PaWasapiHostProcessor hostProcessOverrideOutput;
+
+    // Host callback Input overrider
+	PaWasapiHostProcessor hostProcessOverrideInput;
+
+	// Defines blocking/callback interface used
+	BOOL bBlocking;
+
+	// Av Task (MM thread management)
+	HANDLE hAvTask;
+
+	// Thread priority level
+	PaWasapiThreadPriority nThreadPriority;
+}
+PaWasapiStream;
+
+// COM marshaling
+static HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream);
+static HRESULT MarshalStreamComPointers(PaWasapiStream *stream);
+static HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream);
+static HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream);
+static void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream);
+static void ReleaseUnmarshaledComPointers(PaWasapiStream *stream);
+
+// Local stream methods
+static void _StreamOnStop(PaWasapiStream *stream);
+static void _StreamFinish(PaWasapiStream *stream);
+static void _StreamCleanup(PaWasapiStream *stream);
+static HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available);
+static HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available);
+static void *PaWasapi_ReallocateMemory(void *ptr, size_t size);
+static void PaWasapi_FreeMemory(void *ptr);
+
+// Local statics
+
+// ------------------------------------------------------------------------------------------
+#define LogHostError(HRES) __LogHostError(HRES, __FUNCTION__, __FILE__, __LINE__)
+static HRESULT __LogHostError(HRESULT res, const char *func, const char *file, int line)
+{
+    const char *text = NULL;
+    switch (res)
+	{
+	case S_OK: return res;
+	case E_POINTER                              :text ="E_POINTER"; break;
+	case E_INVALIDARG                           :text ="E_INVALIDARG"; break;
+
+	case AUDCLNT_E_NOT_INITIALIZED              :text ="AUDCLNT_E_NOT_INITIALIZED"; break;
+	case AUDCLNT_E_ALREADY_INITIALIZED          :text ="AUDCLNT_E_ALREADY_INITIALIZED"; break;
+	case AUDCLNT_E_WRONG_ENDPOINT_TYPE          :text ="AUDCLNT_E_WRONG_ENDPOINT_TYPE"; break;
+	case AUDCLNT_E_DEVICE_INVALIDATED           :text ="AUDCLNT_E_DEVICE_INVALIDATED"; break;
+	case AUDCLNT_E_NOT_STOPPED                  :text ="AUDCLNT_E_NOT_STOPPED"; break;
+	case AUDCLNT_E_BUFFER_TOO_LARGE             :text ="AUDCLNT_E_BUFFER_TOO_LARGE"; break;
+	case AUDCLNT_E_OUT_OF_ORDER                 :text ="AUDCLNT_E_OUT_OF_ORDER"; break;
+	case AUDCLNT_E_UNSUPPORTED_FORMAT           :text ="AUDCLNT_E_UNSUPPORTED_FORMAT"; break;
+	case AUDCLNT_E_INVALID_SIZE                 :text ="AUDCLNT_E_INVALID_SIZE"; break;
+	case AUDCLNT_E_DEVICE_IN_USE                :text ="AUDCLNT_E_DEVICE_IN_USE"; break;
+	case AUDCLNT_E_BUFFER_OPERATION_PENDING     :text ="AUDCLNT_E_BUFFER_OPERATION_PENDING"; break;
+	case AUDCLNT_E_THREAD_NOT_REGISTERED        :text ="AUDCLNT_E_THREAD_NOT_REGISTERED"; break;
+	case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED   :text ="AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED"; break;
+	case AUDCLNT_E_ENDPOINT_CREATE_FAILED       :text ="AUDCLNT_E_ENDPOINT_CREATE_FAILED"; break;
+	case AUDCLNT_E_SERVICE_NOT_RUNNING          :text ="AUDCLNT_E_SERVICE_NOT_RUNNING"; break;
+	case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     :text ="AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED"; break;
+	case AUDCLNT_E_EXCLUSIVE_MODE_ONLY          :text ="AUDCLNT_E_EXCLUSIVE_MODE_ONLY"; break;
+	case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :text ="AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL"; break;
+	case AUDCLNT_E_EVENTHANDLE_NOT_SET          :text ="AUDCLNT_E_EVENTHANDLE_NOT_SET"; break;
+	case AUDCLNT_E_INCORRECT_BUFFER_SIZE        :text ="AUDCLNT_E_INCORRECT_BUFFER_SIZE"; break;
+	case AUDCLNT_E_BUFFER_SIZE_ERROR            :text ="AUDCLNT_E_BUFFER_SIZE_ERROR"; break;
+	case AUDCLNT_E_CPUUSAGE_EXCEEDED            :text ="AUDCLNT_E_CPUUSAGE_EXCEEDED"; break;
+	case AUDCLNT_E_BUFFER_ERROR					:text ="AUDCLNT_E_BUFFER_ERROR"; break;
+	case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED		:text ="AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED"; break;
+	case AUDCLNT_E_INVALID_DEVICE_PERIOD		:text ="AUDCLNT_E_INVALID_DEVICE_PERIOD"; break;
+
+	case AUDCLNT_S_BUFFER_EMPTY                 :text ="AUDCLNT_S_BUFFER_EMPTY"; break;
+	case AUDCLNT_S_THREAD_ALREADY_REGISTERED    :text ="AUDCLNT_S_THREAD_ALREADY_REGISTERED"; break;
+	case AUDCLNT_S_POSITION_STALLED				:text ="AUDCLNT_S_POSITION_STALLED"; break;
+
+	// other windows common errors:
+	case CO_E_NOTINITIALIZED                    :text ="CO_E_NOTINITIALIZED: you must call CoInitialize() before Pa_OpenStream()"; break;
+
+	default:
+		text = "UNKNOWN ERROR";
+    }
+	PRINT(("WASAPI ERROR HRESULT: 0x%X : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", res, text, func, file, line));
+	PA_SKELETON_SET_LAST_HOST_ERROR(res, text);
+	return res;
+}
+
+// ------------------------------------------------------------------------------------------
+#define LogPaError(PAERR) __LogPaError(PAERR, __FUNCTION__, __FILE__, __LINE__)
+static PaError __LogPaError(PaError err, const char *func, const char *file, int line)
+{
+	if (err == paNoError)
+		return err;
+	PRINT(("WASAPI ERROR PAERROR: %i : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", err, Pa_GetErrorText(err), func, file, line));
+	return err;
+}
+
+// ------------------------------------------------------------------------------------------
+/*! \class ThreadSleepScheduler
+           Allows to emulate thread sleep of less than 1 millisecond under Windows. Scheduler
+		   calculates number of times the thread must run untill next sleep of 1 millisecond.
+		   It does not make thread sleeping for real number of microseconds but rather controls
+		   how many of imaginary microseconds the thread task can allow thread to sleep.
+*/
+typedef struct ThreadIdleScheduler
+{
+	UINT32 m_idle_microseconds; //!< number of microseconds to sleep
+	UINT32 m_next_sleep;        //!< next sleep round
+	UINT32 m_i;					//!< current round iterator position
+	UINT32 m_resolution;		//!< resolution in number of milliseconds
+}
+ThreadIdleScheduler;
+//! Setup scheduler.
+static void ThreadIdleScheduler_Setup(ThreadIdleScheduler *sched, UINT32 resolution, UINT32 microseconds)
+{
+	assert(microseconds != 0);
+	assert(resolution != 0);
+	assert((resolution * 1000) >= microseconds);
+
+	memset(sched, 0, sizeof(*sched));
+
+	sched->m_idle_microseconds = microseconds;
+	sched->m_resolution        = resolution;
+	sched->m_next_sleep        = (resolution * 1000) / microseconds;
+}
+//! Iterate and check if can sleep.
+static UINT32 ThreadIdleScheduler_NextSleep(ThreadIdleScheduler *sched)
+{
+	// advance and check if thread can sleep
+	if (++ sched->m_i == sched->m_next_sleep)
+	{
+		sched->m_i = 0;
+		return sched->m_resolution;
+	}
+	return 0;
+}
+
+// ------------------------------------------------------------------------------------------
+/*static double nano100ToMillis(REFERENCE_TIME ref)
+{
+    //  1 nano = 0.000000001 seconds
+    //100 nano = 0.0000001   seconds
+    //100 nano = 0.0001   milliseconds
+    return ((double)ref)*0.0001;
+}*/
+
+// ------------------------------------------------------------------------------------------
+static double nano100ToSeconds(REFERENCE_TIME ref)
+{
+    //  1 nano = 0.000000001 seconds
+    //100 nano = 0.0000001   seconds
+    //100 nano = 0.0001   milliseconds
+    return ((double)ref)*0.0000001;
+}
+
+// ------------------------------------------------------------------------------------------
+/*static REFERENCE_TIME MillisTonano100(double ref)
+{
+    //  1 nano = 0.000000001 seconds
+    //100 nano = 0.0000001   seconds
+    //100 nano = 0.0001   milliseconds
+    return (REFERENCE_TIME)(ref/0.0001);
+}*/
+
+// ------------------------------------------------------------------------------------------
+static REFERENCE_TIME SecondsTonano100(double ref)
+{
+    //  1 nano = 0.000000001 seconds
+    //100 nano = 0.0000001   seconds
+    //100 nano = 0.0001   milliseconds
+    return (REFERENCE_TIME)(ref/0.0000001);
+}
+
+// ------------------------------------------------------------------------------------------
+// Makes Hns period from frames and sample rate
+static REFERENCE_TIME MakeHnsPeriod(UINT32 nFrames, DWORD nSamplesPerSec)
+{
+	return (REFERENCE_TIME)((10000.0 * 1000 / nSamplesPerSec * nFrames) + 0.5);
+}
+
+// ------------------------------------------------------------------------------------------
+// Converts PaSampleFormat to bits per sample value
+static WORD PaSampleFormatToBitsPerSample(PaSampleFormat format_id)
+{
+	switch (format_id & ~paNonInterleaved)
+	{
+		case paFloat32:
+		case paInt32: return 32;
+		case paInt24: return 24;
+		case paInt16: return 16;
+		case paInt8:
+		case paUInt8: return 8;
+	}
+	return 0;
+}
+
+// ------------------------------------------------------------------------------------------
+// Converts PaSampleFormat to bits per sample value
+/*static WORD PaSampleFormatToBytesPerSample(PaSampleFormat format_id)
+{
+	return PaSampleFormatToBitsPerSample(format_id) >> 3; // 'bits/8'
+}*/
+
+// ------------------------------------------------------------------------------------------
+// Converts Hns period into number of frames
+static UINT32 MakeFramesFromHns(REFERENCE_TIME hnsPeriod, UINT32 nSamplesPerSec)
+{
+    UINT32 nFrames = (UINT32)(	// frames =
+        1.0 * hnsPeriod *		// hns *
+        nSamplesPerSec /		// (frames / s) /
+        1000 /					// (ms / s) /
+        10000					// (hns / s) /
+        + 0.5					// rounding
+    );
+	return nFrames;
+}
+
+// Aligning function type
+typedef UINT32 (*ALIGN_FUNC) (UINT32 v, UINT32 align);
+
+// ------------------------------------------------------------------------------------------
+// Aligns 'v' backwards
+static UINT32 ALIGN_BWD(UINT32 v, UINT32 align)
+{
+	return ((v - (align ? v % align : 0)));
+}
+
+// ------------------------------------------------------------------------------------------
+// Aligns 'v' forward
+static UINT32 ALIGN_FWD(UINT32 v, UINT32 align)
+{
+	UINT32 remainder = (align ? (v % align) : 0);
+	if (remainder == 0)
+		return v;
+	return v + (align - remainder);
+}
+
+// ------------------------------------------------------------------------------------------
+// Get next value power of 2
+UINT32 ALIGN_NEXT_POW2(UINT32 v)
+{
+	UINT32 v2 = 1;
+	while (v > (v2 <<= 1)) { }
+	v = v2;
+	return v;
+}
+
+// ------------------------------------------------------------------------------------------
+// Aligns WASAPI buffer to 128 byte packet boundary. HD Audio will fail to play if buffer
+// is misaligned. This problem was solved in Windows 7 were AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED
+// is thrown although we must align for Vista anyway.
+static UINT32 AlignFramesPerBuffer(UINT32 nFrames, UINT32 nSamplesPerSec, UINT32 nBlockAlign,
+								   ALIGN_FUNC pAlignFunc)
+{
+#define HDA_PACKET_SIZE (128)
+
+	long frame_bytes = nFrames * nBlockAlign;
+	long packets;
+	(void)nSamplesPerSec;
+
+	// align to packet size
+	frame_bytes  = pAlignFunc(frame_bytes, HDA_PACKET_SIZE); // use ALIGN_FWD if bigger but safer period is more desired
+
+	// atlest 1 frame must be available
+	if (frame_bytes < HDA_PACKET_SIZE)
+		frame_bytes = HDA_PACKET_SIZE;
+
+	nFrames      = frame_bytes / nBlockAlign;
+	packets      = frame_bytes / HDA_PACKET_SIZE;
+
+	frame_bytes = packets * HDA_PACKET_SIZE;
+	nFrames     = frame_bytes / nBlockAlign;
+
+	return nFrames;
+
+#undef HDA_PACKET_SIZE
+}
+
+// ------------------------------------------------------------------------------------------
+static UINT32 GetFramesSleepTime(UINT32 nFrames, UINT32 nSamplesPerSec)
+{
+	REFERENCE_TIME nDuration;
+	if (nSamplesPerSec == 0)
+		return 0;
+#define REFTIMES_PER_SEC  10000000
+#define REFTIMES_PER_MILLISEC  10000
+	// Calculate the actual duration of the allocated buffer.
+	nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);
+	return (UINT32)(nDuration/REFTIMES_PER_MILLISEC/2);
+}
+
+// ------------------------------------------------------------------------------------------
+static UINT32 GetFramesSleepTimeMicroseconds(UINT32 nFrames, UINT32 nSamplesPerSec)
+{
+	REFERENCE_TIME nDuration;
+	if (nSamplesPerSec == 0)
+		return 0;
+#define REFTIMES_PER_SEC  10000000
+#define REFTIMES_PER_MILLISEC  10000
+	// Calculate the actual duration of the allocated buffer.
+	nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);
+	return (UINT32)(nDuration/10/2);
+}
+
+// ------------------------------------------------------------------------------------------
+#ifndef PA_WINRT
+static BOOL SetupAVRT()
+{
+    hDInputDLL = LoadLibraryA("avrt.dll");
+    if (hDInputDLL == NULL)
+        return FALSE;
+
+    _GetProc(pAvRtCreateThreadOrderingGroup,  FAvRtCreateThreadOrderingGroup,  "AvRtCreateThreadOrderingGroup");
+    _GetProc(pAvRtDeleteThreadOrderingGroup,  FAvRtDeleteThreadOrderingGroup,  "AvRtDeleteThreadOrderingGroup");
+    _GetProc(pAvRtWaitOnThreadOrderingGroup,  FAvRtWaitOnThreadOrderingGroup,  "AvRtWaitOnThreadOrderingGroup");
+    _GetProc(pAvSetMmThreadCharacteristics,   FAvSetMmThreadCharacteristics,   "AvSetMmThreadCharacteristicsA");
+	_GetProc(pAvRevertMmThreadCharacteristics,FAvRevertMmThreadCharacteristics,"AvRevertMmThreadCharacteristics");
+    _GetProc(pAvSetMmThreadPriority,          FAvSetMmThreadPriority,          "AvSetMmThreadPriority");
+
+	return pAvRtCreateThreadOrderingGroup &&
+		pAvRtDeleteThreadOrderingGroup &&
+		pAvRtWaitOnThreadOrderingGroup &&
+		pAvSetMmThreadCharacteristics &&
+		pAvRevertMmThreadCharacteristics &&
+		pAvSetMmThreadPriority;
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+static void CloseAVRT()
+{
+#ifndef PA_WINRT
+	if (hDInputDLL != NULL)
+		FreeLibrary(hDInputDLL);
+	hDInputDLL = NULL;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+static BOOL IsWow64()
+{
+#ifndef PA_WINRT
+
+	// http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx
+
+	typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+	LPFN_ISWOW64PROCESS fnIsWow64Process;
+
+    BOOL bIsWow64 = FALSE;
+
+    // IsWow64Process is not available on all supported versions of Windows.
+    // Use GetModuleHandle to get a handle to the DLL that contains the function
+    // and GetProcAddress to get a pointer to the function if available.
+
+    fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
+        GetModuleHandleA("kernel32"), "IsWow64Process");
+
+    if (fnIsWow64Process == NULL)
+		return FALSE;
+
+    if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
+		return FALSE;
+
+    return bIsWow64;
+
+#else
+
+	return FALSE;
+
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+typedef enum EWindowsVersion
+{
+	WINDOWS_UNKNOWN = 0,
+	WINDOWS_VISTA_SERVER2008,
+	WINDOWS_7_SERVER2008R2,
+	WINDOWS_8_SERVER2012,
+	WINDOWS_8_1_SERVER2012R2,
+	WINDOWS_10_SERVER2016,
+	WINDOWS_FUTURE
+}
+EWindowsVersion;
+// Alternative way for checking Windows version (allows to check version on Windows 8.1 and up)
+#ifndef PA_WINRT
+static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
+{
+	typedef ULONGLONG (NTAPI *LPFN_VERSETCONDITIONMASK)(ULONGLONG ConditionMask, DWORD TypeMask, BYTE Condition);
+	typedef BOOL (WINAPI *LPFN_VERIFYVERSIONINFO)(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask);
+
+	LPFN_VERSETCONDITIONMASK fnVerSetConditionMask;
+	LPFN_VERIFYVERSIONINFO fnVerifyVersionInfo;
+	OSVERSIONINFOEXA osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
+	DWORDLONG dwlConditionMask;
+
+	fnVerSetConditionMask = (LPFN_VERSETCONDITIONMASK)GetProcAddress(GetModuleHandleA("kernel32"), "VerSetConditionMask");
+	fnVerifyVersionInfo = (LPFN_VERIFYVERSIONINFO)GetProcAddress(GetModuleHandleA("kernel32"), "VerifyVersionInfoA");
+
+	if ((fnVerSetConditionMask == NULL) || (fnVerifyVersionInfo == NULL))
+		return FALSE;
+
+	dwlConditionMask = fnVerSetConditionMask(
+		fnVerSetConditionMask(
+			fnVerSetConditionMask(
+				0, VER_MAJORVERSION,     VER_GREATER_EQUAL),
+				   VER_MINORVERSION,     VER_GREATER_EQUAL),
+				   VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
+
+	osvi.dwMajorVersion    = wMajorVersion;
+	osvi.dwMinorVersion    = wMinorVersion;
+	osvi.wServicePackMajor = wServicePackMajor;
+
+	return (fnVerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE);
+}
+#endif
+// Get Windows version
+static EWindowsVersion GetWindowsVersion()
+{
+#ifndef PA_WINRT
+	static EWindowsVersion version = WINDOWS_UNKNOWN;
+
+	if (version == WINDOWS_UNKNOWN)
+	{
+		DWORD dwVersion = 0;
+		DWORD dwMajorVersion = 0;
+		DWORD dwMinorVersion = 0;
+		DWORD dwBuild = 0;
+
+		typedef DWORD (WINAPI *LPFN_GETVERSION)(VOID);
+		LPFN_GETVERSION fnGetVersion;
+
+		fnGetVersion = (LPFN_GETVERSION)GetProcAddress(GetModuleHandleA("kernel32"), "GetVersion");
+		if (fnGetVersion != NULL)
+		{
+			PRINT(("WASAPI: getting Windows version with GetVersion()\n"));
+
+			dwVersion = fnGetVersion();
+
+			// Get the Windows version
+			dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
+			dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
+
+			// Get the build number
+			if (dwVersion < 0x80000000)
+				dwBuild = (DWORD)(HIWORD(dwVersion));
+
+			switch (dwMajorVersion)
+			{
+			case 0:
+			case 1:
+			case 2:
+			case 3:
+			case 4:
+			case 5:
+				break; // skip lower
+			case 6:
+				switch (dwMinorVersion)
+				{
+				case 0:  version = WINDOWS_VISTA_SERVER2008;	break;
+				case 1:	 version = WINDOWS_7_SERVER2008R2;		break;
+				case 2:	 version = WINDOWS_8_SERVER2012;  		break;
+				case 3:	 version = WINDOWS_8_1_SERVER2012R2;	break;
+				default: version = WINDOWS_FUTURE;				break;
+				}
+				break;
+			case 10:
+				switch (dwMinorVersion)
+				{
+				case 0:	 version = WINDOWS_10_SERVER2016;		break;
+				default: version = WINDOWS_FUTURE;				break;
+				}
+				break;
+			default:
+				version = WINDOWS_FUTURE;
+				break;
+			}
+		}
+		else
+		{
+			PRINT(("WASAPI: getting Windows version with VerifyVersionInfo()\n"));
+
+			if (IsWindowsVersionOrGreater(10, 0, 0))
+				version = WINDOWS_10_SERVER2016;
+			else
+			if (IsWindowsVersionOrGreater(6, 3, 0))
+				version = WINDOWS_8_1_SERVER2012R2;
+			else
+			if (IsWindowsVersionOrGreater(6, 2, 0))
+				version = WINDOWS_8_SERVER2012;
+			else
+			if (IsWindowsVersionOrGreater(6, 1, 0))
+				version = WINDOWS_7_SERVER2008R2;
+			else
+			if (IsWindowsVersionOrGreater(6, 0, 0))
+				version = WINDOWS_VISTA_SERVER2008;
+			else
+				version = WINDOWS_FUTURE;
+		}
+
+		PRINT(("WASAPI: Windows version = %d\n", version));
+	}
+
+	return version;
+#else
+	return WINDOWS_8_SERVER2012;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+static BOOL UseWOW64Workaround()
+{
+	// note: WOW64 bug is common to Windows Vista x64, thus we fall back to safe Poll-driven
+	//       method. Windows 7 x64 seems has WOW64 bug fixed.
+
+	return (IsWow64() && (GetWindowsVersion() == WINDOWS_VISTA_SERVER2008));
+}
+
+// ------------------------------------------------------------------------------------------
+static UINT32 GetAudioClientVersion()
+{
+	if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)
+		return 3;
+	else
+	if (GetWindowsVersion() >= WINDOWS_8_SERVER2012)
+		return 2;
+
+	return 1;
+}
+
+// ------------------------------------------------------------------------------------------
+static const IID *GetAudioClientIID()
+{
+	static const IID *cli_iid = NULL;
+	if (cli_iid == NULL)
+	{
+		UINT32 cli_version = GetAudioClientVersion();
+		if (cli_version <= 1)
+		{
+			cli_iid = &pa_IID_IAudioClient;
+		}
+		else
+		{
+			switch (cli_version)
+			{
+			case 3:  cli_iid = &pa_IID_IAudioClient2; cli_version = 2; break; // use IAudioClient2 for Windows 10+ until IAudioClient3 functions are required
+			default: cli_iid = &pa_IID_IAudioClient2; cli_version = 2; break;
+			}
+		}
+
+		PRINT(("WASAPI: IAudioClient version = %d\n", cli_version));
+	}
+
+	return cli_iid;
+}
+
+// ------------------------------------------------------------------------------------------
+typedef enum EMixerDir { MIX_DIR__1TO2, MIX_DIR__2TO1, MIX_DIR__2TO1_L } EMixerDir;
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(TYPE)\
+	TYPE * __restrict to   = __to;\
+	TYPE * __restrict from = __from;\
+	TYPE * __restrict end  = from + count;\
+	while (from != end)\
+	{\
+		*to ++ = *from;\
+		*to ++ = *from;\
+		++ from;\
+	}
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(TYPE)\
+	TYPE * __restrict to   = (TYPE *)__to;\
+	TYPE * __restrict from = (TYPE *)__from;\
+	TYPE * __restrict end  = to + count;\
+	while (to != end)\
+	{\
+		*to ++ = (TYPE)((float)(from[0] + from[1]) * 0.5f);\
+		from += 2;\
+	}
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(TYPE)\
+	TYPE * __restrict to   = (TYPE *)__to;\
+	TYPE * __restrict from = (TYPE *)__from;\
+	TYPE * __restrict end  = to + count;\
+	while (to != end)\
+	{\
+		*to ++ = (TYPE)(((INT32)from[0] + (INT32)from[1]) >> 1);\
+		from += 2;\
+	}
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(TYPE)\
+	TYPE * __restrict to   = (TYPE *)__to;\
+	TYPE * __restrict from = (TYPE *)__from;\
+	TYPE * __restrict end  = to + count;\
+	while (to != end)\
+	{\
+		*to ++ = (TYPE)(((INT64)from[0] + (INT64)from[1]) >> 1);\
+		from += 2;\
+	}
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(TYPE)\
+	TYPE * __restrict to   = (TYPE *)__to;\
+	TYPE * __restrict from = (TYPE *)__from;\
+	TYPE * __restrict end  = to + count;\
+	while (to != end)\
+	{\
+		*to ++ = from[0];\
+		from += 2;\
+	}
+
+// ------------------------------------------------------------------------------------------
+static void _MixMonoToStereo_1TO2_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(BYTE); }
+static void _MixMonoToStereo_1TO2_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(short); }
+static void _MixMonoToStereo_1TO2_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); /* !!! int24 data is contained in 32-bit containers*/ }
+static void _MixMonoToStereo_1TO2_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); }
+static void _MixMonoToStereo_1TO2_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(float); }
+
+// ------------------------------------------------------------------------------------------
+static void _MixMonoToStereo_2TO1_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(BYTE); }
+static void _MixMonoToStereo_2TO1_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(short); }
+static void _MixMonoToStereo_2TO1_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(int); /* !!! int24 data is contained in 32-bit containers*/ }
+static void _MixMonoToStereo_2TO1_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(int); }
+static void _MixMonoToStereo_2TO1_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(float); }
+
+// ------------------------------------------------------------------------------------------
+static void _MixMonoToStereo_2TO1_8_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(BYTE); }
+static void _MixMonoToStereo_2TO1_16_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(short); }
+static void _MixMonoToStereo_2TO1_24_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); /* !!! int24 data is contained in 32-bit containers*/ }
+static void _MixMonoToStereo_2TO1_32_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); }
+static void _MixMonoToStereo_2TO1_32f_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(float); }
+
+// ------------------------------------------------------------------------------------------
+static MixMonoToStereoF _GetMonoToStereoMixer(PaSampleFormat format, EMixerDir dir)
+{
+	switch (dir)
+	{
+	case MIX_DIR__1TO2:
+		switch (format & ~paNonInterleaved)
+		{
+		case paUInt8:	return _MixMonoToStereo_1TO2_8;
+		case paInt16:	return _MixMonoToStereo_1TO2_16;
+		case paInt24:	return _MixMonoToStereo_1TO2_24;
+		case paInt32:	return _MixMonoToStereo_1TO2_32;
+		case paFloat32: return _MixMonoToStereo_1TO2_32f;
+		}
+		break;
+
+	case MIX_DIR__2TO1:
+		switch (format & ~paNonInterleaved)
+		{
+		case paUInt8:	return _MixMonoToStereo_2TO1_8;
+		case paInt16:	return _MixMonoToStereo_2TO1_16;
+		case paInt24:	return _MixMonoToStereo_2TO1_24;
+		case paInt32:	return _MixMonoToStereo_2TO1_32;
+		case paFloat32: return _MixMonoToStereo_2TO1_32f;
+		}
+		break;
+
+	case MIX_DIR__2TO1_L:
+		switch (format & ~paNonInterleaved)
+		{
+		case paUInt8:	return _MixMonoToStereo_2TO1_8_L;
+		case paInt16:	return _MixMonoToStereo_2TO1_16_L;
+		case paInt24:	return _MixMonoToStereo_2TO1_24_L;
+		case paInt32:	return _MixMonoToStereo_2TO1_32_L;
+		case paFloat32: return _MixMonoToStereo_2TO1_32f_L;
+		}
+		break;
+	}
+
+	return NULL;
+}
+
+// ------------------------------------------------------------------------------------------
+#ifdef PA_WINRT
+typedef struct PaActivateAudioInterfaceCompletionHandler
+{
+	IActivateAudioInterfaceCompletionHandler parent;
+	volatile LONG refs;
+	volatile LONG done;
+	struct
+	{
+		const IID *iid;
+		void **obj;
+	}
+	in;
+	struct
+	{
+		HRESULT hr;
+	}
+	out;
+}
+PaActivateAudioInterfaceCompletionHandler;
+
+static HRESULT (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_QueryInterface)(
+    IActivateAudioInterfaceCompletionHandler *This, REFIID riid, void **ppvObject)
+{
+	PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;
+
+	// From MSDN:
+	// "The IAgileObject interface is a marker interface that indicates that an object
+	//  is free threaded and can be called from any apartment."
+	if (IsEqualIID(riid, &IID_IUnknown) ||
+		IsEqualIID(riid, &IID_IAgileObject))
+	{
+		IActivateAudioInterfaceCompletionHandler_AddRef((IActivateAudioInterfaceCompletionHandler *)handler);
+		(*ppvObject) = handler;
+		return S_OK;
+	}
+
+	return E_NOINTERFACE;
+}
+
+static ULONG (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_AddRef)(
+    IActivateAudioInterfaceCompletionHandler *This)
+{
+	PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;
+
+	return InterlockedIncrement(&handler->refs);
+}
+
+static ULONG (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_Release)(
+    IActivateAudioInterfaceCompletionHandler *This)
+{
+	PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;
+	ULONG refs;
+
+	if ((refs = InterlockedDecrement(&handler->refs)) == 0)
+	{
+		PaUtil_FreeMemory(handler->parent.lpVtbl);
+		PaUtil_FreeMemory(handler);
+	}
+
+	return refs;
+}
+
+static HRESULT (STDMETHODCALLTYPE PaActivateAudioInterfaceCompletionHandler_ActivateCompleted)(
+    IActivateAudioInterfaceCompletionHandler *This, IActivateAudioInterfaceAsyncOperation *activateOperation)
+{
+	PaActivateAudioInterfaceCompletionHandler *handler = (PaActivateAudioInterfaceCompletionHandler *)This;
+
+    HRESULT hr = S_OK;
+    HRESULT hrActivateResult = S_OK;
+    IUnknown *punkAudioInterface = NULL;
+
+    // Check for a successful activation result
+    hr = IActivateAudioInterfaceAsyncOperation_GetActivateResult(activateOperation, &hrActivateResult, &punkAudioInterface);
+    if (SUCCEEDED(hr) && SUCCEEDED(hrActivateResult))
+    {
+        // Get pointer to the requested audio interface
+        IUnknown_QueryInterface(punkAudioInterface, handler->in.iid, handler->in.obj);
+        if ((*handler->in.obj) == NULL)
+            hrActivateResult = E_FAIL;
+	}
+	SAFE_RELEASE(punkAudioInterface);
+
+	if (SUCCEEDED(hr))
+		handler->out.hr = hrActivateResult;
+	else
+		handler->out.hr = hr;
+
+	// Got client object, stop busy waiting in ActivateAudioInterface
+	InterlockedExchange(&handler->done, TRUE);
+
+	return hr;
+}
+
+static IActivateAudioInterfaceCompletionHandler *CreateActivateAudioInterfaceCompletionHandler(const IID *iid, void **obj)
+{
+	PaActivateAudioInterfaceCompletionHandler *handler = PaUtil_AllocateMemory(sizeof(PaActivateAudioInterfaceCompletionHandler));
+	ZeroMemory(handler, sizeof(*handler));
+	handler->parent.lpVtbl = PaUtil_AllocateMemory(sizeof(*handler->parent.lpVtbl));
+	handler->parent.lpVtbl->QueryInterface    = &PaActivateAudioInterfaceCompletionHandler_QueryInterface;
+	handler->parent.lpVtbl->AddRef            = &PaActivateAudioInterfaceCompletionHandler_AddRef;
+	handler->parent.lpVtbl->Release           = &PaActivateAudioInterfaceCompletionHandler_Release;
+	handler->parent.lpVtbl->ActivateCompleted = &PaActivateAudioInterfaceCompletionHandler_ActivateCompleted;
+	handler->refs = 1;
+	handler->in.iid = iid;
+	handler->in.obj = obj;
+	return (IActivateAudioInterfaceCompletionHandler *)handler;
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+#ifdef PA_WINRT
+static HRESULT ActivateAudioInterface_WINRT(const PaWasapiDeviceInfo *deviceInfo, const IID *iid, void **obj)
+{
+#define PA_WASAPI_DEVICE_PATH_LEN 64
+
+	PaError result = paNoError;
+	HRESULT hr = S_OK;
+	IActivateAudioInterfaceAsyncOperation *asyncOp = NULL;
+	IActivateAudioInterfaceCompletionHandler *handler = CreateActivateAudioInterfaceCompletionHandler(iid, obj);
+	PaActivateAudioInterfaceCompletionHandler *handlerImpl = (PaActivateAudioInterfaceCompletionHandler *)handler;
+	OLECHAR devicePath[PA_WASAPI_DEVICE_PATH_LEN] = { 0 };
+
+	// Get device path in form L"{DEVICE_GUID}"
+	switch (deviceInfo->flow)
+	{
+	case eRender:
+		StringFromGUID2(&DEVINTERFACE_AUDIO_RENDER, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
+		break;
+	case eCapture:
+		StringFromGUID2(&DEVINTERFACE_AUDIO_CAPTURE, devicePath, PA_WASAPI_DEVICE_PATH_LEN - 1);
+		break;
+	default:
+		return S_FALSE;
+	}
+
+	// Async operation will call back to IActivateAudioInterfaceCompletionHandler::ActivateCompleted
+	// which must be an agile interface implementation
+    hr = ActivateAudioInterfaceAsync(devicePath, iid, NULL, handler, &asyncOp);
+    IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+	// Wait in busy loop for async operation to complete
+	// Use Interlocked API here to ensure that ->done variable is read every time through the loop
+	while (SUCCEEDED(hr) && !InterlockedOr(&handlerImpl->done, 0))
+	{
+		Sleep(1);
+	}
+
+	hr = handlerImpl->out.hr;
+
+error:
+
+	SAFE_RELEASE(asyncOp);
+	SAFE_RELEASE(handler);
+
+    return hr;
+
+#undef PA_WASAPI_DEVICE_PATH_LEN
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+static HRESULT ActivateAudioInterface(const PaWasapiDeviceInfo *deviceInfo, IAudioClient **client)
+{
+#ifndef PA_WINRT
+	return IMMDevice_Activate(deviceInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void **)client);
+#else
+	return ActivateAudioInterface_WINRT(deviceInfo, GetAudioClientIID(), (void **)client);
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+#ifdef PA_WINRT
+static DWORD SignalObjectAndWait(HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, DWORD dwMilliseconds, BOOL bAlertable)
+{
+	SetEvent(hObjectToSignal);
+	return WaitForSingleObjectEx(hObjectToWaitOn, dwMilliseconds, bAlertable);
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    PaWasapiHostApiRepresentation *paWasapi;
+    PaDeviceInfo *deviceInfoArray;
+    HRESULT hr = S_OK;
+	UINT i;
+#ifndef PA_WINRT
+    IMMDeviceCollection* pEndPoints = NULL;
+#else
+	WAVEFORMATEX *mixFormat;
+#endif
+
+#ifndef PA_WINRT
+    if (!SetupAVRT())
+	{
+        PRINT(("WASAPI: No AVRT! (not VISTA?)"));
+        return paNoError;
+    }
+#endif
+
+    paWasapi = (PaWasapiHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaWasapiHostApiRepresentation) );
+    if (paWasapi == NULL)
+	{
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    memset( paWasapi, 0, sizeof(PaWasapiHostApiRepresentation) ); /* ensure all fields are zeroed. especially paWasapi->allocations */
+
+    result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );
+    if( result != paNoError )
+    {
+        goto error;
+    }
+
+    paWasapi->allocations = PaUtil_CreateAllocationGroup();
+    if (paWasapi->allocations == NULL)
+	{
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    *hostApi                             = &paWasapi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion		 = 1;
+    (*hostApi)->info.type				 = paWASAPI;
+    (*hostApi)->info.name				 = "Windows WASAPI";
+    (*hostApi)->info.deviceCount		 = 0;
+    (*hostApi)->info.defaultInputDevice	 = paNoDevice;
+    (*hostApi)->info.defaultOutputDevice = paNoDevice;
+
+#ifndef PA_WINRT
+    paWasapi->enumerator = NULL;
+    hr = CoCreateInstance(&pa_CLSID_IMMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER,
+             &pa_IID_IMMDeviceEnumerator, (void **)&paWasapi->enumerator);
+
+	// We need to set the result to a value otherwise we will return paNoError
+	// [IF_FAILED_JUMP(hResult, error);]
+	IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+    // getting default device ids in the eMultimedia "role"
+    {
+        {
+            IMMDevice *defaultRenderer = NULL;
+            hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eRender, eMultimedia, &defaultRenderer);
+            if (hr != S_OK)
+			{
+				if (hr != E_NOTFOUND) {
+					// We need to set the result to a value otherwise we will return paNoError
+					// [IF_FAILED_JUMP(hResult, error);]
+					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+				}
+			}
+			else
+			{
+				WCHAR *pszDeviceId = NULL;
+				hr = IMMDevice_GetId(defaultRenderer, &pszDeviceId);
+				// We need to set the result to a value otherwise we will return paNoError
+				// [IF_FAILED_JUMP(hResult, error);]
+				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+				wcsncpy(paWasapi->defaultRenderer, pszDeviceId, MAX_STR_LEN-1);
+				CoTaskMemFree(pszDeviceId);
+				IMMDevice_Release(defaultRenderer);
+			}
+        }
+
+        {
+            IMMDevice *defaultCapturer = NULL;
+            hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eCapture, eMultimedia, &defaultCapturer);
+            if (hr != S_OK)
+			{
+				if (hr != E_NOTFOUND) {
+					// We need to set the result to a value otherwise we will return paNoError
+					// [IF_FAILED_JUMP(hResult, error);]
+					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+				}
+			}
+			else
+			{
+				WCHAR *pszDeviceId = NULL;
+				hr = IMMDevice_GetId(defaultCapturer, &pszDeviceId);
+				// We need to set the result to a value otherwise we will return paNoError
+				// [IF_FAILED_JUMP(hResult, error);]
+				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+				wcsncpy(paWasapi->defaultCapturer, pszDeviceId, MAX_STR_LEN-1);
+				CoTaskMemFree(pszDeviceId);
+				IMMDevice_Release(defaultCapturer);
+			}
+        }
+    }
+
+    hr = IMMDeviceEnumerator_EnumAudioEndpoints(paWasapi->enumerator, eAll, DEVICE_STATE_ACTIVE, &pEndPoints);
+	// We need to set the result to a value otherwise we will return paNoError
+	// [IF_FAILED_JUMP(hResult, error);]
+	IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+    hr = IMMDeviceCollection_GetCount(pEndPoints, &paWasapi->deviceCount);
+	// We need to set the result to a value otherwise we will return paNoError
+	// [IF_FAILED_JUMP(hResult, error);]
+	IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+#else
+	paWasapi->deviceCount = 2;
+#endif
+
+    paWasapi->devInfo = (PaWasapiDeviceInfo *)PaUtil_AllocateMemory(sizeof(PaWasapiDeviceInfo) * paWasapi->deviceCount);
+    if (paWasapi->devInfo == NULL)
+	{
+        result = paInsufficientMemory;
+        goto error;
+    }
+	for (i = 0; i < paWasapi->deviceCount; ++i)
+		memset(&paWasapi->devInfo[i], 0, sizeof(PaWasapiDeviceInfo));
+
+    if (paWasapi->deviceCount > 0)
+    {
+        (*hostApi)->deviceInfos = (PaDeviceInfo **)PaUtil_GroupAllocateMemory(
+                paWasapi->allocations, sizeof(PaDeviceInfo *) * paWasapi->deviceCount);
+        if ((*hostApi)->deviceInfos == NULL)
+		{
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        /* allocate all device info structs in a contiguous block */
+        deviceInfoArray = (PaDeviceInfo *)PaUtil_GroupAllocateMemory(
+                paWasapi->allocations, sizeof(PaDeviceInfo) * paWasapi->deviceCount);
+        if (deviceInfoArray == NULL)
+		{
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        for (i = 0; i < paWasapi->deviceCount; ++i)
+		{
+            PaDeviceInfo *deviceInfo  = &deviceInfoArray[i];
+            deviceInfo->structVersion = 2;
+            deviceInfo->hostApi       = hostApiIndex;
+
+			PA_DEBUG(("WASAPI: device idx: %02d\n", i));
+			PA_DEBUG(("WASAPI: ---------------\n"));
+
+		#ifndef PA_WINRT
+            hr = IMMDeviceCollection_Item(pEndPoints, i, &paWasapi->devInfo[i].device);
+			// We need to set the result to a value otherwise we will return paNoError
+			// [IF_FAILED_JUMP(hResult, error);]
+			IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+            // getting ID
+            {
+                WCHAR *pszDeviceId = NULL;
+                hr = IMMDevice_GetId(paWasapi->devInfo[i].device, &pszDeviceId);
+				// We need to set the result to a value otherwise we will return paNoError
+				// [IF_FAILED_JUMP(hr, error);]
+				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+                wcsncpy(paWasapi->devInfo[i].szDeviceID, pszDeviceId, MAX_STR_LEN-1);
+                CoTaskMemFree(pszDeviceId);
+
+                if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultCapturer) == 0)
+				{// we found the default input!
+                    (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
+                }
+                if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultRenderer) == 0)
+				{// we found the default output!
+                    (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
+                }
+            }
+
+            hr = IMMDevice_GetState(paWasapi->devInfo[i].device, &paWasapi->devInfo[i].state);
+			// We need to set the result to a value otherwise we will return paNoError
+			// [IF_FAILED_JUMP(hResult, error);]
+			IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+            if (paWasapi->devInfo[i].state != DEVICE_STATE_ACTIVE)
+			{
+                PRINT(("WASAPI device: %d is not currently available (state:%d)\n", i, paWasapi->devInfo[i].state));
+            }
+
+            {
+                IPropertyStore *pProperty;
+                hr = IMMDevice_OpenPropertyStore(paWasapi->devInfo[i].device, STGM_READ, &pProperty);
+				// We need to set the result to a value otherwise we will return paNoError
+				// [IF_FAILED_JUMP(hResult, error);]
+				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+                // "Friendly" Name
+                {
+					char *deviceName;
+                    PROPVARIANT value;
+                    PropVariantInit(&value);
+                    hr = IPropertyStore_GetValue(pProperty, &PKEY_Device_FriendlyName, &value);
+					// We need to set the result to a value otherwise we will return paNoError
+					// [IF_FAILED_JUMP(hResult, error);]
+					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+                    deviceInfo->name = NULL;
+                    deviceName = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, MAX_STR_LEN + 1);
+                    if (deviceName == NULL)
+					{
+                        result = paInsufficientMemory;
+                        goto error;
+                    }
+					if (value.pwszVal)
+						WideCharToMultiByte(CP_UTF8, 0, value.pwszVal, (int)wcslen(value.pwszVal), deviceName, MAX_STR_LEN - 1, 0, 0);
+					else
+						_snprintf(deviceName, MAX_STR_LEN - 1, "baddev%d", i);
+                    deviceInfo->name = deviceName;
+                    PropVariantClear(&value);
+					PA_DEBUG(("WASAPI:%d| name[%s]\n", i, deviceInfo->name));
+                }
+
+                // Default format
+                {
+                    PROPVARIANT value;
+                    PropVariantInit(&value);
+                    hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEngine_DeviceFormat, &value);
+					// We need to set the result to a value otherwise we will return paNoError
+					// [IF_FAILED_JUMP(hResult, error);]
+					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+					memcpy(&paWasapi->devInfo[i].DefaultFormat, value.blob.pBlobData, min(sizeof(paWasapi->devInfo[i].DefaultFormat), value.blob.cbSize));
+                    // cleanup
+                    PropVariantClear(&value);
+                }
+
+                // Formfactor
+                {
+                    PROPVARIANT value;
+                    PropVariantInit(&value);
+                    hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEndpoint_FormFactor, &value);
+					// We need to set the result to a value otherwise we will return paNoError
+					// [IF_FAILED_JUMP(hResult, error);]
+					IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+					// set
+					#if defined(DUMMYUNIONNAME) && defined(NONAMELESSUNION)
+						// avoid breaking strict-aliasing rules in such line: (EndpointFormFactor)(*((UINT *)(((WORD *)&value.wReserved3)+1)));
+						UINT v;
+						memcpy(&v, (((WORD *)&value.wReserved3)+1), sizeof(v));
+						paWasapi->devInfo[i].formFactor = (EndpointFormFactor)v;
+					#else
+						paWasapi->devInfo[i].formFactor = (EndpointFormFactor)value.uintVal;
+					#endif
+					PA_DEBUG(("WASAPI:%d| form-factor[%d]\n", i, paWasapi->devInfo[i].formFactor));
+                    // cleanup
+                    PropVariantClear(&value);
+                }
+
+				SAFE_RELEASE(pProperty);
+            }
+
+            // Endpoint data
+            {
+                IMMEndpoint *endpoint = NULL;
+                hr = IMMDevice_QueryInterface(paWasapi->devInfo[i].device, &pa_IID_IMMEndpoint, (void **)&endpoint);
+                if (SUCCEEDED(hr))
+				{
+                    hr = IMMEndpoint_GetDataFlow(endpoint, &paWasapi->devInfo[i].flow);
+                    SAFE_RELEASE(endpoint);
+                }
+            }
+		#endif
+
+            // Getting a temporary IAudioClient for more fields
+            // we make sure NOT to call Initialize yet!
+            {
+			#ifdef PA_WINRT
+				// Set flow as ActivateAudioInterface depends on it and selects corresponding
+				// direction for the Audio Client
+				paWasapi->devInfo[i].flow = (i == 0 ? eRender : eCapture);
+			#endif
+
+				// Create temp Audio Client instance to query additional details
+                IAudioClient *tmpClient = NULL;
+                hr = ActivateAudioInterface(&paWasapi->devInfo[i], &tmpClient);
+				// We need to set the result to a value otherwise we will return paNoError
+				// [IF_FAILED_JUMP(hResult, error);]
+				IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+				// Get latency
+                hr = IAudioClient_GetDevicePeriod(tmpClient,
+                    &paWasapi->devInfo[i].DefaultDevicePeriod,
+                    &paWasapi->devInfo[i].MinimumDevicePeriod);
+				if (FAILED(hr))
+				{
+					PA_DEBUG(("WASAPI:%d| failed getting min/default periods by IAudioClient::GetDevicePeriod() with error[%08X], will use 30000/100000 hns\n", i, (UINT32)hr));
+
+					// assign WASAPI common values
+					paWasapi->devInfo[i].DefaultDevicePeriod = 100000;
+					paWasapi->devInfo[i].MinimumDevicePeriod = 30000;
+
+					// ignore error, let continue further without failing with paInternalError
+					hr = S_OK;
+				}
+
+			#ifdef PA_WINRT
+				// Get mix format which will treat as default device format
+				hr = IAudioClient_GetMixFormat(tmpClient, &mixFormat);
+				if (SUCCEEDED(hr))
+				{
+					// Default device
+					if (i == 0)
+						(*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
+					else
+						(*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
+
+					// State
+					paWasapi->devInfo[i].state = DEVICE_STATE_ACTIVE;
+
+					// Default format
+					memcpy(&paWasapi->devInfo[i].DefaultFormat, mixFormat, min(sizeof(paWasapi->devInfo[i].DefaultFormat), sizeof(*mixFormat)));
+					CoTaskMemFree(mixFormat);
+
+					// Form-factor
+					paWasapi->devInfo[i].formFactor = UnknownFormFactor;
+
+					// Name
+                    deviceInfo->name = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, MAX_STR_LEN + 1);
+                    if (deviceInfo->name == NULL)
+					{
+						SAFE_RELEASE(tmpClient);
+                        result = paInsufficientMemory;
+                        goto error;
+                    }
+					_snprintf((char *)deviceInfo->name, MAX_STR_LEN - 1, "WASAPI_%s:%d", (i == 0 ? "Output" : "Input"), i);
+					PA_DEBUG(("WASAPI:%d| name[%s]\n", i, deviceInfo->name));
+				}
+			#endif
+
+				// Release tmp client
+				SAFE_RELEASE(tmpClient);
+
+				if (hr != S_OK)
+				{
+					//davidv: this happened with my hardware, previously for that same device in DirectSound:
+					//Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f}
+					//so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat
+					LogHostError(hr);
+					// We need to set the result to a value otherwise we will return paNoError
+					result = paInternalError;
+					goto error;
+				}
+            }
+
+            // we can now fill in portaudio device data
+            deviceInfo->maxInputChannels  = 0;
+            deviceInfo->maxOutputChannels = 0;
+			deviceInfo->defaultSampleRate = paWasapi->devInfo[i].DefaultFormat.Format.nSamplesPerSec;
+            switch (paWasapi->devInfo[i].flow)
+			{
+			case eRender: {
+                deviceInfo->maxOutputChannels		 = paWasapi->devInfo[i].DefaultFormat.Format.nChannels;
+                deviceInfo->defaultHighOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
+                deviceInfo->defaultLowOutputLatency  = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
+				PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,
+					deviceInfo->maxOutputChannels, (float)deviceInfo->defaultHighOutputLatency, (float)deviceInfo->defaultLowOutputLatency));
+				break;}
+			case eCapture: {
+                deviceInfo->maxInputChannels		= paWasapi->devInfo[i].DefaultFormat.Format.nChannels;
+                deviceInfo->defaultHighInputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
+                deviceInfo->defaultLowInputLatency  = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
+				PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,
+					deviceInfo->maxInputChannels, (float)deviceInfo->defaultHighInputLatency, (float)deviceInfo->defaultLowInputLatency));
+				break; }
+            default:
+                PRINT(("WASAPI:%d| bad Data Flow!\n", i));
+				// We need to set the result to a value otherwise we will return paNoError
+				result = paInternalError;
+                //continue; // do not skip from list, allow to initialize
+				 break;
+            }
+
+            (*hostApi)->deviceInfos[i] = deviceInfo;
+            ++(*hostApi)->info.deviceCount;
+        }
+    }
+
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PaUtil_InitializeStreamInterface( &paWasapi->callbackStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &paWasapi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+
+	// findout if platform workaround is required
+	paWasapi->useWOW64Workaround = UseWOW64Workaround();
+
+#ifndef PA_WINRT
+    SAFE_RELEASE(pEndPoints);
+#endif
+
+	PRINT(("WASAPI: initialized ok\n"));
+
+    return paNoError;
+
+error:
+
+	PRINT(("WASAPI: failed %s error[%d|%s]\n", __FUNCTION__, result, Pa_GetErrorText(result)));
+
+#ifndef PA_WINRT
+    SAFE_RELEASE(pEndPoints);
+#endif
+
+	Terminate((PaUtilHostApiRepresentation *)paWasapi);
+
+	// Safety if error was not set so that we do not think initialize was a success
+	if (result == paNoError) {
+		result = paInternalError;
+	}
+
+    return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static void Terminate( PaUtilHostApiRepresentation *hostApi )
+{
+	UINT i;
+    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
+	if (paWasapi == NULL)
+		return;
+
+	// Release IMMDeviceEnumerator
+#ifndef PA_WINRT
+    SAFE_RELEASE(paWasapi->enumerator);
+#endif
+
+	// Release device info bound objects and device info itself
+    for (i = 0; i < paWasapi->deviceCount; ++i)
+	{
+        PaWasapiDeviceInfo *info = &paWasapi->devInfo[i];
+	#ifndef PA_WINRT
+        SAFE_RELEASE(info->device);
+	#else
+		(void)info;
+	#endif
+    }
+    PaUtil_FreeMemory(paWasapi->devInfo);
+
+    if (paWasapi->allocations)
+	{
+        PaUtil_FreeAllAllocations(paWasapi->allocations);
+        PaUtil_DestroyAllocationGroup(paWasapi->allocations);
+    }
+
+    PaWinUtil_CoUninitialize( paWASAPI, &paWasapi->comInitializationResult );
+
+    PaUtil_FreeMemory(paWasapi);
+
+	// Close AVRT
+	CloseAVRT();
+}
+
+// ------------------------------------------------------------------------------------------
+static PaWasapiHostApiRepresentation *_GetHostApi(PaError *_error)
+{
+	PaError error;
+
+	PaUtilHostApiRepresentation *pApi;
+	if ((error = PaUtil_GetHostApiRepresentation(&pApi, paWASAPI)) != paNoError)
+	{
+		if (_error != NULL)
+			(*_error) = error;
+
+		return NULL;
+	}
+	return (PaWasapiHostApiRepresentation *)pApi;
+}
+
+// ------------------------------------------------------------------------------------------
+int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice )
+{
+	PaError ret;
+	PaWasapiHostApiRepresentation *paWasapi;
+	UINT32 size;
+	PaDeviceIndex index;
+
+	if (pFormat == NULL)
+		return paBadBufferPtr;
+	if (nFormatSize <= 0)
+		return paBufferTooSmall;
+
+	// Get API
+	paWasapi = _GetHostApi(&ret);
+	if (paWasapi == NULL)
+		return ret;
+
+	// Get device index
+	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+    if (ret != paNoError)
+        return ret;
+
+	// Validate index
+	if ((UINT32)index >= paWasapi->deviceCount)
+		return paInvalidDevice;
+
+	size = min(nFormatSize, (UINT32)sizeof(paWasapi->devInfo[ index ].DefaultFormat));
+	memcpy(pFormat, &paWasapi->devInfo[ index ].DefaultFormat, size);
+
+	return size;
+}
+
+// ------------------------------------------------------------------------------------------
+int PaWasapi_GetDeviceRole( PaDeviceIndex nDevice )
+{
+	PaError ret;
+	PaDeviceIndex index;
+
+	// Get API
+	PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
+	if (paWasapi == NULL)
+		return paNotInitialized;
+
+	// Get device index
+	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+    if (ret != paNoError)
+        return ret;
+
+	// Validate index
+	if ((UINT32)index >= paWasapi->deviceCount)
+		return paInvalidDevice;
+
+	return paWasapi->devInfo[ index ].formFactor;
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput )
+{
+    PaWasapiStream *stream = (PaWasapiStream *)pStream;
+	if (stream == NULL)
+		return paBadStreamPtr;
+
+	if (nInput != NULL)
+		(*nInput) = stream->in.framesPerHostCallback;
+
+	if (nOutput != NULL)
+		(*nOutput) = stream->out.framesPerHostCallback;
+
+	return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static void LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in)
+{
+    const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
+	switch (old->wFormatTag)
+	{
+	case WAVE_FORMAT_EXTENSIBLE: {
+
+		PRINT(("wFormatTag     =WAVE_FORMAT_EXTENSIBLE\n"));
+
+		if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
+		{
+			PRINT(("SubFormat      =KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n"));
+		}
+		else
+		if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))
+		{
+			PRINT(("SubFormat      =KSDATAFORMAT_SUBTYPE_PCM\n"));
+		}
+		else
+		{
+			PRINT(("SubFormat      =CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\n",
+										in->SubFormat.Data1,
+										in->SubFormat.Data2,
+										in->SubFormat.Data3,
+										(int)in->SubFormat.Data4[0],
+										(int)in->SubFormat.Data4[1],
+										(int)in->SubFormat.Data4[2],
+										(int)in->SubFormat.Data4[3],
+										(int)in->SubFormat.Data4[4],
+										(int)in->SubFormat.Data4[5],
+										(int)in->SubFormat.Data4[6],
+										(int)in->SubFormat.Data4[7]));
+		}
+		PRINT(("Samples.wValidBitsPerSample =%d\n",  in->Samples.wValidBitsPerSample));
+		PRINT(("dwChannelMask  =0x%X\n",in->dwChannelMask));
+
+		break; }
+
+	case WAVE_FORMAT_PCM:        PRINT(("wFormatTag     =WAVE_FORMAT_PCM\n")); break;
+	case WAVE_FORMAT_IEEE_FLOAT: PRINT(("wFormatTag     =WAVE_FORMAT_IEEE_FLOAT\n")); break;
+	default:
+		PRINT(("wFormatTag     =UNKNOWN(%d)\n",old->wFormatTag)); break;
+	}
+
+	PRINT(("nChannels      =%d\n",old->nChannels));
+	PRINT(("nSamplesPerSec =%d\n",old->nSamplesPerSec));
+	PRINT(("nAvgBytesPerSec=%d\n",old->nAvgBytesPerSec));
+	PRINT(("nBlockAlign    =%d\n",old->nBlockAlign));
+	PRINT(("wBitsPerSample =%d\n",old->wBitsPerSample));
+	PRINT(("cbSize         =%d\n",old->cbSize));
+}
+
+// ------------------------------------------------------------------------------------------
+static PaSampleFormat WaveToPaFormat(const WAVEFORMATEXTENSIBLE *in)
+{
+    const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
+
+    switch (old->wFormatTag)
+	{
+    case WAVE_FORMAT_EXTENSIBLE: {
+        if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
+		{
+            if (in->Samples.wValidBitsPerSample == 32)
+                return paFloat32;
+        }
+        else
+		if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))
+		{
+            switch (old->wBitsPerSample)
+			{
+                case 32: return paInt32;
+                case 24: return paInt24;
+                case  8: return paUInt8;
+                case 16: return paInt16;
+            }
+        }
+		break; }
+
+    case WAVE_FORMAT_IEEE_FLOAT:
+		return paFloat32;
+
+    case WAVE_FORMAT_PCM: {
+        switch (old->wBitsPerSample)
+		{
+            case 32: return paInt32;
+            case 24: return paInt24;
+            case  8: return paUInt8;
+            case 16: return paInt16;
+        }
+		break; }
+    }
+
+    return paCustomFormat;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError MakeWaveFormatFromParams(WAVEFORMATEXTENSIBLE *wavex, const PaStreamParameters *params,
+									double sampleRate)
+{
+	WORD bitsPerSample;
+	WAVEFORMATEX *old;
+	DWORD channelMask = 0;
+	PaWasapiStreamInfo *streamInfo = (PaWasapiStreamInfo *)params->hostApiSpecificStreamInfo;
+
+	// Get user assigned channel mask
+	if ((streamInfo != NULL) && (streamInfo->flags & paWinWasapiUseChannelMask))
+		channelMask = streamInfo->channelMask;
+
+	// Convert PaSampleFormat to bits per sample
+	if ((bitsPerSample = PaSampleFormatToBitsPerSample(params->sampleFormat)) == 0)
+		return paSampleFormatNotSupported;
+
+    memset(wavex, 0, sizeof(*wavex));
+
+    old					 = (WAVEFORMATEX *)wavex;
+    old->nChannels       = (WORD)params->channelCount;
+    old->nSamplesPerSec  = (DWORD)sampleRate;
+	if ((old->wBitsPerSample = bitsPerSample) > 16)
+	{
+		old->wBitsPerSample = 32; // 20 or 24 bits must go in 32 bit containers (ints)
+	}
+    old->nBlockAlign     = (old->nChannels * (old->wBitsPerSample/8));
+    old->nAvgBytesPerSec = (old->nSamplesPerSec * old->nBlockAlign);
+
+    // WAVEFORMATEX
+    if ((params->channelCount <= 2) && ((bitsPerSample == 16) || (bitsPerSample == 8)))
+	{
+        old->cbSize		= 0;
+        old->wFormatTag	= WAVE_FORMAT_PCM;
+    }
+    // WAVEFORMATEXTENSIBLE
+    else
+	{
+        old->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+        old->cbSize		= sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
+
+        if ((params->sampleFormat & ~paNonInterleaved) == paFloat32)
+            wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
+        else
+            wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+
+        wavex->Samples.wValidBitsPerSample = bitsPerSample; //no extra padding!
+
+		// Set channel mask
+		if (channelMask != 0)
+		{
+			wavex->dwChannelMask = channelMask;
+		}
+		else
+		{
+			switch (params->channelCount)
+			{
+			case 1:  wavex->dwChannelMask = PAWIN_SPEAKER_MONO; break;
+			case 2:  wavex->dwChannelMask = PAWIN_SPEAKER_STEREO; break;
+			case 3:  wavex->dwChannelMask = PAWIN_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY; break;
+			case 4:  wavex->dwChannelMask = PAWIN_SPEAKER_QUAD; break;
+			case 5:  wavex->dwChannelMask = PAWIN_SPEAKER_QUAD|SPEAKER_LOW_FREQUENCY; break;
+#ifdef PAWIN_SPEAKER_5POINT1_SURROUND
+			case 6:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1_SURROUND; break;
+#else
+			case 6:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1; break;
+#endif
+#ifdef PAWIN_SPEAKER_5POINT1_SURROUND
+			case 7:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1_SURROUND|SPEAKER_BACK_CENTER; break;
+#else
+			case 7:  wavex->dwChannelMask = PAWIN_SPEAKER_5POINT1|SPEAKER_BACK_CENTER; break;
+#endif
+#ifdef PAWIN_SPEAKER_7POINT1_SURROUND
+			case 8:  wavex->dwChannelMask = PAWIN_SPEAKER_7POINT1_SURROUND; break;
+#else
+			case 8:  wavex->dwChannelMask = PAWIN_SPEAKER_7POINT1; break;
+#endif
+
+			default: wavex->dwChannelMask = 0;
+			}
+		}
+	}
+    return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+/*static void wasapiFillWFEXT( WAVEFORMATEXTENSIBLE* pwfext, PaSampleFormat sampleFormat, double sampleRate, int channelCount)
+{
+    PA_DEBUG(( "sampleFormat = %lx\n" , sampleFormat ));
+    PA_DEBUG(( "sampleRate = %f\n" , sampleRate ));
+    PA_DEBUG(( "chanelCount = %d\n", channelCount ));
+
+    pwfext->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+    pwfext->Format.nChannels = (WORD)channelCount;
+    pwfext->Format.nSamplesPerSec = (DWORD)sampleRate;
+    if(channelCount == 1)
+        pwfext->dwChannelMask = PAWIN_SPEAKER_DIRECTOUT;
+    else
+        pwfext->dwChannelMask = PAWIN_SPEAKER_STEREO;
+    if(sampleFormat == paFloat32)
+    {
+        pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
+        pwfext->Format.wBitsPerSample = 32;
+        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Samples.wValidBitsPerSample = 32;
+        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
+    }
+    else if(sampleFormat == paInt32)
+    {
+        pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
+        pwfext->Format.wBitsPerSample = 32;
+        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Samples.wValidBitsPerSample = 32;
+        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+    }
+    else if(sampleFormat == paInt24)
+    {
+        pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
+        pwfext->Format.wBitsPerSample = 32; // 24-bit in 32-bit int container
+        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Samples.wValidBitsPerSample = 24;
+        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+    }
+    else if(sampleFormat == paInt16)
+    {
+        pwfext->Format.nBlockAlign = (WORD)(channelCount * 2);
+        pwfext->Format.wBitsPerSample = 16;
+        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Samples.wValidBitsPerSample = 16;
+        pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+    }
+    pwfext->Format.nAvgBytesPerSec = pwfext->Format.nSamplesPerSec * pwfext->Format.nBlockAlign;
+}*/
+
+// ------------------------------------------------------------------------------------------
+static PaError GetClosestFormat(IAudioClient *myClient, double sampleRate,
+	const PaStreamParameters *_params, AUDCLNT_SHAREMODE shareMode, WAVEFORMATEXTENSIBLE *outWavex,
+	BOOL output)
+{
+	PaError answer                   = paInvalidSampleRate;
+	WAVEFORMATEX *sharedClosestMatch = NULL;
+	HRESULT hr                       = !S_OK;
+	PaStreamParameters params       = (*_params);
+	(void)output;
+
+	/* It was not noticed that 24-bit Input producing no output while device accepts this format.
+	   To fix this issue let's ask for 32-bits and let PA converters convert host 32-bit data
+	   to 24-bit for user-space. The bug concerns Vista, if Windows 7 supports 24-bits for Input
+	   please report to PortAudio developers to exclude Windows 7.
+	*/
+	/*if ((params.sampleFormat == paInt24) && (output == FALSE))
+		params.sampleFormat = paFloat32;*/ // <<< The silence was due to missing Int32_To_Int24_Dither implementation
+
+    MakeWaveFormatFromParams(outWavex, &params, sampleRate);
+
+	hr = IAudioClient_IsFormatSupported(myClient, shareMode, &outWavex->Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+	if (hr == S_OK)
+		answer = paFormatIsSupported;
+    else
+	if (sharedClosestMatch)
+	{
+		WORD bitsPerSample;
+        WAVEFORMATEXTENSIBLE *ext = (WAVEFORMATEXTENSIBLE*)sharedClosestMatch;
+
+		GUID subf_guid = GUID_NULL;
+		if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
+		{
+			memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEXTENSIBLE));
+			subf_guid = ext->SubFormat;
+		}
+		else
+			memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEX));
+
+        CoTaskMemFree(sharedClosestMatch);
+
+		// Make supported by default
+		answer = paFormatIsSupported;
+
+		// Validate SampleRate
+		if ((DWORD)sampleRate != outWavex->Format.nSamplesPerSec)
+			return paInvalidSampleRate;
+
+		// Validate Channel count
+		if ((WORD)params.channelCount != outWavex->Format.nChannels)
+		{
+			// If mono, then driver does not support 1 channel, we use internal workaround
+			// of tiny software mixing functionality, e.g. we provide to user buffer 1 channel
+			// but then mix into 2 for device buffer
+			if ((params.channelCount == 1) && (outWavex->Format.nChannels == 2))
+				return paFormatIsSupported;
+			else
+				return paInvalidChannelCount;
+		}
+
+		// Validate Sample format
+		if ((bitsPerSample = PaSampleFormatToBitsPerSample(params.sampleFormat)) == 0)
+			return paSampleFormatNotSupported;
+
+		// Validate Sample format: bit size (WASAPI does not limit 'bit size')
+		//if (bitsPerSample != outWavex->Format.wBitsPerSample)
+		//	return paSampleFormatNotSupported;
+
+		// Validate Sample format: paFloat32 (WASAPI does not limit 'bit type')
+		//if ((params->sampleFormat == paFloat32) && (subf_guid != KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
+		//	return paSampleFormatNotSupported;
+
+		// Validate Sample format: paInt32 (WASAPI does not limit 'bit type')
+		//if ((params->sampleFormat == paInt32) && (subf_guid != KSDATAFORMAT_SUBTYPE_PCM))
+		//	return paSampleFormatNotSupported;
+	}
+	else
+	{
+		static const int BestToWorst[] = { paFloat32, paInt24, paInt16 };
+		int i;
+
+		// Try combination stereo and we will use built-in mono-stereo mixer then
+		if (params.channelCount == 1)
+		{
+			WAVEFORMATEXTENSIBLE stereo = { 0 };
+
+			PaStreamParameters stereo_params = params;
+			stereo_params.channelCount = 2;
+
+			MakeWaveFormatFromParams(&stereo, &stereo_params, sampleRate);
+
+			hr = IAudioClient_IsFormatSupported(myClient, shareMode, &stereo.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+			if (hr == S_OK)
+			{
+				memcpy(outWavex, &stereo, sizeof(WAVEFORMATEXTENSIBLE));
+				CoTaskMemFree(sharedClosestMatch);
+				return (answer = paFormatIsSupported);
+			}
+
+			// Try selecting suitable sample type
+			for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)
+			{
+				WAVEFORMATEXTENSIBLE sample = { 0 };
+
+				PaStreamParameters sample_params = stereo_params;
+				sample_params.sampleFormat = BestToWorst[i];
+
+				MakeWaveFormatFromParams(&sample, &sample_params, sampleRate);
+
+				hr = IAudioClient_IsFormatSupported(myClient, shareMode, &sample.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+				if (hr == S_OK)
+				{
+					memcpy(outWavex, &sample, sizeof(WAVEFORMATEXTENSIBLE));
+					CoTaskMemFree(sharedClosestMatch);
+					return (answer = paFormatIsSupported);
+				}
+			}
+		}
+
+		// Try selecting suitable sample type
+		for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)
+		{
+			WAVEFORMATEXTENSIBLE spfmt = { 0 };
+
+			PaStreamParameters spfmt_params = params;
+			spfmt_params.sampleFormat = BestToWorst[i];
+
+			MakeWaveFormatFromParams(&spfmt, &spfmt_params, sampleRate);
+
+			hr = IAudioClient_IsFormatSupported(myClient, shareMode, &spfmt.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+			if (hr == S_OK)
+			{
+				memcpy(outWavex, &spfmt, sizeof(WAVEFORMATEXTENSIBLE));
+				CoTaskMemFree(sharedClosestMatch);
+				answer = paFormatIsSupported;
+				break;
+			}
+		}
+
+		// Nothing helped
+		LogHostError(hr);
+	}
+
+	return answer;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsStreamParamsValid(struct PaUtilHostApiRepresentation *hostApi,
+                                   const  PaStreamParameters *inputParameters,
+                                   const  PaStreamParameters *outputParameters,
+                                   double sampleRate)
+{
+	if (hostApi == NULL)
+		return paHostApiNotFound;
+	if ((UINT32)sampleRate == 0)
+		return paInvalidSampleRate;
+
+	if (inputParameters != NULL)
+    {
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+		if (inputParameters->sampleFormat & paCustomFormat)
+            return paSampleFormatNotSupported;
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if (inputParameters->channelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)
+            return paInvalidChannelCount;
+
+        /* validate inputStreamInfo */
+        if (inputParameters->hostApiSpecificStreamInfo)
+		{
+			PaWasapiStreamInfo *inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
+	        if ((inputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||
+	            (inputStreamInfo->version != 1) ||
+                (inputStreamInfo->hostApiType != paWASAPI))
+	        {
+	            return paIncompatibleHostApiSpecificStreamInfo;
+	        }
+		}
+
+        return paNoError;
+    }
+
+    if (outputParameters != NULL)
+    {
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+        if (outputParameters->sampleFormat & paCustomFormat)
+            return paSampleFormatNotSupported;
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
+            return paInvalidDevice;
+
+        /* check that output device can support outputChannelCount */
+        if (outputParameters->channelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)
+            return paInvalidChannelCount;
+
+        /* validate outputStreamInfo */
+        if(outputParameters->hostApiSpecificStreamInfo)
+        {
+			PaWasapiStreamInfo *outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
+	        if ((outputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||
+	            (outputStreamInfo->version != 1) ||
+                (outputStreamInfo->hostApiType != paWASAPI))
+	        {
+	            return paIncompatibleHostApiSpecificStreamInfo;
+	        }
+        }
+
+		return paNoError;
+    }
+
+	return (inputParameters || outputParameters ? paNoError : paInternalError);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const  PaStreamParameters *inputParameters,
+                                  const  PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+	IAudioClient *tmpClient = NULL;
+	PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
+	PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;
+
+	// Validate PaStreamParameters
+	PaError error;
+	if ((error = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)
+		return error;
+
+    if (inputParameters != NULL)
+    {
+		WAVEFORMATEXTENSIBLE wavex;
+		HRESULT hr;
+		PaError answer;
+		AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
+		inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
+
+		if (inputStreamInfo && (inputStreamInfo->flags & paWinWasapiExclusive))
+			shareMode  = AUDCLNT_SHAREMODE_EXCLUSIVE;
+
+		hr = ActivateAudioInterface(&paWasapi->devInfo[inputParameters->device], &tmpClient);
+		if (hr != S_OK)
+		{
+			LogHostError(hr);
+			return paInvalidDevice;
+		}
+
+		answer = GetClosestFormat(tmpClient, sampleRate, inputParameters, shareMode, &wavex, FALSE);
+		SAFE_RELEASE(tmpClient);
+
+		if (answer != paFormatIsSupported)
+			return answer;
+    }
+
+    if (outputParameters != NULL)
+    {
+		HRESULT hr;
+		WAVEFORMATEXTENSIBLE wavex;
+		PaError answer;
+		AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
+        outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
+
+		if (outputStreamInfo && (outputStreamInfo->flags & paWinWasapiExclusive))
+			shareMode  = AUDCLNT_SHAREMODE_EXCLUSIVE;
+
+		hr = ActivateAudioInterface(&paWasapi->devInfo[outputParameters->device], &tmpClient);
+		if (hr != S_OK)
+		{
+			LogHostError(hr);
+			return paInvalidDevice;
+		}
+
+		answer = GetClosestFormat(tmpClient, sampleRate, outputParameters, shareMode, &wavex, TRUE);
+		SAFE_RELEASE(tmpClient);
+
+		if (answer != paFormatIsSupported)
+			return answer;
+    }
+
+    return paFormatIsSupported;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaUint32 PaUtil_GetFramesPerHostBuffer(PaUint32 userFramesPerBuffer, PaTime suggestedLatency, double sampleRate, PaUint32 TimerJitterMs)
+{
+	PaUint32 frames = userFramesPerBuffer + max( userFramesPerBuffer, (PaUint32)(suggestedLatency * sampleRate) );
+    frames += (PaUint32)((sampleRate * 0.001) * TimerJitterMs);
+	return frames;
+}
+
+// ------------------------------------------------------------------------------------------
+static void _RecalculateBuffersCount(PaWasapiSubStream *sub, UINT32 userFramesPerBuffer, UINT32 framesPerLatency, BOOL fullDuplex)
+{
+	// Count buffers (must be at least 1)
+	sub->buffers = (userFramesPerBuffer ? framesPerLatency / userFramesPerBuffer : 0);
+	if (sub->buffers == 0)
+		sub->buffers = 1;
+
+	// Determine amount of buffers used:
+	// - Full-duplex mode will lead to period difference, thus only 1.
+	// - Input mode, only 1, as WASAPI allows extraction of only 1 packet.
+	// - For Shared mode we use double buffering.
+	if ((sub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) || fullDuplex)
+	{
+		// Exclusive mode does not allow >1 buffers be used for Event interface, e.g. GetBuffer
+		// call must acquire max buffer size and it all must be processed.
+		if (sub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)
+			sub->userBufferAndHostMatch = 1;
+
+		// Use paUtilBoundedHostBufferSize because exclusive mode will starve and produce
+		// bad quality of audio
+		sub->buffers = 1;
+	}
+}
+
+// ------------------------------------------------------------------------------------------
+static void _CalculateAlignedPeriod(PaWasapiSubStream *pSub, UINT32 *nFramesPerLatency,
+									ALIGN_FUNC pAlignFunc)
+{
+	// Align frames to HD Audio packet size of 128 bytes for Exclusive mode only.
+	// Not aligning on Windows Vista will cause Event timeout, although Windows 7 will
+	// return AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED error to realign buffer. Aligning is necessary
+	// for Exclusive mode only! when audio data is feeded directly to hardware.
+	if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+	{
+		(*nFramesPerLatency) = AlignFramesPerBuffer((*nFramesPerLatency),
+			pSub->wavex.Format.nSamplesPerSec, pSub->wavex.Format.nBlockAlign, pAlignFunc);
+	}
+
+	// Calculate period
+	pSub->period = MakeHnsPeriod((*nFramesPerLatency), pSub->wavex.Format.nSamplesPerSec);
+}
+
+// ------------------------------------------------------------------------------------------
+static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSub, BOOL output, PaError *pa_error)
+{
+	PaError error;
+    HRESULT hr;
+
+	const PaWasapiDeviceInfo *pInfo  = pSub->params.device_info;
+	const PaStreamParameters *params = &pSub->params.stream_params;
+	UINT32 framesPerLatency          = pSub->params.frames_per_buffer;
+	double sampleRate                = pSub->params.sample_rate;
+	//BOOL blocking                    = pSub->params.blocking;
+	BOOL fullDuplex                  = pSub->params.full_duplex;
+
+	const UINT32 userFramesPerBuffer = framesPerLatency;
+    IAudioClient *audioClient	     = NULL;
+
+	// Assume default failure due to some reason
+	(*pa_error) = paInvalidDevice;
+
+	// Validate parameters
+    if (!pSub || !pInfo || !params)
+	{
+		(*pa_error) = paBadStreamPtr;
+        return E_POINTER;
+	}
+	if ((UINT32)sampleRate == 0)
+	{
+		(*pa_error) = paInvalidSampleRate;
+        return E_INVALIDARG;
+	}
+
+    // Get the audio client
+    hr = ActivateAudioInterface(pInfo, &audioClient);
+	if (hr != S_OK)
+	{
+		(*pa_error) = paInsufficientMemory;
+		LogHostError(hr);
+		goto done;
+	}
+
+	// Get closest format
+	if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)
+	{
+		(*pa_error) = error;
+		LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+		goto done; // fail, format not supported
+	}
+
+	// Check for Mono <<>> Stereo workaround
+	if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))
+	{
+		/*if (blocking)
+		{
+			LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+			goto done; // fail, blocking mode not supported
+		}*/
+
+		// select mixer
+		pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));
+		if (pSub->monoMixer == NULL)
+		{
+			(*pa_error) = paInvalidChannelCount;
+			LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+			goto done; // fail, no mixer for format
+		}
+	}
+
+#if 0
+	// Add suggestd latency
+	framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);
+#else
+	// Calculate host buffer size
+	if ((pSub->shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE) &&
+		(!pSub->streamFlags || ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))
+	{
+		framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,
+			params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,
+			(pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);
+	}
+	else
+	{
+		REFERENCE_TIME overall;
+
+		// Work 1:1 with user buffer (only polling allows to use >1)
+		framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);
+
+		// Use Polling if overall latency is > 5ms as it allows to use 100% CPU in a callback,
+		// or user specified latency parameter
+		overall = MakeHnsPeriod(framesPerLatency, pSub->wavex.Format.nSamplesPerSec);
+		if ((overall >= (106667*2)/*21.33ms*/) || ((INT32)(params->suggestedLatency*100000.0) != 0/*0.01 msec granularity*/))
+		{
+			framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,
+				params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,
+				(streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);
+
+			// Use Polling interface
+			pSub->streamFlags &= ~AUDCLNT_STREAMFLAGS_EVENTCALLBACK;
+			PRINT(("WASAPI: CreateAudioClient: forcing POLL mode\n"));
+		}
+	}
+#endif
+
+	// For full-duplex output resize buffer to be the same as for input
+	if (output && fullDuplex)
+		framesPerLatency = pStream->in.framesPerHostCallback;
+
+	// Avoid 0 frames
+	if (framesPerLatency == 0)
+		framesPerLatency = MakeFramesFromHns(pInfo->DefaultDevicePeriod, pSub->wavex.Format.nSamplesPerSec);
+
+	// Exclusive Input stream renders data in 6 packets, we must set then the size of
+	// single packet, total buffer size, e.g. required latency will be PacketSize * 6
+	if (!output && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))
+	{
+		// Do it only for Polling mode
+		if ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)
+		{
+			framesPerLatency /= WASAPI_PACKETS_PER_INPUT_BUFFER;
+		}
+	}
+
+	// Calculate aligned period
+	_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+
+	/*! Enforce min/max period for device in Shared mode to avoid bad audio quality.
+        Avoid doing so for Exclusive mode as alignment will suffer.
+	*/
+	if (pSub->shareMode == AUDCLNT_SHAREMODE_SHARED)
+	{
+		if (pSub->period < pInfo->DefaultDevicePeriod)
+		{
+			pSub->period = pInfo->DefaultDevicePeriod;
+			// Recalculate aligned period
+			framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+			_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+		}
+	}
+	else
+	{
+		if (pSub->period < pInfo->MinimumDevicePeriod)
+		{
+			pSub->period = pInfo->MinimumDevicePeriod;
+			// Recalculate aligned period
+			framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+			_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_FWD);
+		}
+	}
+
+	/*! Windows 7 does not allow to set latency lower than minimal device period and will
+	    return error: AUDCLNT_E_INVALID_DEVICE_PERIOD. Under Vista we enforce the same behavior
+	    manually for unified behavior on all platforms.
+	*/
+	{
+		/*!	AUDCLNT_E_BUFFER_SIZE_ERROR: Applies to Windows 7 and later.
+			Indicates that the buffer duration value requested by an exclusive-mode client is
+			out of range. The requested duration value for pull mode must not be greater than
+			500 milliseconds; for push mode the duration value must not be greater than 2 seconds.
+		*/
+		if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+		{
+			static const REFERENCE_TIME MAX_BUFFER_EVENT_DURATION = 500  * 10000;
+			static const REFERENCE_TIME MAX_BUFFER_POLL_DURATION  = 2000 * 10000;
+
+			if (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)	// pull mode, max 500ms
+			{
+				if (pSub->period > MAX_BUFFER_EVENT_DURATION)
+				{
+					pSub->period = MAX_BUFFER_EVENT_DURATION;
+					// Recalculate aligned period
+					framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+					_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+				}
+			}
+			else														// push mode, max 2000ms
+			{
+				if (pSub->period > MAX_BUFFER_POLL_DURATION)
+				{
+					pSub->period = MAX_BUFFER_POLL_DURATION;
+					// Recalculate aligned period
+					framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+					_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+				}
+			}
+		}
+	}
+
+	// Set Raw mode (applicable only to IAudioClient2)
+#ifdef __IAudioClient2_INTERFACE_DEFINED__
+	if (GetAudioClientVersion() >= 2)
+	{
+		pa_AudioClientProperties audioProps = { 0 };
+		audioProps.cbSize     = sizeof(pa_AudioClientProperties);
+		audioProps.bIsOffload = FALSE;
+		audioProps.eCategory  = (AUDIO_STREAM_CATEGORY)pSub->params.wasapi_params.streamCategory;
+		switch (pSub->params.wasapi_params.streamOption)
+		{
+		case eStreamOptionRaw:
+			if (GetWindowsVersion() >= WINDOWS_8_1_SERVER2012R2)
+				audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_RAW;
+			break;
+		case eStreamOptionMatchFormat:
+			if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)
+				audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT;
+			break;
+		}
+
+		hr = IAudioClient2_SetClientProperties((IAudioClient2 *)audioClient, (AudioClientProperties *)&audioProps);
+		if (hr != S_OK)
+		{
+			PRINT(("WASAPI: IAudioClient2_SetClientProperties(Category = %d, Options = %d) failed with error = %08X\n", audioProps.eCategory, audioProps.Options, (UINT32)hr));
+		}
+		else
+		{
+			PRINT(("WASAPI: IAudioClient2 set properties: IsOffload = %d, Category = %d, Options = %d\n", audioProps.bIsOffload, audioProps.eCategory, audioProps.Options));
+		}
+	}
+#endif
+
+	// Open the stream and associate it with an audio session
+    hr = IAudioClient_Initialize(audioClient,
+        pSub->shareMode,
+        pSub->streamFlags,
+		pSub->period,
+		(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+		&pSub->wavex.Format,
+        NULL);
+
+	/*! WASAPI is tricky on large device buffer, sometimes 2000ms can be allocated sometimes
+	    less. There is no known guaranteed level thus we make subsequent tries by decreasing
+		buffer by 100ms per try.
+	*/
+	while ((hr == E_OUTOFMEMORY) && (pSub->period > (100 * 10000)))
+	{
+		PRINT(("WASAPI: CreateAudioClient: decreasing buffer size to %d milliseconds\n", (pSub->period / 10000)));
+
+		// Decrease by 100ms and try again
+		pSub->period -= (100 * 10000);
+
+		// Recalculate aligned period
+		framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+		_CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+
+        // Release the previous allocations
+        SAFE_RELEASE(audioClient);
+
+        // Create a new audio client
+        hr = ActivateAudioInterface(pInfo, &audioClient);
+    	if (hr != S_OK)
+		{
+			(*pa_error) = paInsufficientMemory;
+			LogHostError(hr);
+			goto done;
+		}
+
+		// Open the stream and associate it with an audio session
+		hr = IAudioClient_Initialize(audioClient,
+			pSub->shareMode,
+			pSub->streamFlags,
+			pSub->period,
+			(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+			&pSub->wavex.Format,
+			NULL);
+	}
+
+	/*! WASAPI buffer size failure. Fallback to using default size.
+	*/
+	if (hr == AUDCLNT_E_BUFFER_SIZE_ERROR)
+	{
+		// Use default
+		pSub->period = pInfo->DefaultDevicePeriod;
+
+		PRINT(("WASAPI: CreateAudioClient: correcting buffer size to device default\n"));
+
+        // Release the previous allocations
+        SAFE_RELEASE(audioClient);
+
+        // Create a new audio client
+        hr = ActivateAudioInterface(pInfo, &audioClient);
+    	if (hr != S_OK)
+		{
+			(*pa_error) = paInsufficientMemory;
+			LogHostError(hr);
+			goto done;
+		}
+
+		// Open the stream and associate it with an audio session
+		hr = IAudioClient_Initialize(audioClient,
+			pSub->shareMode,
+			pSub->streamFlags,
+			pSub->period,
+			(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+			&pSub->wavex.Format,
+			NULL);
+	}
+
+    /*! If the requested buffer size is not aligned. Can be triggered by Windows 7 and up.
+	    Should not be be triggered ever as we do align buffers always with _CalculateAlignedPeriod.
+	*/
+    if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)
+    {
+		UINT32 frames = 0;
+
+        // Get the next aligned frame
+        hr = IAudioClient_GetBufferSize(audioClient, &frames);
+		if (hr != S_OK)
+		{
+			(*pa_error) = paInvalidDevice;
+			LogHostError(hr);
+			goto done;
+		}
+
+		PRINT(("WASAPI: CreateAudioClient: aligning buffer size to % frames\n", frames));
+
+        // Release the previous allocations
+        SAFE_RELEASE(audioClient);
+
+        // Create a new audio client
+        hr = ActivateAudioInterface(pInfo, &audioClient);
+    	if (hr != S_OK)
+		{
+			(*pa_error) = paInsufficientMemory;
+			LogHostError(hr);
+			goto done;
+		}
+
+		// Get closest format
+		if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)
+		{
+			(*pa_error) = error;
+			LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT); // fail, format not supported
+			goto done;
+		}
+
+		// Check for Mono >> Stereo workaround
+		if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))
+		{
+			/*if (blocking)
+			{
+				LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+				goto done; // fail, blocking mode not supported
+			}*/
+
+			// Select mixer
+			pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));
+			if (pSub->monoMixer == NULL)
+			{
+				(*pa_error) = paInvalidChannelCount;
+				LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+				goto done; // fail, no mixer for format
+			}
+		}
+
+		// Calculate period
+		pSub->period = MakeHnsPeriod(frames, pSub->wavex.Format.nSamplesPerSec);
+
+        // Open the stream and associate it with an audio session
+        hr = IAudioClient_Initialize(audioClient,
+            pSub->shareMode,
+            pSub->streamFlags,
+			pSub->period,
+			(pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+            &pSub->wavex.Format,
+            NULL);
+    	if (hr != S_OK)
+		{
+			(*pa_error) = paInvalidDevice;
+			LogHostError(hr);
+			goto done;
+		}
+    }
+    else
+	if (hr != S_OK)
+    {
+		(*pa_error) = paInvalidDevice;
+		LogHostError(hr);
+		goto done;
+    }
+
+    // Set client
+	pSub->clientParent = audioClient;
+    IAudioClient_AddRef(pSub->clientParent);
+
+	// Recalculate buffers count
+	_RecalculateBuffersCount(pSub,
+		userFramesPerBuffer,
+		MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec),
+		fullDuplex);
+
+	// No error, client is succesfully created
+	(*pa_error) = paNoError;
+
+done:
+
+    // Clean up
+    SAFE_RELEASE(audioClient);
+    return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError ActivateAudioClientOutput(PaWasapiStream *stream)
+{
+	HRESULT hr;
+	PaError result;
+
+	UINT32 maxBufferSize   = 0;
+	PaTime buffer_latency  = 0;
+	UINT32 framesPerBuffer = stream->out.params.frames_per_buffer;
+
+	// Create Audio client
+	hr = CreateAudioClient(stream, &stream->out, TRUE, &result);
+    if (hr != S_OK)
+	{
+		LogPaError(result);
+		goto error;
+    }
+	LogWAVEFORMATEXTENSIBLE(&stream->out.wavex);
+
+	// Activate volume
+	stream->outVol = NULL;
+    /*hr = info->device->Activate(
+        __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
+        (void**)&stream->outVol);
+    if (hr != S_OK)
+        return paInvalidDevice;*/
+
+    // Get max possible buffer size to check if it is not less than that we request
+    hr = IAudioClient_GetBufferSize(stream->out.clientParent, &maxBufferSize);
+    if (hr != S_OK)
+	{
+		LogHostError(hr);
+		LogPaError(result = paInvalidDevice);
+		goto error;
+	}
+
+    // Correct buffer to max size if it maxed out result of GetBufferSize
+	stream->out.bufferSize = maxBufferSize;
+
+	// Get interface latency (actually uneeded as we calculate latency from the size
+	// of maxBufferSize).
+    hr = IAudioClient_GetStreamLatency(stream->out.clientParent, &stream->out.deviceLatency);
+    if (hr != S_OK)
+	{
+		LogHostError(hr);
+		LogPaError(result = paInvalidDevice);
+		goto error;
+	}
+	//stream->out.latencySeconds = nano100ToSeconds(stream->out.deviceLatency);
+
+    // Number of frames that are required at each period
+	stream->out.framesPerHostCallback = maxBufferSize;
+
+	// Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer
+	stream->out.framesPerBuffer =
+		(stream->out.userBufferAndHostMatch ? stream->out.framesPerHostCallback : framesPerBuffer);
+
+	// Calculate buffer latency
+	buffer_latency = (PaTime)maxBufferSize / stream->out.wavex.Format.nSamplesPerSec;
+
+	// Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)
+	stream->out.latencySeconds = buffer_latency;
+
+	PRINT(("WASAPI::OpenStream(output): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->out.framesPerHostCallback, (float)(stream->out.latencySeconds*1000.0f), (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->out.params.wow64_workaround ? "YES" : "NO"), (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));
+
+	return paNoError;
+
+error:
+
+	return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError ActivateAudioClientInput(PaWasapiStream *stream)
+{
+	HRESULT hr;
+	PaError result;
+
+	UINT32 maxBufferSize   = 0;
+	PaTime buffer_latency  = 0;
+	UINT32 framesPerBuffer = stream->in.params.frames_per_buffer;
+
+	// Create Audio client
+	hr = CreateAudioClient(stream, &stream->in, FALSE, &result);
+    if (hr != S_OK)
+	{
+		LogPaError(result);
+		goto error;
+    }
+	LogWAVEFORMATEXTENSIBLE(&stream->in.wavex);
+
+	// Create volume mgr
+	stream->inVol = NULL;
+    /*hr = info->device->Activate(
+        __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
+        (void**)&stream->inVol);
+    if (hr != S_OK)
+        return paInvalidDevice;*/
+
+    // Get max possible buffer size to check if it is not less than that we request
+    hr = IAudioClient_GetBufferSize(stream->in.clientParent, &maxBufferSize);
+    if (hr != S_OK)
+	{
+		LogHostError(hr);
+		LogPaError(result = paInvalidDevice);
+		goto error;
+	}
+
+    // Correct buffer to max size if it maxed out result of GetBufferSize
+	stream->in.bufferSize = maxBufferSize;
+
+	// Get interface latency (actually uneeded as we calculate latency from the size
+	// of maxBufferSize).
+    hr = IAudioClient_GetStreamLatency(stream->in.clientParent, &stream->in.deviceLatency);
+    if (hr != S_OK)
+	{
+		LogHostError(hr);
+		LogPaError(result = paInvalidDevice);
+		goto error;
+	}
+	//stream->in.latencySeconds = nano100ToSeconds(stream->in.deviceLatency);
+
+    // Number of frames that are required at each period
+	stream->in.framesPerHostCallback = maxBufferSize;
+
+	// Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer
+	stream->in.framesPerBuffer =
+		(stream->in.userBufferAndHostMatch ? stream->in.framesPerHostCallback : framesPerBuffer);
+
+	// Calculate buffer latency
+	buffer_latency = (PaTime)maxBufferSize / stream->in.wavex.Format.nSamplesPerSec;
+
+	// Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)
+	stream->in.latencySeconds = buffer_latency;
+
+	PRINT(("WASAPI::OpenStream(input): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->in.framesPerHostCallback, (float)(stream->in.latencySeconds*1000.0f), (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->in.params.wow64_workaround ? "YES" : "NO"), (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));
+
+	return paNoError;
+
+error:
+
+	return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError result = paNoError;
+	HRESULT hr;
+    PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
+    PaWasapiStream *stream = NULL;
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
+	PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;
+	PaWasapiDeviceInfo *info = NULL;
+	ULONG framesPerHostCallback;
+	PaUtilHostBufferSizeMode bufferMode;
+	const BOOL fullDuplex = ((inputParameters != NULL) && (outputParameters != NULL));
+
+	// validate PaStreamParameters
+	if ((result = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)
+		return LogPaError(result);
+
+    // Validate platform specific flags
+    if ((streamFlags & paPlatformSpecificFlags) != 0)
+	{
+		LogPaError(result = paInvalidFlag); /* unexpected platform specific flag */
+		goto error;
+	}
+
+	// Allocate memory for PaWasapiStream
+    if ((stream = (PaWasapiStream *)PaUtil_AllocateMemory(sizeof(PaWasapiStream))) == NULL)
+	{
+        LogPaError(result = paInsufficientMemory);
+        goto error;
+    }
+
+	// Default thread priority is Audio: for exclusive mode we will use Pro Audio.
+	stream->nThreadPriority = eThreadPriorityAudio;
+
+	// Set default number of frames: paFramesPerBufferUnspecified
+	if (framesPerBuffer == paFramesPerBufferUnspecified)
+	{
+		UINT32 framesPerBufferIn  = 0, framesPerBufferOut = 0;
+		if (inputParameters != NULL)
+		{
+			info = &paWasapi->devInfo[inputParameters->device];
+			framesPerBufferIn = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);
+		}
+		if (outputParameters != NULL)
+		{
+			info = &paWasapi->devInfo[outputParameters->device];
+			framesPerBufferOut = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);
+		}
+		// choosing maximum default size
+		framesPerBuffer = max(framesPerBufferIn, framesPerBufferOut);
+	}
+	if (framesPerBuffer == 0)
+		framesPerBuffer = ((UINT32)sampleRate / 100) * 2;
+
+	// Try create device: Input
+	if (inputParameters != NULL)
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+        info              = &paWasapi->devInfo[inputParameters->device];
+
+		// default Shared Mode
+		stream->in.shareMode = AUDCLNT_SHAREMODE_SHARED;
+
+		// PaWasapiStreamInfo
+		if (inputParameters->hostApiSpecificStreamInfo != NULL)
+		{
+			memcpy(&stream->in.params.wasapi_params, inputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->in.params.wasapi_params), ((PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo)->size));
+			stream->in.params.wasapi_params.size = sizeof(stream->in.params.wasapi_params);
+
+			stream->in.params.stream_params.hostApiSpecificStreamInfo = &stream->in.params.wasapi_params;
+			inputStreamInfo = &stream->in.params.wasapi_params;
+
+			stream->in.flags = inputStreamInfo->flags;
+
+			// Exclusive Mode
+			if (inputStreamInfo->flags & paWinWasapiExclusive)
+			{
+				// Boost thread priority
+				stream->nThreadPriority = eThreadPriorityProAudio;
+				// Make Exclusive
+				stream->in.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+			}
+
+			// explicit thread priority level
+			if (inputStreamInfo->flags & paWinWasapiThreadPriority)
+			{
+				if ((inputStreamInfo->threadPriority > eThreadPriorityNone) &&
+					(inputStreamInfo->threadPriority <= eThreadPriorityWindowManager))
+					stream->nThreadPriority = inputStreamInfo->threadPriority;
+			}
+		}
+
+		// Choose processing mode
+		stream->in.streamFlags = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);
+		if (paWasapi->useWOW64Workaround)
+			stream->in.streamFlags = 0; // polling interface
+		else
+		if (streamCallback == NULL)
+			stream->in.streamFlags = 0; // polling interface
+		else
+		if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiPolling))
+			stream->in.streamFlags = 0; // polling interface
+		else
+		if (fullDuplex)
+			stream->in.streamFlags = 0; // polling interface is implemented for full-duplex mode also
+
+		// Fill parameters for Audio Client creation
+		stream->in.params.device_info       = info;
+		stream->in.params.stream_params     = (*inputParameters);
+		stream->in.params.frames_per_buffer = framesPerBuffer;
+		stream->in.params.sample_rate       = sampleRate;
+		stream->in.params.blocking          = (streamCallback == NULL);
+		stream->in.params.full_duplex       = fullDuplex;
+		stream->in.params.wow64_workaround  = paWasapi->useWOW64Workaround;
+
+		// Create and activate audio client
+		hr = ActivateAudioClientInput(stream);
+        if (hr != S_OK)
+		{
+			LogPaError(result = paInvalidDevice);
+			goto error;
+        }
+
+		// Get closest format
+        hostInputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->in.wavex), inputSampleFormat );
+
+        // Set user-side custom host processor
+        if ((inputStreamInfo != NULL) &&
+            (inputStreamInfo->flags & paWinWasapiRedirectHostProcessor))
+        {
+            stream->hostProcessOverrideInput.processor = inputStreamInfo->hostProcessorInput;
+            stream->hostProcessOverrideInput.userData = userData;
+        }
+
+		// Only get IAudioCaptureClient input once here instead of getting it at multiple places based on the use
+		hr = IAudioClient_GetService(stream->in.clientParent, &pa_IID_IAudioCaptureClient, (void **)&stream->captureClientParent);
+		if (hr != S_OK)
+		{
+			LogHostError(hr);
+			LogPaError(result = paUnanticipatedHostError);
+			goto error;
+		}
+
+		// Create ring buffer for blocking mode (It is needed because we fetch Input packets, not frames,
+		// and thus we have to save partial packet if such remains unread)
+		if (stream->in.params.blocking == TRUE)
+		{
+			UINT32 bufferFrames = ALIGN_NEXT_POW2((stream->in.framesPerHostCallback / WASAPI_PACKETS_PER_INPUT_BUFFER) * 2);
+			UINT32 frameSize    = stream->in.wavex.Format.nBlockAlign;
+
+			// buffer
+			if ((stream->in.tailBuffer = PaUtil_AllocateMemory(sizeof(PaUtilRingBuffer))) == NULL)
+			{
+				LogPaError(result = paInsufficientMemory);
+				goto error;
+			}
+			memset(stream->in.tailBuffer, 0, sizeof(PaUtilRingBuffer));
+
+			// buffer memory region
+			stream->in.tailBufferMemory = PaUtil_AllocateMemory(frameSize * bufferFrames);
+			if (stream->in.tailBufferMemory == NULL)
+			{
+				LogPaError(result = paInsufficientMemory);
+				goto error;
+			}
+
+			// initialize
+			if (PaUtil_InitializeRingBuffer(stream->in.tailBuffer, frameSize, bufferFrames,	stream->in.tailBufferMemory) != 0)
+			{
+				LogPaError(result = paInternalError);
+				goto error;
+			}
+		}
+	}
+    else
+    {
+        inputChannelCount = 0;
+        inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
+    }
+
+	// Try create device: Output
+    if (outputParameters != NULL)
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+		info               = &paWasapi->devInfo[outputParameters->device];
+
+		// default Shared Mode
+		stream->out.shareMode = AUDCLNT_SHAREMODE_SHARED;
+
+		// set PaWasapiStreamInfo
+		if (outputParameters->hostApiSpecificStreamInfo != NULL)
+		{
+			memcpy(&stream->out.params.wasapi_params, outputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->out.params.wasapi_params), ((PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo)->size));
+			stream->out.params.wasapi_params.size = sizeof(stream->out.params.wasapi_params);
+
+			stream->out.params.stream_params.hostApiSpecificStreamInfo = &stream->out.params.wasapi_params;
+			outputStreamInfo = &stream->out.params.wasapi_params;
+
+			stream->out.flags = outputStreamInfo->flags;
+
+			// Exclusive Mode
+			if (outputStreamInfo->flags & paWinWasapiExclusive)
+			{
+				// Boost thread priority
+				stream->nThreadPriority = eThreadPriorityProAudio;
+				// Make Exclusive
+				stream->out.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+			}
+
+			// explicit thread priority level
+			if (outputStreamInfo->flags & paWinWasapiThreadPriority)
+			{
+				if ((outputStreamInfo->threadPriority > eThreadPriorityNone) &&
+					(outputStreamInfo->threadPriority <= eThreadPriorityWindowManager))
+					stream->nThreadPriority = outputStreamInfo->threadPriority;
+			}
+		}
+
+		// Choose processing mode
+		stream->out.streamFlags = (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);
+		if (paWasapi->useWOW64Workaround)
+			stream->out.streamFlags = 0; // polling interface
+		else
+		if (streamCallback == NULL)
+			stream->out.streamFlags = 0; // polling interface
+		else
+		if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiPolling))
+			stream->out.streamFlags = 0; // polling interface
+		else
+		if (fullDuplex)
+			stream->out.streamFlags = 0; // polling interface is implemented for full-duplex mode also
+
+		// Fill parameters for Audio Client creation
+		stream->out.params.device_info       = info;
+		stream->out.params.stream_params     = (*outputParameters);
+		stream->out.params.frames_per_buffer = framesPerBuffer;
+		stream->out.params.sample_rate       = sampleRate;
+		stream->out.params.blocking          = (streamCallback == NULL);
+		stream->out.params.full_duplex       = fullDuplex;
+		stream->out.params.wow64_workaround  = paWasapi->useWOW64Workaround;
+
+		// Create and activate audio client
+		hr = ActivateAudioClientOutput(stream);
+        if (hr != S_OK)
+		{
+			LogPaError(result = paInvalidDevice);
+			goto error;
+        }
+
+		// Get closest format
+        hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->out.wavex), outputSampleFormat );
+
+        // Set user-side custom host processor
+        if ((outputStreamInfo != NULL) &&
+            (outputStreamInfo->flags & paWinWasapiRedirectHostProcessor))
+        {
+            stream->hostProcessOverrideOutput.processor = outputStreamInfo->hostProcessorOutput;
+            stream->hostProcessOverrideOutput.userData = userData;
+        }
+
+		// Only get IAudioCaptureClient output once here instead of getting it at multiple places based on the use
+		hr = IAudioClient_GetService(stream->out.clientParent, &pa_IID_IAudioRenderClient, (void **)&stream->renderClientParent);
+		if (hr != S_OK)
+		{
+			LogHostError(hr);
+			LogPaError(result = paUnanticipatedHostError);
+			goto error;
+		}
+	}
+    else
+    {
+        outputChannelCount = 0;
+        outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
+    }
+
+	// log full-duplex
+	if (fullDuplex)
+		PRINT(("WASAPI::OpenStream: full-duplex mode\n"));
+
+	// paWinWasapiPolling must be on/or not on both streams
+	if ((inputParameters != NULL) && (outputParameters != NULL))
+	{
+		if ((inputStreamInfo != NULL) && (outputStreamInfo != NULL))
+		{
+			if (((inputStreamInfo->flags & paWinWasapiPolling) &&
+				!(outputStreamInfo->flags & paWinWasapiPolling))
+				||
+				(!(inputStreamInfo->flags & paWinWasapiPolling) &&
+				 (outputStreamInfo->flags & paWinWasapiPolling)))
+			{
+				LogPaError(result = paInvalidFlag);
+				goto error;
+			}
+		}
+	}
+
+	// Initialize stream representation
+    if (streamCallback)
+    {
+		stream->bBlocking = FALSE;
+        PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,
+                                              &paWasapi->callbackStreamInterface,
+											  streamCallback, userData);
+    }
+    else
+    {
+		stream->bBlocking = TRUE;
+        PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,
+                                              &paWasapi->blockingStreamInterface,
+											  streamCallback, userData);
+    }
+
+	// Initialize CPU measurer
+    PaUtil_InitializeCpuLoadMeasurer(&stream->cpuLoadMeasurer, sampleRate);
+
+	if (outputParameters && inputParameters)
+	{
+		// serious problem #1 - No, Not a problem, especially concerning Exclusive mode.
+		// Input device in exclusive mode somehow is getting large buffer always, thus we
+		// adjust Output latency to reflect it, thus period will differ but playback will be
+		// normal.
+		/*if (stream->in.period != stream->out.period)
+		{
+			PRINT(("WASAPI: OpenStream: period discrepancy\n"));
+			LogPaError(result = paBadIODeviceCombination);
+			goto error;
+		}*/
+
+		// serious problem #2 - No, Not a problem, as framesPerHostCallback take into account
+		// sample size while it is not a problem for PA full-duplex, we must care of
+		// preriod only!
+		/*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)
+		{
+			PRINT(("WASAPI: OpenStream: framesPerHostCallback discrepancy\n"));
+			goto error;
+		}*/
+	}
+
+	// Calculate frames per host for processor
+	framesPerHostCallback = (outputParameters ? stream->out.framesPerBuffer : stream->in.framesPerBuffer);
+
+	// Choose correct mode of buffer processing:
+	// Exclusive/Shared non paWinWasapiPolling mode: paUtilFixedHostBufferSize - always fixed
+	// Exclusive/Shared paWinWasapiPolling mode: paUtilBoundedHostBufferSize - may vary for Exclusive or Full-duplex
+	bufferMode = paUtilFixedHostBufferSize;
+	if (inputParameters) // !!! WASAPI IAudioCaptureClient::GetBuffer extracts not number of frames but 1 packet, thus we always must adapt
+		bufferMode = paUtilBoundedHostBufferSize;
+	else
+	if (outputParameters)
+	{
+		if ((stream->out.buffers == 1) &&
+			(!stream->out.streamFlags || ((stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))
+			bufferMode = paUtilBoundedHostBufferSize;
+	}
+	stream->bufferMode = bufferMode;
+
+    // Initialize buffer processor
+    result =  PaUtil_InitializeBufferProcessor(
+		&stream->bufferProcessor,
+        inputChannelCount,
+		inputSampleFormat,
+		hostInputSampleFormat,
+        outputChannelCount,
+		outputSampleFormat,
+		hostOutputSampleFormat,
+        sampleRate,
+		streamFlags,
+		framesPerBuffer,
+        framesPerHostCallback,
+		bufferMode,
+        streamCallback,
+		userData);
+    if (result != paNoError)
+	{
+		LogPaError(result);
+        goto error;
+	}
+
+	// Set Input latency
+    stream->streamRepresentation.streamInfo.inputLatency =
+            ((double)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate)
+			+ ((inputParameters)?stream->in.latencySeconds : 0);
+
+	// Set Output latency
+    stream->streamRepresentation.streamInfo.outputLatency =
+            ((double)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate)
+			+ ((outputParameters)?stream->out.latencySeconds : 0);
+
+	// Set SR
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+    (*s) = (PaStream *)stream;
+    return result;
+
+error:
+
+    if (stream != NULL)
+		CloseStream(stream);
+
+    return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError CloseStream( PaStream* s )
+{
+    PaError result = paNoError;
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+
+	// abort active stream
+	if (IsStreamActive(s))
+	{
+		result = AbortStream(s);
+	}
+
+    SAFE_RELEASE(stream->captureClientParent);
+    SAFE_RELEASE(stream->renderClientParent);
+    SAFE_RELEASE(stream->out.clientParent);
+    SAFE_RELEASE(stream->in.clientParent);
+	SAFE_RELEASE(stream->inVol);
+	SAFE_RELEASE(stream->outVol);
+
+	CloseHandle(stream->event[S_INPUT]);
+	CloseHandle(stream->event[S_OUTPUT]);
+
+	_StreamCleanup(stream);
+
+	PaWasapi_FreeMemory(stream->in.monoBuffer);
+	PaWasapi_FreeMemory(stream->out.monoBuffer);
+
+	PaUtil_FreeMemory(stream->in.tailBuffer);
+	PaUtil_FreeMemory(stream->in.tailBufferMemory);
+
+	PaUtil_FreeMemory(stream->out.tailBuffer);
+	PaUtil_FreeMemory(stream->out.tailBufferMemory);
+
+    PaUtil_TerminateBufferProcessor(&stream->bufferProcessor);
+    PaUtil_TerminateStreamRepresentation(&stream->streamRepresentation);
+    PaUtil_FreeMemory(stream);
+
+    return result;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream)
+{
+#ifndef PA_WINRT
+	HRESULT hResult = S_OK;
+	HRESULT hFirstBadResult = S_OK;
+	substream->clientProc = NULL;
+
+	// IAudioClient
+	hResult = CoGetInterfaceAndReleaseStream(substream->clientStream, GetAudioClientIID(), (LPVOID*)&substream->clientProc);
+	substream->clientStream = NULL;
+	if (hResult != S_OK)
+	{
+		hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+	}
+
+	return hFirstBadResult;
+
+#else
+	(void)substream;
+	return S_OK;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream)
+{
+#ifndef PA_WINRT
+	HRESULT hResult = S_OK;
+	HRESULT hFirstBadResult = S_OK;
+	stream->captureClient = NULL;
+	stream->renderClient = NULL;
+	stream->in.clientProc = NULL;
+	stream->out.clientProc = NULL;
+
+	if (NULL != stream->in.clientParent)
+	{
+		// SubStream pointers
+		hResult = UnmarshalSubStreamComPointers(&stream->in);
+		if (hResult != S_OK)
+		{
+			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+		}
+
+		// IAudioCaptureClient
+		hResult = CoGetInterfaceAndReleaseStream(stream->captureClientStream, &pa_IID_IAudioCaptureClient, (LPVOID*)&stream->captureClient);
+		stream->captureClientStream = NULL;
+		if (hResult != S_OK)
+		{
+			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+		}
+	}
+
+	if (NULL != stream->out.clientParent)
+	{
+		// SubStream pointers
+		hResult = UnmarshalSubStreamComPointers(&stream->out);
+		if (hResult != S_OK)
+		{
+			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+		}
+
+		// IAudioRenderClient
+		hResult = CoGetInterfaceAndReleaseStream(stream->renderClientStream, &pa_IID_IAudioRenderClient, (LPVOID*)&stream->renderClient);
+		stream->renderClientStream = NULL;
+		if (hResult != S_OK)
+		{
+			hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+		}
+	}
+
+	return hFirstBadResult;
+#else
+	if (stream->in.clientParent != NULL)
+	{
+		stream->in.clientProc = stream->in.clientParent;
+		IAudioClient_AddRef(stream->in.clientParent);
+	}
+
+	if (stream->out.clientParent != NULL)
+	{
+		stream->out.clientProc = stream->out.clientParent;
+		IAudioClient_AddRef(stream->out.clientParent);
+	}
+
+	if (stream->renderClientParent != NULL)
+	{
+		stream->renderClient = stream->renderClientParent;
+		IAudioRenderClient_AddRef(stream->renderClientParent);
+	}
+
+	if (stream->captureClientParent != NULL)
+	{
+		stream->captureClient = stream->captureClientParent;
+		IAudioCaptureClient_AddRef(stream->captureClientParent);
+	}
+
+	return S_OK;
+#endif
+}
+
+// -----------------------------------------------------------------------------------------
+void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream)
+{
+	SAFE_RELEASE(substream->clientProc);
+}
+
+// -----------------------------------------------------------------------------------------
+void ReleaseUnmarshaledComPointers(PaWasapiStream *stream)
+{
+	// Release AudioClient services first
+	SAFE_RELEASE(stream->captureClient);
+	SAFE_RELEASE(stream->renderClient);
+
+	// Release AudioClients
+	ReleaseUnmarshaledSubComPointers(&stream->in);
+	ReleaseUnmarshaledSubComPointers(&stream->out);
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream)
+{
+#ifndef PA_WINRT
+	HRESULT hResult;
+	substream->clientStream = NULL;
+
+	// IAudioClient
+	hResult = CoMarshalInterThreadInterfaceInStream(GetAudioClientIID(), (LPUNKNOWN)substream->clientParent, &substream->clientStream);
+	if (hResult != S_OK)
+		goto marshal_sub_error;
+
+	return hResult;
+
+	// If marshaling error occurred, make sure to release everything.
+marshal_sub_error:
+
+	UnmarshalSubStreamComPointers(substream);
+	ReleaseUnmarshaledSubComPointers(substream);
+	return hResult;
+#else
+	(void)substream;
+	return S_OK;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT MarshalStreamComPointers(PaWasapiStream *stream)
+{
+#ifndef PA_WINRT
+	HRESULT hResult = S_OK;
+	stream->captureClientStream = NULL;
+	stream->in.clientStream = NULL;
+	stream->renderClientStream = NULL;
+	stream->out.clientStream = NULL;
+
+	if (NULL != stream->in.clientParent)
+	{
+		// SubStream pointers
+		hResult = MarshalSubStreamComPointers(&stream->in);
+		if (hResult != S_OK)
+			goto marshal_error;
+
+		// IAudioCaptureClient
+		hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioCaptureClient, (LPUNKNOWN)stream->captureClientParent, &stream->captureClientStream);
+		if (hResult != S_OK)
+			goto marshal_error;
+	}
+
+	if (NULL != stream->out.clientParent)
+	{
+		// SubStream pointers
+		hResult = MarshalSubStreamComPointers(&stream->out);
+		if (hResult != S_OK)
+			goto marshal_error;
+
+		// IAudioRenderClient
+		hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioRenderClient, (LPUNKNOWN)stream->renderClientParent, &stream->renderClientStream);
+		if (hResult != S_OK)
+			goto marshal_error;
+	}
+
+	return hResult;
+
+	// If marshaling error occurred, make sure to release everything.
+marshal_error:
+
+	UnmarshalStreamComPointers(stream);
+	ReleaseUnmarshaledComPointers(stream);
+	return hResult;
+#else
+	(void)stream;
+	return S_OK;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError StartStream( PaStream *s )
+{
+	HRESULT hr;
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+	PaError result = paNoError;
+
+	// check if stream is active already
+	if (IsStreamActive(s))
+		return paStreamIsNotStopped;
+
+    PaUtil_ResetBufferProcessor(&stream->bufferProcessor);
+
+	// Cleanup handles (may be necessary if stream was stopped by itself due to error)
+	_StreamCleanup(stream);
+
+	// Create close event
+	if ((stream->hCloseRequest = CreateEvent(NULL, TRUE, FALSE, NULL)) == NULL)
+	{
+		result = paInsufficientMemory;
+		goto start_error;
+	}
+
+	// Create thread
+	if (!stream->bBlocking)
+	{
+		// Create thread events
+		stream->hThreadStart = CreateEvent(NULL, TRUE, FALSE, NULL);
+		stream->hThreadExit  = CreateEvent(NULL, TRUE, FALSE, NULL);
+		if ((stream->hThreadStart == NULL) || (stream->hThreadExit == NULL))
+		{
+			result = paInsufficientMemory;
+			goto start_error;
+		}
+
+		// Marshal WASAPI interface pointers for safe use in thread created below.
+		if ((hr = MarshalStreamComPointers(stream)) != S_OK)
+		{
+			PRINT(("Failed marshaling stream COM pointers."));
+			result = paUnanticipatedHostError;
+			goto nonblocking_start_error;
+		}
+
+		if ((stream->in.clientParent  && (stream->in.streamFlags  & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)) ||
+			(stream->out.clientParent && (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)))
+		{
+			if ((stream->hThread = CREATE_THREAD(ProcThreadEvent)) == NULL)
+			{
+				PRINT(("Failed creating thread: ProcThreadEvent."));
+				result = paUnanticipatedHostError;
+				goto nonblocking_start_error;
+			}
+		}
+		else
+		{
+			if ((stream->hThread = CREATE_THREAD(ProcThreadPoll)) == NULL)
+			{
+				PRINT(("Failed creating thread: ProcThreadPoll."));
+				result = paUnanticipatedHostError;
+				goto nonblocking_start_error;
+			}
+		}
+
+		// Wait for thread to start
+		if (WaitForSingleObject(stream->hThreadStart, 60*1000) == WAIT_TIMEOUT)
+		{
+			PRINT(("Failed starting thread: timeout."));
+			result = paUnanticipatedHostError;
+			goto nonblocking_start_error;
+		}
+	}
+	else
+	{
+		// Create blocking operation events (non-signaled event means - blocking operation is pending)
+		if (stream->out.clientParent != NULL)
+		{
+			if ((stream->hBlockingOpStreamWR = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL)
+			{
+				result = paInsufficientMemory;
+				goto start_error;
+			}
+		}
+		if (stream->in.clientParent != NULL)
+		{
+			if ((stream->hBlockingOpStreamRD = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL)
+			{
+				result = paInsufficientMemory;
+				goto start_error;
+			}
+		}
+
+		// Initialize event & start INPUT stream
+		if (stream->in.clientParent != NULL)
+		{
+			if ((hr = IAudioClient_Start(stream->in.clientParent)) != S_OK)
+			{
+				LogHostError(hr);
+				result = paUnanticipatedHostError;
+				goto start_error;
+			}
+		}
+
+		// Initialize event & start OUTPUT stream
+		if (stream->out.clientParent != NULL)
+		{
+			// Start
+			if ((hr = IAudioClient_Start(stream->out.clientParent)) != S_OK)
+			{
+				LogHostError(hr);
+				result = paUnanticipatedHostError;
+				goto start_error;
+			}
+		}
+
+		// Set parent to working pointers to use shared functions.
+		stream->captureClient  = stream->captureClientParent;
+		stream->renderClient   = stream->renderClientParent;
+		stream->in.clientProc  = stream->in.clientParent;
+		stream->out.clientProc = stream->out.clientParent;
+
+		// Signal: stream running.
+		stream->running = TRUE;
+	}
+
+    return result;
+
+nonblocking_start_error:
+
+	// Set hThreadExit event to prevent blocking during cleanup
+	SetEvent(stream->hThreadExit);
+	UnmarshalStreamComPointers(stream);
+	ReleaseUnmarshaledComPointers(stream);
+
+start_error:
+
+	StopStream(s);
+	return result;
+}
+
+// ------------------------------------------------------------------------------------------
+void _StreamFinish(PaWasapiStream *stream)
+{
+	// Issue command to thread to stop processing and wait for thread exit
+	if (!stream->bBlocking)
+	{
+		SignalObjectAndWait(stream->hCloseRequest, stream->hThreadExit, INFINITE, FALSE);
+	}
+	else
+	// Blocking mode does not own thread
+	{
+		// Signal close event and wait for each of 2 blocking operations to complete
+		if (stream->out.clientParent)
+			SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamWR, INFINITE, TRUE);
+		if (stream->out.clientParent)
+			SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamRD, INFINITE, TRUE);
+
+		// Process stop
+		_StreamOnStop(stream);
+	}
+
+	// Cleanup handles
+	_StreamCleanup(stream);
+
+    stream->running = FALSE;
+}
+
+// ------------------------------------------------------------------------------------------
+void _StreamCleanup(PaWasapiStream *stream)
+{
+	// Close thread handles to allow restart
+	SAFE_CLOSE(stream->hThread);
+	SAFE_CLOSE(stream->hThreadStart);
+	SAFE_CLOSE(stream->hThreadExit);
+	SAFE_CLOSE(stream->hCloseRequest);
+	SAFE_CLOSE(stream->hBlockingOpStreamRD);
+	SAFE_CLOSE(stream->hBlockingOpStreamWR);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError StopStream( PaStream *s )
+{
+	// Finish stream
+	_StreamFinish((PaWasapiStream *)s);
+    return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError AbortStream( PaStream *s )
+{
+	// Finish stream
+	_StreamFinish((PaWasapiStream *)s);
+    return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsStreamStopped( PaStream *s )
+{
+	return !((PaWasapiStream *)s)->running;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsStreamActive( PaStream *s )
+{
+    return ((PaWasapiStream *)s)->running;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaTime GetStreamTime( PaStream *s )
+{
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+
+    return PaUtil_GetTime();
+}
+
+// ------------------------------------------------------------------------------------------
+static double GetStreamCpuLoad( PaStream* s )
+{
+	return PaUtil_GetCpuLoad(&((PaWasapiStream *)s)->cpuLoadMeasurer);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError ReadStream( PaStream* s, void *_buffer, unsigned long frames )
+{
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+
+	HRESULT hr = S_OK;
+	BYTE *user_buffer = (BYTE *)_buffer;
+	BYTE *wasapi_buffer = NULL;
+	DWORD flags = 0;
+	UINT32 i, available, sleep = 0;
+	unsigned long processed;
+	ThreadIdleScheduler sched;
+
+	// validate
+	if (!stream->running)
+		return paStreamIsStopped;
+	if (stream->captureClient == NULL)
+		return paBadStreamPtr;
+
+	// Notify blocking op has begun
+	ResetEvent(stream->hBlockingOpStreamRD);
+
+	// Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than
+	// 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting
+	ThreadIdleScheduler_Setup(&sched, 1, 250/* microseconds */);
+
+    // Make a local copy of the user buffer pointer(s), this is necessary
+	// because PaUtil_CopyOutput() advances these pointers every time it is called
+    if (!stream->bufferProcessor.userInputIsInterleaved)
+    {
+		user_buffer = (BYTE *)alloca(sizeof(BYTE *) * stream->bufferProcessor.inputChannelCount);
+        if (user_buffer == NULL)
+            return paInsufficientMemory;
+
+        for (i = 0; i < stream->bufferProcessor.inputChannelCount; ++i)
+            ((BYTE **)user_buffer)[i] = ((BYTE **)_buffer)[i];
+    }
+
+	// Findout if there are tail frames, flush them all before reading hardware
+	if ((available = PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer)) != 0)
+	{
+		ring_buffer_size_t buf1_size = 0, buf2_size = 0, read, desired;
+		void *buf1 = NULL, *buf2 = NULL;
+
+		// Limit desired to amount of requested frames
+		desired = available;
+		if ((UINT32)desired > frames)
+			desired = frames;
+
+		// Get pointers to read regions
+		read = PaUtil_GetRingBufferReadRegions(stream->in.tailBuffer, desired, &buf1, &buf1_size, &buf2, &buf2_size);
+
+		if (buf1 != NULL)
+		{
+			// Register available frames to processor
+			PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf1_size);
+
+			// Register host buffer pointer to processor
+			PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf1, stream->bufferProcessor.inputChannelCount);
+
+			// Copy user data to host buffer (with conversion if applicable)
+			processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf1_size);
+			frames -= processed;
+		}
+
+		if (buf2 != NULL)
+		{
+			// Register available frames to processor
+			PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf2_size);
+
+			// Register host buffer pointer to processor
+			PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf2, stream->bufferProcessor.inputChannelCount);
+
+			// Copy user data to host buffer (with conversion if applicable)
+			processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf2_size);
+			frames -= processed;
+		}
+
+		// Advance
+		PaUtil_AdvanceRingBufferReadIndex(stream->in.tailBuffer, read);
+	}
+
+	// Read hardware
+	while (frames != 0)
+	{
+		// Check if blocking call must be interrupted
+		if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)
+			break;
+
+		// Get available frames (must be finding out available frames before call to IAudioCaptureClient_GetBuffer
+		// othervise audio glitches will occur inExclusive mode as it seems that WASAPI has some scheduling/
+		// processing problems when such busy polling with IAudioCaptureClient_GetBuffer occurs)
+		if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)
+		{
+			LogHostError(hr);
+			return paUnanticipatedHostError;
+		}
+
+		// Wait for more frames to become available
+		if (available == 0)
+		{
+			// Exclusive mode may require latency of 1 millisecond, thus we shall sleep
+			// around 500 microseconds (emulated) to collect packets in time
+			if (stream->in.shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE)
+			{
+				UINT32 sleep_frames = (frames < stream->in.framesPerHostCallback ? frames : stream->in.framesPerHostCallback);
+
+				sleep  = GetFramesSleepTime(sleep_frames, stream->in.wavex.Format.nSamplesPerSec);
+				sleep /= 4; // wait only for 1/4 of the buffer
+
+				// WASAPI input provides packets, thus expiring packet will result in bad audio
+				// limit waiting time to 2 seconds (will always work for smallest buffer in Shared)
+				if (sleep > 2)
+					sleep = 2;
+
+				// Avoid busy waiting, schedule next 1 millesecond wait
+				if (sleep == 0)
+					sleep = ThreadIdleScheduler_NextSleep(&sched);
+			}
+			else
+			{
+				if ((sleep = ThreadIdleScheduler_NextSleep(&sched)) != 0)
+				{
+					Sleep(sleep);
+					sleep = 0;
+				}
+			}
+
+			continue;
+		}
+
+		// Get the available data in the shared buffer.
+		if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &wasapi_buffer, &available, &flags, NULL, NULL)) != S_OK)
+		{
+			// Buffer size is too small, waiting
+			if (hr != AUDCLNT_S_BUFFER_EMPTY)
+			{
+				LogHostError(hr);
+				goto end;
+			}
+
+			continue;
+		}
+
+		// Register available frames to processor
+        PaUtil_SetInputFrameCount(&stream->bufferProcessor, available);
+
+		// Register host buffer pointer to processor
+        PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.inputChannelCount);
+
+		// Copy user data to host buffer (with conversion if applicable)
+		processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, frames);
+		frames -= processed;
+
+		// Save tail into buffer
+		if ((frames == 0) && (available > processed))
+		{
+			UINT32 bytes_processed = processed * stream->in.wavex.Format.nBlockAlign;
+			UINT32 frames_to_save  = available - processed;
+
+			PaUtil_WriteRingBuffer(stream->in.tailBuffer, wasapi_buffer + bytes_processed, frames_to_save);
+		}
+
+		// Release host buffer
+		if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, available)) != S_OK)
+		{
+			LogHostError(hr);
+			goto end;
+		}
+	}
+
+end:
+
+	// Notify blocking op has ended
+	SetEvent(stream->hBlockingOpStreamRD);
+
+	return (hr != S_OK ? paUnanticipatedHostError : paNoError);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError WriteStream( PaStream* s, const void *_buffer, unsigned long frames )
+{
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+
+	//UINT32 frames;
+	const BYTE *user_buffer = (const BYTE *)_buffer;
+	BYTE *wasapi_buffer;
+	HRESULT hr = S_OK;
+	UINT32 i, available, sleep = 0;
+	unsigned long processed;
+	ThreadIdleScheduler sched;
+
+	// validate
+	if (!stream->running)
+		return paStreamIsStopped;
+	if (stream->renderClient == NULL)
+		return paBadStreamPtr;
+
+	// Notify blocking op has begun
+	ResetEvent(stream->hBlockingOpStreamWR);
+
+	// Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than
+	// 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting
+	ThreadIdleScheduler_Setup(&sched, 1, 500/* microseconds */);
+
+    // Make a local copy of the user buffer pointer(s), this is necessary
+	// because PaUtil_CopyOutput() advances these pointers every time it is called
+    if (!stream->bufferProcessor.userOutputIsInterleaved)
+    {
+        user_buffer = (const BYTE *)alloca(sizeof(const BYTE *) * stream->bufferProcessor.outputChannelCount);
+        if (user_buffer == NULL)
+            return paInsufficientMemory;
+
+        for (i = 0; i < stream->bufferProcessor.outputChannelCount; ++i)
+            ((const BYTE **)user_buffer)[i] = ((const BYTE **)_buffer)[i];
+    }
+
+	// Blocking (potentially, untill 'frames' are consumed) loop
+	while (frames != 0)
+	{
+		// Check if blocking call must be interrupted
+		if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)
+			break;
+
+		// Get frames available
+		if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)
+		{
+			LogHostError(hr);
+			goto end;
+		}
+
+		// Wait for more frames to become available
+		if (available == 0)
+		{
+			UINT32 sleep_frames = (frames < stream->out.framesPerHostCallback ? frames : stream->out.framesPerHostCallback);
+
+			sleep  = GetFramesSleepTime(sleep_frames, stream->out.wavex.Format.nSamplesPerSec);
+			sleep /= 2; // wait only for half of the buffer
+
+			// Avoid busy waiting, schedule next 1 millesecond wait
+			if (sleep == 0)
+				sleep = ThreadIdleScheduler_NextSleep(&sched);
+
+			continue;
+		}
+
+		// Keep in 'frmaes' range
+		if (available > frames)
+			available = frames;
+
+		// Get pointer to host buffer
+		if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, available, &wasapi_buffer)) != S_OK)
+		{
+			// Buffer size is too big, waiting
+			if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)
+				continue;
+
+			LogHostError(hr);
+			goto end;
+		}
+
+		// Keep waiting again (on Vista it was noticed that WASAPI could SOMETIMES return NULL pointer
+		// to buffer without returning AUDCLNT_E_BUFFER_TOO_LARGE instead)
+		if (wasapi_buffer == NULL)
+			continue;
+
+		// Register available frames to processor
+        PaUtil_SetOutputFrameCount(&stream->bufferProcessor, available);
+
+		// Register host buffer pointer to processor
+        PaUtil_SetInterleavedOutputChannels(&stream->bufferProcessor, 0, wasapi_buffer,	stream->bufferProcessor.outputChannelCount);
+
+		// Copy user data to host buffer (with conversion if applicable), this call will advance
+		// pointer 'user_buffer' to consumed portion of data
+		processed = PaUtil_CopyOutput(&stream->bufferProcessor, (const void **)&user_buffer, frames);
+		frames -= processed;
+
+		// Release host buffer
+		if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, available, 0)) != S_OK)
+		{
+			LogHostError(hr);
+			goto end;
+		}
+	}
+
+end:
+
+	// Notify blocking op has ended
+	SetEvent(stream->hBlockingOpStreamWR);
+
+	return (hr != S_OK ? paUnanticipatedHostError : paNoError);
+}
+
+unsigned long PaUtil_GetOutputFrameCount( PaUtilBufferProcessor* bp )
+{
+	return bp->hostOutputFrameCount[0];
+}
+
+// ------------------------------------------------------------------------------------------
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+
+	HRESULT hr;
+	UINT32  available = 0;
+
+	// validate
+	if (!stream->running)
+		return paStreamIsStopped;
+	if (stream->captureClient == NULL)
+		return paBadStreamPtr;
+
+	// available in hardware buffer
+	if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)
+	{
+		LogHostError(hr);
+		return paUnanticipatedHostError;
+	}
+
+	// available in software tail buffer
+	available += PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer);
+
+    return available;
+}
+
+// ------------------------------------------------------------------------------------------
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    PaWasapiStream *stream = (PaWasapiStream*)s;
+	HRESULT hr;
+	UINT32  available = 0;
+
+	// validate
+	if (!stream->running)
+		return paStreamIsStopped;
+	if (stream->renderClient == NULL)
+		return paBadStreamPtr;
+
+	if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)
+	{
+		LogHostError(hr);
+		return paUnanticipatedHostError;
+	}
+
+	return (signed long)available;
+}
+
+
+// ------------------------------------------------------------------------------------------
+static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
+                                     void *outputBuffer, long outputFrames,
+                                     void *userData )
+{
+    PaWasapiStream *stream = (PaWasapiStream*)userData;
+    PaStreamCallbackTimeInfo timeInfo = {0,0,0};
+	PaStreamCallbackFlags flags = 0;
+    int callbackResult;
+    unsigned long framesProcessed;
+	HRESULT hr;
+	UINT32 pending;
+
+    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+    /*
+		Pa_GetStreamTime:
+            - generate timing information
+            - handle buffer slips
+    */
+	timeInfo.currentTime = PaUtil_GetTime();
+	// Query input latency
+	if (stream->in.clientProc != NULL)
+	{
+		PaTime pending_time;
+		if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, &pending)) == S_OK)
+			pending_time = (PaTime)pending / (PaTime)stream->in.wavex.Format.nSamplesPerSec;
+		else
+			pending_time = (PaTime)stream->in.latencySeconds;
+
+		timeInfo.inputBufferAdcTime = timeInfo.currentTime + pending_time;
+	}
+	// Query output current latency
+	if (stream->out.clientProc != NULL)
+	{
+		PaTime pending_time;
+		if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &pending)) == S_OK)
+			pending_time = (PaTime)pending / (PaTime)stream->out.wavex.Format.nSamplesPerSec;
+		else
+			pending_time = (PaTime)stream->out.latencySeconds;
+
+		timeInfo.outputBufferDacTime = timeInfo.currentTime + pending_time;
+	}
+
+    /*
+        If you need to byte swap or shift inputBuffer to convert it into a
+        portaudio format, do it here.
+    */
+
+    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, flags );
+
+    /*
+        depending on whether the host buffers are interleaved, non-interleaved
+        or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),
+        PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.
+    */
+
+    if (stream->bufferProcessor.inputChannelCount > 0)
+    {
+        PaUtil_SetInputFrameCount( &stream->bufferProcessor, inputFrames );
+        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,
+            0, /* first channel of inputBuffer is channel 0 */
+            inputBuffer,
+            0 ); /* 0 - use inputChannelCount passed to init buffer processor */
+    }
+
+    if (stream->bufferProcessor.outputChannelCount > 0)
+    {
+        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, outputFrames);
+        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,
+            0, /* first channel of outputBuffer is channel 0 */
+            outputBuffer,
+            0 ); /* 0 - use outputChannelCount passed to init buffer processor */
+    }
+
+    /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()
+        in general you would pass paContinue for normal operation, and
+        paComplete to drain the buffer processor's internal output buffer.
+        You can check whether the buffer processor's output buffer is empty
+        using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )
+    */
+    callbackResult = paContinue;
+    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+
+    /*
+        If you need to byte swap or shift outputBuffer to convert it to
+        host format, do it here.
+    */
+
+	PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+
+    if (callbackResult == paContinue)
+    {
+        /* nothing special to do */
+    }
+    else
+	if (callbackResult == paAbort)
+    {
+		// stop stream
+        SetEvent(stream->hCloseRequest);
+    }
+    else
+    {
+		// stop stream
+        SetEvent(stream->hCloseRequest);
+    }
+}
+
+// ------------------------------------------------------------------------------------------
+HANDLE MMCSS_activate(const char *name)
+{
+#ifndef PA_WINRT
+    DWORD task_idx = 0;
+    HANDLE hTask = pAvSetMmThreadCharacteristics(name, &task_idx);
+    if (hTask == NULL)
+	{
+        PRINT(("WASAPI: AvSetMmThreadCharacteristics failed!\n"));
+    }
+
+    /*BOOL priority_ok = pAvSetMmThreadPriority(hTask, AVRT_PRIORITY_NORMAL);
+    if (priority_ok == FALSE)
+	{
+        PRINT(("WASAPI: AvSetMmThreadPriority failed!\n"));
+    }*/
+
+	// debug
+    {
+        int    cur_priority		  = GetThreadPriority(GetCurrentThread());
+        DWORD  cur_priority_class = GetPriorityClass(GetCurrentProcess());
+		PRINT(("WASAPI: thread[ priority-0x%X class-0x%X ]\n", cur_priority, cur_priority_class));
+    }
+
+	return hTask;
+#else
+	(void)name;
+	return NULL;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+void MMCSS_deactivate(HANDLE hTask)
+{
+	if (!hTask)
+		return;
+
+#ifndef PA_WINRT
+	if (pAvRevertMmThreadCharacteristics(hTask) == FALSE)
+	{
+        PRINT(("WASAPI: AvRevertMmThreadCharacteristics failed!\n"));
+    }
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_ThreadPriorityBoost(void **hTask, PaWasapiThreadPriority nPriorityClass)
+{
+	static const char *mmcs_name[] =
+	{
+		NULL,
+		"Audio",
+		"Capture",
+		"Distribution",
+		"Games",
+		"Playback",
+		"Pro Audio",
+		"Window Manager"
+	};
+	HANDLE task;
+
+	if (hTask == NULL)
+		return paUnanticipatedHostError;
+
+	if ((UINT32)nPriorityClass >= STATIC_ARRAY_SIZE(mmcs_name))
+		return paUnanticipatedHostError;
+
+	task = MMCSS_activate(mmcs_name[nPriorityClass]);
+	if (task == NULL)
+		return paUnanticipatedHostError;
+
+	(*hTask) = task;
+	return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_ThreadPriorityRevert(void *hTask)
+{
+	if (hTask == NULL)
+		return paUnanticipatedHostError;
+
+	MMCSS_deactivate((HANDLE)hTask);
+
+	return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+// Described at:
+// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx
+
+PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount)
+{
+#ifndef PA_WINRT
+	PaError ret;
+	HRESULT hr = S_OK;
+	PaDeviceIndex index;
+    IDeviceTopology *pDeviceTopology = NULL;
+    IConnector *pConnFrom = NULL;
+    IConnector *pConnTo = NULL;
+    IPart *pPart = NULL;
+    IKsJackDescription *pJackDesc = NULL;
+	UINT jackCount = 0;
+
+	PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
+	if (paWasapi == NULL)
+		return paNotInitialized;
+
+	// Get device index.
+	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+    if (ret != paNoError)
+        return ret;
+
+	// Validate index.
+	if ((UINT32)index >= paWasapi->deviceCount)
+		return paInvalidDevice;
+
+	// Get the endpoint device's IDeviceTopology interface.
+	hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,
+		CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);
+	IF_FAILED_JUMP(hr, error);
+
+    // The device topology for an endpoint device always contains just one connector (connector number 0).
+	hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);
+	IF_FAILED_JUMP(hr, error);
+
+    // Step across the connection to the jack on the adapter.
+	hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);
+    if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
+    {
+        // The adapter device is not currently active.
+        hr = E_NOINTERFACE;
+    }
+	IF_FAILED_JUMP(hr, error);
+
+	// Get the connector's IPart interface.
+	hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);
+	IF_FAILED_JUMP(hr, error);
+
+	// Activate the connector's IKsJackDescription interface.
+	hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);
+	IF_FAILED_JUMP(hr, error);
+
+	// Return jack count for this device.
+	hr = IKsJackDescription_GetJackCount(pJackDesc, &jackCount);
+	IF_FAILED_JUMP(hr, error);
+
+	// Set.
+	(*jcount) = jackCount;
+
+	// Ok.
+	ret = paNoError;
+
+error:
+
+	SAFE_RELEASE(pDeviceTopology);
+	SAFE_RELEASE(pConnFrom);
+	SAFE_RELEASE(pConnTo);
+	SAFE_RELEASE(pPart);
+	SAFE_RELEASE(pJackDesc);
+
+	LogHostError(hr);
+	return paNoError;
+#else
+	(void)nDevice;
+	(void)jcount;
+	return paUnanticipatedHostError;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+#ifndef PA_WINRT
+static PaWasapiJackConnectionType ConvertJackConnectionTypeWASAPIToPA(int connType)
+{
+	switch (connType)
+	{
+		case eConnTypeUnknown:			return eJackConnTypeUnknown;
+#ifdef _KS_
+		case eConnType3Point5mm:		return eJackConnType3Point5mm;
+#else
+		case eConnTypeEighth:		    return eJackConnType3Point5mm;
+#endif
+		case eConnTypeQuarter:			return eJackConnTypeQuarter;
+		case eConnTypeAtapiInternal:	return eJackConnTypeAtapiInternal;
+		case eConnTypeRCA:				return eJackConnTypeRCA;
+		case eConnTypeOptical:			return eJackConnTypeOptical;
+		case eConnTypeOtherDigital:		return eJackConnTypeOtherDigital;
+		case eConnTypeOtherAnalog:		return eJackConnTypeOtherAnalog;
+		case eConnTypeMultichannelAnalogDIN: return eJackConnTypeMultichannelAnalogDIN;
+		case eConnTypeXlrProfessional:	return eJackConnTypeXlrProfessional;
+		case eConnTypeRJ11Modem:		return eJackConnTypeRJ11Modem;
+		case eConnTypeCombination:		return eJackConnTypeCombination;
+	}
+	return eJackConnTypeUnknown;
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+#ifndef PA_WINRT
+static PaWasapiJackGeoLocation ConvertJackGeoLocationWASAPIToPA(int geoLoc)
+{
+	switch (geoLoc)
+	{
+	case eGeoLocRear:				return eJackGeoLocRear;
+	case eGeoLocFront:				return eJackGeoLocFront;
+	case eGeoLocLeft:				return eJackGeoLocLeft;
+	case eGeoLocRight:				return eJackGeoLocRight;
+	case eGeoLocTop:				return eJackGeoLocTop;
+	case eGeoLocBottom:				return eJackGeoLocBottom;
+#ifdef _KS_
+	case eGeoLocRearPanel:			return eJackGeoLocRearPanel;
+#else
+	case eGeoLocRearOPanel:         return eJackGeoLocRearPanel;
+#endif
+	case eGeoLocRiser:				return eJackGeoLocRiser;
+	case eGeoLocInsideMobileLid:	return eJackGeoLocInsideMobileLid;
+	case eGeoLocDrivebay:			return eJackGeoLocDrivebay;
+	case eGeoLocHDMI:				return eJackGeoLocHDMI;
+	case eGeoLocOutsideMobileLid:	return eJackGeoLocOutsideMobileLid;
+	case eGeoLocATAPI:				return eJackGeoLocATAPI;
+	}
+	return eJackGeoLocUnk;
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+#ifndef PA_WINRT
+static PaWasapiJackGenLocation ConvertJackGenLocationWASAPIToPA(int genLoc)
+{
+	switch (genLoc)
+	{
+	case eGenLocPrimaryBox:	return eJackGenLocPrimaryBox;
+	case eGenLocInternal:	return eJackGenLocInternal;
+#ifdef _KS_
+	case eGenLocSeparate:	return eJackGenLocSeparate;
+#else
+	case eGenLocSeperate:	return eJackGenLocSeparate;
+#endif
+	case eGenLocOther:		return eJackGenLocOther;
+	}
+	return eJackGenLocPrimaryBox;
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+#ifndef PA_WINRT
+static PaWasapiJackPortConnection ConvertJackPortConnectionWASAPIToPA(int portConn)
+{
+	switch (portConn)
+	{
+	case ePortConnJack:					return eJackPortConnJack;
+	case ePortConnIntegratedDevice:		return eJackPortConnIntegratedDevice;
+	case ePortConnBothIntegratedAndJack:return eJackPortConnBothIntegratedAndJack;
+	case ePortConnUnknown:				return eJackPortConnUnknown;
+	}
+	return eJackPortConnJack;
+}
+#endif
+
+// ------------------------------------------------------------------------------------------
+// Described at:
+// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx
+
+PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription)
+{
+#ifndef PA_WINRT
+	PaError ret;
+	HRESULT hr = S_OK;
+	PaDeviceIndex index;
+    IDeviceTopology *pDeviceTopology = NULL;
+    IConnector *pConnFrom = NULL;
+    IConnector *pConnTo = NULL;
+    IPart *pPart = NULL;
+    IKsJackDescription *pJackDesc = NULL;
+	KSJACK_DESCRIPTION jack = { 0 };
+
+	PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
+	if (paWasapi == NULL)
+		return paNotInitialized;
+
+	// Get device index.
+	ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+    if (ret != paNoError)
+        return ret;
+
+	// Validate index.
+	if ((UINT32)index >= paWasapi->deviceCount)
+		return paInvalidDevice;
+
+	// Get the endpoint device's IDeviceTopology interface.
+	hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,
+		CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);
+	IF_FAILED_JUMP(hr, error);
+
+    // The device topology for an endpoint device always contains just one connector (connector number 0).
+	hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);
+	IF_FAILED_JUMP(hr, error);
+
+    // Step across the connection to the jack on the adapter.
+	hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);
+    if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
+    {
+        // The adapter device is not currently active.
+        hr = E_NOINTERFACE;
+    }
+	IF_FAILED_JUMP(hr, error);
+
+	// Get the connector's IPart interface.
+	hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);
+	IF_FAILED_JUMP(hr, error);
+
+	// Activate the connector's IKsJackDescription interface.
+	hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);
+	IF_FAILED_JUMP(hr, error);
+
+	// Test to return jack description struct for index 0.
+	hr = IKsJackDescription_GetJackDescription(pJackDesc, jindex, &jack);
+	IF_FAILED_JUMP(hr, error);
+
+	// Convert WASAPI values to PA format.
+	pJackDescription->channelMapping = jack.ChannelMapping;
+	pJackDescription->color          = jack.Color;
+	pJackDescription->connectionType = ConvertJackConnectionTypeWASAPIToPA(jack.ConnectionType);
+	pJackDescription->genLocation    = ConvertJackGenLocationWASAPIToPA(jack.GenLocation);
+	pJackDescription->geoLocation    = ConvertJackGeoLocationWASAPIToPA(jack.GeoLocation);
+	pJackDescription->isConnected    = jack.IsConnected;
+	pJackDescription->portConnection = ConvertJackPortConnectionWASAPIToPA(jack.PortConnection);
+
+	// Ok.
+	ret = paNoError;
+
+error:
+
+	SAFE_RELEASE(pDeviceTopology);
+	SAFE_RELEASE(pConnFrom);
+	SAFE_RELEASE(pConnTo);
+	SAFE_RELEASE(pPart);
+	SAFE_RELEASE(pJackDesc);
+
+	LogHostError(hr);
+	return ret;
+
+#else
+	(void)nDevice;
+	(void)jindex;
+	(void)pJackDescription;
+	return paUnanticipatedHostError;
+#endif
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available)
+{
+	HRESULT hr;
+	UINT32 frames  = stream->out.framesPerHostCallback,
+		   padding = 0;
+
+	(*available) = 0;
+
+	// get read position
+	if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding)) != S_OK)
+		return LogHostError(hr);
+
+	// get available
+	frames -= padding;
+
+	// set
+	(*available) = frames;
+	return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available)
+{
+	HRESULT hr;
+
+	(*available) = 0;
+
+	// GetCurrentPadding() has opposite meaning to Output stream
+	if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, available)) != S_OK)
+		return LogHostError(hr);
+
+	return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT ProcessOutputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor, UINT32 frames)
+{
+	HRESULT hr;
+	BYTE *data = NULL;
+
+	// Get buffer
+	if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)
+	{
+		if (stream->out.shareMode == AUDCLNT_SHAREMODE_SHARED)
+		{
+			// Using GetCurrentPadding to overcome AUDCLNT_E_BUFFER_TOO_LARGE in
+			// shared mode results in no sound in Event-driven mode (MSDN does not
+			// document this, or is it WASAPI bug?), thus we better
+			// try to acquire buffer next time when GetBuffer allows to do so.
+#if 0
+			// Get Read position
+			UINT32 padding = 0;
+			hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding);
+			if (hr != S_OK)
+				return LogHostError(hr);
+
+			// Get frames to write
+			frames -= padding;
+			if (frames == 0)
+				return S_OK;
+
+			if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)
+				return LogHostError(hr);
+#else
+			if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)
+				return S_OK; // be silent in shared mode, try again next time
+#endif
+		}
+		else
+			return LogHostError(hr);
+	}
+
+	// Process data
+	if (stream->out.monoMixer != NULL)
+	{
+		// expand buffer
+		UINT32 mono_frames_size = frames * (stream->out.wavex.Format.wBitsPerSample / 8);
+		if (mono_frames_size > stream->out.monoBufferSize)
+			stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
+
+		// process
+		processor[S_OUTPUT].processor(NULL, 0, (BYTE *)stream->out.monoBuffer, frames, processor[S_OUTPUT].userData);
+
+		// mix 1 to 2 channels
+		stream->out.monoMixer(data, stream->out.monoBuffer, frames);
+	}
+	else
+	{
+		processor[S_OUTPUT].processor(NULL, 0, data, frames, processor[S_OUTPUT].userData);
+	}
+
+	// Release buffer
+	if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, frames, 0)) != S_OK)
+		LogHostError(hr);
+
+	return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor)
+{
+	HRESULT hr = S_OK;
+	UINT32 frames;
+	BYTE *data = NULL;
+	DWORD flags = 0;
+
+	for (;;)
+	{
+		// Check if blocking call must be interrupted
+		if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
+			break;
+
+		// Findout if any frames available
+		frames = 0;
+		if ((hr = _PollGetInputFramesAvailable(stream, &frames)) != S_OK)
+			return hr;
+
+		// Empty/consumed buffer
+		if (frames == 0)
+			break;
+
+		// Get the available data in the shared buffer.
+		if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &data, &frames, &flags, NULL, NULL)) != S_OK)
+		{
+			if (hr == AUDCLNT_S_BUFFER_EMPTY)
+			{
+				hr = S_OK;
+				break; // Empty/consumed buffer
+			}
+
+			return LogHostError(hr);
+			break;
+		}
+
+		// Detect silence
+		// if (flags & AUDCLNT_BUFFERFLAGS_SILENT)
+		//	data = NULL;
+
+		// Process data
+		if (stream->in.monoMixer != NULL)
+		{
+			// expand buffer
+			UINT32 mono_frames_size = frames * (stream->in.wavex.Format.wBitsPerSample / 8);
+			if (mono_frames_size > stream->in.monoBufferSize)
+				stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
+
+			// mix 1 to 2 channels
+			stream->in.monoMixer(stream->in.monoBuffer, data, frames);
+
+			// process
+			processor[S_INPUT].processor((BYTE *)stream->in.monoBuffer, frames, NULL, 0, processor[S_INPUT].userData);
+		}
+		else
+		{
+			processor[S_INPUT].processor(data, frames, NULL, 0, processor[S_INPUT].userData);
+		}
+
+		// Release buffer
+		if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, frames)) != S_OK)
+			return LogHostError(hr);
+
+		//break;
+	}
+
+	return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+void _StreamOnStop(PaWasapiStream *stream)
+{
+	// Stop INPUT/OUTPUT clients
+	if (!stream->bBlocking)
+	{
+		if (stream->in.clientProc != NULL)
+			IAudioClient_Stop(stream->in.clientProc);
+		if (stream->out.clientProc != NULL)
+			IAudioClient_Stop(stream->out.clientProc);
+	}
+	else
+	{
+		if (stream->in.clientParent != NULL)
+			IAudioClient_Stop(stream->in.clientParent);
+		if (stream->out.clientParent != NULL)
+			IAudioClient_Stop(stream->out.clientParent);
+	}
+
+	// Restore thread priority
+	if (stream->hAvTask != NULL)
+	{
+		PaWasapi_ThreadPriorityRevert(stream->hAvTask);
+		stream->hAvTask = NULL;
+	}
+
+    // Notify
+    if (stream->streamRepresentation.streamFinishedCallback != NULL)
+        stream->streamRepresentation.streamFinishedCallback(stream->streamRepresentation.userData);
+}
+
+// ------------------------------------------------------------------------------------------
+PA_THREAD_FUNC ProcThreadEvent(void *param)
+{
+    PaWasapiHostProcessor processor[S_COUNT];
+	HRESULT hr;
+	DWORD dwResult;
+    PaWasapiStream *stream = (PaWasapiStream *)param;
+	PaWasapiHostProcessor defaultProcessor;
+	BOOL set_event[S_COUNT] = { FALSE, FALSE };
+	BOOL bWaitAllEvents = FALSE;
+	BOOL bThreadComInitialized = FALSE;
+
+	/*
+	If COM is already initialized CoInitialize will either return
+	FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different
+	threading mode. In either case we shouldn't consider it an error
+	but we need to be careful to not call CoUninitialize() if
+	RPC_E_CHANGED_MODE was returned.
+	*/
+	hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+	if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))
+	{
+		PRINT(("WASAPI: failed ProcThreadEvent CoInitialize"));
+		return (UINT32)paUnanticipatedHostError;
+	}
+	if (hr != RPC_E_CHANGED_MODE)
+		bThreadComInitialized = TRUE;
+
+	// Unmarshal stream pointers for safe COM operation
+	hr = UnmarshalStreamComPointers(stream);
+	if (hr != S_OK) {
+		PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));
+		goto thread_end;
+	}
+
+	// Waiting on all events in case of Full-Duplex/Exclusive mode.
+	if ((stream->in.clientProc != NULL) && (stream->out.clientProc != NULL))
+	{
+		bWaitAllEvents = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) &&
+			(stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE);
+	}
+
+    // Setup data processors
+    defaultProcessor.processor = WaspiHostProcessingLoop;
+    defaultProcessor.userData  = stream;
+    processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);
+    processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);
+
+	// Boost thread priority
+	PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
+
+	// Create events
+	if (stream->event[S_OUTPUT] == NULL)
+	{
+		stream->event[S_OUTPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);
+		set_event[S_OUTPUT] = TRUE;
+	}
+	if (stream->event[S_INPUT] == NULL)
+	{
+		stream->event[S_INPUT]  = CreateEvent(NULL, FALSE, FALSE, NULL);
+		set_event[S_INPUT] = TRUE;
+	}
+	if ((stream->event[S_OUTPUT] == NULL) || (stream->event[S_INPUT] == NULL))
+	{
+		PRINT(("WASAPI Thread: failed creating Input/Output event handle\n"));
+		goto thread_error;
+	}
+
+	// Initialize event & start INPUT stream
+	if (stream->in.clientProc)
+	{
+		// Create & set handle
+		if (set_event[S_INPUT])
+		{
+			if ((hr = IAudioClient_SetEventHandle(stream->in.clientProc, stream->event[S_INPUT])) != S_OK)
+			{
+				LogHostError(hr);
+				goto thread_error;
+			}
+		}
+
+		// Start
+		if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)
+		{
+			LogHostError(hr);
+			goto thread_error;
+		}
+	}
+
+	// Initialize event & start OUTPUT stream
+	if (stream->out.clientProc)
+	{
+		// Create & set handle
+		if (set_event[S_OUTPUT])
+		{
+			if ((hr = IAudioClient_SetEventHandle(stream->out.clientProc, stream->event[S_OUTPUT])) != S_OK)
+			{
+				LogHostError(hr);
+				goto thread_error;
+			}
+		}
+
+		// Preload buffer before start
+		if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
+		{
+			LogHostError(hr);
+			goto thread_error;
+		}
+
+		// Start
+		if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)
+		{
+			LogHostError(hr);
+			goto thread_error;
+		}
+
+	}
+
+	// Signal: stream running
+	stream->running = TRUE;
+
+	// Notify: thread started
+	SetEvent(stream->hThreadStart);
+
+	// Processing Loop
+	for (;;)
+    {
+	    // 10 sec timeout (on timeout stream will auto-stop when processed by WAIT_TIMEOUT case)
+        dwResult = WaitForMultipleObjects(S_COUNT, stream->event, bWaitAllEvents, 10*1000);
+
+		// Check for close event (after wait for buffers to avoid any calls to user
+		// callback when hCloseRequest was set)
+		if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
+			break;
+
+		// Process S_INPUT/S_OUTPUT
+		switch (dwResult)
+		{
+		case WAIT_TIMEOUT: {
+			PRINT(("WASAPI Thread: WAIT_TIMEOUT - probably bad audio driver or Vista x64 bug: use paWinWasapiPolling instead\n"));
+			goto thread_end;
+			break; }
+
+		// Input stream
+		case WAIT_OBJECT_0 + S_INPUT: {
+
+            if (stream->captureClient == NULL)
+                break;
+
+			if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
+			{
+				LogHostError(hr);
+				goto thread_error;
+			}
+
+			break; }
+
+		// Output stream
+		case WAIT_OBJECT_0 + S_OUTPUT: {
+
+            if (stream->renderClient == NULL)
+                break;
+
+			if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
+			{
+				LogHostError(hr);
+				goto thread_error;
+			}
+
+			break; }
+		}
+	}
+
+thread_end:
+
+	// Process stop
+	_StreamOnStop(stream);
+
+	// Release unmarshaled COM pointers
+	ReleaseUnmarshaledComPointers(stream);
+
+	// Cleanup COM for this thread
+	if (bThreadComInitialized == TRUE)
+		CoUninitialize();
+
+	// Notify: not running
+	stream->running = FALSE;
+
+	// Notify: thread exited
+	SetEvent(stream->hThreadExit);
+
+	return 0;
+
+thread_error:
+
+	// Prevent deadlocking in Pa_StreamStart
+	SetEvent(stream->hThreadStart);
+
+	// Exit
+	goto thread_end;
+}
+
+// ------------------------------------------------------------------------------------------
+PA_THREAD_FUNC ProcThreadPoll(void *param)
+{
+    PaWasapiHostProcessor processor[S_COUNT];
+	HRESULT hr;
+    PaWasapiStream *stream = (PaWasapiStream *)param;
+	PaWasapiHostProcessor defaultProcessor;
+	INT32 i;
+	ThreadIdleScheduler scheduler;
+
+	// Calculate the actual duration of the allocated buffer.
+	DWORD sleep_ms     = 0;
+	DWORD sleep_ms_in;
+	DWORD sleep_ms_out;
+
+	BOOL bThreadComInitialized = FALSE;
+
+	/*
+	If COM is already initialized CoInitialize will either return
+	FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different
+	threading mode. In either case we shouldn't consider it an error
+	but we need to be careful to not call CoUninitialize() if
+	RPC_E_CHANGED_MODE was returned.
+	*/
+	hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+	if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))
+	{
+		PRINT(("WASAPI: failed ProcThreadPoll CoInitialize"));
+		return (UINT32)paUnanticipatedHostError;
+	}
+	if (hr != RPC_E_CHANGED_MODE)
+		bThreadComInitialized = TRUE;
+
+	// Unmarshal stream pointers for safe COM operation
+	hr = UnmarshalStreamComPointers(stream);
+	if (hr != S_OK)
+	{
+		PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));
+		return 0;
+	}
+
+	// Calculate timeout for next polling attempt.
+	sleep_ms_in  = GetFramesSleepTime(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);
+	sleep_ms_out = GetFramesSleepTime(stream->out.framesPerBuffer, stream->out.wavex.Format.nSamplesPerSec);
+
+	// WASAPI Input packets tend to expire very easily, let's limit sleep time to 2 milliseconds
+	// for all cases. Please propose better solution if any.
+	if (sleep_ms_in > 2)
+		sleep_ms_in = 2;
+
+	// Adjust polling time for non-paUtilFixedHostBufferSize. Input stream is not adjustable as it is being
+	// polled according its packet length.
+	if (stream->bufferMode != paUtilFixedHostBufferSize)
+	{
+		//sleep_ms_in = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->in.wavex.Format.nSamplesPerSec);
+		sleep_ms_out = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);
+	}
+
+	// Choose smallest
+	if ((sleep_ms_in != 0) && (sleep_ms_out != 0))
+		sleep_ms = min(sleep_ms_in, sleep_ms_out);
+	else
+	{
+		sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);
+	}
+	// Make sure not 0, othervise use ThreadIdleScheduler
+	if (sleep_ms == 0)
+	{
+		sleep_ms_in  = GetFramesSleepTimeMicroseconds(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);
+		sleep_ms_out = GetFramesSleepTimeMicroseconds(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);
+
+		// Choose smallest
+		if ((sleep_ms_in != 0) && (sleep_ms_out != 0))
+			sleep_ms = min(sleep_ms_in, sleep_ms_out);
+		else
+		{
+			sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);
+		}
+
+		// Setup thread sleep scheduler
+		ThreadIdleScheduler_Setup(&scheduler, 1, sleep_ms/* microseconds here */);
+		sleep_ms = 0;
+	}
+
+    // Setup data processors
+    defaultProcessor.processor = WaspiHostProcessingLoop;
+    defaultProcessor.userData  = stream;
+    processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);
+    processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);
+
+	// Boost thread priority
+	PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
+
+	// Initialize event & start INPUT stream
+	if (stream->in.clientProc)
+	{
+		if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)
+		{
+			LogHostError(hr);
+			goto thread_error;
+		}
+	}
+
+	// Initialize event & start OUTPUT stream
+	if (stream->out.clientProc)
+	{
+		// Preload buffer (obligatory, othervise ->Start() will fail), avoid processing
+		// when in full-duplex mode as it requires input processing as well
+		if (!PA_WASAPI__IS_FULLDUPLEX(stream))
+		{
+			UINT32 frames = 0;
+			if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) == S_OK)
+            {
+				if (stream->bufferMode == paUtilFixedHostBufferSize)
+				{
+					if (frames >= stream->out.framesPerBuffer)
+					{
+						frames = stream->out.framesPerBuffer;
+
+						if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
+						{
+							LogHostError(hr); // not fatal, just log
+						}
+					}
+				}
+				else
+				{
+					if (frames != 0)
+					{
+						if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
+						{
+							LogHostError(hr); // not fatal, just log
+						}
+					}
+				}
+            }
+            else
+			{
+				LogHostError(hr); // not fatal, just log
+			}
+		}
+
+		// Start
+		if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)
+		{
+			LogHostError(hr);
+			goto thread_error;
+		}
+	}
+
+	// Signal: stream running
+	stream->running = TRUE;
+
+	// Notify: thread started
+	SetEvent(stream->hThreadStart);
+
+	if (!PA_WASAPI__IS_FULLDUPLEX(stream))
+	{
+		// Processing Loop
+		UINT32 next_sleep = sleep_ms;
+		while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)
+		{
+			// Get next sleep time
+			if (sleep_ms == 0)
+			{
+				next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);
+			}
+
+			for (i = 0; i < S_COUNT; ++i)
+			{
+				// Process S_INPUT/S_OUTPUT
+				switch (i)
+				{
+				// Input stream
+				case S_INPUT: {
+
+					if (stream->captureClient == NULL)
+						break;
+
+					if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
+					{
+						LogHostError(hr);
+						goto thread_error;
+					}
+
+					break; }
+
+				// Output stream
+				case S_OUTPUT: {
+
+					UINT32 frames;
+					if (stream->renderClient == NULL)
+						break;
+
+					// get available frames
+					if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) != S_OK)
+					{
+						LogHostError(hr);
+						goto thread_error;
+					}
+
+					// output
+					if (stream->bufferMode == paUtilFixedHostBufferSize)
+					{
+						while (frames >= stream->out.framesPerBuffer)
+						{
+							if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
+							{
+								LogHostError(hr);
+								goto thread_error;
+							}
+
+							frames -= stream->out.framesPerBuffer;
+						}
+					}
+					else
+					{
+						if (frames != 0)
+						{
+							if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
+							{
+								LogHostError(hr);
+								goto thread_error;
+							}
+						}
+					}
+
+					break; }
+				}
+			}
+		}
+	}
+	else
+	{
+#if 0
+		// Processing Loop
+		while (WaitForSingleObject(stream->hCloseRequest, 1) == WAIT_TIMEOUT)
+		{
+			UINT32 i_frames = 0, i_processed = 0;
+			BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;
+			DWORD i_flags = 0;
+			UINT32 o_frames = 0;
+
+			// get host input buffer
+			if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)
+			{
+				if (hr == AUDCLNT_S_BUFFER_EMPTY)
+					continue; // no data in capture buffer
+
+				LogHostError(hr);
+				break;
+			}
+
+			// get available frames
+			if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)
+			{
+				// release input buffer
+				IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+
+				LogHostError(hr);
+				break;
+			}
+
+			// process equal ammount of frames
+			if (o_frames >= i_frames)
+			{
+				// process input ammount of frames
+				UINT32 o_processed = i_frames;
+
+				// get host output buffer
+				if ((hr = IAudioRenderClient_GetBuffer(stream->procRCClient, o_processed, &o_data)) == S_OK)
+				{
+					// processed amount of i_frames
+					i_processed = i_frames;
+					o_data_host = o_data;
+
+					// convert output mono
+					if (stream->out.monoMixer)
+					{
+						UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);
+						// expand buffer
+						if (mono_frames_size > stream->out.monoBufferSize)
+						{
+							stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
+							if (stream->out.monoBuffer == NULL)
+							{
+								// release input buffer
+								IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+								// release output buffer
+								IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+								LogPaError(paInsufficientMemory);
+								break;
+							}
+						}
+
+						// replace buffer pointer
+						o_data = (BYTE *)stream->out.monoBuffer;
+					}
+
+					// convert input mono
+					if (stream->in.monoMixer)
+					{
+						UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);
+						// expand buffer
+						if (mono_frames_size > stream->in.monoBufferSize)
+						{
+							stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
+							if (stream->in.monoBuffer == NULL)
+							{
+								// release input buffer
+								IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+								// release output buffer
+								IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+								LogPaError(paInsufficientMemory);
+								break;
+							}
+						}
+
+						// mix 2 to 1 input channels
+						stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);
+
+						// replace buffer pointer
+						i_data = (BYTE *)stream->in.monoBuffer;
+					}
+
+					// process
+					processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);
+
+					// mix 1 to 2 output channels
+					if (stream->out.monoBuffer)
+						stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);
+
+					// release host output buffer
+					if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)
+						LogHostError(hr);
+				}
+				else
+				{
+					if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)
+						LogHostError(hr); // be silent in shared mode, try again next time
+				}
+			}
+
+			// release host input buffer
+			if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)
+			{
+				LogHostError(hr);
+				break;
+			}
+		}
+#else
+		// Processing Loop
+		UINT32 next_sleep = sleep_ms;
+		while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)
+		{
+			UINT32 i_frames = 0, i_processed = 0;
+			BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;
+			DWORD i_flags = 0;
+			UINT32 o_frames = 0;
+
+			// Get next sleep time
+			if (sleep_ms == 0)
+			{
+				next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);
+			}
+
+			// get available frames
+			if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)
+			{
+				LogHostError(hr);
+				break;
+			}
+
+			while (o_frames != 0)
+			{
+				// get host input buffer
+				if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)
+				{
+					if (hr == AUDCLNT_S_BUFFER_EMPTY)
+						break; // no data in capture buffer
+
+					LogHostError(hr);
+					break;
+				}
+
+				// process equal ammount of frames
+				if (o_frames >= i_frames)
+				{
+					// process input ammount of frames
+					UINT32 o_processed = i_frames;
+
+					// get host output buffer
+					if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, o_processed, &o_data)) == S_OK)
+					{
+						// processed amount of i_frames
+						i_processed = i_frames;
+						o_data_host = o_data;
+
+						// convert output mono
+						if (stream->out.monoMixer)
+						{
+							UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);
+							// expand buffer
+							if (mono_frames_size > stream->out.monoBufferSize)
+							{
+								stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
+								if (stream->out.monoBuffer == NULL)
+								{
+									// release input buffer
+									IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+									// release output buffer
+									IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+									LogPaError(paInsufficientMemory);
+									goto thread_error;
+								}
+							}
+
+							// replace buffer pointer
+							o_data = (BYTE *)stream->out.monoBuffer;
+						}
+
+						// convert input mono
+						if (stream->in.monoMixer)
+						{
+							UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);
+							// expand buffer
+							if (mono_frames_size > stream->in.monoBufferSize)
+							{
+								stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
+								if (stream->in.monoBuffer == NULL)
+								{
+									// release input buffer
+									IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+									// release output buffer
+									IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+									LogPaError(paInsufficientMemory);
+									goto thread_error;
+								}
+							}
+
+							// mix 2 to 1 input channels
+							stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);
+
+							// replace buffer pointer
+							i_data = (BYTE *)stream->in.monoBuffer;
+						}
+
+						// process
+						processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);
+
+						// mix 1 to 2 output channels
+						if (stream->out.monoBuffer)
+							stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);
+
+						// release host output buffer
+						if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)
+							LogHostError(hr);
+
+						o_frames -= o_processed;
+					}
+					else
+					{
+						if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)
+							LogHostError(hr); // be silent in shared mode, try again next time
+					}
+				}
+				else
+				{
+					i_processed = 0;
+					goto fd_release_buffer_in;
+				}
+
+fd_release_buffer_in:
+
+				// release host input buffer
+				if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)
+				{
+					LogHostError(hr);
+					break;
+				}
+
+				// break processing, input hasn't been accumulated yet
+				if (i_processed == 0)
+					break;
+			}
+		}
+#endif
+	}
+
+thread_end:
+
+	// Process stop
+	_StreamOnStop(stream);
+
+	// Release unmarshaled COM pointers
+	ReleaseUnmarshaledComPointers(stream);
+
+	// Cleanup COM for this thread
+	if (bThreadComInitialized == TRUE)
+		CoUninitialize();
+
+	// Notify: not running
+	stream->running = FALSE;
+
+	// Notify: thread exited
+	SetEvent(stream->hThreadExit);
+
+	return 0;
+
+thread_error:
+
+	// Prevent deadlocking in Pa_StreamStart
+	SetEvent(stream->hThreadStart);
+
+	// Exit
+	goto thread_end;
+}
+
+// ------------------------------------------------------------------------------------------
+void *PaWasapi_ReallocateMemory(void *ptr, size_t size)
+{
+	return realloc(ptr, size);
+}
+
+// ------------------------------------------------------------------------------------------
+void PaWasapi_FreeMemory(void *ptr)
+{
+	free(ptr);
+}
+
+//#endif //VC 2005
+
+
+
+
+#if 0
+			if(bFirst) {
+				float masteur;
+				hr = stream->outVol->GetMasterVolumeLevelScalar(&masteur);
+				if (hr != S_OK)
+					LogHostError(hr);
+				float chan1, chan2;
+				hr = stream->outVol->GetChannelVolumeLevelScalar(0, &chan1);
+				if (hr != S_OK)
+					LogHostError(hr);
+				hr = stream->outVol->GetChannelVolumeLevelScalar(1, &chan2);
+				if (hr != S_OK)
+					LogHostError(hr);
+
+				BOOL bMute;
+				hr = stream->outVol->GetMute(&bMute);
+				if (hr != S_OK)
+					LogHostError(hr);
+
+				stream->outVol->SetMasterVolumeLevelScalar(0.5, NULL);
+				stream->outVol->SetChannelVolumeLevelScalar(0, 0.5, NULL);
+				stream->outVol->SetChannelVolumeLevelScalar(1, 0.5, NULL);
+				stream->outVol->SetMute(FALSE, NULL);
+				bFirst = FALSE;
+			}
+#endif
diff --git a/portaudio/src/hostapi/wdmks/pa_win_wdmks.c b/portaudio/src/hostapi/wdmks/pa_win_wdmks.c
--- a/portaudio/src/hostapi/wdmks/pa_win_wdmks.c
+++ b/portaudio/src/hostapi/wdmks/pa_win_wdmks.c
@@ -1,5 +1,5 @@
 /*
-* $Id: pa_win_wdmks.c 1885 2012-12-28 16:54:25Z robiwan $
+* $Id$
 * PortAudio Windows WDM-KS interface
 *
 * Author: Andrew Baldwin, Robert Bielik (WaveRT)
@@ -27,13 +27,13 @@
 */
 
 /*
-* The text above constitutes the entire PortAudio license; however, 
+* The text above constitutes the entire PortAudio license; however,
 * the PortAudio community also makes the following non-binding requests:
 *
 * Any person wishing to distribute modifications to the Software is
 * requested to send the modifications to the original developer so that
-* they can be incorporated into the canonical version. It is also 
-* requested that these non-binding requests be included along with the 
+* they can be incorporated into the canonical version. It is also
+* requested that these non-binding requests be included along with the
 * license above.
 */
 
@@ -86,8 +86,17 @@
 
 #include "pa_win_wdmks.h"
 
+#ifndef DRV_QUERYDEVICEINTERFACE
+#define DRV_QUERYDEVICEINTERFACE     (DRV_RESERVED + 12)
+#endif
+#ifndef DRV_QUERYDEVICEINTERFACESIZE
+#define DRV_QUERYDEVICEINTERFACESIZE (DRV_RESERVED + 13)
+#endif
+
 #include <windows.h>
+#ifndef __GNUC__ /* Fix for ticket #257: MinGW-w64: Inclusion of <winioctl.h> triggers multiple redefinition errors. */
 #include <winioctl.h>
+#endif
 #include <process.h>
 
 #include <math.h>
@@ -214,7 +223,7 @@
 static PaWinWDMKSAvRtEntryPoints paWinWDMKSAvRtEntryPoints = {0};
 
 /* An unspecified channel count (-1) is not treated correctly, so we replace it with
-* an arbitrarily large number */ 
+* an arbitrarily large number */
 #define MAXIMUM_NUMBER_OF_CHANNELS 256
 
 /* Forward definition to break circular type reference between pin and filter */
@@ -356,7 +365,7 @@
     HANDLE              *events;        /* noOfPackets handles (WaveCyclic) 1 (WaveRT) */
     DATAPACKET          *packets;       /* noOfPackets packets (WaveCyclic) 2 (WaveRT) */
     /* WaveRT polled mode */
-    unsigned            lastPosition; 
+    unsigned            lastPosition;
     unsigned            pollCntr;
 } PaWinWdmIOInfo;
 
@@ -399,7 +408,7 @@
 };
 
 /* Gather all processing variables in a struct */
-struct __PaProcessThreadInfo 
+struct __PaProcessThreadInfo
 {
     PaWinWdmStream              *stream;
     PaStreamCallbackTimeInfo    ti;
@@ -419,7 +428,7 @@
 
 /* Used for transferring device infos during scanning / rescanning */
 typedef struct __PaWinWDMScanDeviceInfosResults
-{ 
+{
     PaDeviceInfo **deviceInfos;
     PaDeviceIndex defaultInputDevice;
     PaDeviceIndex defaultOutputDevice;
@@ -506,8 +515,9 @@
 static PaError PinRegisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle);
 static PaError PinUnregisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle);
 static PaError PinGetHwLatency(PaWinWdmPin* pPin, ULONG* pFifoSize, ULONG* pChipsetDelay, ULONG* pCodecDelay);
-static PaError PinGetAudioPositionDirect(PaWinWdmPin* pPin, ULONG* pPosition);
-static PaError PinGetAudioPositionViaIOCTL(PaWinWdmPin* pPin, ULONG* pPosition);
+static PaError PinGetAudioPositionMemoryMapped(PaWinWdmPin* pPin, ULONG* pPosition);
+static PaError PinGetAudioPositionViaIOCTLRead(PaWinWdmPin* pPin, ULONG* pPosition);
+static PaError PinGetAudioPositionViaIOCTLWrite(PaWinWdmPin* pPin, ULONG* pPosition);
 
 /* Filter management functions */
 static PaWinWdmFilter* FilterNew(PaWDMKSType type, DWORD devNode, const wchar_t* filterName, const wchar_t* friendlyName, PaError* error);
@@ -633,6 +643,16 @@
 
 static BOOL IsEarlierThanVista()
 {
+/*
+NOTE: GetVersionEx() is deprecated as of Windows 8.1 and can not be used to reliably detect
+versions of Windows higher than Windows 8 (due to manifest requirements for reporting higher versions).
+Microsoft recommends switching to VerifyVersionInfo (available on Win 2k and later), however GetVersionEx
+is is faster, for now we just disable the deprecation warning.
+See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx
+See: http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe
+*/
+#pragma warning (disable : 4996) /* use of GetVersionEx */
+
     OSVERSIONINFO osvi;
     osvi.dwOSVersionInfoSize = sizeof(osvi);
     if (GetVersionEx(&osvi) && osvi.dwMajorVersion<6)
@@ -640,6 +660,8 @@
         return TRUE;
     }
     return FALSE;
+
+#pragma warning (default : 4996)
 }
 
 
@@ -707,9 +729,9 @@
     if (!bRes)
     {
         unsigned long error = GetLastError();
-        if ( !(((error == ERROR_INSUFFICIENT_BUFFER ) || ( error == ERROR_MORE_DATA )) && 
+        if ( !(((error == ERROR_INSUFFICIENT_BUFFER ) || ( error == ERROR_MORE_DATA )) &&
             ( ioctlNumber == IOCTL_KS_PROPERTY ) &&
-            ( outBufferCount == 0 ) ) ) 
+            ( outBufferCount == 0 ) ) )
         {
             KSPROPERTY* ksProperty = (KSPROPERTY*)inBuffer;
 
@@ -1004,7 +1026,7 @@
     ULONG retval = 0;
     unsigned i;
     const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);
-    PA_DEBUG(("GetNumberOfConnectionsTo: Checking %u connections...", filter->connections->Count));
+    PA_DEBUG(("GetNumberOfConnectionsTo: Checking %u connections...\n", filter->connections->Count));
     for (i = 0; i < filter->connections->Count; ++i)
     {
         const KSTOPOLOGY_CONNECTION* pConn = connections + i;
@@ -1014,6 +1036,7 @@
             ++retval;
         }
     }
+    PA_DEBUG(("GetNumberOfConnectionsTo: Returning %d\n", retval));
     return retval;
 }
 
@@ -1023,16 +1046,18 @@
 {
     unsigned i;
     const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);
-    PA_DEBUG(("FindStartConnectionFrom: Checking %u connections...", filter->connections->Count));
+    PA_DEBUG(("FindStartConnectionFrom: Startpin %u, Checking %u connections...\n", startPin, filter->connections->Count));
     for (i = 0; i < filter->connections->Count; ++i)
     {
         const KSTOPOLOGY_CONNECTION* pConn = connections + i;
         if (pConn->ToNode == KSFILTER_NODE && pConn->ToNodePin == startPin)
         {
+            PA_DEBUG(("FindStartConnectionFrom: returning %p\n", pConn));
             return pConn;
         }
     }
 
+    PA_DEBUG(("FindStartConnectionFrom: returning NULL\n"));
     assert(FALSE);
     return 0;
 }
@@ -1041,26 +1066,36 @@
 {
     unsigned i;
     const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);
-    PA_DEBUG(("FindStartConnectionTo: Checking %u connections...", filter->connections->Count));
+    PA_DEBUG(("FindStartConnectionTo: Startpin %u, Checking %u connections...\n", startPin, filter->connections->Count));
     for (i = 0; i < filter->connections->Count; ++i)
     {
         const KSTOPOLOGY_CONNECTION* pConn = connections + i;
         if (pConn->FromNode == KSFILTER_NODE && pConn->FromNodePin == startPin)
         {
+            PA_DEBUG(("FindStartConnectionTo: returning %p\n", pConn));
             return pConn;
         }
     }
 
+    PA_DEBUG(("FindStartConnectionTo: returning NULL\n"));
     assert(FALSE);
     return 0;
 }
 
 static ULONG GetConnectedPin(ULONG startPin, BOOL forward, PaWinWdmFilter* filter, int muxPosition, ULONG *muxInputPinId, ULONG *muxNodeId)
 {
-    const KSTOPOLOGY_CONNECTION *conn = NULL; 
+    int limit=1000;
+    const KSTOPOLOGY_CONNECTION *conn = NULL;
     TFnGetConnection fnGetConnection = forward ? GetConnectionTo : GetConnectionFrom ;
+    PA_LOGE_;
     while (1)
     {
+        limit--;
+        if (limit == 0) {
+           PA_DEBUG(("GetConnectedPin: LOOP LIMIT REACHED\n"));
+           break;
+        }
+
         if (conn == NULL)
         {
             conn = forward ? FindStartConnectionTo(startPin, filter) : FindStartConnectionFrom(startPin, filter);
@@ -1106,6 +1141,7 @@
             }
         }
     }
+    PA_LOGL_;
     return KSFILTER_NODE;
 }
 
@@ -1115,12 +1151,13 @@
     const KSTOPOLOGY_CONNECTION* connections = (const KSTOPOLOGY_CONNECTION*)(filter->connections + 1);
     const GUID* nodes = (const GUID*)(filter->nodes + 1);
 
+    PA_LOGE_;
     PA_DEBUG(("DumpConnectionsAndNodes: connections=%d, nodes=%d\n", filter->connections->Count, filter->nodes->Count));
 
     for (i=0; i < filter->connections->Count; ++i)
     {
         const KSTOPOLOGY_CONNECTION* pConn = connections + i;
-        PA_DEBUG(("  Connection: %u - FromNode=%u,FromPin=%u -> ToNode=%u,ToPin=%u\n", 
+        PA_DEBUG(("  Connection: %u - FromNode=%u,FromPin=%u -> ToNode=%u,ToPin=%u\n",
             i,
             pConn->FromNode, pConn->FromNodePin,
             pConn->ToNode, pConn->ToNodePin
@@ -1139,10 +1176,11 @@
             pConn->Data4[6], pConn->Data4[7]
         ));
     }
+    PA_LOGL_;
 
 }
 
-typedef struct __PaUsbTerminalGUIDToName 
+typedef struct __PaUsbTerminalGUIDToName
 {
     USHORT     usbGUID;
     wchar_t    name[64];
@@ -1188,6 +1226,7 @@
     PaError result = paUnanticipatedHostError;
     USHORT usbTerminalGUID = (USHORT)(pGUID->Data1 - 0xDFF219E0);
 
+    PA_LOGE_;
     if (input && usbTerminalGUID >= 0x301 && usbTerminalGUID < 0x400)
     {
         /* Output terminal name for an input !? Set it to Line! */
@@ -1227,6 +1266,7 @@
     {
         PaWinWDM_SetLastErrorInfo(result, "GetNameFromCategory: usbTerminalGUID = %04X ", usbTerminalGUID);
     }
+    PA_LOGL_;
     return result;
 }
 
@@ -1625,6 +1665,8 @@
             else
             {
                 KSPIN_PHYSICALCONNECTION* pc = (KSPIN_PHYSICALCONNECTION*)PaUtil_AllocateMemory(cbBytes + 2);
+                ULONG pcPin;
+                wchar_t symbLinkName[MAX_PATH];
                 PA_DEBUG(("PinNew: Physical connection found!\n"));
                 if (pc == NULL)
                 {
@@ -1639,144 +1681,255 @@
                     cbBytes,
                     NULL
                     );
-                if (result == paNoError)
+
+                pcPin = pc->Pin;
+                wcsncpy(symbLinkName, pc->SymbolicLinkName, MAX_PATH);
+                PaUtil_FreeMemory( pc );
+
+                if (result != paNoError)
                 {
-                    wchar_t symbLinkName[MAX_PATH];
-                    wcsncpy(symbLinkName, pc->SymbolicLinkName, MAX_PATH);
-                    if (symbLinkName[1] == TEXT('?'))
+                    /* Shouldn't happen, but fail if it does */
+                    PA_DEBUG(("PinNew: failed to retrieve physical connection!\n"));
+                    goto error;
+                }
+
+                if (symbLinkName[1] == TEXT('?'))
+                {
+                    symbLinkName[1] = TEXT('\\');
+                }
+
+                if (pin->parentFilter->topologyFilter == NULL)
+                {
+                    PA_DEBUG(("PinNew: Creating topology filter '%S'\n", symbLinkName));
+
+                    pin->parentFilter->topologyFilter = FilterNew(Type_kNotUsed, 0, symbLinkName, L"", &result);
+                    if (pin->parentFilter->topologyFilter == NULL)
                     {
-                        symbLinkName[1] = TEXT('\\');
+                        PA_DEBUG(("PinNew: Failed creating topology filter\n"));
+                        result = paUnanticipatedHostError;
+                        PaWinWDM_SetLastErrorInfo(result, "Failed to create topology filter '%S'", symbLinkName);
+                        goto error;
                     }
 
-                    if (pin->parentFilter->topologyFilter == NULL)
+                    /* Copy info so we have it in device info */
+                    wcsncpy(pin->parentFilter->devInfo.topologyPath, symbLinkName, MAX_PATH);
+                }
+                else
+                {
+                    /* Must be the same */
+                    assert(wcscmp(symbLinkName, pin->parentFilter->topologyFilter->devInfo.filterPath) == 0);
+                }
+
+                PA_DEBUG(("PinNew: Opening topology filter..."));
+
+                result = FilterUse(pin->parentFilter->topologyFilter);
+                if (result == paNoError)
+                {
+                    unsigned long endpointPinId;
+
+                    if (pin->dataFlow == KSPIN_DATAFLOW_IN)
                     {
-                        PA_DEBUG(("PinNew: Creating topology filter '%S'\n", symbLinkName));
+                        /* The "endpointPinId" is what WASAPI looks at for pin names */
+                        GUID category = {0};
 
-                        pin->parentFilter->topologyFilter = FilterNew(Type_kNotUsed, 0, symbLinkName, L"", &result);
-                        if (pin->parentFilter->topologyFilter == NULL)
+                        PA_DEBUG(("PinNew: Checking for output endpoint pin id...\n"));
+
+                        endpointPinId = GetConnectedPin(pcPin, TRUE, pin->parentFilter->topologyFilter, -1, NULL, NULL);
+
+                        if (endpointPinId == KSFILTER_NODE)
                         {
-                            PA_DEBUG(("PinNew: Failed creating topology filter\n"));
                             result = paUnanticipatedHostError;
-                            PaWinWDM_SetLastErrorInfo(result, "Failed to create topology filter '%S'", symbLinkName);
+                            PaWinWDM_SetLastErrorInfo(result, "Failed to get endpoint pin ID on topology filter!");
                             goto error;
                         }
 
-                        /* Copy info so we have it in device info */
-                        wcsncpy(pin->parentFilter->devInfo.topologyPath, symbLinkName, MAX_PATH);
-                    }
-                    else
-                    {
-                        /* Must be the same */
-                        assert(wcscmp(symbLinkName, pin->parentFilter->topologyFilter->devInfo.filterPath) == 0);
-                    }
-
-                    PA_DEBUG(("PinNew: Opening topology filter..."));
+                        PA_DEBUG(("PinNew: Found endpoint pin id %u\n", endpointPinId));
 
-                    result = FilterUse(pin->parentFilter->topologyFilter);
-                    if (result == paNoError)
-                    {
-                        unsigned long endpointPinId;
+                        /* Get pin category information */
+                        result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
+                            endpointPinId,
+                            &KSPROPSETID_Pin,
+                            KSPROPERTY_PIN_CATEGORY,
+                            &category,
+                            sizeof(GUID),
+                            NULL);
 
-                        if (pin->dataFlow == KSPIN_DATAFLOW_IN)
+                        if (result == paNoError)
                         {
-                            /* The "endpointPinId" is what WASAPI looks at for pin names */
-                            GUID category = {0};
+#if !PA_WDMKS_USE_CATEGORY_FOR_PIN_NAMES
+                            wchar_t pinName[MAX_PATH];
 
-                            PA_DEBUG(("PinNew: Checking for output endpoint pin id...\n"));
+                            PA_DEBUG(("PinNew: Getting pin name property..."));
 
-                            endpointPinId = GetConnectedPin(pc->Pin, TRUE, pin->parentFilter->topologyFilter, -1, NULL, NULL);
+                            /* Ok, try pin name also, and favor that if available */
+                            result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
+                                endpointPinId,
+                                &KSPROPSETID_Pin,
+                                KSPROPERTY_PIN_NAME,
+                                pinName,
+                                MAX_PATH,
+                                NULL);
 
-                            if (endpointPinId == KSFILTER_NODE)
+                            if (result == paNoError && wcslen(pinName)>0)
                             {
-                                result = paUnanticipatedHostError;
-                                PaWinWDM_SetLastErrorInfo(result, "Failed to get endpoint pin ID on topology filter!");
-                                goto error;
+                                wcsncpy(pin->friendlyName, pinName, MAX_PATH);
                             }
+                            else
+#endif
+                            {
+                                result = GetNameFromCategory(&category, (pin->dataFlow == KSPIN_DATAFLOW_OUT), pin->friendlyName, MAX_PATH);
+                            }
+                        }
 
-                            PA_DEBUG(("PinNew: Found endpoint pin id %u\n", endpointPinId));
+                        /* Make sure we get a name for the pin */
+                        if (wcslen(pin->friendlyName) == 0)
+                        {
+                            wcscpy(pin->friendlyName, kOutputName);
+                        }
+#ifdef UNICODE
+                        PA_DEBUG(("PinNew: Pin name '%s'\n", pin->friendlyName));
+#else
+                        PA_DEBUG(("PinNew: Pin name '%S'\n", pin->friendlyName));
+#endif
 
-                            /* Get pin category information */
-                            result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
-                                endpointPinId,
-                                &KSPROPSETID_Pin,
-                                KSPROPERTY_PIN_CATEGORY,
-                                &category,
-                                sizeof(GUID),
-                                NULL);
+                        /* Set endpoint pin ID (this is the topology INPUT pin, since portmixer will always traverse the
+                        filter in audio streaming direction, see http://msdn.microsoft.com/en-us/library/windows/hardware/ff536331(v=vs.85).aspx
+                        for more information)
+                        */
+                        pin->endpointPinId = pcPin;
+                    }
+                    else
+                    {
+                        unsigned muxCount = 0;
+                        int muxPos = 0;
+                        /* Max 64 multiplexer inputs... sanity check :) */
+                        for (i = 0; i < 64; ++i)
+                        {
+                            ULONG muxNodeIdTest = (unsigned)-1;
+                            PA_DEBUG(("PinNew: Checking for input endpoint pin id (%d)...\n", i));
 
-                            if (result == paNoError)
+                            endpointPinId = GetConnectedPin(pcPin,
+                                FALSE,
+                                pin->parentFilter->topologyFilter,
+                                (int)i,
+                                NULL,
+                                &muxNodeIdTest);
+
+                            if (endpointPinId == KSFILTER_NODE)
                             {
-#if !PA_WDMKS_USE_CATEGORY_FOR_PIN_NAMES
-                                wchar_t pinName[MAX_PATH];
+                                /* We're done */
+                                PA_DEBUG(("PinNew: Done with inputs.\n", endpointPinId));
+                                break;
+                            }
+                            else
+                            {
+                                /* The "endpointPinId" is what WASAPI looks at for pin names */
+                                GUID category = {0};
 
-                                PA_DEBUG(("PinNew: Getting pin name property..."));
+                                PA_DEBUG(("PinNew: Found endpoint pin id %u\n", endpointPinId));
 
-                                /* Ok, try pin name also, and favor that if available */
+                                /* Get pin category information */
                                 result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
                                     endpointPinId,
                                     &KSPROPSETID_Pin,
-                                    KSPROPERTY_PIN_NAME,
-                                    pinName,
-                                    MAX_PATH,
+                                    KSPROPERTY_PIN_CATEGORY,
+                                    &category,
+                                    sizeof(GUID),
                                     NULL);
 
-                                if (result == paNoError && wcslen(pinName)>0)
+                                if (result == paNoError)
                                 {
-                                    wcsncpy(pin->friendlyName, pinName, MAX_PATH);
+                                    if (muxNodeIdTest == (unsigned)-1)
+                                    {
+                                        /* Ok, try pin name, and favor that if available */
+                                        result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
+                                            endpointPinId,
+                                            &KSPROPSETID_Pin,
+                                            KSPROPERTY_PIN_NAME,
+                                            pin->friendlyName,
+                                            MAX_PATH,
+                                            NULL);
+
+                                        if (result != paNoError)
+                                        {
+                                            result = GetNameFromCategory(&category, TRUE, pin->friendlyName, MAX_PATH);
+                                        }
+                                        break;
+                                    }
+                                    else
+                                    {
+                                        result = GetNameFromCategory(&category, TRUE, NULL, 0);
+
+                                        if (result == paNoError)
+                                        {
+                                            ++muxCount;
+                                        }
+                                    }
                                 }
                                 else
-#endif
                                 {
-                                    result = GetNameFromCategory(&category, (pin->dataFlow == KSPIN_DATAFLOW_OUT), pin->friendlyName, MAX_PATH);
+                                    PA_DEBUG(("PinNew: Failed to get pin category"));
                                 }
+                            }
+                        }
 
-                                if (wcslen(pin->friendlyName) == 0)
-                                {
-                                    wcscpy(pin->friendlyName, L"Output");
-                                }
+                        if (muxCount == 0)
+                        {
+                            pin->endpointPinId = endpointPinId;
+                            /* Make sure we get a name for the pin */
+                            if (wcslen(pin->friendlyName) == 0)
+                            {
+                                wcscpy(pin->friendlyName, kInputName);
+                            }
 #ifdef UNICODE
-                                PA_DEBUG(("PinNew: Pin name '%s'\n", pin->friendlyName));
+                            PA_DEBUG(("PinNew: Input friendly name '%s'\n", pin->friendlyName));
 #else
-                                PA_DEBUG(("PinNew: Pin name '%S'\n", pin->friendlyName));
-#endif                                
-                            }
-
-                            /* Set endpoint pin ID (this is the topology INPUT pin, since portmixer will always traverse the
-                            filter in audio streaming direction, see http://msdn.microsoft.com/en-us/library/windows/hardware/ff536331(v=vs.85).aspx
-                            for more information)
-                            */
-                            pin->endpointPinId = pc->Pin;
+                            PA_DEBUG(("PinNew: Input friendly name '%S'\n", pin->friendlyName));
+#endif
                         }
-                        else
+                        else // muxCount > 0
                         {
-                            unsigned muxCount = 0;
-                            int muxPos = 0;
-                            /* Max 64 multiplexer inputs... sanity check :) */
-                            for (i = 0; i < 64; ++i)
-                            {
-                                ULONG muxNodeIdTest = (unsigned)-1;
-                                PA_DEBUG(("PinNew: Checking for input endpoint pin id (%d)...\n", i));
+                            PA_DEBUG(("PinNew: Setting up %u inputs\n", muxCount));
 
-                                endpointPinId = GetConnectedPin(pc->Pin,
-                                    FALSE,
-                                    pin->parentFilter->topologyFilter,
-                                    (int)i,
-                                    NULL,
-                                    &muxNodeIdTest);
+                            /* Now we redo the operation once known how many multiplexer positions there are */
+                            pin->inputs = (PaWinWdmMuxedInput**)PaUtil_AllocateMemory(muxCount * sizeof(PaWinWdmMuxedInput*));
+                            if (pin->inputs == NULL)
+                            {
+                                FilterRelease(pin->parentFilter->topologyFilter);
+                                result = paInsufficientMemory;
+                                goto error;
+                            }
+                            pin->inputCount = muxCount;
 
+                            for (i = 0; i < muxCount; ++muxPos)
+                            {
+                                PA_DEBUG(("PinNew: Setting up input %u...\n", i));
 
-                                if (endpointPinId == KSFILTER_NODE)
+                                if (pin->inputs[i] == NULL)
                                 {
-                                    /* We're done */
-                                    PA_DEBUG(("PinNew: Done with inputs.\n", endpointPinId));
-                                    break;
+                                    pin->inputs[i] = (PaWinWdmMuxedInput*)PaUtil_AllocateMemory(sizeof(PaWinWdmMuxedInput));
+                                    if (pin->inputs[i] == NULL)
+                                    {
+                                        FilterRelease(pin->parentFilter->topologyFilter);
+                                        result = paInsufficientMemory;
+                                        goto error;
+                                    }
                                 }
-                                else
+
+                                endpointPinId = GetConnectedPin(pcPin,
+                                    FALSE,
+                                    pin->parentFilter->topologyFilter,
+                                    muxPos,
+                                    &pin->inputs[i]->muxPinId,
+                                    &pin->inputs[i]->muxNodeId);
+
+                                if (endpointPinId != KSFILTER_NODE)
                                 {
                                     /* The "endpointPinId" is what WASAPI looks at for pin names */
                                     GUID category = {0};
 
-                                    PA_DEBUG(("PinNew: Found endpoint pin id %u\n", endpointPinId));
+                                    /* Set input endpoint ID */
+                                    pin->inputs[i]->endpointPinId = endpointPinId;
 
                                     /* Get pin category information */
                                     result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
@@ -1789,146 +1942,41 @@
 
                                     if (result == paNoError)
                                     {
-                                        if (muxNodeIdTest == (unsigned)-1)
-                                        {
-                                            /* Ok, try pin name, and favor that if available */
-                                            result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
-                                                endpointPinId,
-                                                &KSPROPSETID_Pin,
-                                                KSPROPERTY_PIN_NAME,
-                                                pin->friendlyName,
-                                                MAX_PATH,
-                                                NULL);
-
-                                            if (result != paNoError)
-                                            {
-                                                result = GetNameFromCategory(&category, TRUE, pin->friendlyName, MAX_PATH);
-                                            }
-                                            break;
-                                        }
-                                        else
-                                        {
-                                            result = GetNameFromCategory(&category, TRUE, NULL, 0);
-
-                                            if (result == paNoError)
-                                            {
-                                                ++muxCount;
-                                            }
-                                        }
-                                    }
-                                    else
-                                    {
-                                        PA_DEBUG(("PinNew: Failed to get pin category"));
-                                    }
-                                }
-                            }
-
-                            if (muxCount == 0)
-                            {
-                                pin->endpointPinId = endpointPinId;
-                                /* Make sure we get a name for the pin */
-                                if (wcslen(pin->friendlyName) == 0)
-                                {
-                                    wcscpy(pin->friendlyName, kInputName);
-                                }
-#ifdef UNICODE
-                                PA_DEBUG(("PinNew: Input friendly name '%s'\n", pin->friendlyName));
-#else
-                                PA_DEBUG(("PinNew: Input friendly name '%S'\n", pin->friendlyName));
-#endif
-                            }
-                            else // muxCount > 0
-                            {
-                                PA_DEBUG(("PinNew: Setting up %u inputs\n", muxCount));
-
-                                /* Now we redo the operation once known how many multiplexer positions there are */
-                                pin->inputs = (PaWinWdmMuxedInput**)PaUtil_AllocateMemory(muxCount * sizeof(PaWinWdmMuxedInput*));
-                                if (pin->inputs == NULL)
-                                {
-                                    FilterRelease(pin->parentFilter->topologyFilter);
-                                    result = paInsufficientMemory;
-                                    goto error;
-                                }
-                                pin->inputCount = muxCount;
-
-                                for (i = 0; i < muxCount; ++muxPos)
-                                {
-                                    PA_DEBUG(("PinNew: Setting up input %u...\n", i));
-
-                                    if (pin->inputs[i] == NULL)
-                                    {
-                                        pin->inputs[i] = (PaWinWdmMuxedInput*)PaUtil_AllocateMemory(sizeof(PaWinWdmMuxedInput));
-                                        if (pin->inputs[i] == NULL)
-                                        {
-                                            FilterRelease(pin->parentFilter->topologyFilter);
-                                            result = paInsufficientMemory;
-                                            goto error;
-                                        }
-                                    }
-
-                                    endpointPinId = GetConnectedPin(pc->Pin,
-                                        FALSE,
-                                        pin->parentFilter->topologyFilter,
-                                        muxPos,
-                                        &pin->inputs[i]->muxPinId, 
-                                        &pin->inputs[i]->muxNodeId);
-
-                                    if (endpointPinId != KSFILTER_NODE)
-                                    {
-                                        /* The "endpointPinId" is what WASAPI looks at for pin names */
-                                        GUID category = {0};
-
-                                        /* Set input endpoint ID */
-                                        pin->inputs[i]->endpointPinId = endpointPinId;
-
-                                        /* Get pin category information */
+                                        /* Try pin name first, and if that is not defined, use category instead */
                                         result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
                                             endpointPinId,
                                             &KSPROPSETID_Pin,
-                                            KSPROPERTY_PIN_CATEGORY,
-                                            &category,
-                                            sizeof(GUID),
+                                            KSPROPERTY_PIN_NAME,
+                                            pin->inputs[i]->friendlyName,
+                                            MAX_PATH,
                                             NULL);
 
-                                        if (result == paNoError)
+                                        if (result != paNoError)
                                         {
-                                            /* Try pin name first, and if that is not defined, use category instead */
-                                            result = WdmGetPinPropertySimple(pin->parentFilter->topologyFilter->handle,
-                                                endpointPinId,
-                                                &KSPROPSETID_Pin,
-                                                KSPROPERTY_PIN_NAME,
-                                                pin->inputs[i]->friendlyName,
-                                                MAX_PATH,
-                                                NULL);
-
+                                            result = GetNameFromCategory(&category, TRUE, pin->inputs[i]->friendlyName, MAX_PATH);
                                             if (result != paNoError)
                                             {
-                                                result = GetNameFromCategory(&category, TRUE, pin->inputs[i]->friendlyName, MAX_PATH);
-                                                if (result != paNoError)
-                                                {
-                                                    /* Only specify name, let name hash in ScanDeviceInfos fix postfix enumerators */
-                                                    wcscpy(pin->inputs[i]->friendlyName, kInputName);
-                                                }
+                                                /* Only specify name, let name hash in ScanDeviceInfos fix postfix enumerators */
+                                                wcscpy(pin->inputs[i]->friendlyName, kInputName);
                                             }
+                                        }
 #ifdef UNICODE
-                                            PA_DEBUG(("PinNew: Input (%u) friendly name '%s'\n", i, pin->inputs[i]->friendlyName));
+                                        PA_DEBUG(("PinNew: Input (%u) friendly name '%s'\n", i, pin->inputs[i]->friendlyName));
 #else
-                                            PA_DEBUG(("PinNew: Input (%u) friendly name '%S'\n", i, pin->inputs[i]->friendlyName));
+                                        PA_DEBUG(("PinNew: Input (%u) friendly name '%S'\n", i, pin->inputs[i]->friendlyName));
 #endif
-                                            ++i;
-                                        }
-                                    }
-                                    else
-                                    {
-                                        /* Should never come here! */
-                                        assert(FALSE);
+                                        ++i;
                                     }
                                 }
+                                else
+                                {
+                                    /* Should never come here! */
+                                    assert(FALSE);
+                                }
                             }
                         }
                     }
                 }
-                PaUtil_FreeMemory(pc);
             }
         }
         else
@@ -1958,18 +2006,14 @@
     Error cleanup
     */
 
-    PaUtil_FreeMemory( item );
-    if( pin )
+    if (pin->parentFilter->topologyFilter && pin->parentFilter->topologyFilter->handle != NULL)
     {
-        if (pin->parentFilter->topologyFilter && pin->parentFilter->topologyFilter->handle != NULL)
-        {
-            FilterRelease(pin->parentFilter->topologyFilter);
-        }
-
-        PaUtil_FreeMemory( pin->pinConnect );
-        PaUtil_FreeMemory( pin->dataRangesItem );
-        PaUtil_FreeMemory( pin );
+        FilterRelease(pin->parentFilter->topologyFilter);
     }
+
+    PaUtil_FreeMemory( item );
+    PinFree(pin);
+
     *error = result;
     PA_LOGL_;
     return NULL;
@@ -2181,7 +2225,7 @@
     dataRange = (KSDATARANGE_AUDIO*)pin->dataRanges;
     for(count = 0;
         count<pin->dataRangesItem->Count;
-        count++, 
+        count++,
         dataRange = (KSDATARANGE_AUDIO*)( ((char*)dataRange) + dataRange->DataRange.FormatSize)) /* Need to update dataRange here, due to 'continue' !! */
     {
         /* Check major format*/
@@ -2212,7 +2256,7 @@
         PA_DEBUG(("\tBits:%d-%d\n",dataRange->MinimumBitsPerSample,dataRange->MaximumBitsPerSample));
         PA_DEBUG(("\tSampleRate:%d-%d\n",dataRange->MinimumSampleFrequency,dataRange->MaximumSampleFrequency));
 
-        if( dataRange->MaximumChannels != (ULONG)-1 && 
+        if( dataRange->MaximumChannels != (ULONG)-1 &&
             dataRange->MaximumChannels < format->nChannels )
         {
             result = paInvalidChannelCount;
@@ -2221,12 +2265,7 @@
 
         if (pFormatExt != 0)
         {
-            if ( dataRange->MinimumBitsPerSample > pFormatExt->Samples.wValidBitsPerSample )
-            {
-                result = paSampleFormatNotSupported;
-                continue;
-            }
-            if ( dataRange->MaximumBitsPerSample < pFormatExt->Samples.wValidBitsPerSample )
+            if (!IsBitsWithinRange(dataRange, pFormatExt->Samples.wValidBitsPerSample))
             {
                 result = paSampleFormatNotSupported;
                 continue;
@@ -2234,26 +2273,14 @@
         }
         else
         {
-            if( dataRange->MinimumBitsPerSample > format->wBitsPerSample )
-            {
-                result = paSampleFormatNotSupported;
-                continue;
-            }
-
-            if( dataRange->MaximumBitsPerSample < format->wBitsPerSample )
+            if (!IsBitsWithinRange(dataRange, format->wBitsPerSample))
             {
                 result = paSampleFormatNotSupported;
                 continue;
             }
         }
 
-        if( dataRange->MinimumSampleFrequency > format->nSamplesPerSec )
-        {
-            result = paInvalidSampleRate;
-            continue;
-        }
-
-        if( dataRange->MaximumSampleFrequency < format->nSamplesPerSec )
+        if (!IsFrequencyWithinRange(dataRange, format->nSamplesPerSec))
         {
             result = paInvalidSampleRate;
             continue;
@@ -2273,6 +2300,8 @@
     PaError result = paNoError;
     KSPROPERTY propIn;
 
+    PA_LOGE_;
+
     propIn.Set = KSPROPSETID_RtAudio;
     propIn.Id = 8; /* = KSPROPERTY_RTAUDIO_QUERY_NOTIFICATION_SUPPORT */
     propIn.Flags = KSPROPERTY_TYPE_GET;
@@ -2284,13 +2313,13 @@
         sizeof(BOOL),
         NULL);
 
-    if (result != paNoError) 
+    if (result != paNoError)
     {
         PA_DEBUG(("Failed PinQueryNotificationSupport\n"));
     }
 
+    PA_LOGL_;
     return result;
-
 }
 
 static PaError PinGetBufferWithNotification(PaWinWdmPin* pPin, void** pBuffer, DWORD* pRequestedBufSize, BOOL* pbCallMemBarrier)
@@ -2299,6 +2328,8 @@
     KSRTAUDIO_BUFFER_PROPERTY_WITH_NOTIFICATION propIn;
     KSRTAUDIO_BUFFER propOut;
 
+    PA_LOGE_;
+
     propIn.BaseAddress = 0;
     propIn.NotificationCount = 2;
     propIn.RequestedBufferSize = *pRequestedBufSize;
@@ -2313,17 +2344,18 @@
         sizeof(KSRTAUDIO_BUFFER),
         NULL);
 
-    if (result == paNoError) 
+    if (result == paNoError)
     {
         *pBuffer = propOut.BufferAddress;
         *pRequestedBufSize = propOut.ActualBufferSize;
         *pbCallMemBarrier = propOut.CallMemoryBarrier;
     }
-    else 
+    else
     {
         PA_DEBUG(("Failed to get buffer with notification\n"));
     }
 
+    PA_LOGL_;
     return result;
 }
 
@@ -2333,6 +2365,8 @@
     KSRTAUDIO_BUFFER_PROPERTY propIn;
     KSRTAUDIO_BUFFER propOut;
 
+    PA_LOGE_;
+
     propIn.BaseAddress = NULL;
     propIn.RequestedBufferSize = *pRequestedBufSize;
     propIn.Property.Set = KSPROPSETID_RtAudio;
@@ -2352,11 +2386,12 @@
         *pRequestedBufSize = propOut.ActualBufferSize;
         *pbCallMemBarrier = propOut.CallMemoryBarrier;
     }
-    else 
+    else
     {
         PA_DEBUG(("Failed to get buffer without notification\n"));
     }
 
+    PA_LOGL_;
     return result;
 }
 
@@ -2374,9 +2409,17 @@
 static PaError PinGetBuffer(PaWinWdmPin* pPin, void** pBuffer, DWORD* pRequestedBufSize, BOOL* pbCallMemBarrier)
 {
     PaError result = paNoError;
+    int limit = 1000;
+    PA_LOGE_;
 
     while (1)
     {
+        limit--;
+        if (limit == 0) {
+           PA_DEBUG(("PinGetBuffer: LOOP LIMIT REACHED\n"));
+           break;
+        }
+
         if (pPin->pinKsSubType != SubType_kPolled)
         {
             /* In case of unknown (or notification), we try both modes */
@@ -2419,10 +2462,12 @@
         }
     }
 
+    PA_LOGL_;
+
     return result;
 }
 
-static PaError PinRegisterPositionRegister(PaWinWdmPin* pPin) 
+static PaError PinRegisterPositionRegister(PaWinWdmPin* pPin)
 {
     PaError result = paNoError;
     KSRTAUDIO_HWREGISTER_PROPERTY propIn;
@@ -2433,7 +2478,7 @@
     propIn.BaseAddress = NULL;
     propIn.Property.Set = KSPROPSETID_RtAudio;
     propIn.Property.Id = KSPROPERTY_RTAUDIO_POSITIONREGISTER;
-    propIn.Property.Flags = KSPROPERTY_TYPE_GET;
+    propIn.Property.Flags = KSPROPERTY_TYPE_SET;
 
     result = WdmSyncIoctl(pPin->handle, IOCTL_KS_PROPERTY,
         &propIn,
@@ -2442,7 +2487,7 @@
         sizeof(KSRTAUDIO_HWREGISTER),
         NULL);
 
-    if (result == paNoError) 
+    if (result == paNoError)
     {
         pPin->positionRegister = (ULONG*)propOut.Register;
     }
@@ -2456,7 +2501,7 @@
     return result;
 }
 
-static PaError PinRegisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle) 
+static PaError PinRegisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle)
 {
     PaError result = paNoError;
     KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY prop;
@@ -2466,7 +2511,7 @@
     prop.NotificationEvent = handle;
     prop.Property.Set = KSPROPSETID_RtAudio;
     prop.Property.Id = KSPROPERTY_RTAUDIO_REGISTER_NOTIFICATION_EVENT;
-    prop.Property.Flags = KSPROPERTY_TYPE_GET;
+    prop.Property.Flags = KSPROPERTY_TYPE_SET;
 
     result = WdmSyncIoctl(pPin->handle,
         IOCTL_KS_PROPERTY,
@@ -2485,7 +2530,7 @@
     return result;
 }
 
-static PaError PinUnregisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle) 
+static PaError PinUnregisterNotificationHandle(PaWinWdmPin* pPin, HANDLE handle)
 {
     PaError result = paNoError;
     KSRTAUDIO_NOTIFICATION_EVENT_PROPERTY prop;
@@ -2497,7 +2542,7 @@
         prop.NotificationEvent = handle;
         prop.Property.Set = KSPROPSETID_RtAudio;
         prop.Property.Id = KSPROPERTY_RTAUDIO_UNREGISTER_NOTIFICATION_EVENT;
-        prop.Property.Flags = KSPROPERTY_TYPE_GET;
+        prop.Property.Flags = KSPROPERTY_TYPE_SET;
 
         result = WdmSyncIoctl(pPin->handle,
             IOCTL_KS_PROPERTY,
@@ -2552,14 +2597,14 @@
 }
 
 /* This one is used for WaveRT */
-static PaError PinGetAudioPositionDirect(PaWinWdmPin* pPin, ULONG* pPosition)
+static PaError PinGetAudioPositionMemoryMapped(PaWinWdmPin* pPin, ULONG* pPosition)
 {
     *pPosition = (*pPin->positionRegister);
     return paNoError;
 }
 
 /* This one also, but in case the driver hasn't implemented memory mapped access to the position register */
-static PaError PinGetAudioPositionViaIOCTL(PaWinWdmPin* pPin, ULONG* pPosition)
+static PaError PinGetAudioPositionViaIOCTLRead(PaWinWdmPin* pPin, ULONG* pPosition)
 {
     PaError result = paNoError;
     KSPROPERTY propIn;
@@ -2583,7 +2628,7 @@
     }
     else
     {
-        PA_DEBUG(("Failed to get audio position!\n"));
+        PA_DEBUG(("Failed to get audio play position!\n"));
     }
 
     PA_LOGL_;
@@ -2592,10 +2637,44 @@
 
 }
 
+/* This one also, but in case the driver hasn't implemented memory mapped access to the position register */
+static PaError PinGetAudioPositionViaIOCTLWrite(PaWinWdmPin* pPin, ULONG* pPosition)
+{
+    PaError result = paNoError;
+    KSPROPERTY propIn;
+    KSAUDIO_POSITION propOut;
+
+    PA_LOGE_;
+
+    propIn.Set = KSPROPSETID_Audio;
+    propIn.Id = KSPROPERTY_AUDIO_POSITION;
+    propIn.Flags = KSPROPERTY_TYPE_GET;
+
+    result = WdmSyncIoctl(pPin->handle,
+        IOCTL_KS_PROPERTY,
+        &propIn, sizeof(KSPROPERTY),
+        &propOut, sizeof(KSAUDIO_POSITION),
+        NULL);
+
+    if (result == paNoError)
+    {
+        *pPosition = (ULONG)(propOut.WriteOffset);
+    }
+    else
+    {
+        PA_DEBUG(("Failed to get audio write position!\n"));
+    }
+
+    PA_LOGL_;
+
+    return result;
+
+}
+
 /***********************************************************************************************/
 
 /**
-* Create a new filter object. 
+* Create a new filter object.
 */
 static PaWinWdmFilter* FilterNew( PaWDMKSType type, DWORD devNode, const wchar_t* filterName, const wchar_t* friendlyName, PaError* error )
 {
@@ -2742,7 +2821,7 @@
         return paNoError;
 
     if (filter->pins != NULL)
-        return paNoError;   
+        return paNoError;
 
     /* Allocate pointer array to hold the pins */
     filter->pins = (PaWinWdmPin**)PaUtil_AllocateMemory( sizeof(PaWinWdmPin*) * filter->pinCount );
@@ -2783,7 +2862,7 @@
         {
             if (filter->pins[pinId])
             {
-                PaUtil_FreeMemory(filter->pins[pinId]);
+                PinFree(filter->pins[pinId]);
                 filter->pins[pinId] = 0;
             }
         }
@@ -2800,7 +2879,6 @@
 */
 static void FilterFree(PaWinWdmFilter* filter)
 {
-    int pinId;
     PA_LOGL_;
     if( filter )
     {
@@ -2810,13 +2888,14 @@
             return;
         }
 
-        if (filter->topologyFilter)
+        if ( filter->topologyFilter )
         {
             FilterFree(filter->topologyFilter);
             filter->topologyFilter = 0;
         }
         if ( filter->pins )
         {
+            int pinId;
             for( pinId = 0; pinId < filter->pinCount; pinId++ )
                 PinFree(filter->pins[pinId]);
             PaUtil_FreeMemory( filter->pins );
@@ -2964,10 +3043,10 @@
 
 /**
 * Build the list of available filters
-* Use the SetupDi API to enumerate all devices in the KSCATEGORY_AUDIO which 
-* have a KSCATEGORY_RENDER or KSCATEGORY_CAPTURE alias. For each of these 
-* devices initialise a PaWinWdmFilter structure by calling our NewFilter() 
-* function. We enumerate devices twice, once to count how many there are, 
+* Use the SetupDi API to enumerate all devices in the KSCATEGORY_AUDIO which
+* have a KSCATEGORY_RENDER or KSCATEGORY_CAPTURE alias. For each of these
+* devices initialise a PaWinWdmFilter structure by calling our NewFilter()
+* function. We enumerate devices twice, once to count how many there are,
 * and once to initialize the PaWinWdmFilter structures.
 *
 * Vista and later: Also check KSCATEGORY_REALTIME for WaveRT devices.
@@ -3145,7 +3224,7 @@
                 very literate. */
                 if (!SetupDiGetDeviceRegistryPropertyW(handle,
                     &devInfoData,
-                    SPDRP_LOCATION_INFORMATION, 
+                    SPDRP_LOCATION_INFORMATION,
                     &type,
                     (BYTE*)friendlyName,
                     sizeof(friendlyName),
@@ -3179,7 +3258,7 @@
 
             TrimString(friendlyName, sizeFriendlyName);
 
-            newFilter = FilterNew(streamingType, 
+            newFilter = FilterNew(streamingType,
                 devInfoData.DevInst,
                 devInterfaceDetails->DevicePath,
                 friendlyName,
@@ -3260,7 +3339,7 @@
 
 static PaError CreateHashEntry(PaNameHashObject* obj, const wchar_t* name, const BOOL input)
 {
-    ULONG hash = GetNameHash(name, input); 
+    ULONG hash = GetNameHash(name, input);
     PaNameHashIndex * pLast = NULL;
     PaNameHashIndex * p = obj->list;
     while (p != 0)
@@ -3342,7 +3421,7 @@
 
 static unsigned GetNameIndex(PaNameHashObject* obj, const wchar_t* name, const BOOL input)
 {
-    ULONG hash = GetNameHash(name, input); 
+    ULONG hash = GetNameHash(name, input);
     PaNameHashIndex* p = obj->list;
     while (p != NULL)
     {
@@ -3374,6 +3453,10 @@
     int filterCount = 0;
     int totalDeviceCount = 0;
     int idxDevice = 0;
+    DWORD defaultInDevPathSize = 0;
+    DWORD defaultOutDevPathSize = 0;
+    wchar_t* defaultInDevPath = 0;
+    wchar_t* defaultOutDevPath = 0;
 
     ppFilters = BuildFilterList( &filterCount, &totalDeviceCount, &result );
     if( result != paNoError )
@@ -3381,11 +3464,24 @@
         goto error;
     }
 
+    // Get hold of default device paths for capture & playback
+    if( waveInMessage(0, DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&defaultInDevPathSize, 0 ) == MMSYSERR_NOERROR )
+    {
+        defaultInDevPath = (wchar_t *)PaUtil_AllocateMemory((defaultInDevPathSize + 1) * sizeof(wchar_t));
+        waveInMessage(0, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)defaultInDevPath, defaultInDevPathSize);
+    }
+    if( waveOutMessage(0, DRV_QUERYDEVICEINTERFACESIZE, (DWORD_PTR)&defaultOutDevPathSize, 0 ) == MMSYSERR_NOERROR )
+    {
+        defaultOutDevPath = (wchar_t *)PaUtil_AllocateMemory((defaultOutDevPathSize + 1) * sizeof(wchar_t));
+        waveOutMessage(0, DRV_QUERYDEVICEINTERFACE, (DWORD_PTR)defaultOutDevPath, defaultOutDevPathSize);
+    }
+
     if( totalDeviceCount > 0 )
     {
         PaWinWdmDeviceInfo *deviceInfoArray = 0;
         int idxFilter;
         int i;
+        unsigned devIsDefaultIn = 0, devIsDefaultOut = 0;
 
         /* Allocate the out param for all the info we need */
         outArgument = (PaWinWDMScanDeviceInfosResults *) PaUtil_GroupAllocateMemory(
@@ -3440,6 +3536,9 @@
                 continue;
             }
 
+            devIsDefaultIn = (defaultInDevPath && (_wcsicmp(pFilter->devInfo.filterPath, defaultInDevPath) == 0));
+            devIsDefaultOut = (defaultOutDevPath && (_wcsicmp(pFilter->devInfo.filterPath, defaultOutDevPath) == 0));
+
             for (i = 0; i < pFilter->pinCount; ++i)
             {
                 unsigned m;
@@ -3501,14 +3600,19 @@
                     /* Convert wide char string to utf-8 */
                     WideCharToMultiByte(CP_UTF8, 0, localCompositeName, -1, wdmDeviceInfo->compositeName, MAX_PATH, NULL, NULL);
 
-                    /* NB! WDM/KS has no concept of a full-duplex device, each pin is either an input or and output */
+                    /* NB! WDM/KS has no concept of a full-duplex device, each pin is either an input or an output */
                     if (isInput)
                     {
                         /* INPUT ! */
                         deviceInfo->maxInputChannels  = pin->maxChannels;
                         deviceInfo->maxOutputChannels = 0;
 
-                        if (outArgument->defaultInputDevice == paNoDevice)
+                        /* RoBi NB: Due to the fact that input audio endpoints in Vista (& later OSs) can be the same device, but with
+                           different input mux settings, there might be a discrepancy between the default input device chosen, and
+                           that which will be used by Portaudio. Not much to do about that unfortunately.
+                        */
+                        if ((defaultInDevPath == 0 || devIsDefaultIn) &&
+                             outArgument->defaultInputDevice == paNoDevice)
                         {
                             outArgument->defaultInputDevice = idxDevice;
                         }
@@ -3519,7 +3623,8 @@
                         deviceInfo->maxInputChannels  = 0;
                         deviceInfo->maxOutputChannels = pin->maxChannels;
 
-                        if (outArgument->defaultOutputDevice == paNoDevice)
+                        if ((defaultOutDevPath == 0 || devIsDefaultOut) &&
+                            outArgument->defaultOutputDevice == paNoDevice)
                         {
                             outArgument->defaultOutputDevice = idxDevice;
                         }
@@ -3537,7 +3642,7 @@
                     case Type_kWaveCyclic:
                         if (IsEarlierThanVista())
                         {
-                            /* XP doesn't tolerate low latency, unless the Process Priority Class is set to REALTIME_PRIORITY_CLASS 
+                            /* XP doesn't tolerate low latency, unless the Process Priority Class is set to REALTIME_PRIORITY_CLASS
                             through SetPriorityClass, then 10 ms is quite feasible. However, one should then bear in mind that ALL of
                             the process is running in REALTIME_PRIORITY_CLASS, which might not be appropriate for an application with
                             a GUI . In this case it is advisable to separate the audio engine in another process and use IPC to communicate
@@ -3900,7 +4005,7 @@
         /* Check that the input format is supported */
         channelMask = PaWin_DefaultChannelMask(inputChannelCount);
         PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,
-            inputChannelCount, 
+            inputChannelCount,
             testFormat,
             PaWin_SampleFormatToLinearWaveFormatTag(testFormat),
             sampleRate,
@@ -3915,7 +4020,7 @@
         {
             /* Try a WAVE_FORMAT_PCM instead */
             PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,
-                inputChannelCount, 
+                inputChannelCount,
                 testFormat,
                 PaWin_SampleFormatToLinearWaveFormatTag(testFormat),
                 sampleRate);
@@ -4011,7 +4116,7 @@
         /* Check that the output format is supported */
         channelMask = PaWin_DefaultChannelMask(outputChannelCount);
         PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,
-            outputChannelCount, 
+            outputChannelCount,
             testFormat,
             PaWin_SampleFormatToLinearWaveFormatTag(testFormat),
             sampleRate,
@@ -4027,7 +4132,7 @@
         {
             /* Try a WAVE_FORMAT_PCM instead */
             PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,
-                outputChannelCount, 
+                outputChannelCount,
                 testFormat,
                 PaWin_SampleFormatToLinearWaveFormatTag(testFormat),
                 sampleRate);
@@ -4081,7 +4186,7 @@
     return result;
 }
 
-static void ResetStreamEvents(PaWinWdmStream* stream) 
+static void ResetStreamEvents(PaWinWdmStream* stream)
 {
     unsigned i;
     ResetEvent(stream->eventAbort);
@@ -4105,7 +4210,7 @@
     }
 }
 
-static void CloseStreamEvents(PaWinWdmStream* stream) 
+static void CloseStreamEvents(PaWinWdmStream* stream)
 {
     unsigned i;
     PaWinWdmIOInfo* ios[2] = { &stream->capture, &stream->render };
@@ -4159,7 +4264,8 @@
 
 static PaError ValidateSpecificStreamParameters(
     const PaStreamParameters *streamParameters,
-    const PaWinWDMKSInfo *streamInfo)
+    const PaWinWDMKSInfo *streamInfo,
+    unsigned isInput)
 {
     if( streamInfo )
     {
@@ -4170,6 +4276,12 @@
             return paIncompatibleHostApiSpecificStreamInfo;
         }
 
+        if (!!(streamInfo->flags & ~(paWinWDMKSOverrideFramesize | paWinWDMKSUseGivenChannelMask)))
+        {
+            PA_DEBUG(("Stream parameters: non supported flags set"));
+            return paIncompatibleHostApiSpecificStreamInfo;
+        }
+
         if (streamInfo->noOfPackets != 0 &&
             (streamInfo->noOfPackets < 2 || streamInfo->noOfPackets > 8))
         {
@@ -4177,6 +4289,21 @@
             return paIncompatibleHostApiSpecificStreamInfo;
         }
 
+        if (streamInfo->flags & paWinWDMKSUseGivenChannelMask)
+        {
+            if (isInput)
+            {
+                PA_DEBUG(("Stream parameters: Channels mask setting not supported for input stream"));
+                return paIncompatibleHostApiSpecificStreamInfo;
+            }
+
+            if (streamInfo->channelMask & PAWIN_SPEAKER_RESERVED)
+            {
+                PA_DEBUG(("Stream parameters: Given channels mask 0x%08X not supported", streamInfo->channelMask));
+                return paIncompatibleHostApiSpecificStreamInfo;
+            }
+        }
+
     }
 
     return paNoError;
@@ -4184,6 +4311,7 @@
 
 
 
+
 /* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */
 
 static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
@@ -4231,7 +4359,7 @@
         }
 
         /* validate inputStreamInfo */
-        result = ValidateSpecificStreamParameters(inputParameters, inputParameters->hostApiSpecificStreamInfo);
+        result = ValidateSpecificStreamParameters(inputParameters, inputParameters->hostApiSpecificStreamInfo, 1 );
         if(result != paNoError)
         {
             PaWinWDM_SetLastErrorInfo(result, "Host API stream info not supported (in)");
@@ -4266,7 +4394,7 @@
         }
 
         /* validate outputStreamInfo */
-        result = ValidateSpecificStreamParameters( outputParameters, outputParameters->hostApiSpecificStreamInfo );
+        result = ValidateSpecificStreamParameters( outputParameters, outputParameters->hostApiSpecificStreamInfo, 0 );
         if (result != paNoError)
         {
             PaWinWDM_SetLastErrorInfo(result, "Host API stream info not supported (out)");
@@ -4367,7 +4495,7 @@
             while (1)
             {
                 PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,
-                    channelsToProbe, 
+                    channelsToProbe,
                     hostInputSampleFormat,
                     PaWin_SampleFormatToLinearWaveFormatTag(hostInputSampleFormat),
                     sampleRate,
@@ -4384,7 +4512,7 @@
                 {
                     /* Try a WAVE_FORMAT_PCM instead */
                     PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,
-                        channelsToProbe, 
+                        channelsToProbe,
                         hostInputSampleFormat,
                         PaWin_SampleFormatToLinearWaveFormatTag(hostInputSampleFormat),
                         sampleRate);
@@ -4471,8 +4599,16 @@
         PaWinWdmFilter* pFilter;
         PaWinWdmDeviceInfo* pDeviceInfo;
         PaWinWdmPin* pPin;
+        PaWinWDMKSInfo* pInfo = (PaWinWDMKSInfo*)(outputParameters->hostApiSpecificStreamInfo);
         unsigned validBitsPerSample = 0;
         PaWinWaveFormatChannelMask channelMask = PaWin_DefaultChannelMask( userOutputChannels );
+        if (pInfo && (pInfo->flags & paWinWDMKSUseGivenChannelMask))
+        {
+            PA_DEBUG(("Using channelMask 0x%08X instead of default 0x%08X\n",
+                pInfo->channelMask,
+                channelMask));
+            channelMask = pInfo->channelMask;
+        }
 
         result = paSampleFormatNotSupported;
         pDeviceInfo = (PaWinWdmDeviceInfo*)wdmHostApi->inheritedHostApiRep.deviceInfos[outputParameters->device];
@@ -4509,7 +4645,7 @@
             while (1)
             {
                 PaWin_InitializeWaveFormatExtensible((PaWinWaveFormat*)&wfx,
-                    channelsToProbe, 
+                    channelsToProbe,
                     hostOutputSampleFormat,
                     PaWin_SampleFormatToLinearWaveFormatTag(hostOutputSampleFormat),
                     sampleRate,
@@ -4525,7 +4661,7 @@
                 if( result != paNoError && result != paDeviceUnavailable )
                 {
                     PaWin_InitializeWaveFormatEx((PaWinWaveFormat*)&wfx,
-                        channelsToProbe, 
+                        channelsToProbe,
                         hostOutputSampleFormat,
                         PaWin_SampleFormatToLinearWaveFormatTag(hostOutputSampleFormat),
                         sampleRate);
@@ -4646,7 +4782,7 @@
         stream->userInputChannels, inputSampleFormat, hostInputSampleFormat,
         stream->userOutputChannels, outputSampleFormat, hostOutputSampleFormat,
         sampleRate, streamFlags, framesPerUserBuffer,
-        max(stream->capture.framesPerBuffer, stream->render.framesPerBuffer), 
+        max(stream->capture.framesPerBuffer, stream->render.framesPerBuffer),
         paUtilBoundedHostBufferSize,
         streamCallback, userData );
     if( result != paNoError )
@@ -4693,7 +4829,7 @@
                 ULONG hwFifoLatency = 0;
                 ULONG dummy;
                 result = PinGetBuffer(stream->capture.pPin, (void**)&stream->capture.hostBuffer, &dwRequestedSize, &bCallMemoryBarrier);
-                if (!result) 
+                if (!result)
                 {
                     PA_DEBUG(("Input buffer start = %p, size = %u\n", stream->capture.hostBuffer, dwRequestedSize));
                     if (dwRequestedSize != dwTotalSize)
@@ -4717,7 +4853,7 @@
 
                     stream->capture.pPin->fnMemBarrier = bCallMemoryBarrier ? MemoryBarrierRead : MemoryBarrierDummy;
                 }
-                else 
+                else
                 {
                     PA_DEBUG(("Failed to get input buffer (WaveRT)\n"));
                     PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, "Failed to get input buffer (WaveRT)");
@@ -4749,7 +4885,7 @@
             goto error;
         }
     }
-    else 
+    else
     {
         stream->capture.hostBuffer = 0;
     }
@@ -4788,7 +4924,7 @@
                 ULONG hwFifoLatency = 0;
                 ULONG dummy;
                 result = PinGetBuffer(stream->render.pPin, (void**)&stream->render.hostBuffer, &dwRequestedSize, &bCallMemoryBarrier);
-                if (!result) 
+                if (!result)
                 {
                     PA_DEBUG(("Output buffer start = %p, size = %u, membarrier = %u\n", stream->render.hostBuffer, dwRequestedSize, bCallMemoryBarrier));
                     if (dwRequestedSize != dwTotalSize)
@@ -4812,7 +4948,7 @@
 
                     stream->render.pPin->fnMemBarrier = bCallMemoryBarrier ? MemoryBarrierWrite : MemoryBarrierDummy;
                 }
-                else 
+                else
                 {
                     PA_DEBUG(("Failed to get output buffer (with notification)\n"));
                     PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, "Failed to get output buffer (with notification)");
@@ -4844,7 +4980,7 @@
             goto error;
         }
     }
-    else 
+    else
     {
         stream->render.hostBuffer = 0;
     }
@@ -4960,8 +5096,8 @@
                 if (result != paNoError)
                 {
                     unsigned long pos = 0xdeadc0de;
-                    PA_DEBUG(("Failed to register capture position register, using PinGetAudioPositionViaIOCTL\n"));
-                    stream->capture.pPin->fnAudioPosition = PinGetAudioPositionViaIOCTL;
+                    PA_DEBUG(("Failed to register capture position register, using PinGetAudioPositionViaIOCTLWrite\n"));
+                    stream->capture.pPin->fnAudioPosition = PinGetAudioPositionViaIOCTLWrite;
                     /* Test position function */
                     result = (stream->capture.pPin->fnAudioPosition)(stream->capture.pPin, &pos);
                     if (result != paNoError || pos != 0x0)
@@ -4970,11 +5106,11 @@
                         PaWinWDM_SetLastErrorInfo(paUnanticipatedHostError, "Failed to read capture position register (IOCTL)");
                         result = paUnanticipatedHostError;
                         goto error;
-                    }                
+                    }
                 }
                 else
                 {
-                    stream->capture.pPin->fnAudioPosition = PinGetAudioPositionDirect;
+                    stream->capture.pPin->fnAudioPosition = PinGetAudioPositionMemoryMapped;
                 }
             }
             break;
@@ -5082,8 +5218,8 @@
                 if (result != paNoError)
                 {
                     unsigned long pos = 0xdeadc0de;
-                    PA_DEBUG(("Failed to register rendering position register, using PinGetAudioPositionViaIOCTL\n"));
-                    stream->render.pPin->fnAudioPosition = PinGetAudioPositionViaIOCTL;
+                    PA_DEBUG(("Failed to register rendering position register, using PinGetAudioPositionViaIOCTLRead\n"));
+                    stream->render.pPin->fnAudioPosition = PinGetAudioPositionViaIOCTLRead;
                     /* Test position function */
                     result = (stream->render.pPin->fnAudioPosition)(stream->render.pPin, &pos);
                     if (result != paNoError || pos != 0x0)
@@ -5096,7 +5232,7 @@
                 }
                 else
                 {
-                    stream->render.pPin->fnAudioPosition = PinGetAudioPositionDirect;
+                    stream->render.pPin->fnAudioPosition = PinGetAudioPositionMemoryMapped;
                 }
             }
             break;
@@ -5365,19 +5501,19 @@
 }
 
 /*
-Increase the priority of the calling thread to RT 
+Increase the priority of the calling thread to RT
 */
-static HANDLE BumpThreadPriority() 
+static HANDLE BumpThreadPriority()
 {
     HANDLE hThread = GetCurrentThread();
     DWORD dwTask = 0;
     HANDLE hAVRT = NULL;
 
     /* If we have access to AVRT.DLL (Vista and later), use it */
-    if (paWinWDMKSAvRtEntryPoints.AvSetMmThreadCharacteristics != NULL) 
+    if (paWinWDMKSAvRtEntryPoints.AvSetMmThreadCharacteristics != NULL)
     {
         hAVRT = paWinWDMKSAvRtEntryPoints.AvSetMmThreadCharacteristics("Pro Audio", &dwTask);
-        if (hAVRT != NULL && hAVRT != INVALID_HANDLE_VALUE) 
+        if (hAVRT != NULL && hAVRT != INVALID_HANDLE_VALUE)
         {
             BOOL bret = paWinWDMKSAvRtEntryPoints.AvSetMmThreadPriority(hAVRT, PA_AVRT_PRIORITY_CRITICAL);
             if (!bret)
@@ -5414,7 +5550,7 @@
 {
     HANDLE hThread = GetCurrentThread();
 
-    if (hAVRT != NULL) 
+    if (hAVRT != NULL)
     {
         paWinWDMKSAvRtEntryPoints.AvSetMmThreadPriority(hAVRT, PA_AVRT_PRIORITY_NORMAL);
         paWinWDMKSAvRtEntryPoints.AvRevertMmThreadCharacteristics(hAVRT);
@@ -5484,7 +5620,7 @@
         pInfo->priming += pInfo->stream->render.noOfPackets;
         ++pInfo->pending;
         SetEvent(pInfo->stream->render.events[0]);
-        if (pInfo->stream->render.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic) 
+        if (pInfo->stream->render.pPin->parentFilter->devInfo.streamingType == Type_kWaveCyclic)
         {
             unsigned i;
             for(i=1; i < pInfo->stream->render.noOfPackets; ++i)
@@ -5654,7 +5790,7 @@
                 framesProcessed = 0;
             }
         }
-        else 
+        else
         {
             framesProcessed = PaUtil_EndBufferProcessing(&pInfo->stream->bufferProcessor, &pInfo->cbResult);
         }
@@ -5800,7 +5936,7 @@
     assert(noOfHandles <= (info.stream->capture.noOfPackets + info.stream->render.noOfPackets + 1));
 
     /* Prepare render and capture pins */
-    if ((result = PreparePinsForStart(&info)) != paNoError) 
+    if ((result = PreparePinsForStart(&info)) != paNoError)
     {
         PA_DEBUG(("Failed to prepare device(s)!\n"));
         goto error;
@@ -5881,7 +6017,7 @@
         unsigned eventSignalled = wait - WAIT_OBJECT_0;
         DWORD dwCurrentTime = 0;
 
-        if (wait == WAIT_FAILED) 
+        if (wait == WAIT_FAILED)
         {
             PA_DEBUG(("Wait failed = %ld! \n",wait));
             break;
@@ -5914,7 +6050,7 @@
         /* Get event time */
         dwCurrentTime = GetCurrentTimeInMillisecs();
 
-        /* Since we can mix capture/render devices between WaveCyclic, WaveRT polled and WaveRT notification (3x3 combinations), 
+        /* Since we can mix capture/render devices between WaveCyclic, WaveRT polled and WaveRT notification (3x3 combinations),
         we can't rely on the timeout of WFMO to check for device timeouts, we need to keep tally. */
         if (info.stream->capture.pPin && (dwCurrentTime - timeStamp[0]) >= info.timeout)
         {
@@ -6373,7 +6509,7 @@
     {
         PA_HP_TRACE((pInfo->stream->hLog, ">>> Capture bogus event (no data): idx=%u", eventIndex));
 
-        /* Bogus event, reset! This is to handle the behavior of this USB mic: http://shop.xtz.se/measurement-system/microphone-to-dirac-live-room-correction-suite 
+        /* Bogus event, reset! This is to handle the behavior of this USB mic: http://shop.xtz.se/measurement-system/microphone-to-dirac-live-room-correction-suite
            on startup of streaming, where it erroneously sets the event without the corresponding buffer being filled (DataUsed == 0) */
         ResetEvent(packet->Signal.hEvent);
 
diff --git a/portaudio/src/hostapi/wmme/pa_win_wmme.c b/portaudio/src/hostapi/wmme/pa_win_wmme.c
--- a/portaudio/src/hostapi/wmme/pa_win_wmme.c
+++ b/portaudio/src/hostapi/wmme/pa_win_wmme.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_win_wmme.c 1874 2012-10-31 06:20:59Z rbencina $
+ * $Id$
  * pa_win_wmme.c
  * Implementation of PortAudio for Windows MultiMedia Extensions (WMME)       
  *                                                                                         
@@ -62,7 +62,7 @@
 */
 
 /** @file
-	@ingroup hostapi_src
+    @ingroup hostapi_src
 
     @brief Win32 host API implementation for the Windows MultiMedia Extensions (WMME) audio API.
 */
@@ -86,6 +86,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <limits.h>
 #include <math.h>
 #include <windows.h>
 #include <mmsystem.h>
@@ -201,31 +202,52 @@
 static const char constInputMapperSuffix_[] = " - Input";
 static const char constOutputMapperSuffix_[] = " - Output";
 
-/*
-copies TCHAR string to explicit char string
-*/
-char *StrTCpyToC(char *to, const TCHAR *from)
+/********************************************************************/
+
+/* Copy null-terminated TCHAR string to explicit char string using UTF8 encoding */
+static char *CopyTCharStringToUtf8CString(char *destination, size_t destLengthBytes, const TCHAR *source)
 {
 #if !defined(_UNICODE) && !defined(UNICODE)
-	return strcpy(to, from);
+    return strcpy(destination, source);
 #else
-	int count = wcslen(from);
-	if (count != 0)
-		if (WideCharToMultiByte(CP_ACP, 0, from, count, to, count, NULL, NULL) == 0)
-			return NULL;
-	return to;
+    /* The cbMultiByte parameter ["destLengthBytes" below] is:
+    """
+    Size, in bytes, of the buffer indicated by lpMultiByteStr ["destination" below]. 
+    If this parameter is set to 0, the function returns the required buffer 
+    size for lpMultiByteStr and makes no use of the output parameter itself.
+    """
+    Source: WideCharToMultiByte at MSDN:
+    http://msdn.microsoft.com/en-us/library/windows/desktop/dd374130(v=vs.85).aspx
+    */
+    int intDestLengthBytes; /* cbMultiByte */
+    /* intDestLengthBytes is an int, destLengthBytes is a size_t. Ensure that we don't overflow
+    intDestLengthBytes by only using at most INT_MAX bytes of destination buffer.
+    */
+    if (destLengthBytes < INT_MAX)
+    {
+#pragma warning (disable : 4267) /* "conversion from 'size_t' to 'int', possible loss of data" */
+        intDestLengthBytes = (int)destLengthBytes; /* destLengthBytes is guaranteed < INT_MAX here */
+#pragma warning (default : 4267)
+    }
+    else
+    {
+        intDestLengthBytes = INT_MAX;
+    }
+    
+    if (WideCharToMultiByte(CP_UTF8, 0, source, -1, destination, /*cbMultiByte=*/intDestLengthBytes, NULL, NULL) == 0)
+        return NULL;
+    return destination;
 #endif
 }
 
-/*
-returns length of TCHAR string
-*/
-size_t StrTLen(const TCHAR *str)
+/* returns required length (in bytes) of destination buffer when 
+   converting TCHAR string to UTF8 bytes, not including the terminating null. */
+static size_t TCharStringLen(const TCHAR *str)
 {
 #if !defined(_UNICODE) && !defined(UNICODE)
-	return strlen(str);
+    return strlen(str);
 #else
-	return wcslen(str);	
+    return WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);	
 #endif
 }
 
@@ -491,7 +513,7 @@
 {
     assert( device >= 0 && device < hostApi->inputDeviceCount + hostApi->outputDeviceCount );
 
-	return hostApi->winMmeDeviceIds[ device ];
+    return hostApi->winMmeDeviceIds[ device ];
 }
 
 
@@ -686,6 +708,7 @@
     MMRESULT mmresult;
     WAVEINCAPS wic;
     PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    size_t len;
     
     *success = 0;
 
@@ -705,31 +728,35 @@
         return paNoError;
     }           
 
+    /* NOTE: the WAVEOUTCAPS.szPname is a null-terminated array of 32 characters,
+        so we are limited to displaying only the first 31 characters of the device name. */
     if( winMmeInputDeviceId == WAVE_MAPPER )
     {
+        len = TCharStringLen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_);
         /* Append I/O suffix to WAVE_MAPPER device. */
-        deviceName = (char *)PaUtil_GroupAllocateMemory(
+        deviceName = (char*)PaUtil_GroupAllocateMemory(
                     winMmeHostApi->allocations,
-					(long) (StrTLen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_)) );
+                    (long)len );
         if( !deviceName )
         {
             result = paInsufficientMemory;
             goto error;
         }
-        StrTCpyToC( deviceName, wic.szPname );
+        CopyTCharStringToUtf8CString( deviceName, len, wic.szPname );
         strcat( deviceName, constInputMapperSuffix_ );
     }
     else
     {
+        len = TCharStringLen( wic.szPname ) + 1;
         deviceName = (char*)PaUtil_GroupAllocateMemory(
-                    winMmeHostApi->allocations, 
-					(long) (StrTLen( wic.szPname ) + 1) );
+                    winMmeHostApi->allocations,
+                    (long)len );
         if( !deviceName )
         {
             result = paInsufficientMemory;
             goto error;
         }
-        StrTCpyToC( deviceName, wic.szPname  );
+        CopyTCharStringToUtf8CString( deviceName, len, wic.szPname  );
     }
     deviceInfo->name = deviceName;
 
@@ -811,6 +838,7 @@
     MMRESULT mmresult;
     WAVEOUTCAPS woc;
     PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    size_t len;
 #ifdef PAWIN_USE_WDMKS_DEVICE_INFO
     int wdmksDeviceOutputChannelCountIsKnown;
 #endif
@@ -833,31 +861,35 @@
         return paNoError;
     }
 
+    /* NOTE: the WAVEOUTCAPS.szPname is a null-terminated array of 32 characters,
+        so we are limited to displaying only the first 31 characters of the device name. */
     if( winMmeOutputDeviceId == WAVE_MAPPER )
     {
         /* Append I/O suffix to WAVE_MAPPER device. */
-        deviceName = (char *)PaUtil_GroupAllocateMemory(
+        len = TCharStringLen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_);
+        deviceName = (char*)PaUtil_GroupAllocateMemory(
                     winMmeHostApi->allocations, 
-					(long) (StrTLen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_)) );
+                    (long)len );
         if( !deviceName )
         {
             result = paInsufficientMemory;
             goto error;
         }
-        StrTCpyToC( deviceName, woc.szPname );
+        CopyTCharStringToUtf8CString( deviceName, len, woc.szPname );
         strcat( deviceName, constOutputMapperSuffix_ );
     }
     else
     {
+        len = TCharStringLen( woc.szPname ) + 1;
         deviceName = (char*)PaUtil_GroupAllocateMemory(
                     winMmeHostApi->allocations, 
-					(long) (StrTLen( woc.szPname ) + 1) );
+                    (long)len );
         if( !deviceName )
         {
             result = paInsufficientMemory;
             goto error;
         }
-        StrTCpyToC( deviceName, woc.szPname  );
+        CopyTCharStringToUtf8CString( deviceName, len, woc.szPname );
     }
     deviceInfo->name = deviceName;
 
@@ -882,7 +914,7 @@
 
 #ifdef PAWIN_USE_WDMKS_DEVICE_INFO
     wdmksDeviceOutputChannelCountIsKnown = QueryWaveOutKSFilterMaxChannels( 
-			winMmeOutputDeviceId, &deviceInfo->maxOutputChannels );
+            winMmeOutputDeviceId, &deviceInfo->maxOutputChannels );
     if( wdmksDeviceOutputChannelCountIsKnown && !winMmeDeviceInfo->deviceOutputChannelCountIsKnown )
         winMmeDeviceInfo->deviceOutputChannelCountIsKnown = 1;
 #endif /* PAWIN_USE_WDMKS_DEVICE_INFO */
@@ -901,9 +933,19 @@
 
 static void GetDefaultLatencies( PaTime *defaultLowLatency, PaTime *defaultHighLatency )
 {
+/*
+NOTE: GetVersionEx() is deprecated as of Windows 8.1 and can not be used to reliably detect
+versions of Windows higher than Windows 8 (due to manifest requirements for reporting higher versions).
+Microsoft recommends switching to VerifyVersionInfo (available on Win 2k and later), however GetVersionEx
+is is faster, for now we just disable the deprecation warning.
+See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx
+See: http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVe
+*/
+#pragma warning (disable : 4996) /* use of GetVersionEx */
+
     OSVERSIONINFO osvi;
     osvi.dwOSVersionInfoSize = sizeof( osvi );
-	GetVersionEx( &osvi );
+    GetVersionEx( &osvi );
 
     /* Check for NT */
     if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )
@@ -920,6 +962,8 @@
     }     
 
     *defaultHighLatency = *defaultLowLatency * 2;
+
+#pragma warning (default : 4996)
 }
 
 
@@ -983,11 +1027,11 @@
 
     inputDeviceCount = waveInGetNumDevs();
     if( inputDeviceCount > 0 )
-    	maximumPossibleDeviceCount += inputDeviceCount + 1;	/* assume there is a WAVE_MAPPER */
+        maximumPossibleDeviceCount += inputDeviceCount + 1;	/* assume there is a WAVE_MAPPER */
 
     outputDeviceCount = waveOutGetNumDevs();
     if( outputDeviceCount > 0 )
-	    maximumPossibleDeviceCount += outputDeviceCount + 1;	/* assume there is a WAVE_MAPPER */
+        maximumPossibleDeviceCount += outputDeviceCount + 1;	/* assume there is a WAVE_MAPPER */
 
 
     if( maximumPossibleDeviceCount > 0 ){
@@ -2157,29 +2201,29 @@
         char *throttleProcessingThreadOnOverload,
         unsigned long *deviceCount )
 {
-	if( streamInfo )
-	{
-	    if( streamInfo->size != sizeof( PaWinMmeStreamInfo )
-	            || streamInfo->version != 1 )
-	    {
-	        return paIncompatibleHostApiSpecificStreamInfo;
-	    }
+    if( streamInfo )
+    {
+        if( streamInfo->size != sizeof( PaWinMmeStreamInfo )
+                || streamInfo->version != 1 )
+        {
+            return paIncompatibleHostApiSpecificStreamInfo;
+        }
 
         *winMmeSpecificFlags = streamInfo->flags;
 
-	    if( streamInfo->flags & paWinMmeDontThrottleOverloadedProcessingThread )
-	        *throttleProcessingThreadOnOverload = 0;
+        if( streamInfo->flags & paWinMmeDontThrottleOverloadedProcessingThread )
+            *throttleProcessingThreadOnOverload = 0;
             
-	    if( streamInfo->flags & paWinMmeUseMultipleDevices )
-	    {
-	        if( streamParameters->device != paUseHostApiSpecificDeviceSpecification )
-	            return paInvalidDevice;
-	
-			*deviceCount = streamInfo->deviceCount;
-		}	
-	}
+        if( streamInfo->flags & paWinMmeUseMultipleDevices )
+        {
+            if( streamParameters->device != paUseHostApiSpecificDeviceSpecification )
+                return paInvalidDevice;
+    
+            *deviceCount = streamInfo->deviceCount;
+        }	
+    }
 
-	return paNoError;
+    return paNoError;
 }
 
 static PaError RetrieveDevicesFromStreamParameters(
@@ -2194,34 +2238,34 @@
     int totalChannelCount;
     PaDeviceIndex hostApiDevice;
     
-	if( streamInfo && streamInfo->flags & paWinMmeUseMultipleDevices )
-	{
-		totalChannelCount = 0;
-	    for( i=0; i < deviceCount; ++i )
-	    {
-	        /* validate that the device number is within range */
-	        result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice,
-	                        streamInfo->devices[i].device, hostApi );
-	        if( result != paNoError )
-	            return result;
-	        
-	        devices[i].device = hostApiDevice;
-	        devices[i].channelCount = streamInfo->devices[i].channelCount;
-	
-	        totalChannelCount += devices[i].channelCount;
-	    }
-	
-	    if( totalChannelCount != streamParameters->channelCount )
-	    {
-	        /* channelCount must match total channels specified by multiple devices */
-	        return paInvalidChannelCount; /* REVIEW use of this error code */
-	    }
-	}	
-	else
-	{		
-	    devices[0].device = streamParameters->device;
-	    devices[0].channelCount = streamParameters->channelCount;
-	}
+    if( streamInfo && streamInfo->flags & paWinMmeUseMultipleDevices )
+    {
+        totalChannelCount = 0;
+        for( i=0; i < deviceCount; ++i )
+        {
+            /* validate that the device number is within range */
+            result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice,
+                            streamInfo->devices[i].device, hostApi );
+            if( result != paNoError )
+                return result;
+            
+            devices[i].device = hostApiDevice;
+            devices[i].channelCount = streamInfo->devices[i].channelCount;
+    
+            totalChannelCount += devices[i].channelCount;
+        }
+    
+        if( totalChannelCount != streamParameters->channelCount )
+        {
+            /* channelCount must match total channels specified by multiple devices */
+            return paInvalidChannelCount; /* REVIEW use of this error code */
+        }
+    }	
+    else
+    {		
+        devices[0].device = streamParameters->device;
+        devices[0].channelCount = streamParameters->channelCount;
+    }
 
     return result;
 }
@@ -2235,10 +2279,10 @@
     PaWinMmeDeviceInfo *inputDeviceInfo;
     PaError paerror;
 
-	for( i=0; i < deviceCount; ++i )
-	{
+    for( i=0; i < deviceCount; ++i )
+    {
         if( devices[i].channelCount < 1 )
-        	return paInvalidChannelCount;
+            return paInvalidChannelCount;
 
         inputDeviceInfo = 
                 (PaWinMmeDeviceInfo*)hostApi->deviceInfos[ devices[i].device ];
@@ -2246,7 +2290,7 @@
         paerror = IsInputChannelCountSupported( inputDeviceInfo, devices[i].channelCount );
         if( paerror != paNoError )
             return paerror;
-	}
+    }
 
     return paNoError;
 }
@@ -2260,10 +2304,10 @@
     PaWinMmeDeviceInfo *outputDeviceInfo;
     PaError paerror;
 
-	for( i=0; i < deviceCount; ++i )
-	{
+    for( i=0; i < deviceCount; ++i )
+    {
         if( devices[i].channelCount < 1 )
-        	return paInvalidChannelCount;
+            return paInvalidChannelCount;
 
         outputDeviceInfo = 
                 (PaWinMmeDeviceInfo*)hostApi->deviceInfos[ devices[i].device ];
@@ -2271,7 +2315,7 @@
         paerror = IsOutputChannelCountSupported( outputDeviceInfo, devices[i].channelCount );
         if( paerror != paNoError )
             return paerror;
-	}
+    }
 
     return paNoError;
 }
@@ -2320,28 +2364,28 @@
     
     if( inputParameters )
     {
-		inputChannelCount = inputParameters->channelCount;
+        inputChannelCount = inputParameters->channelCount;
         inputSampleFormat = inputParameters->sampleFormat;
         suggestedInputLatency = inputParameters->suggestedLatency;
 
-      	inputDeviceCount = 1;
+        inputDeviceCount = 1;
 
-		/* validate input hostApiSpecificStreamInfo */
+        /* validate input hostApiSpecificStreamInfo */
         inputStreamInfo = (PaWinMmeStreamInfo*)inputParameters->hostApiSpecificStreamInfo;
-		result = ValidateWinMmeSpecificStreamInfo( inputParameters, inputStreamInfo,
+        result = ValidateWinMmeSpecificStreamInfo( inputParameters, inputStreamInfo,
                 &winMmeSpecificInputFlags,
-				&throttleProcessingThreadOnOverload,
-				&inputDeviceCount );
-		if( result != paNoError ) return result;
+                &throttleProcessingThreadOnOverload,
+                &inputDeviceCount );
+        if( result != paNoError ) return result;
 
-		inputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * inputDeviceCount );
+        inputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * inputDeviceCount );
         if( !inputDevices ) return paInsufficientMemory;
 
-		result = RetrieveDevicesFromStreamParameters( hostApi, inputParameters, inputStreamInfo, inputDevices, inputDeviceCount );
-		if( result != paNoError ) return result;
+        result = RetrieveDevicesFromStreamParameters( hostApi, inputParameters, inputStreamInfo, inputDevices, inputDeviceCount );
+        if( result != paNoError ) return result;
 
-		result = ValidateInputChannelCounts( hostApi, inputDevices, inputDeviceCount );
-		if( result != paNoError ) return result;
+        result = ValidateInputChannelCounts( hostApi, inputDevices, inputDeviceCount );
+        if( result != paNoError ) return result;
 
         hostInputSampleFormat =
             PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, inputSampleFormat );
@@ -2357,7 +2401,7 @@
             else
                 inputChannelMask = PaWin_DefaultChannelMask( inputDevices[0].channelCount );
         }
-	}
+    }
     else
     {
         inputChannelCount = 0;
@@ -2376,22 +2420,22 @@
 
         outputDeviceCount = 1;
 
-		/* validate output hostApiSpecificStreamInfo */
+        /* validate output hostApiSpecificStreamInfo */
         outputStreamInfo = (PaWinMmeStreamInfo*)outputParameters->hostApiSpecificStreamInfo;
-		result = ValidateWinMmeSpecificStreamInfo( outputParameters, outputStreamInfo,
+        result = ValidateWinMmeSpecificStreamInfo( outputParameters, outputStreamInfo,
                 &winMmeSpecificOutputFlags,
-				&throttleProcessingThreadOnOverload,
-				&outputDeviceCount );
-		if( result != paNoError ) return result;
+                &throttleProcessingThreadOnOverload,
+                &outputDeviceCount );
+        if( result != paNoError ) return result;
 
-		outputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * outputDeviceCount );
+        outputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * outputDeviceCount );
         if( !outputDevices ) return paInsufficientMemory;
 
-		result = RetrieveDevicesFromStreamParameters( hostApi, outputParameters, outputStreamInfo, outputDevices, outputDeviceCount );
-		if( result != paNoError ) return result;
+        result = RetrieveDevicesFromStreamParameters( hostApi, outputParameters, outputStreamInfo, outputDevices, outputDeviceCount );
+        if( result != paNoError ) return result;
 
-		result = ValidateOutputChannelCounts( hostApi, outputDevices, outputDeviceCount );
-		if( result != paNoError ) return result;
+        result = ValidateOutputChannelCounts( hostApi, outputDevices, outputDeviceCount );
+        if( result != paNoError ) return result;
 
         hostOutputSampleFormat =
             PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, outputSampleFormat );
@@ -3219,9 +3263,9 @@
     MMRESULT mmresult;
     unsigned int i, j;
     int callbackResult;
-	unsigned int channel;
- 	unsigned long framesProcessed;
-	PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement this for stream priming */
+    unsigned int channel;
+    unsigned long framesProcessed;
+    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement this for stream priming */
     
     PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
     
diff --git a/portaudio/src/os/win/pa_win_coinitialize.c b/portaudio/src/os/win/pa_win_coinitialize.c
--- a/portaudio/src/os/win/pa_win_coinitialize.c
+++ b/portaudio/src/os/win/pa_win_coinitialize.c
@@ -1,144 +1,148 @@
-/*
- * Microsoft COM initialization routines
- * Copyright (c) 1999-2011 Ross Bencina, Dmitry Kostjuchenko
- *
- * Based on the Open Source API proposed by Ross Bencina
- * Copyright (c) 1999-2011 Ross Bencina, Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however,
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also
- * requested that these non-binding requests be included along with the
- * license above.
- */
-
-/** @file
- @ingroup win_src
-
- @brief Microsoft COM initialization routines.
-*/
-
-#include <windows.h>
-#include <objbase.h>
-
-#include "portaudio.h"
-#include "pa_util.h"
-#include "pa_debugprint.h"
-
-#include "pa_win_coinitialize.h"
-
-
-#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
-#pragma comment( lib, "ole32.lib" )
-#endif
-
-
-/* use some special bit patterns here to try to guard against uninitialized memory errors */
-#define PAWINUTIL_COM_INITIALIZED       (0xb38f)
-#define PAWINUTIL_COM_NOT_INITIALIZED   (0xf1cd)
-
-
-PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )
-{
-    HRESULT hr;
-
-    comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;
-
-    /*
-        If COM is already initialized CoInitialize will either return
-        FALSE, or RPC_E_CHANGED_MODE if it was initialised in a different
-        threading mode. In either case we shouldn't consider it an error
-        but we need to be careful to not call CoUninitialize() if 
-        RPC_E_CHANGED_MODE was returned.
-    */
-
-    hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */
-    if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )
-    {
-        PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));
-
-        if( hr == E_OUTOFMEMORY )
-            return paInsufficientMemory;
-
-        {
-            char *lpMsgBuf;
-            FormatMessage(
-                FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-                NULL,
-                hr,
-                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                (LPTSTR) &lpMsgBuf,
-                0,
-                NULL
-            );
-            PaUtil_SetLastHostErrorInfo( hostApiType, hr, lpMsgBuf );
-            LocalFree( lpMsgBuf );
-        }
-
-        return paUnanticipatedHostError;
-    }
-
-    if( hr != RPC_E_CHANGED_MODE )
-    {
-        comInitializationResult->state = PAWINUTIL_COM_INITIALIZED;
-
-        /*
-            Memorize calling thread id and report warning on Uninitialize if 
-            calling thread is different as CoInitialize must match CoUninitialize 
-            in the same thread.
-        */
-        comInitializationResult->initializingThreadId = GetCurrentThreadId();
-    }
-
-    return paNoError;
-}
-
-
-void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )
-{
-    if( comInitializationResult->state != PAWINUTIL_COM_NOT_INITIALIZED
-            && comInitializationResult->state != PAWINUTIL_COM_INITIALIZED ){
-    
-        PA_DEBUG(("ERROR: PaWinUtil_CoUninitialize called without calling PaWinUtil_CoInitialize\n"));
-    }
-
-    if( comInitializationResult->state == PAWINUTIL_COM_INITIALIZED )
-    {
-        DWORD currentThreadId = GetCurrentThreadId();
-		if( comInitializationResult->initializingThreadId != currentThreadId )
-		{
-			PA_DEBUG(("ERROR: failed PaWinUtil_CoUninitialize calling thread[%d] does not match initializing thread[%d]\n",
-				currentThreadId, comInitializationResult->initializingThreadId));
-		}
-		else
-		{
-			CoUninitialize();
-
-            comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;
-		}
-    }
+/*
+ * Microsoft COM initialization routines
+ * Copyright (c) 1999-2011 Ross Bencina, Dmitry Kostjuchenko
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2011 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup win_src
+
+ @brief Microsoft COM initialization routines.
+*/
+
+#include <windows.h>
+#include <objbase.h>
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_debugprint.h"
+
+#include "pa_win_coinitialize.h"
+
+
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) /* MSC version 6 and above */
+#pragma comment( lib, "ole32.lib" )
+#endif
+
+
+/* use some special bit patterns here to try to guard against uninitialized memory errors */
+#define PAWINUTIL_COM_INITIALIZED       (0xb38f)
+#define PAWINUTIL_COM_NOT_INITIALIZED   (0xf1cd)
+
+
+PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )
+{
+    HRESULT hr;
+
+    comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;
+
+    /*
+        If COM is already initialized CoInitialize will either return
+        FALSE, or RPC_E_CHANGED_MODE if it was initialised in a different
+        threading mode. In either case we shouldn't consider it an error
+        but we need to be careful to not call CoUninitialize() if 
+        RPC_E_CHANGED_MODE was returned.
+    */
+
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_APP)
+    hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */
+#else
+	hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+#endif
+    if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )
+    {
+        PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));
+
+        if( hr == E_OUTOFMEMORY )
+            return paInsufficientMemory;
+
+        {
+            char *lpMsgBuf;
+            FormatMessage(
+                FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+                NULL,
+                hr,
+                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                (LPTSTR) &lpMsgBuf,
+                0,
+                NULL
+            );
+            PaUtil_SetLastHostErrorInfo( hostApiType, hr, lpMsgBuf );
+            LocalFree( lpMsgBuf );
+        }
+
+        return paUnanticipatedHostError;
+    }
+
+    if( hr != RPC_E_CHANGED_MODE )
+    {
+        comInitializationResult->state = PAWINUTIL_COM_INITIALIZED;
+
+        /*
+            Memorize calling thread id and report warning on Uninitialize if 
+            calling thread is different as CoInitialize must match CoUninitialize 
+            in the same thread.
+        */
+        comInitializationResult->initializingThreadId = GetCurrentThreadId();
+    }
+
+    return paNoError;
+}
+
+
+void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )
+{
+    if( comInitializationResult->state != PAWINUTIL_COM_NOT_INITIALIZED
+            && comInitializationResult->state != PAWINUTIL_COM_INITIALIZED ){
+    
+        PA_DEBUG(("ERROR: PaWinUtil_CoUninitialize called without calling PaWinUtil_CoInitialize\n"));
+    }
+
+    if( comInitializationResult->state == PAWINUTIL_COM_INITIALIZED )
+    {
+        DWORD currentThreadId = GetCurrentThreadId();
+		if( comInitializationResult->initializingThreadId != currentThreadId )
+		{
+			PA_DEBUG(("ERROR: failed PaWinUtil_CoUninitialize calling thread[%d] does not match initializing thread[%d]\n",
+				currentThreadId, comInitializationResult->initializingThreadId));
+		}
+		else
+		{
+			CoUninitialize();
+
+            comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;
+		}
+    }
 }
diff --git a/portaudio/src/os/win/pa_win_coinitialize.h b/portaudio/src/os/win/pa_win_coinitialize.h
--- a/portaudio/src/os/win/pa_win_coinitialize.h
+++ b/portaudio/src/os/win/pa_win_coinitialize.h
@@ -1,94 +1,94 @@
-/*
- * Microsoft COM initialization routines
- * Copyright (c) 1999-2011 Ross Bencina, Phil Burk
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @ingroup win_src
-
- @brief Microsoft COM initialization routines.
-*/
-
-#ifndef PA_WIN_COINITIALIZE_H
-#define PA_WIN_COINITIALIZE_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-
-/**
- @brief Data type used to hold the result of an attempt to initialize COM
-    using PaWinUtil_CoInitialize. Must be retained between a call to 
-    PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize.
-*/
-typedef struct PaWinUtilComInitializationResult{
-    int state;
-    int initializingThreadId;
-} PaWinUtilComInitializationResult;
-
-
-/**
- @brief Initialize Microsoft COM subsystem on the current thread.
-
- @param hostApiType the host API type id of the caller. Used for error reporting.
-
- @param comInitializationResult An output parameter. The value pointed to by 
-        this parameter stores information required by PaWinUtil_CoUninitialize 
-        to correctly uninitialize COM. The value should be retained and later 
-        passed to PaWinUtil_CoUninitialize.
-
- If PaWinUtil_CoInitialize returns paNoError, the caller must later call
- PaWinUtil_CoUninitialize once.
-*/
-PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );
-
-
-/**
- @brief Uninitialize the Microsoft COM subsystem on the current thread using 
- the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same
- thread as PaWinUtil_CoInitialize.
-
- @param hostApiType the host API type id of the caller. Used for error reporting.
-
- @param comInitializationResult An input parameter. A pointer to a value previously
- initialized by a call to PaWinUtil_CoInitialize.
-*/
-void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* PA_WIN_COINITIALIZE_H */
+/*
+ * Microsoft COM initialization routines
+ * Copyright (c) 1999-2011 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup win_src
+
+ @brief Microsoft COM initialization routines.
+*/
+
+#ifndef PA_WIN_COINITIALIZE_H
+#define PA_WIN_COINITIALIZE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/**
+ @brief Data type used to hold the result of an attempt to initialize COM
+    using PaWinUtil_CoInitialize. Must be retained between a call to 
+    PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize.
+*/
+typedef struct PaWinUtilComInitializationResult{
+    int state;
+    int initializingThreadId;
+} PaWinUtilComInitializationResult;
+
+
+/**
+ @brief Initialize Microsoft COM subsystem on the current thread.
+
+ @param hostApiType the host API type id of the caller. Used for error reporting.
+
+ @param comInitializationResult An output parameter. The value pointed to by 
+        this parameter stores information required by PaWinUtil_CoUninitialize 
+        to correctly uninitialize COM. The value should be retained and later 
+        passed to PaWinUtil_CoUninitialize.
+
+ If PaWinUtil_CoInitialize returns paNoError, the caller must later call
+ PaWinUtil_CoUninitialize once.
+*/
+PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );
+
+
+/**
+ @brief Uninitialize the Microsoft COM subsystem on the current thread using 
+ the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same
+ thread as PaWinUtil_CoInitialize.
+
+ @param hostApiType the host API type id of the caller. Used for error reporting.
+
+ @param comInitializationResult An input parameter. A pointer to a value previously
+ initialized by a call to PaWinUtil_CoInitialize.
+*/
+void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_WIN_COINITIALIZE_H */
diff --git a/portaudio/src/os/win/pa_win_hostapis.c b/portaudio/src/os/win/pa_win_hostapis.c
--- a/portaudio/src/os/win/pa_win_hostapis.c
+++ b/portaudio/src/os/win/pa_win_hostapis.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_win_hostapis.c 1728 2011-08-18 03:31:51Z rossb $
+ * $Id$
  * Portable Audio I/O Library Windows initialization table
  *
  * Based on the Open Source API proposed by Ross Bencina
diff --git a/portaudio/src/os/win/pa_win_util.c b/portaudio/src/os/win/pa_win_util.c
--- a/portaudio/src/os/win/pa_win_util.c
+++ b/portaudio/src/os/win/pa_win_util.c
@@ -1,5 +1,5 @@
 /*
- * $Id: pa_win_util.c 1584 2011-02-02 18:58:17Z rossb $
+ * $Id$
  * Portable Audio I/O Library
  * Win32 platform-specific support functions
  *
@@ -44,14 +44,17 @@
 */
  
 #include <windows.h>
-#include <mmsystem.h> /* for timeGetTime() */
 
-#include "pa_util.h"
-
-#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
-#pragma comment( lib, "winmm.lib" )
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+	#include <sys/timeb.h> /* for _ftime_s() */
+#else
+	#include <mmsystem.h> /* for timeGetTime() */
+	#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
+	#pragma comment( lib, "winmm.lib" )
+	#endif
 #endif
 
+#include "pa_util.h"
 
 /*
    Track memory allocations to avoid leaks.
@@ -144,8 +147,12 @@
     }
     else
     {
-#ifndef UNDER_CE    	
+#ifndef UNDER_CE
+	#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+        return GetTickCount64() * .001;
+	#else
         return timeGetTime() * .001;
+	#endif
 #else
         return GetTickCount() * .001;
 #endif                
diff --git a/portaudio/src/os/win/pa_win_waveformat.c b/portaudio/src/os/win/pa_win_waveformat.c
--- a/portaudio/src/os/win/pa_win_waveformat.c
+++ b/portaudio/src/os/win/pa_win_waveformat.c
@@ -1,158 +1,162 @@
-/*
- * PortAudio Portable Real-Time Audio Library
- * Windows WAVEFORMAT* data structure utilities
- * portaudio.h should be included before this file.
- *
- * Copyright (c) 2007 Ross Bencina
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-#include <windows.h>
-#include <mmsystem.h>
-
-#include "portaudio.h"
-#include "pa_win_waveformat.h"
-
-
-#if !defined(WAVE_FORMAT_EXTENSIBLE)
-#define  WAVE_FORMAT_EXTENSIBLE         0xFFFE
-#endif
-
-static GUID pawin_ksDataFormatSubtypeGuidBase = 
-	{ (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };
-
-
-int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat )
-{
-    if( sampleFormat == paFloat32 )
-        return PAWIN_WAVE_FORMAT_IEEE_FLOAT;
-    
-    return PAWIN_WAVE_FORMAT_PCM;
-}
-
-
-void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, 
-		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate )
-{
-	WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
-    int bytesPerSample = Pa_GetSampleSize(sampleFormat);
-	unsigned long bytesPerFrame = numChannels * bytesPerSample;
-	
-    waveFormatEx->wFormatTag = waveFormatTag;
-	waveFormatEx->nChannels = (WORD)numChannels;
-	waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
-	waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;
-	waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;
-	waveFormatEx->wBitsPerSample = bytesPerSample * 8;
-	waveFormatEx->cbSize = 0;
-}
-
-
-void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, 
-		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
-		PaWinWaveFormatChannelMask channelMask )
-{
-	WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
-    int bytesPerSample = Pa_GetSampleSize(sampleFormat);
-	unsigned long bytesPerFrame = numChannels * bytesPerSample;
-    GUID guid;
-
-	waveFormatEx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
-	waveFormatEx->nChannels = (WORD)numChannels;
-	waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
-	waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;
-	waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;
-	waveFormatEx->wBitsPerSample = bytesPerSample * 8;
-	waveFormatEx->cbSize = 22;
-
-	*((WORD*)&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE]) =
-			waveFormatEx->wBitsPerSample;
-
-	*((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) = channelMask;
-		
-    guid = pawin_ksDataFormatSubtypeGuidBase;
-    guid.Data1 = (USHORT)waveFormatTag;
-    *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) = guid;
-}
-
-PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
-{
-	switch( numChannels ){
-		case 1:
-			return PAWIN_SPEAKER_MONO;
-		case 2:
-			return PAWIN_SPEAKER_STEREO; 
-		case 3:
-            return PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_FRONT_RIGHT;
-		case 4:
-			return PAWIN_SPEAKER_QUAD;
-		case 5:
-            return PAWIN_SPEAKER_QUAD | PAWIN_SPEAKER_FRONT_CENTER;
-		case 6:
-            /* The meaning of the PAWIN_SPEAKER_5POINT1 flag has changed over time:
-                http://msdn2.microsoft.com/en-us/library/aa474707.aspx
-               We use PAWIN_SPEAKER_5POINT1 (not PAWIN_SPEAKER_5POINT1_SURROUND)
-               because on some cards (eg Audigy) PAWIN_SPEAKER_5POINT1_SURROUND 
-               results in a virtual mixdown placing the rear output in the 
-               front _and_ rear speakers.
-            */
-			return PAWIN_SPEAKER_5POINT1; 
-        /* case 7: */
-		case 8:
-            /* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio
-               output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Micrsoft HD Audio driver using PAWIN_SPEAKER_7POINT1. 
-               With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */
-			return PAWIN_SPEAKER_7POINT1_SURROUND;
-	}
-
-    /* Apparently some Audigy drivers will output silence 
-       if the direct-out constant (0) is used. So this is not ideal.    
-
-       RoBi 2012-12-19: Also, NVidia driver seem to output garbage instead. Again not very ideal.
-    */
-	return  PAWIN_SPEAKER_DIRECTOUT;
-
-    /* Note that Alec Rogers proposed the following as an alternate method to 
-        generate the default channel mask, however it doesn't seem to be an improvement
-        over the above, since some drivers will matrix outputs mapping to non-present
-        speakers accross multiple physical speakers.
-
-        if(nChannels==1) {
-            pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;
-        }
-        else {
-            pwfFormat->dwChannelMask = 0;
-            for(i=0; i<nChannels; i++)
-                pwfFormat->dwChannelMask = (pwfFormat->dwChannelMask << 1) | 0x1;
-        }
-    */
-}
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WAVEFORMAT* data structure utilities
+ * portaudio.h should be included before this file.
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+#include <windows.h>
+#include <mmsystem.h>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+    #include <mmreg.h> /* for WAVEFORMATEX */
+#endif
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+
+#if !defined(WAVE_FORMAT_EXTENSIBLE)
+#define  WAVE_FORMAT_EXTENSIBLE         0xFFFE
+#endif
+
+
+static GUID pawin_ksDataFormatSubtypeGuidBase = 
+	{ (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };
+
+
+int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat )
+{
+    if( sampleFormat == paFloat32 )
+        return PAWIN_WAVE_FORMAT_IEEE_FLOAT;
+    
+    return PAWIN_WAVE_FORMAT_PCM;
+}
+
+
+void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, 
+		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate )
+{
+	WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
+    int bytesPerSample = Pa_GetSampleSize(sampleFormat);
+	unsigned long bytesPerFrame = numChannels * bytesPerSample;
+	
+    waveFormatEx->wFormatTag = waveFormatTag;
+	waveFormatEx->nChannels = (WORD)numChannels;
+	waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
+	waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;
+	waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;
+	waveFormatEx->wBitsPerSample = bytesPerSample * 8;
+	waveFormatEx->cbSize = 0;
+}
+
+
+void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, 
+		int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
+		PaWinWaveFormatChannelMask channelMask )
+{
+	WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
+    int bytesPerSample = Pa_GetSampleSize(sampleFormat);
+	unsigned long bytesPerFrame = numChannels * bytesPerSample;
+    GUID guid;
+
+	waveFormatEx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+	waveFormatEx->nChannels = (WORD)numChannels;
+	waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
+	waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;
+	waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;
+	waveFormatEx->wBitsPerSample = bytesPerSample * 8;
+	waveFormatEx->cbSize = 22;
+
+	*((WORD*)&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE]) =
+			waveFormatEx->wBitsPerSample;
+
+	*((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) = channelMask;
+		
+    guid = pawin_ksDataFormatSubtypeGuidBase;
+    guid.Data1 = (USHORT)waveFormatTag;
+    *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) = guid;
+}
+
+PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
+{
+	switch( numChannels ){
+		case 1:
+			return PAWIN_SPEAKER_MONO;
+		case 2:
+			return PAWIN_SPEAKER_STEREO; 
+		case 3:
+            return PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_FRONT_RIGHT;
+		case 4:
+			return PAWIN_SPEAKER_QUAD;
+		case 5:
+            return PAWIN_SPEAKER_QUAD | PAWIN_SPEAKER_FRONT_CENTER;
+		case 6:
+            /* The meaning of the PAWIN_SPEAKER_5POINT1 flag has changed over time:
+                http://msdn2.microsoft.com/en-us/library/aa474707.aspx
+               We use PAWIN_SPEAKER_5POINT1 (not PAWIN_SPEAKER_5POINT1_SURROUND)
+               because on some cards (eg Audigy) PAWIN_SPEAKER_5POINT1_SURROUND 
+               results in a virtual mixdown placing the rear output in the 
+               front _and_ rear speakers.
+            */
+			return PAWIN_SPEAKER_5POINT1; 
+        /* case 7: */
+		case 8:
+            /* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio
+               output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Micrsoft HD Audio driver using PAWIN_SPEAKER_7POINT1. 
+               With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */
+			return PAWIN_SPEAKER_7POINT1_SURROUND;
+	}
+
+    /* Apparently some Audigy drivers will output silence 
+       if the direct-out constant (0) is used. So this is not ideal.    
+
+       RoBi 2012-12-19: Also, NVidia driver seem to output garbage instead. Again not very ideal.
+    */
+	return  PAWIN_SPEAKER_DIRECTOUT;
+
+    /* Note that Alec Rogers proposed the following as an alternate method to 
+        generate the default channel mask, however it doesn't seem to be an improvement
+        over the above, since some drivers will matrix outputs mapping to non-present
+        speakers accross multiple physical speakers.
+
+        if(nChannels==1) {
+            pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;
+        }
+        else {
+            pwfFormat->dwChannelMask = 0;
+            for(i=0; i<nChannels; i++)
+                pwfFormat->dwChannelMask = (pwfFormat->dwChannelMask << 1) | 0x1;
+        }
+    */
+}
diff --git a/portaudio/src/os/win/pa_win_wdmks_utils.c b/portaudio/src/os/win/pa_win_wdmks_utils.c
--- a/portaudio/src/os/win/pa_win_wdmks_utils.c
+++ b/portaudio/src/os/win/pa_win_wdmks_utils.c
@@ -1,308 +1,309 @@
-/*
- * PortAudio Portable Real-Time Audio Library
- * Windows WDM KS utilities
- *
- * Copyright (c) 1999 - 2007 Andrew Baldwin, Ross Bencina
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-#include <windows.h>
-#include <mmreg.h>
-#ifndef WAVE_FORMAT_IEEE_FLOAT
-    #define WAVE_FORMAT_IEEE_FLOAT 0x0003   // MinGW32 does not define this
-#endif    
-#ifndef _WAVEFORMATEXTENSIBLE_
-    #define _WAVEFORMATEXTENSIBLE_          // MinGW32 does not define this
-#endif
-#ifndef _INC_MMREG
-    #define _INC_MMREG                      // for STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
-#endif
-#include <winioctl.h>						// MinGW32 does not define this automatically
-
-#if defined(__GNUC__)
-
-#include "../../hostapi/wasapi/mingw-include/ks.h"
-#include "../../hostapi/wasapi/mingw-include/ksmedia.h"
-
-#else
-
-#include <ks.h>
-#include <ksmedia.h>
-
-#endif
-
-#include <stdio.h>                          // just for some development printfs
-
-#include "portaudio.h"
-#include "pa_util.h"
-#include "pa_win_wdmks_utils.h"
-
-#if !defined(PA_WDMKS_NO_KSGUID_LIB) && !defined(PAWIN_WDMKS_NO_KSGUID_LIB) && !defined(__GNUC__)
-    #if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
-        #pragma comment( lib, "ksguid.lib" )
-    #endif
-    #define pa_KSDATAFORMAT_TYPE_AUDIO            KSDATAFORMAT_TYPE_AUDIO
-    #define pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT    KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
-    #define pa_KSDATAFORMAT_SUBTYPE_PCM           KSDATAFORMAT_SUBTYPE_PCM
-    #define pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX  KSDATAFORMAT_SUBTYPE_WAVEFORMATEX
-    #define pa_KSMEDIUMSETID_Standard             KSMEDIUMSETID_Standard
-    #define pa_KSINTERFACESETID_Standard          KSINTERFACESETID_Standard
-    #define pa_KSPROPSETID_Pin                    KSPROPSETID_Pin
-#else
-    static const GUID pa_KSDATAFORMAT_TYPE_AUDIO            = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
-    static const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT    = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };
-    static const GUID pa_KSDATAFORMAT_SUBTYPE_PCM           = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
-    static const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX  = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };
-    static const GUID pa_KSMEDIUMSETID_Standard             = { STATIC_KSMEDIUMSETID_Standard };
-    static const GUID pa_KSINTERFACESETID_Standard          = { STATIC_KSINTERFACESETID_Standard };
-    static const GUID pa_KSPROPSETID_Pin                    = { STATIC_KSPROPSETID_Pin };
-#endif
-
-
-#define pa_IS_VALID_WAVEFORMATEX_GUID(Guid)\
-    (!memcmp(((PUSHORT)&pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))
-
-
-
-static PaError WdmGetPinPropertySimple(
-    HANDLE  handle,
-    unsigned long pinId,
-    unsigned long property,
-    void* value,
-    unsigned long valueSize )
-{
-    DWORD bytesReturned;
-    KSP_PIN ksPProp;
-    ksPProp.Property.Set = pa_KSPROPSETID_Pin;
-    ksPProp.Property.Id = property;
-    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;
-    ksPProp.PinId = pinId;
-    ksPProp.Reserved = 0;
-
-    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),
-            value, valueSize, &bytesReturned, NULL ) == 0 || bytesReturned != valueSize )
-    {
-        return paUnanticipatedHostError;
-    }
-    else
-    {
-        return paNoError;
-    }
-}
-
-
-static PaError WdmGetPinPropertyMulti(
-    HANDLE handle,
-    unsigned long pinId,
-    unsigned long property,
-    KSMULTIPLE_ITEM** ksMultipleItem)
-{
-    unsigned long multipleItemSize = 0;
-    KSP_PIN ksPProp;
-    DWORD bytesReturned;
-
-    *ksMultipleItem = 0;
-
-    ksPProp.Property.Set = pa_KSPROPSETID_Pin;
-    ksPProp.Property.Id = property;
-    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;
-    ksPProp.PinId = pinId;
-    ksPProp.Reserved = 0;
-
-    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp.Property,
-            sizeof(KSP_PIN), NULL, 0, &multipleItemSize, NULL ) == 0 && GetLastError() != ERROR_MORE_DATA )
-    {
-        return paUnanticipatedHostError;
-    }
-
-    *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );
-    if( !*ksMultipleItem )
-    {
-        return paInsufficientMemory;
-    }
-
-    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),
-            (void*)*ksMultipleItem,  multipleItemSize, &bytesReturned, NULL ) == 0 || bytesReturned != multipleItemSize )
-    {
-        PaUtil_FreeMemory( ksMultipleItem );
-        return paUnanticipatedHostError;
-    }
-
-    return paNoError;
-}
-
-
-static int GetKSFilterPinCount( HANDLE deviceHandle )
-{
-    DWORD result;
-
-    if( WdmGetPinPropertySimple( deviceHandle, 0, KSPROPERTY_PIN_CTYPES, &result, sizeof(result) ) == paNoError ){
-        return result;
-    }else{
-        return 0;
-    }
-}
-
-
-static KSPIN_COMMUNICATION GetKSFilterPinPropertyCommunication( HANDLE deviceHandle, int pinId )
-{
-    KSPIN_COMMUNICATION result;
-
-    if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_COMMUNICATION, &result, sizeof(result) ) == paNoError ){
-        return result;
-    }else{
-        return KSPIN_COMMUNICATION_NONE;
-    }
-}
-
-
-static KSPIN_DATAFLOW GetKSFilterPinPropertyDataflow( HANDLE deviceHandle, int pinId )
-{
-    KSPIN_DATAFLOW result;
-
-    if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_DATAFLOW, &result, sizeof(result) ) == paNoError ){
-        return result;
-    }else{
-        return (KSPIN_DATAFLOW)0;
-    }
-}
-
-
-static int KSFilterPinPropertyIdentifiersInclude( 
-        HANDLE deviceHandle, int pinId, unsigned long property, const GUID *identifierSet, unsigned long identifierId  )
-{
-    KSMULTIPLE_ITEM* item = NULL;
-    KSIDENTIFIER* identifier;
-    int i;
-    int result = 0;
-
-    if( WdmGetPinPropertyMulti( deviceHandle, pinId, property, &item) != paNoError )
-        return 0;
-    
-    identifier = (KSIDENTIFIER*)(item+1);
-
-    for( i = 0; i < (int)item->Count; i++ )
-    {
-        if( !memcmp( (void*)&identifier[i].Set, (void*)identifierSet, sizeof( GUID ) ) &&
-           ( identifier[i].Id == identifierId ) )
-        {
-            result = 1;
-            break;
-        }
-    }
-
-    PaUtil_FreeMemory( item );
-
-    return result;
-}
-
-
-/* return the maximum channel count supported by any pin on the device. 
-   if isInput is non-zero we query input pins, otherwise output pins.
-*/
-int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput )
-{
-    HANDLE deviceHandle;
-	ULONG i;
-    int pinCount, pinId;
-    int result = 0;
-    KSPIN_DATAFLOW requiredDataflowDirection = (isInput ? KSPIN_DATAFLOW_OUT : KSPIN_DATAFLOW_IN );
-    
-    if( !wcharDevicePath )
-        return 0;
-
-    deviceHandle = CreateFileW( (LPCWSTR)wcharDevicePath, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL );
-    if( deviceHandle == INVALID_HANDLE_VALUE )
-        return 0;
-
-    pinCount = GetKSFilterPinCount( deviceHandle );
-    for( pinId = 0; pinId < pinCount; ++pinId )
-    {
-        KSPIN_COMMUNICATION communication = GetKSFilterPinPropertyCommunication( deviceHandle, pinId );
-        KSPIN_DATAFLOW dataflow = GetKSFilterPinPropertyDataflow( deviceHandle, pinId );
-        if( ( dataflow == requiredDataflowDirection ) &&
-                (( communication == KSPIN_COMMUNICATION_SINK) ||
-                 ( communication == KSPIN_COMMUNICATION_BOTH)) 
-             && ( KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, 
-                    KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_STREAMING )
-                || KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, 
-                    KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_LOOPED_STREAMING ) )
-             && KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, 
-                    KSPROPERTY_PIN_MEDIUMS, &pa_KSMEDIUMSETID_Standard, KSMEDIUM_STANDARD_DEVIO ) )
-         {
-            KSMULTIPLE_ITEM* item = NULL;
-            if( WdmGetPinPropertyMulti( deviceHandle, pinId, KSPROPERTY_PIN_DATARANGES, &item ) == paNoError )
-            {
-                KSDATARANGE *dataRange = (KSDATARANGE*)(item+1);
-
-                for( i=0; i < item->Count; ++i ){
-
-                    if( pa_IS_VALID_WAVEFORMATEX_GUID(&dataRange->SubFormat)
-                            || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID) ) == 0
-                            || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, sizeof(GUID) ) == 0
-                            || ( ( memcmp( (void*)&dataRange->MajorFormat, (void*)&pa_KSDATAFORMAT_TYPE_AUDIO, sizeof(GUID) ) == 0 )
-                                && ( memcmp( (void*)&dataRange->SubFormat, (void*)&KSDATAFORMAT_SUBTYPE_WILDCARD, sizeof(GUID) ) == 0 ) ) )
-                    {
-                        KSDATARANGE_AUDIO *dataRangeAudio = (KSDATARANGE_AUDIO*)dataRange;
-                        
-                        /*
-                        printf( ">>> %d %d %d %d %S\n", isInput, dataflow, communication, dataRangeAudio->MaximumChannels, devicePath );
-                       
-                        if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, sizeof(GUID) ) == 0 )
-                            printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\n" );
-                        else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_DSOUND, sizeof(GUID) ) == 0 )
-                            printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_DSOUND\n" );
-                        else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WILDCARD, sizeof(GUID) ) == 0 )
-                            printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WILDCARD\n" );
-                        else
-                            printf( "\tspecifier: ?\n" );
-                        */
-
-                        /*
-                            We assume that very high values for MaximumChannels are not useful and indicate
-                            that the driver isn't prepared to tell us the real number of channels which it supports.
-                        */
-                        if( dataRangeAudio->MaximumChannels  < 0xFFFFUL && (int)dataRangeAudio->MaximumChannels > result )
-                            result = (int)dataRangeAudio->MaximumChannels;
-                    }
-                    
-                    dataRange = (KSDATARANGE*)( ((char*)dataRange) + dataRange->FormatSize);
-                }
-
-                PaUtil_FreeMemory( item );
-            }
-        }
-    }
-    
-    CloseHandle( deviceHandle );
-    return result;
-}
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WDM KS utilities
+ *
+ * Copyright (c) 1999 - 2007 Andrew Baldwin, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+#include <windows.h>
+#include <mmreg.h>
+#ifndef WAVE_FORMAT_IEEE_FLOAT
+    #define WAVE_FORMAT_IEEE_FLOAT 0x0003   // MinGW32 does not define this
+#endif    
+#ifndef _WAVEFORMATEXTENSIBLE_
+    #define _WAVEFORMATEXTENSIBLE_          // MinGW32 does not define this
+#endif
+#ifndef _INC_MMREG
+    #define _INC_MMREG                      // for STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
+#endif
+#include <winioctl.h>						// MinGW32 does not define this automatically
+
+#if defined(__GNUC__)
+
+#include "../../hostapi/wasapi/mingw-include/ks.h"
+#include "../../hostapi/wasapi/mingw-include/ksmedia.h"
+
+#else
+
+#include <ks.h>
+#include <ksmedia.h>
+
+#endif
+
+#include <stdio.h>                          // just for some development printfs
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_win_wdmks_utils.h"
+
+
+/* PortAudio-local instances of GUIDs previously sourced from ksguid.lib */
+
+/* GUID KSDATAFORMAT_TYPE_AUDIO */
+static const GUID pa_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
+
+/* GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT */
+static const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };
+
+/* GUID KSDATAFORMAT_SUBTYPE_PCM */
+static const GUID pa_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
+
+/* GUID KSDATAFORMAT_SUBTYPE_WAVEFORMATEX */
+static const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };
+
+/* GUID KSMEDIUMSETID_Standard */
+static const GUID pa_KSMEDIUMSETID_Standard = { STATIC_KSMEDIUMSETID_Standard };
+
+/* GUID KSINTERFACESETID_Standard */
+static const GUID pa_KSINTERFACESETID_Standard = { STATIC_KSINTERFACESETID_Standard };
+
+/* GUID KSPROPSETID_Pin */
+static const GUID pa_KSPROPSETID_Pin = { STATIC_KSPROPSETID_Pin };
+
+#define pa_IS_VALID_WAVEFORMATEX_GUID(Guid)\
+    (!memcmp(((PUSHORT)&pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))
+
+
+static PaError WdmGetPinPropertySimple(
+    HANDLE  handle,
+    unsigned long pinId,
+    unsigned long property,
+    void* value,
+    unsigned long valueSize )
+{
+    DWORD bytesReturned;
+    KSP_PIN ksPProp;
+    ksPProp.Property.Set = pa_KSPROPSETID_Pin;
+    ksPProp.Property.Id = property;
+    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;
+    ksPProp.PinId = pinId;
+    ksPProp.Reserved = 0;
+
+    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),
+            value, valueSize, &bytesReturned, NULL ) == 0 || bytesReturned != valueSize )
+    {
+        return paUnanticipatedHostError;
+    }
+    else
+    {
+        return paNoError;
+    }
+}
+
+
+static PaError WdmGetPinPropertyMulti(
+    HANDLE handle,
+    unsigned long pinId,
+    unsigned long property,
+    KSMULTIPLE_ITEM** ksMultipleItem)
+{
+    unsigned long multipleItemSize = 0;
+    KSP_PIN ksPProp;
+    DWORD bytesReturned;
+
+    *ksMultipleItem = 0;
+
+    ksPProp.Property.Set = pa_KSPROPSETID_Pin;
+    ksPProp.Property.Id = property;
+    ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;
+    ksPProp.PinId = pinId;
+    ksPProp.Reserved = 0;
+
+    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp.Property,
+            sizeof(KSP_PIN), NULL, 0, &multipleItemSize, NULL ) == 0 && GetLastError() != ERROR_MORE_DATA )
+    {
+        return paUnanticipatedHostError;
+    }
+
+    *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );
+    if( !*ksMultipleItem )
+    {
+        return paInsufficientMemory;
+    }
+
+    if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),
+            (void*)*ksMultipleItem,  multipleItemSize, &bytesReturned, NULL ) == 0 || bytesReturned != multipleItemSize )
+    {
+        PaUtil_FreeMemory( ksMultipleItem );
+        return paUnanticipatedHostError;
+    }
+
+    return paNoError;
+}
+
+
+static int GetKSFilterPinCount( HANDLE deviceHandle )
+{
+    DWORD result;
+
+    if( WdmGetPinPropertySimple( deviceHandle, 0, KSPROPERTY_PIN_CTYPES, &result, sizeof(result) ) == paNoError ){
+        return result;
+    }else{
+        return 0;
+    }
+}
+
+
+static KSPIN_COMMUNICATION GetKSFilterPinPropertyCommunication( HANDLE deviceHandle, int pinId )
+{
+    KSPIN_COMMUNICATION result;
+
+    if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_COMMUNICATION, &result, sizeof(result) ) == paNoError ){
+        return result;
+    }else{
+        return KSPIN_COMMUNICATION_NONE;
+    }
+}
+
+
+static KSPIN_DATAFLOW GetKSFilterPinPropertyDataflow( HANDLE deviceHandle, int pinId )
+{
+    KSPIN_DATAFLOW result;
+
+    if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_DATAFLOW, &result, sizeof(result) ) == paNoError ){
+        return result;
+    }else{
+        return (KSPIN_DATAFLOW)0;
+    }
+}
+
+
+static int KSFilterPinPropertyIdentifiersInclude( 
+        HANDLE deviceHandle, int pinId, unsigned long property, const GUID *identifierSet, unsigned long identifierId  )
+{
+    KSMULTIPLE_ITEM* item = NULL;
+    KSIDENTIFIER* identifier;
+    int i;
+    int result = 0;
+
+    if( WdmGetPinPropertyMulti( deviceHandle, pinId, property, &item) != paNoError )
+        return 0;
+    
+    identifier = (KSIDENTIFIER*)(item+1);
+
+    for( i = 0; i < (int)item->Count; i++ )
+    {
+        if( !memcmp( (void*)&identifier[i].Set, (void*)identifierSet, sizeof( GUID ) ) &&
+           ( identifier[i].Id == identifierId ) )
+        {
+            result = 1;
+            break;
+        }
+    }
+
+    PaUtil_FreeMemory( item );
+
+    return result;
+}
+
+
+/* return the maximum channel count supported by any pin on the device. 
+   if isInput is non-zero we query input pins, otherwise output pins.
+*/
+int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput )
+{
+    HANDLE deviceHandle;
+	ULONG i;
+    int pinCount, pinId;
+    int result = 0;
+    KSPIN_DATAFLOW requiredDataflowDirection = (isInput ? KSPIN_DATAFLOW_OUT : KSPIN_DATAFLOW_IN );
+    
+    if( !wcharDevicePath )
+        return 0;
+
+    deviceHandle = CreateFileW( (LPCWSTR)wcharDevicePath, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL );
+    if( deviceHandle == INVALID_HANDLE_VALUE )
+        return 0;
+
+    pinCount = GetKSFilterPinCount( deviceHandle );
+    for( pinId = 0; pinId < pinCount; ++pinId )
+    {
+        KSPIN_COMMUNICATION communication = GetKSFilterPinPropertyCommunication( deviceHandle, pinId );
+        KSPIN_DATAFLOW dataflow = GetKSFilterPinPropertyDataflow( deviceHandle, pinId );
+        if( ( dataflow == requiredDataflowDirection ) &&
+                (( communication == KSPIN_COMMUNICATION_SINK) ||
+                 ( communication == KSPIN_COMMUNICATION_BOTH)) 
+             && ( KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, 
+                    KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_STREAMING )
+                || KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, 
+                    KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_LOOPED_STREAMING ) )
+             && KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, 
+                    KSPROPERTY_PIN_MEDIUMS, &pa_KSMEDIUMSETID_Standard, KSMEDIUM_STANDARD_DEVIO ) )
+         {
+            KSMULTIPLE_ITEM* item = NULL;
+            if( WdmGetPinPropertyMulti( deviceHandle, pinId, KSPROPERTY_PIN_DATARANGES, &item ) == paNoError )
+            {
+                KSDATARANGE *dataRange = (KSDATARANGE*)(item+1);
+
+                for( i=0; i < item->Count; ++i ){
+
+                    if( pa_IS_VALID_WAVEFORMATEX_GUID(&dataRange->SubFormat)
+                            || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID) ) == 0
+                            || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, sizeof(GUID) ) == 0
+                            || ( ( memcmp( (void*)&dataRange->MajorFormat, (void*)&pa_KSDATAFORMAT_TYPE_AUDIO, sizeof(GUID) ) == 0 )
+                                && ( memcmp( (void*)&dataRange->SubFormat, (void*)&KSDATAFORMAT_SUBTYPE_WILDCARD, sizeof(GUID) ) == 0 ) ) )
+                    {
+                        KSDATARANGE_AUDIO *dataRangeAudio = (KSDATARANGE_AUDIO*)dataRange;
+                        
+                        /*
+                        printf( ">>> %d %d %d %d %S\n", isInput, dataflow, communication, dataRangeAudio->MaximumChannels, devicePath );
+                       
+                        if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, sizeof(GUID) ) == 0 )
+                            printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\n" );
+                        else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_DSOUND, sizeof(GUID) ) == 0 )
+                            printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_DSOUND\n" );
+                        else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WILDCARD, sizeof(GUID) ) == 0 )
+                            printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WILDCARD\n" );
+                        else
+                            printf( "\tspecifier: ?\n" );
+                        */
+
+                        /*
+                            We assume that very high values for MaximumChannels are not useful and indicate
+                            that the driver isn't prepared to tell us the real number of channels which it supports.
+                        */
+                        if( dataRangeAudio->MaximumChannels  < 0xFFFFUL && (int)dataRangeAudio->MaximumChannels > result )
+                            result = (int)dataRangeAudio->MaximumChannels;
+                    }
+                    
+                    dataRange = (KSDATARANGE*)( ((char*)dataRange) + dataRange->FormatSize);
+                }
+
+                PaUtil_FreeMemory( item );
+            }
+        }
+    }
+    
+    CloseHandle( deviceHandle );
+    return result;
+}
diff --git a/portaudio/src/os/win/pa_win_wdmks_utils.h b/portaudio/src/os/win/pa_win_wdmks_utils.h
--- a/portaudio/src/os/win/pa_win_wdmks_utils.h
+++ b/portaudio/src/os/win/pa_win_wdmks_utils.h
@@ -1,65 +1,65 @@
-#ifndef PA_WIN_WDMKS_UTILS_H
-#define PA_WIN_WDMKS_UTILS_H
-
-/*
- * PortAudio Portable Real-Time Audio Library
- * Windows WDM KS utilities
- *
- * Copyright (c) 1999 - 2007 Ross Bencina, Andrew Baldwin
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * The text above constitutes the entire PortAudio license; however, 
- * the PortAudio community also makes the following non-binding requests:
- *
- * Any person wishing to distribute modifications to the Software is
- * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
- * license above.
- */
-
-/** @file
- @brief Utilities for working with the Windows WDM KS API
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-    Query for the maximum number of channels supported by any pin of the
-    specified device. Returns 0 if the query fails for any reason.
-
-    @param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.
-    Declard as void* to avoid introducing a dependency on wchar_t here.
-
-    @param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.
-*/
-int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput );
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+#ifndef PA_WIN_WDMKS_UTILS_H
+#define PA_WIN_WDMKS_UTILS_H
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WDM KS utilities
+ *
+ * Copyright (c) 1999 - 2007 Ross Bencina, Andrew Baldwin
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @brief Utilities for working with the Windows WDM KS API
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+    Query for the maximum number of channels supported by any pin of the
+    specified device. Returns 0 if the query fails for any reason.
+
+    @param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.
+    Declard as void* to avoid introducing a dependency on wchar_t here.
+
+    @param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.
+*/
+int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* PA_WIN_WDMKS_UTILS_H */
