Updated imported headers to current Wine version.

(cherry picked from commit 8bbe98a687b6aff31fe1253390d164c1590a4254)
diff --git a/mingw-w64-headers/direct-x/include/d3d11_1.h b/mingw-w64-headers/direct-x/include/d3d11_1.h
index ad50171..e4ffaca 100644
--- a/mingw-w64-headers/direct-x/include/d3d11_1.h
+++ b/mingw-w64-headers/direct-x/include/d3d11_1.h
@@ -17,6 +17,11 @@
 
 /* Forward declarations */
 
+#ifndef __ID3D11BlendState1_FWD_DEFINED__
+#define __ID3D11BlendState1_FWD_DEFINED__
+typedef interface ID3D11BlendState1 ID3D11BlendState1;
+#endif
+
 #ifndef __ID3DDeviceContextState_FWD_DEFINED__
 #define __ID3DDeviceContextState_FWD_DEFINED__
 typedef interface ID3DDeviceContextState ID3DDeviceContextState;
@@ -32,6 +37,16 @@
 typedef interface ID3DUserDefinedAnnotation ID3DUserDefinedAnnotation;
 #endif
 
+#ifndef __ID3D11RasterizerState1_FWD_DEFINED__
+#define __ID3D11RasterizerState1_FWD_DEFINED__
+typedef interface ID3D11RasterizerState1 ID3D11RasterizerState1;
+#endif
+
+#ifndef __ID3D11Device1_FWD_DEFINED__
+#define __ID3D11Device1_FWD_DEFINED__
+typedef interface ID3D11Device1 ID3D11Device1;
+#endif
+
 /* Headers for imported files */
 
 #include <oaidl.h>
@@ -44,6 +59,189 @@
 extern "C" {
 #endif
 
+typedef enum D3D11_LOGIC_OP {
+    D3D11_LOGIC_OP_CLEAR = 0,
+    D3D11_LOGIC_OP_SET = 1,
+    D3D11_LOGIC_OP_COPY = 2,
+    D3D11_LOGIC_OP_COPY_INVERTED = 3,
+    D3D11_LOGIC_OP_NOOP = 4,
+    D3D11_LOGIC_OP_INVERT = 5,
+    D3D11_LOGIC_OP_AND = 6,
+    D3D11_LOGIC_OP_NAND = 7,
+    D3D11_LOGIC_OP_OR = 8,
+    D3D11_LOGIC_OP_NOR = 9,
+    D3D11_LOGIC_OP_XOR = 10,
+    D3D11_LOGIC_OP_EQUIV = 11,
+    D3D11_LOGIC_OP_AND_REVERSE = 12,
+    D3D11_LOGIC_OP_AND_INVERTED = 13,
+    D3D11_LOGIC_OP_OR_REVERSE = 14,
+    D3D11_LOGIC_OP_OR_INVERTED = 15
+} D3D11_LOGIC_OP;
+typedef struct _D3D11_RENDER_TARGET_BLEND_DESC1 {
+    WINBOOL BlendEnable;
+    WINBOOL LogicOpEnable;
+    D3D11_BLEND SrcBlend;
+    D3D11_BLEND DestBlend;
+    D3D11_BLEND_OP BlendOp;
+    D3D11_BLEND SrcBlendAlpha;
+    D3D11_BLEND DestBlendAlpha;
+    D3D11_BLEND_OP BlendOpAlpha;
+    D3D11_LOGIC_OP LogicOp;
+    UINT8 RenderTargetWriteMask;
+} D3D11_RENDER_TARGET_BLEND_DESC1;
+typedef struct _D3D11_BLEND_DESC1 {
+    WINBOOL AlphaToCoverageEnable;
+    WINBOOL IndependentBlendEnable;
+    D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget[8];
+} D3D11_BLEND_DESC1;
+typedef struct _D3D11_RASTERIZER_DESC1 {
+    D3D11_FILL_MODE FillMode;
+    D3D11_CULL_MODE CullMode;
+    WINBOOL FrontCounterClockwise;
+    INT DepthBias;
+    FLOAT DepthBiasClamp;
+    FLOAT SlopeScaledDepthBias;
+    WINBOOL DepthClipEnable;
+    WINBOOL ScissorEnable;
+    WINBOOL MultisampleEnable;
+    WINBOOL AntialiasedLineEnable;
+    UINT ForcedSampleCount;
+} D3D11_RASTERIZER_DESC1;
+/*****************************************************************************
+ * ID3D11BlendState1 interface
+ */
+#ifndef __ID3D11BlendState1_INTERFACE_DEFINED__
+#define __ID3D11BlendState1_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_ID3D11BlendState1, 0xcc86fabe, 0xda55, 0x401d, 0x85,0xe7, 0xe3,0xc9,0xde,0x28,0x77,0xe9);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("cc86fabe-da55-401d-85e7-e3c9de2877e9")
+ID3D11BlendState1 : public ID3D11BlendState
+{
+    virtual void STDMETHODCALLTYPE GetDesc1(
+        D3D11_BLEND_DESC1 *pDesc) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(ID3D11BlendState1, 0xcc86fabe, 0xda55, 0x401d, 0x85,0xe7, 0xe3,0xc9,0xde,0x28,0x77,0xe9)
+#endif
+#else
+typedef struct ID3D11BlendState1Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        ID3D11BlendState1* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        ID3D11BlendState1* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        ID3D11BlendState1* This);
+
+    /*** ID3D11DeviceChild methods ***/
+    void (STDMETHODCALLTYPE *GetDevice)(
+        ID3D11BlendState1* This,
+        ID3D11Device **ppDevice);
+
+    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
+        ID3D11BlendState1* This,
+        REFGUID guid,
+        UINT *pDataSize,
+        void *pData);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
+        ID3D11BlendState1* This,
+        REFGUID guid,
+        UINT DataSize,
+        const void *pData);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
+        ID3D11BlendState1* This,
+        REFGUID guid,
+        const IUnknown *pData);
+
+    /*** ID3D11BlendState methods ***/
+    void (STDMETHODCALLTYPE *GetDesc)(
+        ID3D11BlendState1* This,
+        D3D11_BLEND_DESC *pDesc);
+
+    /*** ID3D11BlendState1 methods ***/
+    void (STDMETHODCALLTYPE *GetDesc1)(
+        ID3D11BlendState1* This,
+        D3D11_BLEND_DESC1 *pDesc);
+
+    END_INTERFACE
+} ID3D11BlendState1Vtbl;
+interface ID3D11BlendState1 {
+    CONST_VTBL ID3D11BlendState1Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define ID3D11BlendState1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define ID3D11BlendState1_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define ID3D11BlendState1_Release(This) (This)->lpVtbl->Release(This)
+/*** ID3D11DeviceChild methods ***/
+#define ID3D11BlendState1_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
+#define ID3D11BlendState1_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
+#define ID3D11BlendState1_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
+#define ID3D11BlendState1_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
+/*** ID3D11BlendState methods ***/
+#define ID3D11BlendState1_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
+/*** ID3D11BlendState1 methods ***/
+#define ID3D11BlendState1_GetDesc1(This,pDesc) (This)->lpVtbl->GetDesc1(This,pDesc)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT ID3D11BlendState1_QueryInterface(ID3D11BlendState1* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG ID3D11BlendState1_AddRef(ID3D11BlendState1* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG ID3D11BlendState1_Release(ID3D11BlendState1* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** ID3D11DeviceChild methods ***/
+static FORCEINLINE void ID3D11BlendState1_GetDevice(ID3D11BlendState1* This,ID3D11Device **ppDevice) {
+    This->lpVtbl->GetDevice(This,ppDevice);
+}
+static FORCEINLINE HRESULT ID3D11BlendState1_GetPrivateData(ID3D11BlendState1* This,REFGUID guid,UINT *pDataSize,void *pData) {
+    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
+}
+static FORCEINLINE HRESULT ID3D11BlendState1_SetPrivateData(ID3D11BlendState1* This,REFGUID guid,UINT DataSize,const void *pData) {
+    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
+}
+static FORCEINLINE HRESULT ID3D11BlendState1_SetPrivateDataInterface(ID3D11BlendState1* This,REFGUID guid,const IUnknown *pData) {
+    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
+}
+/*** ID3D11BlendState methods ***/
+static FORCEINLINE void ID3D11BlendState1_GetDesc(ID3D11BlendState1* This,D3D11_BLEND_DESC *pDesc) {
+    This->lpVtbl->GetDesc(This,pDesc);
+}
+/*** ID3D11BlendState1 methods ***/
+static FORCEINLINE void ID3D11BlendState1_GetDesc1(ID3D11BlendState1* This,D3D11_BLEND_DESC1 *pDesc) {
+    This->lpVtbl->GetDesc1(This,pDesc);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE ID3D11BlendState1_GetDesc1_Proxy(
+    ID3D11BlendState1* This,
+    D3D11_BLEND_DESC1 *pDesc);
+void __RPC_STUB ID3D11BlendState1_GetDesc1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __ID3D11BlendState1_INTERFACE_DEFINED__ */
+
 /*****************************************************************************
  * ID3DDeviceContextState interface
  */
@@ -2009,6 +2207,774 @@
 
 #endif  /* __ID3DUserDefinedAnnotation_INTERFACE_DEFINED__ */
 
+/*****************************************************************************
+ * ID3D11RasterizerState1 interface
+ */
+#ifndef __ID3D11RasterizerState1_INTERFACE_DEFINED__
+#define __ID3D11RasterizerState1_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_ID3D11RasterizerState1, 0x1217d7a6, 0x5039, 0x418c, 0xb0,0x42, 0x9c,0xbe,0x25,0x6a,0xfd,0x6e);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("1217d7a6-5039-418c-b042-9cbe256afd6e")
+ID3D11RasterizerState1 : public ID3D11RasterizerState
+{
+    virtual void STDMETHODCALLTYPE GetDesc1(
+        D3D11_RASTERIZER_DESC1 *pDesc) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(ID3D11RasterizerState1, 0x1217d7a6, 0x5039, 0x418c, 0xb0,0x42, 0x9c,0xbe,0x25,0x6a,0xfd,0x6e)
+#endif
+#else
+typedef struct ID3D11RasterizerState1Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        ID3D11RasterizerState1* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        ID3D11RasterizerState1* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        ID3D11RasterizerState1* This);
+
+    /*** ID3D11DeviceChild methods ***/
+    void (STDMETHODCALLTYPE *GetDevice)(
+        ID3D11RasterizerState1* This,
+        ID3D11Device **ppDevice);
+
+    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
+        ID3D11RasterizerState1* This,
+        REFGUID guid,
+        UINT *pDataSize,
+        void *pData);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
+        ID3D11RasterizerState1* This,
+        REFGUID guid,
+        UINT DataSize,
+        const void *pData);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
+        ID3D11RasterizerState1* This,
+        REFGUID guid,
+        const IUnknown *pData);
+
+    /*** ID3D11RasterizerState methods ***/
+    void (STDMETHODCALLTYPE *GetDesc)(
+        ID3D11RasterizerState1* This,
+        D3D11_RASTERIZER_DESC *pDesc);
+
+    /*** ID3D11RasterizerState1 methods ***/
+    void (STDMETHODCALLTYPE *GetDesc1)(
+        ID3D11RasterizerState1* This,
+        D3D11_RASTERIZER_DESC1 *pDesc);
+
+    END_INTERFACE
+} ID3D11RasterizerState1Vtbl;
+interface ID3D11RasterizerState1 {
+    CONST_VTBL ID3D11RasterizerState1Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define ID3D11RasterizerState1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define ID3D11RasterizerState1_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define ID3D11RasterizerState1_Release(This) (This)->lpVtbl->Release(This)
+/*** ID3D11DeviceChild methods ***/
+#define ID3D11RasterizerState1_GetDevice(This,ppDevice) (This)->lpVtbl->GetDevice(This,ppDevice)
+#define ID3D11RasterizerState1_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
+#define ID3D11RasterizerState1_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
+#define ID3D11RasterizerState1_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
+/*** ID3D11RasterizerState methods ***/
+#define ID3D11RasterizerState1_GetDesc(This,pDesc) (This)->lpVtbl->GetDesc(This,pDesc)
+/*** ID3D11RasterizerState1 methods ***/
+#define ID3D11RasterizerState1_GetDesc1(This,pDesc) (This)->lpVtbl->GetDesc1(This,pDesc)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT ID3D11RasterizerState1_QueryInterface(ID3D11RasterizerState1* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG ID3D11RasterizerState1_AddRef(ID3D11RasterizerState1* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG ID3D11RasterizerState1_Release(ID3D11RasterizerState1* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** ID3D11DeviceChild methods ***/
+static FORCEINLINE void ID3D11RasterizerState1_GetDevice(ID3D11RasterizerState1* This,ID3D11Device **ppDevice) {
+    This->lpVtbl->GetDevice(This,ppDevice);
+}
+static FORCEINLINE HRESULT ID3D11RasterizerState1_GetPrivateData(ID3D11RasterizerState1* This,REFGUID guid,UINT *pDataSize,void *pData) {
+    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
+}
+static FORCEINLINE HRESULT ID3D11RasterizerState1_SetPrivateData(ID3D11RasterizerState1* This,REFGUID guid,UINT DataSize,const void *pData) {
+    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
+}
+static FORCEINLINE HRESULT ID3D11RasterizerState1_SetPrivateDataInterface(ID3D11RasterizerState1* This,REFGUID guid,const IUnknown *pData) {
+    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
+}
+/*** ID3D11RasterizerState methods ***/
+static FORCEINLINE void ID3D11RasterizerState1_GetDesc(ID3D11RasterizerState1* This,D3D11_RASTERIZER_DESC *pDesc) {
+    This->lpVtbl->GetDesc(This,pDesc);
+}
+/*** ID3D11RasterizerState1 methods ***/
+static FORCEINLINE void ID3D11RasterizerState1_GetDesc1(ID3D11RasterizerState1* This,D3D11_RASTERIZER_DESC1 *pDesc) {
+    This->lpVtbl->GetDesc1(This,pDesc);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE ID3D11RasterizerState1_GetDesc1_Proxy(
+    ID3D11RasterizerState1* This,
+    D3D11_RASTERIZER_DESC1 *pDesc);
+void __RPC_STUB ID3D11RasterizerState1_GetDesc1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __ID3D11RasterizerState1_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * ID3D11Device1 interface
+ */
+#ifndef __ID3D11Device1_INTERFACE_DEFINED__
+#define __ID3D11Device1_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_ID3D11Device1, 0xa04bfb29, 0x08ef, 0x43d6, 0xa4,0x9c, 0xa9,0xbd,0xbd,0xcb,0xe6,0x86);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("a04bfb29-08ef-43d6-a49c-a9bdbdcbe686")
+ID3D11Device1 : public ID3D11Device
+{
+    virtual void STDMETHODCALLTYPE GetImmediateContext1(
+        ID3D11DeviceContext1 **ppImmediateContext) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext1(
+        UINT ContextFlags,
+        ID3D11DeviceContext1 **ppDeferredContext) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateBlendState1(
+        const D3D11_BLEND_DESC1 *pBlendStateDesc,
+        ID3D11BlendState1 **ppBlendState) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState1(
+        const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
+        ID3D11RasterizerState1 **ppRasterizerState) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateDeviceContextState(
+        UINT Flags,
+        const D3D_FEATURE_LEVEL *pFeatureLevels,
+        UINT FeatureLevels,
+        UINT SDKVersion,
+        REFIID EmulatedInterface,
+        D3D_FEATURE_LEVEL *pChosenFeatureLevel,
+        ID3DDeviceContextState **ppContextState) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE OpenSharedResource1(
+        HANDLE hResource,
+        REFIID returnedInterface,
+        void **ppResource) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE OpenSharedResourceByName(
+        LPCWSTR lpName,
+        DWORD dwDesiredAccess,
+        REFIID returnedInterface,
+        void **ppResource) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(ID3D11Device1, 0xa04bfb29, 0x08ef, 0x43d6, 0xa4,0x9c, 0xa9,0xbd,0xbd,0xcb,0xe6,0x86)
+#endif
+#else
+typedef struct ID3D11Device1Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        ID3D11Device1* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        ID3D11Device1* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        ID3D11Device1* This);
+
+    /*** ID3D11Device methods ***/
+    HRESULT (STDMETHODCALLTYPE *CreateBuffer)(
+        ID3D11Device1* This,
+        const D3D11_BUFFER_DESC *pDesc,
+        const D3D11_SUBRESOURCE_DATA *pInitialData,
+        ID3D11Buffer **ppBuffer);
+
+    HRESULT (STDMETHODCALLTYPE *CreateTexture1D)(
+        ID3D11Device1* This,
+        const D3D11_TEXTURE1D_DESC *pDesc,
+        const D3D11_SUBRESOURCE_DATA *pInitialData,
+        ID3D11Texture1D **ppTexture1D);
+
+    HRESULT (STDMETHODCALLTYPE *CreateTexture2D)(
+        ID3D11Device1* This,
+        const D3D11_TEXTURE2D_DESC *pDesc,
+        const D3D11_SUBRESOURCE_DATA *pInitialData,
+        ID3D11Texture2D **ppTexture2D);
+
+    HRESULT (STDMETHODCALLTYPE *CreateTexture3D)(
+        ID3D11Device1* This,
+        const D3D11_TEXTURE3D_DESC *pDesc,
+        const D3D11_SUBRESOURCE_DATA *pInitialData,
+        ID3D11Texture3D **ppTexture3D);
+
+    HRESULT (STDMETHODCALLTYPE *CreateShaderResourceView)(
+        ID3D11Device1* This,
+        ID3D11Resource *pResource,
+        const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
+        ID3D11ShaderResourceView **ppSRView);
+
+    HRESULT (STDMETHODCALLTYPE *CreateUnorderedAccessView)(
+        ID3D11Device1* This,
+        ID3D11Resource *pResource,
+        const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
+        ID3D11UnorderedAccessView **ppUAView);
+
+    HRESULT (STDMETHODCALLTYPE *CreateRenderTargetView)(
+        ID3D11Device1* This,
+        ID3D11Resource *pResource,
+        const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
+        ID3D11RenderTargetView **ppRTView);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDepthStencilView)(
+        ID3D11Device1* This,
+        ID3D11Resource *pResource,
+        const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
+        ID3D11DepthStencilView **ppDepthStencilView);
+
+    HRESULT (STDMETHODCALLTYPE *CreateInputLayout)(
+        ID3D11Device1* This,
+        const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
+        UINT NumElements,
+        const void *pShaderBytecodeWithInputSignature,
+        SIZE_T BytecodeLength,
+        ID3D11InputLayout **ppInputLayout);
+
+    HRESULT (STDMETHODCALLTYPE *CreateVertexShader)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11VertexShader **ppVertexShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreateGeometryShader)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11GeometryShader **ppGeometryShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreateGeometryShaderWithStreamOutput)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
+        UINT NumEntries,
+        const UINT *pBufferStrides,
+        UINT NumStrides,
+        UINT RasterizedStream,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11GeometryShader **ppGeometryShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreatePixelShader)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11PixelShader **ppPixelShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreateHullShader)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11HullShader **ppHullShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDomainShader)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11DomainShader **ppDomainShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreateComputeShader)(
+        ID3D11Device1* This,
+        const void *pShaderBytecode,
+        SIZE_T BytecodeLength,
+        ID3D11ClassLinkage *pClassLinkage,
+        ID3D11ComputeShader **ppComputeShader);
+
+    HRESULT (STDMETHODCALLTYPE *CreateClassLinkage)(
+        ID3D11Device1* This,
+        ID3D11ClassLinkage **ppLinkage);
+
+    HRESULT (STDMETHODCALLTYPE *CreateBlendState)(
+        ID3D11Device1* This,
+        const D3D11_BLEND_DESC *pBlendStateDesc,
+        ID3D11BlendState **ppBlendState);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDepthStencilState)(
+        ID3D11Device1* This,
+        const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
+        ID3D11DepthStencilState **ppDepthStencilState);
+
+    HRESULT (STDMETHODCALLTYPE *CreateRasterizerState)(
+        ID3D11Device1* This,
+        const D3D11_RASTERIZER_DESC *pRasterizerDesc,
+        ID3D11RasterizerState **ppRasterizerState);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSamplerState)(
+        ID3D11Device1* This,
+        const D3D11_SAMPLER_DESC *pSamplerDesc,
+        ID3D11SamplerState **ppSamplerState);
+
+    HRESULT (STDMETHODCALLTYPE *CreateQuery)(
+        ID3D11Device1* This,
+        const D3D11_QUERY_DESC *pQueryDesc,
+        ID3D11Query **ppQuery);
+
+    HRESULT (STDMETHODCALLTYPE *CreatePredicate)(
+        ID3D11Device1* This,
+        const D3D11_QUERY_DESC *pPredicateDesc,
+        ID3D11Predicate **ppPredicate);
+
+    HRESULT (STDMETHODCALLTYPE *CreateCounter)(
+        ID3D11Device1* This,
+        const D3D11_COUNTER_DESC *pCounterDesc,
+        ID3D11Counter **ppCounter);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDeferredContext)(
+        ID3D11Device1* This,
+        UINT ContextFlags,
+        ID3D11DeviceContext **ppDeferredContext);
+
+    HRESULT (STDMETHODCALLTYPE *OpenSharedResource)(
+        ID3D11Device1* This,
+        HANDLE hResource,
+        REFIID ReturnedInterface,
+        void **ppResource);
+
+    HRESULT (STDMETHODCALLTYPE *CheckFormatSupport)(
+        ID3D11Device1* This,
+        DXGI_FORMAT Format,
+        UINT *pFormatSupport);
+
+    HRESULT (STDMETHODCALLTYPE *CheckMultisampleQualityLevels)(
+        ID3D11Device1* This,
+        DXGI_FORMAT Format,
+        UINT SampleCount,
+        UINT *pNumQualityLevels);
+
+    void (STDMETHODCALLTYPE *CheckCounterInfo)(
+        ID3D11Device1* This,
+        D3D11_COUNTER_INFO *pCounterInfo);
+
+    HRESULT (STDMETHODCALLTYPE *CheckCounter)(
+        ID3D11Device1* This,
+        const D3D11_COUNTER_DESC *pDesc,
+        D3D11_COUNTER_TYPE *pType,
+        UINT *pActiveCounters,
+        LPSTR szName,
+        UINT *pNameLength,
+        LPSTR szUnits,
+        UINT *pUnitsLength,
+        LPSTR szDescription,
+        UINT *pDescriptionLength);
+
+    HRESULT (STDMETHODCALLTYPE *CheckFeatureSupport)(
+        ID3D11Device1* This,
+        D3D11_FEATURE Feature,
+        void *pFeatureSupportData,
+        UINT FeatureSupportDataSize);
+
+    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
+        ID3D11Device1* This,
+        REFGUID guid,
+        UINT *pDataSize,
+        void *pData);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
+        ID3D11Device1* This,
+        REFGUID guid,
+        UINT DataSize,
+        const void *pData);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
+        ID3D11Device1* This,
+        REFGUID guid,
+        const IUnknown *pData);
+
+    D3D_FEATURE_LEVEL (STDMETHODCALLTYPE *GetFeatureLevel)(
+        ID3D11Device1* This);
+
+    UINT (STDMETHODCALLTYPE *GetCreationFlags)(
+        ID3D11Device1* This);
+
+    HRESULT (STDMETHODCALLTYPE *GetDeviceRemovedReason)(
+        ID3D11Device1* This);
+
+    void (STDMETHODCALLTYPE *GetImmediateContext)(
+        ID3D11Device1* This,
+        ID3D11DeviceContext **ppImmediateContext);
+
+    HRESULT (STDMETHODCALLTYPE *SetExceptionMode)(
+        ID3D11Device1* This,
+        UINT RaiseFlags);
+
+    UINT (STDMETHODCALLTYPE *GetExceptionMode)(
+        ID3D11Device1* This);
+
+    /*** ID3D11Device1 methods ***/
+    void (STDMETHODCALLTYPE *GetImmediateContext1)(
+        ID3D11Device1* This,
+        ID3D11DeviceContext1 **ppImmediateContext);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDeferredContext1)(
+        ID3D11Device1* This,
+        UINT ContextFlags,
+        ID3D11DeviceContext1 **ppDeferredContext);
+
+    HRESULT (STDMETHODCALLTYPE *CreateBlendState1)(
+        ID3D11Device1* This,
+        const D3D11_BLEND_DESC1 *pBlendStateDesc,
+        ID3D11BlendState1 **ppBlendState);
+
+    HRESULT (STDMETHODCALLTYPE *CreateRasterizerState1)(
+        ID3D11Device1* This,
+        const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
+        ID3D11RasterizerState1 **ppRasterizerState);
+
+    HRESULT (STDMETHODCALLTYPE *CreateDeviceContextState)(
+        ID3D11Device1* This,
+        UINT Flags,
+        const D3D_FEATURE_LEVEL *pFeatureLevels,
+        UINT FeatureLevels,
+        UINT SDKVersion,
+        REFIID EmulatedInterface,
+        D3D_FEATURE_LEVEL *pChosenFeatureLevel,
+        ID3DDeviceContextState **ppContextState);
+
+    HRESULT (STDMETHODCALLTYPE *OpenSharedResource1)(
+        ID3D11Device1* This,
+        HANDLE hResource,
+        REFIID returnedInterface,
+        void **ppResource);
+
+    HRESULT (STDMETHODCALLTYPE *OpenSharedResourceByName)(
+        ID3D11Device1* This,
+        LPCWSTR lpName,
+        DWORD dwDesiredAccess,
+        REFIID returnedInterface,
+        void **ppResource);
+
+    END_INTERFACE
+} ID3D11Device1Vtbl;
+interface ID3D11Device1 {
+    CONST_VTBL ID3D11Device1Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define ID3D11Device1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define ID3D11Device1_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define ID3D11Device1_Release(This) (This)->lpVtbl->Release(This)
+/*** ID3D11Device methods ***/
+#define ID3D11Device1_CreateBuffer(This,pDesc,pInitialData,ppBuffer) (This)->lpVtbl->CreateBuffer(This,pDesc,pInitialData,ppBuffer)
+#define ID3D11Device1_CreateTexture1D(This,pDesc,pInitialData,ppTexture1D) (This)->lpVtbl->CreateTexture1D(This,pDesc,pInitialData,ppTexture1D)
+#define ID3D11Device1_CreateTexture2D(This,pDesc,pInitialData,ppTexture2D) (This)->lpVtbl->CreateTexture2D(This,pDesc,pInitialData,ppTexture2D)
+#define ID3D11Device1_CreateTexture3D(This,pDesc,pInitialData,ppTexture3D) (This)->lpVtbl->CreateTexture3D(This,pDesc,pInitialData,ppTexture3D)
+#define ID3D11Device1_CreateShaderResourceView(This,pResource,pDesc,ppSRView) (This)->lpVtbl->CreateShaderResourceView(This,pResource,pDesc,ppSRView)
+#define ID3D11Device1_CreateUnorderedAccessView(This,pResource,pDesc,ppUAView) (This)->lpVtbl->CreateUnorderedAccessView(This,pResource,pDesc,ppUAView)
+#define ID3D11Device1_CreateRenderTargetView(This,pResource,pDesc,ppRTView) (This)->lpVtbl->CreateRenderTargetView(This,pResource,pDesc,ppRTView)
+#define ID3D11Device1_CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView) (This)->lpVtbl->CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView)
+#define ID3D11Device1_CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout) (This)->lpVtbl->CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout)
+#define ID3D11Device1_CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader) (This)->lpVtbl->CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader)
+#define ID3D11Device1_CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader) (This)->lpVtbl->CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader)
+#define ID3D11Device1_CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader) (This)->lpVtbl->CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader)
+#define ID3D11Device1_CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader) (This)->lpVtbl->CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader)
+#define ID3D11Device1_CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader) (This)->lpVtbl->CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader)
+#define ID3D11Device1_CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader) (This)->lpVtbl->CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader)
+#define ID3D11Device1_CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader) (This)->lpVtbl->CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader)
+#define ID3D11Device1_CreateClassLinkage(This,ppLinkage) (This)->lpVtbl->CreateClassLinkage(This,ppLinkage)
+#define ID3D11Device1_CreateBlendState(This,pBlendStateDesc,ppBlendState) (This)->lpVtbl->CreateBlendState(This,pBlendStateDesc,ppBlendState)
+#define ID3D11Device1_CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState) (This)->lpVtbl->CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState)
+#define ID3D11Device1_CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState) (This)->lpVtbl->CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState)
+#define ID3D11Device1_CreateSamplerState(This,pSamplerDesc,ppSamplerState) (This)->lpVtbl->CreateSamplerState(This,pSamplerDesc,ppSamplerState)
+#define ID3D11Device1_CreateQuery(This,pQueryDesc,ppQuery) (This)->lpVtbl->CreateQuery(This,pQueryDesc,ppQuery)
+#define ID3D11Device1_CreatePredicate(This,pPredicateDesc,ppPredicate) (This)->lpVtbl->CreatePredicate(This,pPredicateDesc,ppPredicate)
+#define ID3D11Device1_CreateCounter(This,pCounterDesc,ppCounter) (This)->lpVtbl->CreateCounter(This,pCounterDesc,ppCounter)
+#define ID3D11Device1_CreateDeferredContext(This,ContextFlags,ppDeferredContext) (This)->lpVtbl->CreateDeferredContext(This,ContextFlags,ppDeferredContext)
+#define ID3D11Device1_OpenSharedResource(This,hResource,ReturnedInterface,ppResource) (This)->lpVtbl->OpenSharedResource(This,hResource,ReturnedInterface,ppResource)
+#define ID3D11Device1_CheckFormatSupport(This,Format,pFormatSupport) (This)->lpVtbl->CheckFormatSupport(This,Format,pFormatSupport)
+#define ID3D11Device1_CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels) (This)->lpVtbl->CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels)
+#define ID3D11Device1_CheckCounterInfo(This,pCounterInfo) (This)->lpVtbl->CheckCounterInfo(This,pCounterInfo)
+#define ID3D11Device1_CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength) (This)->lpVtbl->CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength)
+#define ID3D11Device1_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) (This)->lpVtbl->CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize)
+#define ID3D11Device1_GetPrivateData(This,guid,pDataSize,pData) (This)->lpVtbl->GetPrivateData(This,guid,pDataSize,pData)
+#define ID3D11Device1_SetPrivateData(This,guid,DataSize,pData) (This)->lpVtbl->SetPrivateData(This,guid,DataSize,pData)
+#define ID3D11Device1_SetPrivateDataInterface(This,guid,pData) (This)->lpVtbl->SetPrivateDataInterface(This,guid,pData)
+#define ID3D11Device1_GetFeatureLevel(This) (This)->lpVtbl->GetFeatureLevel(This)
+#define ID3D11Device1_GetCreationFlags(This) (This)->lpVtbl->GetCreationFlags(This)
+#define ID3D11Device1_GetDeviceRemovedReason(This) (This)->lpVtbl->GetDeviceRemovedReason(This)
+#define ID3D11Device1_GetImmediateContext(This,ppImmediateContext) (This)->lpVtbl->GetImmediateContext(This,ppImmediateContext)
+#define ID3D11Device1_SetExceptionMode(This,RaiseFlags) (This)->lpVtbl->SetExceptionMode(This,RaiseFlags)
+#define ID3D11Device1_GetExceptionMode(This) (This)->lpVtbl->GetExceptionMode(This)
+/*** ID3D11Device1 methods ***/
+#define ID3D11Device1_GetImmediateContext1(This,ppImmediateContext) (This)->lpVtbl->GetImmediateContext1(This,ppImmediateContext)
+#define ID3D11Device1_CreateDeferredContext1(This,ContextFlags,ppDeferredContext) (This)->lpVtbl->CreateDeferredContext1(This,ContextFlags,ppDeferredContext)
+#define ID3D11Device1_CreateBlendState1(This,pBlendStateDesc,ppBlendState) (This)->lpVtbl->CreateBlendState1(This,pBlendStateDesc,ppBlendState)
+#define ID3D11Device1_CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState) (This)->lpVtbl->CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState)
+#define ID3D11Device1_CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState) (This)->lpVtbl->CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState)
+#define ID3D11Device1_OpenSharedResource1(This,hResource,returnedInterface,ppResource) (This)->lpVtbl->OpenSharedResource1(This,hResource,returnedInterface,ppResource)
+#define ID3D11Device1_OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource) (This)->lpVtbl->OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT ID3D11Device1_QueryInterface(ID3D11Device1* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG ID3D11Device1_AddRef(ID3D11Device1* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG ID3D11Device1_Release(ID3D11Device1* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** ID3D11Device methods ***/
+static FORCEINLINE HRESULT ID3D11Device1_CreateBuffer(ID3D11Device1* This,const D3D11_BUFFER_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Buffer **ppBuffer) {
+    return This->lpVtbl->CreateBuffer(This,pDesc,pInitialData,ppBuffer);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateTexture1D(ID3D11Device1* This,const D3D11_TEXTURE1D_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Texture1D **ppTexture1D) {
+    return This->lpVtbl->CreateTexture1D(This,pDesc,pInitialData,ppTexture1D);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateTexture2D(ID3D11Device1* This,const D3D11_TEXTURE2D_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Texture2D **ppTexture2D) {
+    return This->lpVtbl->CreateTexture2D(This,pDesc,pInitialData,ppTexture2D);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateTexture3D(ID3D11Device1* This,const D3D11_TEXTURE3D_DESC *pDesc,const D3D11_SUBRESOURCE_DATA *pInitialData,ID3D11Texture3D **ppTexture3D) {
+    return This->lpVtbl->CreateTexture3D(This,pDesc,pInitialData,ppTexture3D);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateShaderResourceView(ID3D11Device1* This,ID3D11Resource *pResource,const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,ID3D11ShaderResourceView **ppSRView) {
+    return This->lpVtbl->CreateShaderResourceView(This,pResource,pDesc,ppSRView);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateUnorderedAccessView(ID3D11Device1* This,ID3D11Resource *pResource,const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,ID3D11UnorderedAccessView **ppUAView) {
+    return This->lpVtbl->CreateUnorderedAccessView(This,pResource,pDesc,ppUAView);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateRenderTargetView(ID3D11Device1* This,ID3D11Resource *pResource,const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,ID3D11RenderTargetView **ppRTView) {
+    return This->lpVtbl->CreateRenderTargetView(This,pResource,pDesc,ppRTView);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateDepthStencilView(ID3D11Device1* This,ID3D11Resource *pResource,const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,ID3D11DepthStencilView **ppDepthStencilView) {
+    return This->lpVtbl->CreateDepthStencilView(This,pResource,pDesc,ppDepthStencilView);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateInputLayout(ID3D11Device1* This,const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,UINT NumElements,const void *pShaderBytecodeWithInputSignature,SIZE_T BytecodeLength,ID3D11InputLayout **ppInputLayout) {
+    return This->lpVtbl->CreateInputLayout(This,pInputElementDescs,NumElements,pShaderBytecodeWithInputSignature,BytecodeLength,ppInputLayout);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateVertexShader(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11VertexShader **ppVertexShader) {
+    return This->lpVtbl->CreateVertexShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppVertexShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateGeometryShader(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11GeometryShader **ppGeometryShader) {
+    return This->lpVtbl->CreateGeometryShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppGeometryShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateGeometryShaderWithStreamOutput(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,UINT NumEntries,const UINT *pBufferStrides,UINT NumStrides,UINT RasterizedStream,ID3D11ClassLinkage *pClassLinkage,ID3D11GeometryShader **ppGeometryShader) {
+    return This->lpVtbl->CreateGeometryShaderWithStreamOutput(This,pShaderBytecode,BytecodeLength,pSODeclaration,NumEntries,pBufferStrides,NumStrides,RasterizedStream,pClassLinkage,ppGeometryShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreatePixelShader(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11PixelShader **ppPixelShader) {
+    return This->lpVtbl->CreatePixelShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppPixelShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateHullShader(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11HullShader **ppHullShader) {
+    return This->lpVtbl->CreateHullShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppHullShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateDomainShader(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11DomainShader **ppDomainShader) {
+    return This->lpVtbl->CreateDomainShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppDomainShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateComputeShader(ID3D11Device1* This,const void *pShaderBytecode,SIZE_T BytecodeLength,ID3D11ClassLinkage *pClassLinkage,ID3D11ComputeShader **ppComputeShader) {
+    return This->lpVtbl->CreateComputeShader(This,pShaderBytecode,BytecodeLength,pClassLinkage,ppComputeShader);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateClassLinkage(ID3D11Device1* This,ID3D11ClassLinkage **ppLinkage) {
+    return This->lpVtbl->CreateClassLinkage(This,ppLinkage);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateBlendState(ID3D11Device1* This,const D3D11_BLEND_DESC *pBlendStateDesc,ID3D11BlendState **ppBlendState) {
+    return This->lpVtbl->CreateBlendState(This,pBlendStateDesc,ppBlendState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateDepthStencilState(ID3D11Device1* This,const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,ID3D11DepthStencilState **ppDepthStencilState) {
+    return This->lpVtbl->CreateDepthStencilState(This,pDepthStencilDesc,ppDepthStencilState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateRasterizerState(ID3D11Device1* This,const D3D11_RASTERIZER_DESC *pRasterizerDesc,ID3D11RasterizerState **ppRasterizerState) {
+    return This->lpVtbl->CreateRasterizerState(This,pRasterizerDesc,ppRasterizerState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateSamplerState(ID3D11Device1* This,const D3D11_SAMPLER_DESC *pSamplerDesc,ID3D11SamplerState **ppSamplerState) {
+    return This->lpVtbl->CreateSamplerState(This,pSamplerDesc,ppSamplerState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateQuery(ID3D11Device1* This,const D3D11_QUERY_DESC *pQueryDesc,ID3D11Query **ppQuery) {
+    return This->lpVtbl->CreateQuery(This,pQueryDesc,ppQuery);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreatePredicate(ID3D11Device1* This,const D3D11_QUERY_DESC *pPredicateDesc,ID3D11Predicate **ppPredicate) {
+    return This->lpVtbl->CreatePredicate(This,pPredicateDesc,ppPredicate);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateCounter(ID3D11Device1* This,const D3D11_COUNTER_DESC *pCounterDesc,ID3D11Counter **ppCounter) {
+    return This->lpVtbl->CreateCounter(This,pCounterDesc,ppCounter);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateDeferredContext(ID3D11Device1* This,UINT ContextFlags,ID3D11DeviceContext **ppDeferredContext) {
+    return This->lpVtbl->CreateDeferredContext(This,ContextFlags,ppDeferredContext);
+}
+static FORCEINLINE HRESULT ID3D11Device1_OpenSharedResource(ID3D11Device1* This,HANDLE hResource,REFIID ReturnedInterface,void **ppResource) {
+    return This->lpVtbl->OpenSharedResource(This,hResource,ReturnedInterface,ppResource);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CheckFormatSupport(ID3D11Device1* This,DXGI_FORMAT Format,UINT *pFormatSupport) {
+    return This->lpVtbl->CheckFormatSupport(This,Format,pFormatSupport);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CheckMultisampleQualityLevels(ID3D11Device1* This,DXGI_FORMAT Format,UINT SampleCount,UINT *pNumQualityLevels) {
+    return This->lpVtbl->CheckMultisampleQualityLevels(This,Format,SampleCount,pNumQualityLevels);
+}
+static FORCEINLINE void ID3D11Device1_CheckCounterInfo(ID3D11Device1* This,D3D11_COUNTER_INFO *pCounterInfo) {
+    This->lpVtbl->CheckCounterInfo(This,pCounterInfo);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CheckCounter(ID3D11Device1* This,const D3D11_COUNTER_DESC *pDesc,D3D11_COUNTER_TYPE *pType,UINT *pActiveCounters,LPSTR szName,UINT *pNameLength,LPSTR szUnits,UINT *pUnitsLength,LPSTR szDescription,UINT *pDescriptionLength) {
+    return This->lpVtbl->CheckCounter(This,pDesc,pType,pActiveCounters,szName,pNameLength,szUnits,pUnitsLength,szDescription,pDescriptionLength);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CheckFeatureSupport(ID3D11Device1* This,D3D11_FEATURE Feature,void *pFeatureSupportData,UINT FeatureSupportDataSize) {
+    return This->lpVtbl->CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize);
+}
+static FORCEINLINE HRESULT ID3D11Device1_GetPrivateData(ID3D11Device1* This,REFGUID guid,UINT *pDataSize,void *pData) {
+    return This->lpVtbl->GetPrivateData(This,guid,pDataSize,pData);
+}
+static FORCEINLINE HRESULT ID3D11Device1_SetPrivateData(ID3D11Device1* This,REFGUID guid,UINT DataSize,const void *pData) {
+    return This->lpVtbl->SetPrivateData(This,guid,DataSize,pData);
+}
+static FORCEINLINE HRESULT ID3D11Device1_SetPrivateDataInterface(ID3D11Device1* This,REFGUID guid,const IUnknown *pData) {
+    return This->lpVtbl->SetPrivateDataInterface(This,guid,pData);
+}
+static FORCEINLINE D3D_FEATURE_LEVEL ID3D11Device1_GetFeatureLevel(ID3D11Device1* This) {
+    return This->lpVtbl->GetFeatureLevel(This);
+}
+static FORCEINLINE UINT ID3D11Device1_GetCreationFlags(ID3D11Device1* This) {
+    return This->lpVtbl->GetCreationFlags(This);
+}
+static FORCEINLINE HRESULT ID3D11Device1_GetDeviceRemovedReason(ID3D11Device1* This) {
+    return This->lpVtbl->GetDeviceRemovedReason(This);
+}
+static FORCEINLINE void ID3D11Device1_GetImmediateContext(ID3D11Device1* This,ID3D11DeviceContext **ppImmediateContext) {
+    This->lpVtbl->GetImmediateContext(This,ppImmediateContext);
+}
+static FORCEINLINE HRESULT ID3D11Device1_SetExceptionMode(ID3D11Device1* This,UINT RaiseFlags) {
+    return This->lpVtbl->SetExceptionMode(This,RaiseFlags);
+}
+static FORCEINLINE UINT ID3D11Device1_GetExceptionMode(ID3D11Device1* This) {
+    return This->lpVtbl->GetExceptionMode(This);
+}
+/*** ID3D11Device1 methods ***/
+static FORCEINLINE void ID3D11Device1_GetImmediateContext1(ID3D11Device1* This,ID3D11DeviceContext1 **ppImmediateContext) {
+    This->lpVtbl->GetImmediateContext1(This,ppImmediateContext);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateDeferredContext1(ID3D11Device1* This,UINT ContextFlags,ID3D11DeviceContext1 **ppDeferredContext) {
+    return This->lpVtbl->CreateDeferredContext1(This,ContextFlags,ppDeferredContext);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateBlendState1(ID3D11Device1* This,const D3D11_BLEND_DESC1 *pBlendStateDesc,ID3D11BlendState1 **ppBlendState) {
+    return This->lpVtbl->CreateBlendState1(This,pBlendStateDesc,ppBlendState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateRasterizerState1(ID3D11Device1* This,const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,ID3D11RasterizerState1 **ppRasterizerState) {
+    return This->lpVtbl->CreateRasterizerState1(This,pRasterizerDesc,ppRasterizerState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_CreateDeviceContextState(ID3D11Device1* This,UINT Flags,const D3D_FEATURE_LEVEL *pFeatureLevels,UINT FeatureLevels,UINT SDKVersion,REFIID EmulatedInterface,D3D_FEATURE_LEVEL *pChosenFeatureLevel,ID3DDeviceContextState **ppContextState) {
+    return This->lpVtbl->CreateDeviceContextState(This,Flags,pFeatureLevels,FeatureLevels,SDKVersion,EmulatedInterface,pChosenFeatureLevel,ppContextState);
+}
+static FORCEINLINE HRESULT ID3D11Device1_OpenSharedResource1(ID3D11Device1* This,HANDLE hResource,REFIID returnedInterface,void **ppResource) {
+    return This->lpVtbl->OpenSharedResource1(This,hResource,returnedInterface,ppResource);
+}
+static FORCEINLINE HRESULT ID3D11Device1_OpenSharedResourceByName(ID3D11Device1* This,LPCWSTR lpName,DWORD dwDesiredAccess,REFIID returnedInterface,void **ppResource) {
+    return This->lpVtbl->OpenSharedResourceByName(This,lpName,dwDesiredAccess,returnedInterface,ppResource);
+}
+#endif
+#endif
+
+#endif
+
+void STDMETHODCALLTYPE ID3D11Device1_GetImmediateContext1_Proxy(
+    ID3D11Device1* This,
+    ID3D11DeviceContext1 **ppImmediateContext);
+void __RPC_STUB ID3D11Device1_GetImmediateContext1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE ID3D11Device1_CreateDeferredContext1_Proxy(
+    ID3D11Device1* This,
+    UINT ContextFlags,
+    ID3D11DeviceContext1 **ppDeferredContext);
+void __RPC_STUB ID3D11Device1_CreateDeferredContext1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE ID3D11Device1_CreateBlendState1_Proxy(
+    ID3D11Device1* This,
+    const D3D11_BLEND_DESC1 *pBlendStateDesc,
+    ID3D11BlendState1 **ppBlendState);
+void __RPC_STUB ID3D11Device1_CreateBlendState1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE ID3D11Device1_CreateRasterizerState1_Proxy(
+    ID3D11Device1* This,
+    const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
+    ID3D11RasterizerState1 **ppRasterizerState);
+void __RPC_STUB ID3D11Device1_CreateRasterizerState1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE ID3D11Device1_CreateDeviceContextState_Proxy(
+    ID3D11Device1* This,
+    UINT Flags,
+    const D3D_FEATURE_LEVEL *pFeatureLevels,
+    UINT FeatureLevels,
+    UINT SDKVersion,
+    REFIID EmulatedInterface,
+    D3D_FEATURE_LEVEL *pChosenFeatureLevel,
+    ID3DDeviceContextState **ppContextState);
+void __RPC_STUB ID3D11Device1_CreateDeviceContextState_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE ID3D11Device1_OpenSharedResource1_Proxy(
+    ID3D11Device1* This,
+    HANDLE hResource,
+    REFIID returnedInterface,
+    void **ppResource);
+void __RPC_STUB ID3D11Device1_OpenSharedResource1_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE ID3D11Device1_OpenSharedResourceByName_Proxy(
+    ID3D11Device1* This,
+    LPCWSTR lpName,
+    DWORD dwDesiredAccess,
+    REFIID returnedInterface,
+    void **ppResource);
+void __RPC_STUB ID3D11Device1_OpenSharedResourceByName_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __ID3D11Device1_INTERFACE_DEFINED__ */
+
 /* Begin additional prototypes for all interfaces */
 
 
diff --git a/mingw-w64-headers/direct-x/include/d3d11_1.idl b/mingw-w64-headers/direct-x/include/d3d11_1.idl
index 928548f..1ebfc5a 100644
--- a/mingw-w64-headers/direct-x/include/d3d11_1.idl
+++ b/mingw-w64-headers/direct-x/include/d3d11_1.idl
@@ -22,6 +22,69 @@
 import "d3dcommon.idl";
 import "d3d11.idl";
 
+typedef enum D3D11_LOGIC_OP {
+    D3D11_LOGIC_OP_CLEAR = 0,
+    D3D11_LOGIC_OP_SET,
+    D3D11_LOGIC_OP_COPY,
+    D3D11_LOGIC_OP_COPY_INVERTED,
+    D3D11_LOGIC_OP_NOOP,
+    D3D11_LOGIC_OP_INVERT,
+    D3D11_LOGIC_OP_AND,
+    D3D11_LOGIC_OP_NAND,
+    D3D11_LOGIC_OP_OR,
+    D3D11_LOGIC_OP_NOR,
+    D3D11_LOGIC_OP_XOR,
+    D3D11_LOGIC_OP_EQUIV,
+    D3D11_LOGIC_OP_AND_REVERSE,
+    D3D11_LOGIC_OP_AND_INVERTED,
+    D3D11_LOGIC_OP_OR_REVERSE,
+    D3D11_LOGIC_OP_OR_INVERTED
+} D3D11_LOGIC_OP;
+
+typedef struct _D3D11_RENDER_TARGET_BLEND_DESC1 {
+    BOOL           BlendEnable;
+    BOOL           LogicOpEnable;
+    D3D11_BLEND    SrcBlend;
+    D3D11_BLEND    DestBlend;
+    D3D11_BLEND_OP BlendOp;
+    D3D11_BLEND    SrcBlendAlpha;
+    D3D11_BLEND    DestBlendAlpha;
+    D3D11_BLEND_OP BlendOpAlpha;
+    D3D11_LOGIC_OP LogicOp;
+    UINT8          RenderTargetWriteMask;
+} D3D11_RENDER_TARGET_BLEND_DESC1;
+
+typedef struct _D3D11_BLEND_DESC1 {
+    BOOL                            AlphaToCoverageEnable;
+    BOOL                            IndependentBlendEnable;
+    D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT];
+} D3D11_BLEND_DESC1;
+
+typedef struct _D3D11_RASTERIZER_DESC1 {
+    D3D11_FILL_MODE FillMode;
+    D3D11_CULL_MODE CullMode;
+    BOOL            FrontCounterClockwise;
+    INT             DepthBias;
+    FLOAT           DepthBiasClamp;
+    FLOAT           SlopeScaledDepthBias;
+    BOOL            DepthClipEnable;
+    BOOL            ScissorEnable;
+    BOOL            MultisampleEnable;
+    BOOL            AntialiasedLineEnable;
+    UINT            ForcedSampleCount;
+} D3D11_RASTERIZER_DESC1;
+
+[
+    uuid(cc86fabe-da55-401d-85e7-e3c9de2877e9),
+    object,
+    local,
+    pointer_default(unique)
+]
+interface ID3D11BlendState1 : ID3D11BlendState
+{
+    void GetDesc1(D3D11_BLEND_DESC1 *pDesc);
+}
+
 [
     uuid(5c1e0d8a-7c23-48f9-8c59-a92958ceff11),
     object,
@@ -177,3 +240,58 @@
     void SetMarker(LPCWSTR Name);
     BOOL GetStatus();
 }
+
+[
+    uuid(1217d7a6-5039-418c-b042-9cbe256afd6e),
+    object,
+    local,
+    pointer_default(unique)
+]
+interface ID3D11RasterizerState1 : ID3D11RasterizerState
+{
+    void GetDesc1(D3D11_RASTERIZER_DESC1 *pDesc);
+}
+
+[
+    uuid(a04bfb29-08ef-43d6-a49c-a9bdbdcbe686),
+    object,
+    local,
+    pointer_default(unique)
+]
+interface ID3D11Device1 : ID3D11Device
+{
+    void GetImmediateContext1(
+            ID3D11DeviceContext1 **ppImmediateContext);
+
+    HRESULT CreateDeferredContext1(
+            UINT ContextFlags,
+            ID3D11DeviceContext1 **ppDeferredContext);
+
+    HRESULT CreateBlendState1(
+            const D3D11_BLEND_DESC1 *pBlendStateDesc,
+            ID3D11BlendState1 **ppBlendState);
+
+    HRESULT CreateRasterizerState1(
+            const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
+            ID3D11RasterizerState1 **ppRasterizerState);
+
+    HRESULT CreateDeviceContextState(
+            UINT Flags,
+            const D3D_FEATURE_LEVEL *pFeatureLevels,
+            UINT FeatureLevels,
+            UINT SDKVersion,
+            REFIID EmulatedInterface,
+            D3D_FEATURE_LEVEL *pChosenFeatureLevel,
+            ID3DDeviceContextState **ppContextState);
+
+    HRESULT OpenSharedResource1(
+            HANDLE hResource,
+            REFIID returnedInterface,
+            void **ppResource);
+
+     HRESULT OpenSharedResourceByName(
+            LPCWSTR lpName,
+            DWORD dwDesiredAccess,
+            REFIID returnedInterface,
+            void **ppResource);
+}
diff --git a/mingw-w64-headers/direct-x/include/dxgi.h b/mingw-w64-headers/direct-x/include/dxgi.h
index a8a99ed..88e76a2 100644
--- a/mingw-w64-headers/direct-x/include/dxgi.h
+++ b/mingw-w64-headers/direct-x/include/dxgi.h
@@ -141,7 +141,8 @@
 
 typedef enum DXGI_SWAP_EFFECT {
     DXGI_SWAP_EFFECT_DISCARD = 0,
-    DXGI_SWAP_EFFECT_SEQUENTIAL = 1
+    DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
+    DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3
 } DXGI_SWAP_EFFECT;
 typedef enum DXGI_RESIDENCY {
     DXGI_RESIDENCY_FULLY_RESIDENT = 1,
diff --git a/mingw-w64-headers/direct-x/include/dxgi.idl b/mingw-w64-headers/direct-x/include/dxgi.idl
index bc9538e..009a6b5 100644
--- a/mingw-w64-headers/direct-x/include/dxgi.idl
+++ b/mingw-w64-headers/direct-x/include/dxgi.idl
@@ -67,6 +67,7 @@
 typedef enum DXGI_SWAP_EFFECT {
     DXGI_SWAP_EFFECT_DISCARD    = 0,
     DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
+    DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3
 } DXGI_SWAP_EFFECT;
 
 typedef enum DXGI_RESIDENCY {
diff --git a/mingw-w64-headers/direct-x/include/dxgi1_2.h b/mingw-w64-headers/direct-x/include/dxgi1_2.h
index f621d30..72ac571 100644
--- a/mingw-w64-headers/direct-x/include/dxgi1_2.h
+++ b/mingw-w64-headers/direct-x/include/dxgi1_2.h
@@ -27,6 +27,11 @@
 typedef interface IDXGISwapChain1 IDXGISwapChain1;
 #endif
 
+#ifndef __IDXGIFactory2_FWD_DEFINED__
+#define __IDXGIFactory2_FWD_DEFINED__
+typedef interface IDXGIFactory2 IDXGIFactory2;
+#endif
+
 /* Headers for imported files */
 
 #include <dxgi.h>
@@ -745,6 +750,443 @@
 
 #endif  /* __IDXGISwapChain1_INTERFACE_DEFINED__ */
 
+/*****************************************************************************
+ * IDXGIFactory2 interface
+ */
+#ifndef __IDXGIFactory2_INTERFACE_DEFINED__
+#define __IDXGIFactory2_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IDXGIFactory2, 0x50c83a1c, 0xe072, 0x4c48, 0x87,0xb0, 0x36,0x30,0xfa,0x36,0xa6,0xd0);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("50c83a1c-e072-4c48-87b0-3630fa36a6d0")
+IDXGIFactory2 : public IDXGIFactory1
+{
+    virtual WINBOOL STDMETHODCALLTYPE IsWindowedStereoEnabled(
+        ) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForHwnd(
+        IUnknown *pDevice,
+        HWND hWnd,
+        const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+        const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+        IDXGIOutput *pRestrictToOutput,
+        IDXGISwapChain1 **ppSwapChain) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForCoreWindow(
+        IUnknown *pDevice,
+        IUnknown *pWindow,
+        const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+        IDXGIOutput *pRestrictToOutput,
+        IDXGISwapChain1 **ppSwapChain) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetSharedResourceAdapterLuid(
+        HANDLE hResource,
+        LUID *pLuid) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusWindow(
+        HWND WindowHandle,
+        UINT wMsg,
+        DWORD *pdwCookie) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE RegisterStereoStatusEvent(
+        HANDLE hEvent,
+        DWORD *pdwCookie) = 0;
+
+    virtual void STDMETHODCALLTYPE UnregisterStereoStatus(
+        DWORD dwCookie) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE RegisterStereoStatusWindow(
+        HWND WindowHandle,
+        UINT wMsg,
+        DWORD *pdwCookie) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE RegisterOcclusionStatusEvent(
+        HANDLE hEvent,
+        DWORD *pdwCookie) = 0;
+
+    virtual void STDMETHODCALLTYPE UnregisterOcclusionStatus(
+        DWORD dwCookie) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE CreateSwapChainForComposition(
+        IUnknown *pDevice,
+        const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+        IDXGIOutput *pRestrictToOutput,
+        IDXGISwapChain1 **ppSwapChain) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IDXGIFactory2, 0x50c83a1c, 0xe072, 0x4c48, 0x87,0xb0, 0x36,0x30,0xfa,0x36,0xa6,0xd0)
+#endif
+#else
+typedef struct IDXGIFactory2Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IDXGIFactory2* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IDXGIFactory2* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IDXGIFactory2* This);
+
+    /*** IDXGIObject methods ***/
+    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
+        IDXGIFactory2* This,
+        REFGUID guid,
+        UINT data_size,
+        const void *data);
+
+    HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)(
+        IDXGIFactory2* This,
+        REFGUID guid,
+        const IUnknown *object);
+
+    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
+        IDXGIFactory2* This,
+        REFGUID guid,
+        UINT *data_size,
+        void *data);
+
+    HRESULT (STDMETHODCALLTYPE *GetParent)(
+        IDXGIFactory2* This,
+        REFIID riid,
+        void **parent);
+
+    /*** IDXGIFactory methods ***/
+    HRESULT (STDMETHODCALLTYPE *EnumAdapters)(
+        IDXGIFactory2* This,
+        UINT adapter_idx,
+        IDXGIAdapter **adapter);
+
+    HRESULT (STDMETHODCALLTYPE *MakeWindowAssociation)(
+        IDXGIFactory2* This,
+        HWND window,
+        UINT flags);
+
+    HRESULT (STDMETHODCALLTYPE *GetWindowAssociation)(
+        IDXGIFactory2* This,
+        HWND *window);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSwapChain)(
+        IDXGIFactory2* This,
+        IUnknown *device,
+        DXGI_SWAP_CHAIN_DESC *desc,
+        IDXGISwapChain **swapchain);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSoftwareAdapter)(
+        IDXGIFactory2* This,
+        HMODULE swrast,
+        IDXGIAdapter **adapter);
+
+    /*** IDXGIFactory1 methods ***/
+    HRESULT (STDMETHODCALLTYPE *EnumAdapters1)(
+        IDXGIFactory2* This,
+        UINT Adapter,
+        IDXGIAdapter1 **ppAdapter);
+
+    WINBOOL (STDMETHODCALLTYPE *IsCurrent)(
+        IDXGIFactory2* This);
+
+    /*** IDXGIFactory2 methods ***/
+    WINBOOL (STDMETHODCALLTYPE *IsWindowedStereoEnabled)(
+        IDXGIFactory2* This);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSwapChainForHwnd)(
+        IDXGIFactory2* This,
+        IUnknown *pDevice,
+        HWND hWnd,
+        const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+        const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+        IDXGIOutput *pRestrictToOutput,
+        IDXGISwapChain1 **ppSwapChain);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSwapChainForCoreWindow)(
+        IDXGIFactory2* This,
+        IUnknown *pDevice,
+        IUnknown *pWindow,
+        const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+        IDXGIOutput *pRestrictToOutput,
+        IDXGISwapChain1 **ppSwapChain);
+
+    HRESULT (STDMETHODCALLTYPE *GetSharedResourceAdapterLuid)(
+        IDXGIFactory2* This,
+        HANDLE hResource,
+        LUID *pLuid);
+
+    HRESULT (STDMETHODCALLTYPE *RegisterOcclusionStatusWindow)(
+        IDXGIFactory2* This,
+        HWND WindowHandle,
+        UINT wMsg,
+        DWORD *pdwCookie);
+
+    HRESULT (STDMETHODCALLTYPE *RegisterStereoStatusEvent)(
+        IDXGIFactory2* This,
+        HANDLE hEvent,
+        DWORD *pdwCookie);
+
+    void (STDMETHODCALLTYPE *UnregisterStereoStatus)(
+        IDXGIFactory2* This,
+        DWORD dwCookie);
+
+    HRESULT (STDMETHODCALLTYPE *RegisterStereoStatusWindow)(
+        IDXGIFactory2* This,
+        HWND WindowHandle,
+        UINT wMsg,
+        DWORD *pdwCookie);
+
+    HRESULT (STDMETHODCALLTYPE *RegisterOcclusionStatusEvent)(
+        IDXGIFactory2* This,
+        HANDLE hEvent,
+        DWORD *pdwCookie);
+
+    void (STDMETHODCALLTYPE *UnregisterOcclusionStatus)(
+        IDXGIFactory2* This,
+        DWORD dwCookie);
+
+    HRESULT (STDMETHODCALLTYPE *CreateSwapChainForComposition)(
+        IDXGIFactory2* This,
+        IUnknown *pDevice,
+        const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+        IDXGIOutput *pRestrictToOutput,
+        IDXGISwapChain1 **ppSwapChain);
+
+    END_INTERFACE
+} IDXGIFactory2Vtbl;
+interface IDXGIFactory2 {
+    CONST_VTBL IDXGIFactory2Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IDXGIFactory2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IDXGIFactory2_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IDXGIFactory2_Release(This) (This)->lpVtbl->Release(This)
+/*** IDXGIObject methods ***/
+#define IDXGIFactory2_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data)
+#define IDXGIFactory2_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object)
+#define IDXGIFactory2_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data)
+#define IDXGIFactory2_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent)
+/*** IDXGIFactory methods ***/
+#define IDXGIFactory2_EnumAdapters(This,adapter_idx,adapter) (This)->lpVtbl->EnumAdapters(This,adapter_idx,adapter)
+#define IDXGIFactory2_MakeWindowAssociation(This,window,flags) (This)->lpVtbl->MakeWindowAssociation(This,window,flags)
+#define IDXGIFactory2_GetWindowAssociation(This,window) (This)->lpVtbl->GetWindowAssociation(This,window)
+#define IDXGIFactory2_CreateSwapChain(This,device,desc,swapchain) (This)->lpVtbl->CreateSwapChain(This,device,desc,swapchain)
+#define IDXGIFactory2_CreateSoftwareAdapter(This,swrast,adapter) (This)->lpVtbl->CreateSoftwareAdapter(This,swrast,adapter)
+/*** IDXGIFactory1 methods ***/
+#define IDXGIFactory2_EnumAdapters1(This,Adapter,ppAdapter) (This)->lpVtbl->EnumAdapters1(This,Adapter,ppAdapter)
+#define IDXGIFactory2_IsCurrent(This) (This)->lpVtbl->IsCurrent(This)
+/*** IDXGIFactory2 methods ***/
+#define IDXGIFactory2_IsWindowedStereoEnabled(This) (This)->lpVtbl->IsWindowedStereoEnabled(This)
+#define IDXGIFactory2_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) (This)->lpVtbl->CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain)
+#define IDXGIFactory2_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) (This)->lpVtbl->CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain)
+#define IDXGIFactory2_GetSharedResourceAdapterLuid(This,hResource,pLuid) (This)->lpVtbl->GetSharedResourceAdapterLuid(This,hResource,pLuid)
+#define IDXGIFactory2_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) (This)->lpVtbl->RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie)
+#define IDXGIFactory2_RegisterStereoStatusEvent(This,hEvent,pdwCookie) (This)->lpVtbl->RegisterStereoStatusEvent(This,hEvent,pdwCookie)
+#define IDXGIFactory2_UnregisterStereoStatus(This,dwCookie) (This)->lpVtbl->UnregisterStereoStatus(This,dwCookie)
+#define IDXGIFactory2_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) (This)->lpVtbl->RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie)
+#define IDXGIFactory2_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) (This)->lpVtbl->RegisterOcclusionStatusEvent(This,hEvent,pdwCookie)
+#define IDXGIFactory2_UnregisterOcclusionStatus(This,dwCookie) (This)->lpVtbl->UnregisterOcclusionStatus(This,dwCookie)
+#define IDXGIFactory2_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) (This)->lpVtbl->CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IDXGIFactory2_QueryInterface(IDXGIFactory2* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IDXGIFactory2_AddRef(IDXGIFactory2* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IDXGIFactory2_Release(IDXGIFactory2* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IDXGIObject methods ***/
+static FORCEINLINE HRESULT IDXGIFactory2_SetPrivateData(IDXGIFactory2* This,REFGUID guid,UINT data_size,const void *data) {
+    return This->lpVtbl->SetPrivateData(This,guid,data_size,data);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_SetPrivateDataInterface(IDXGIFactory2* This,REFGUID guid,const IUnknown *object) {
+    return This->lpVtbl->SetPrivateDataInterface(This,guid,object);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_GetPrivateData(IDXGIFactory2* This,REFGUID guid,UINT *data_size,void *data) {
+    return This->lpVtbl->GetPrivateData(This,guid,data_size,data);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_GetParent(IDXGIFactory2* This,REFIID riid,void **parent) {
+    return This->lpVtbl->GetParent(This,riid,parent);
+}
+/*** IDXGIFactory methods ***/
+static FORCEINLINE HRESULT IDXGIFactory2_EnumAdapters(IDXGIFactory2* This,UINT adapter_idx,IDXGIAdapter **adapter) {
+    return This->lpVtbl->EnumAdapters(This,adapter_idx,adapter);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_MakeWindowAssociation(IDXGIFactory2* This,HWND window,UINT flags) {
+    return This->lpVtbl->MakeWindowAssociation(This,window,flags);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_GetWindowAssociation(IDXGIFactory2* This,HWND *window) {
+    return This->lpVtbl->GetWindowAssociation(This,window);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_CreateSwapChain(IDXGIFactory2* This,IUnknown *device,DXGI_SWAP_CHAIN_DESC *desc,IDXGISwapChain **swapchain) {
+    return This->lpVtbl->CreateSwapChain(This,device,desc,swapchain);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_CreateSoftwareAdapter(IDXGIFactory2* This,HMODULE swrast,IDXGIAdapter **adapter) {
+    return This->lpVtbl->CreateSoftwareAdapter(This,swrast,adapter);
+}
+/*** IDXGIFactory1 methods ***/
+static FORCEINLINE HRESULT IDXGIFactory2_EnumAdapters1(IDXGIFactory2* This,UINT Adapter,IDXGIAdapter1 **ppAdapter) {
+    return This->lpVtbl->EnumAdapters1(This,Adapter,ppAdapter);
+}
+static FORCEINLINE WINBOOL IDXGIFactory2_IsCurrent(IDXGIFactory2* This) {
+    return This->lpVtbl->IsCurrent(This);
+}
+/*** IDXGIFactory2 methods ***/
+static FORCEINLINE WINBOOL IDXGIFactory2_IsWindowedStereoEnabled(IDXGIFactory2* This) {
+    return This->lpVtbl->IsWindowedStereoEnabled(This);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_CreateSwapChainForHwnd(IDXGIFactory2* This,IUnknown *pDevice,HWND hWnd,const DXGI_SWAP_CHAIN_DESC1 *pDesc,const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,IDXGIOutput *pRestrictToOutput,IDXGISwapChain1 **ppSwapChain) {
+    return This->lpVtbl->CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_CreateSwapChainForCoreWindow(IDXGIFactory2* This,IUnknown *pDevice,IUnknown *pWindow,const DXGI_SWAP_CHAIN_DESC1 *pDesc,IDXGIOutput *pRestrictToOutput,IDXGISwapChain1 **ppSwapChain) {
+    return This->lpVtbl->CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_GetSharedResourceAdapterLuid(IDXGIFactory2* This,HANDLE hResource,LUID *pLuid) {
+    return This->lpVtbl->GetSharedResourceAdapterLuid(This,hResource,pLuid);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_RegisterOcclusionStatusWindow(IDXGIFactory2* This,HWND WindowHandle,UINT wMsg,DWORD *pdwCookie) {
+    return This->lpVtbl->RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_RegisterStereoStatusEvent(IDXGIFactory2* This,HANDLE hEvent,DWORD *pdwCookie) {
+    return This->lpVtbl->RegisterStereoStatusEvent(This,hEvent,pdwCookie);
+}
+static FORCEINLINE void IDXGIFactory2_UnregisterStereoStatus(IDXGIFactory2* This,DWORD dwCookie) {
+    This->lpVtbl->UnregisterStereoStatus(This,dwCookie);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_RegisterStereoStatusWindow(IDXGIFactory2* This,HWND WindowHandle,UINT wMsg,DWORD *pdwCookie) {
+    return This->lpVtbl->RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_RegisterOcclusionStatusEvent(IDXGIFactory2* This,HANDLE hEvent,DWORD *pdwCookie) {
+    return This->lpVtbl->RegisterOcclusionStatusEvent(This,hEvent,pdwCookie);
+}
+static FORCEINLINE void IDXGIFactory2_UnregisterOcclusionStatus(IDXGIFactory2* This,DWORD dwCookie) {
+    This->lpVtbl->UnregisterOcclusionStatus(This,dwCookie);
+}
+static FORCEINLINE HRESULT IDXGIFactory2_CreateSwapChainForComposition(IDXGIFactory2* This,IUnknown *pDevice,const DXGI_SWAP_CHAIN_DESC1 *pDesc,IDXGIOutput *pRestrictToOutput,IDXGISwapChain1 **ppSwapChain) {
+    return This->lpVtbl->CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain);
+}
+#endif
+#endif
+
+#endif
+
+WINBOOL STDMETHODCALLTYPE IDXGIFactory2_IsWindowedStereoEnabled_Proxy(
+    IDXGIFactory2* This);
+void __RPC_STUB IDXGIFactory2_IsWindowedStereoEnabled_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_CreateSwapChainForHwnd_Proxy(
+    IDXGIFactory2* This,
+    IUnknown *pDevice,
+    HWND hWnd,
+    const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+    const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+    IDXGIOutput *pRestrictToOutput,
+    IDXGISwapChain1 **ppSwapChain);
+void __RPC_STUB IDXGIFactory2_CreateSwapChainForHwnd_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_CreateSwapChainForCoreWindow_Proxy(
+    IDXGIFactory2* This,
+    IUnknown *pDevice,
+    IUnknown *pWindow,
+    const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+    IDXGIOutput *pRestrictToOutput,
+    IDXGISwapChain1 **ppSwapChain);
+void __RPC_STUB IDXGIFactory2_CreateSwapChainForCoreWindow_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_GetSharedResourceAdapterLuid_Proxy(
+    IDXGIFactory2* This,
+    HANDLE hResource,
+    LUID *pLuid);
+void __RPC_STUB IDXGIFactory2_GetSharedResourceAdapterLuid_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_RegisterOcclusionStatusWindow_Proxy(
+    IDXGIFactory2* This,
+    HWND WindowHandle,
+    UINT wMsg,
+    DWORD *pdwCookie);
+void __RPC_STUB IDXGIFactory2_RegisterOcclusionStatusWindow_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_RegisterStereoStatusEvent_Proxy(
+    IDXGIFactory2* This,
+    HANDLE hEvent,
+    DWORD *pdwCookie);
+void __RPC_STUB IDXGIFactory2_RegisterStereoStatusEvent_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IDXGIFactory2_UnregisterStereoStatus_Proxy(
+    IDXGIFactory2* This,
+    DWORD dwCookie);
+void __RPC_STUB IDXGIFactory2_UnregisterStereoStatus_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_RegisterStereoStatusWindow_Proxy(
+    IDXGIFactory2* This,
+    HWND WindowHandle,
+    UINT wMsg,
+    DWORD *pdwCookie);
+void __RPC_STUB IDXGIFactory2_RegisterStereoStatusWindow_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_RegisterOcclusionStatusEvent_Proxy(
+    IDXGIFactory2* This,
+    HANDLE hEvent,
+    DWORD *pdwCookie);
+void __RPC_STUB IDXGIFactory2_RegisterOcclusionStatusEvent_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+void STDMETHODCALLTYPE IDXGIFactory2_UnregisterOcclusionStatus_Proxy(
+    IDXGIFactory2* This,
+    DWORD dwCookie);
+void __RPC_STUB IDXGIFactory2_UnregisterOcclusionStatus_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IDXGIFactory2_CreateSwapChainForComposition_Proxy(
+    IDXGIFactory2* This,
+    IUnknown *pDevice,
+    const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+    IDXGIOutput *pRestrictToOutput,
+    IDXGISwapChain1 **ppSwapChain);
+void __RPC_STUB IDXGIFactory2_CreateSwapChainForComposition_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IDXGIFactory2_INTERFACE_DEFINED__ */
+
 /* Begin additional prototypes for all interfaces */
 
 
diff --git a/mingw-w64-headers/direct-x/include/dxgi1_2.idl b/mingw-w64-headers/direct-x/include/dxgi1_2.idl
index bba4ab8..775b81c 100644
--- a/mingw-w64-headers/direct-x/include/dxgi1_2.idl
+++ b/mingw-w64-headers/direct-x/include/dxgi1_2.idl
@@ -130,3 +130,63 @@
     HRESULT GetRotation(
             [out] DXGI_MODE_ROTATION *pRotation);
 }
+
+[
+    object,
+    uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
+    local,
+    pointer_default(unique)
+]
+interface IDXGIFactory2 : IDXGIFactory1
+{
+    BOOL IsWindowedStereoEnabled();
+
+    HRESULT CreateSwapChainForHwnd(
+            [in]  IUnknown *pDevice,
+            [in]  HWND hWnd,
+            [in]  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            [in]  const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+            [in]  IDXGIOutput *pRestrictToOutput,
+            [out] IDXGISwapChain1 **ppSwapChain);
+
+    HRESULT CreateSwapChainForCoreWindow(
+            [in]  IUnknown *pDevice,
+            [in]  IUnknown *pWindow,
+            [in]  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            [in]  IDXGIOutput *pRestrictToOutput,
+            [out] IDXGISwapChain1 **ppSwapChain);
+
+    HRESULT GetSharedResourceAdapterLuid(
+            [in]  HANDLE hResource,
+            [out] LUID *pLuid);
+
+    HRESULT RegisterOcclusionStatusWindow(
+            [in]  HWND WindowHandle,
+            [in]  UINT wMsg,
+            [out] DWORD *pdwCookie);
+
+    HRESULT RegisterStereoStatusEvent(
+            [in]  HANDLE hEvent,
+            [out] DWORD *pdwCookie);
+
+    void UnregisterStereoStatus(
+            [in]  DWORD dwCookie);
+
+    HRESULT RegisterStereoStatusWindow(
+            [in]  HWND WindowHandle,
+            [in]  UINT wMsg,
+            [out] DWORD *pdwCookie);
+
+    HRESULT RegisterOcclusionStatusEvent(
+            [in]  HANDLE hEvent,
+            [out] DWORD *pdwCookie);
+
+    void UnregisterOcclusionStatus(
+            [in]  DWORD dwCookie);
+
+    HRESULT CreateSwapChainForComposition(
+            [in]  IUnknown *pDevice,
+            [in]  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            [in]  IDXGIOutput *pRestrictToOutput,
+            [out] IDXGISwapChain1 **ppSwapChain);
+}
diff --git a/mingw-w64-headers/include/wmsdkidl.h b/mingw-w64-headers/include/wmsdkidl.h
index ad3afc4..5ff3d9e 100644
--- a/mingw-w64-headers/include/wmsdkidl.h
+++ b/mingw-w64-headers/include/wmsdkidl.h
@@ -77,6 +77,36 @@
 typedef interface IWMSyncReader IWMSyncReader;
 #endif
 
+#ifndef __IWMInputMediaProps_FWD_DEFINED__
+#define __IWMInputMediaProps_FWD_DEFINED__
+typedef interface IWMInputMediaProps IWMInputMediaProps;
+#endif
+
+#ifndef __IWMWriterSink_FWD_DEFINED__
+#define __IWMWriterSink_FWD_DEFINED__
+typedef interface IWMWriterSink IWMWriterSink;
+#endif
+
+#ifndef __IWMWriter_FWD_DEFINED__
+#define __IWMWriter_FWD_DEFINED__
+typedef interface IWMWriter IWMWriter;
+#endif
+
+#ifndef __IWMWriterAdvanced_FWD_DEFINED__
+#define __IWMWriterAdvanced_FWD_DEFINED__
+typedef interface IWMWriterAdvanced IWMWriterAdvanced;
+#endif
+
+#ifndef __IWMWriterAdvanced2_FWD_DEFINED__
+#define __IWMWriterAdvanced2_FWD_DEFINED__
+typedef interface IWMWriterAdvanced2 IWMWriterAdvanced2;
+#endif
+
+#ifndef __IWMWriterAdvanced3_FWD_DEFINED__
+#define __IWMWriterAdvanced3_FWD_DEFINED__
+typedef interface IWMWriterAdvanced3 IWMWriterAdvanced3;
+#endif
+
 /* Headers for imported files */
 
 #include <oaidl.h>
@@ -98,6 +128,27 @@
     ULONG cbFormat;
     BYTE *pbFormat;
 } WM_MEDIA_TYPE;
+typedef struct _WMWriterStatistics {
+    QWORD qwSampleCount;
+    QWORD qwByteCount;
+    QWORD qwDroppedSampleCount;
+    QWORD qwDroppedByteCount;
+    DWORD dwCurrentBitrate;
+    DWORD dwAverageBitrate;
+    DWORD dwExpectedBitrate;
+    DWORD dwCurrentSampleRate;
+    DWORD dwAverageSampleRate;
+    DWORD dwExpectedSampleRate;
+} WM_WRITER_STATISTICS;
+typedef struct _WMWriterStatisticsEx {
+    DWORD dwBitratePlusOverhead;
+    DWORD dwCurrentSampleDropRateInQueue;
+    DWORD dwCurrentSampleDropRateInCodec;
+    DWORD dwCurrentSampleDropRateInMultiplexer;
+    DWORD dwTotalSampleDropsInQueue;
+    DWORD dwTotalSampleDropsInCodec;
+    DWORD dwTotalSampleDropsInMultiplexer;
+} WM_WRITER_STATISTICS_EX;
 typedef enum WMT_ATTR_DATATYPE {
     WMT_TYPE_DWORD = 0,
     WMT_TYPE_STRING = 1,
@@ -2774,6 +2825,1387 @@
 
 #endif  /* __IWMSyncReader_INTERFACE_DEFINED__ */
 
+/*****************************************************************************
+ * IWMInputMediaProps interface
+ */
+#ifndef __IWMInputMediaProps_INTERFACE_DEFINED__
+#define __IWMInputMediaProps_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWMInputMediaProps, 0x96406bd5, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("96406bd5-2b2b-11d3-b36b-00c04f6108ff")
+IWMInputMediaProps : public IWMMediaProps
+{
+    virtual HRESULT STDMETHODCALLTYPE GetConnectionName(
+        WCHAR *pwszName,
+        WORD *pcchName) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetGroupName(
+        WCHAR *pwszName,
+        WORD *pcchName) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IWMInputMediaProps, 0x96406bd5, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff)
+#endif
+#else
+typedef struct IWMInputMediaPropsVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWMInputMediaProps* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWMInputMediaProps* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWMInputMediaProps* This);
+
+    /*** IWMMediaProps methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetType)(
+        IWMInputMediaProps* This,
+        GUID *pguidType);
+
+    HRESULT (STDMETHODCALLTYPE *GetMediaType)(
+        IWMInputMediaProps* This,
+        WM_MEDIA_TYPE *pType,
+        DWORD *pcbType);
+
+    HRESULT (STDMETHODCALLTYPE *SetMediaType)(
+        IWMInputMediaProps* This,
+        WM_MEDIA_TYPE *pType);
+
+    /*** IWMInputMediaProps methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetConnectionName)(
+        IWMInputMediaProps* This,
+        WCHAR *pwszName,
+        WORD *pcchName);
+
+    HRESULT (STDMETHODCALLTYPE *GetGroupName)(
+        IWMInputMediaProps* This,
+        WCHAR *pwszName,
+        WORD *pcchName);
+
+    END_INTERFACE
+} IWMInputMediaPropsVtbl;
+interface IWMInputMediaProps {
+    CONST_VTBL IWMInputMediaPropsVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IWMInputMediaProps_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWMInputMediaProps_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWMInputMediaProps_Release(This) (This)->lpVtbl->Release(This)
+/*** IWMMediaProps methods ***/
+#define IWMInputMediaProps_GetType(This,pguidType) (This)->lpVtbl->GetType(This,pguidType)
+#define IWMInputMediaProps_GetMediaType(This,pType,pcbType) (This)->lpVtbl->GetMediaType(This,pType,pcbType)
+#define IWMInputMediaProps_SetMediaType(This,pType) (This)->lpVtbl->SetMediaType(This,pType)
+/*** IWMInputMediaProps methods ***/
+#define IWMInputMediaProps_GetConnectionName(This,pwszName,pcchName) (This)->lpVtbl->GetConnectionName(This,pwszName,pcchName)
+#define IWMInputMediaProps_GetGroupName(This,pwszName,pcchName) (This)->lpVtbl->GetGroupName(This,pwszName,pcchName)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IWMInputMediaProps_QueryInterface(IWMInputMediaProps* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IWMInputMediaProps_AddRef(IWMInputMediaProps* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IWMInputMediaProps_Release(IWMInputMediaProps* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IWMMediaProps methods ***/
+static FORCEINLINE HRESULT IWMInputMediaProps_GetType(IWMInputMediaProps* This,GUID *pguidType) {
+    return This->lpVtbl->GetType(This,pguidType);
+}
+static FORCEINLINE HRESULT IWMInputMediaProps_GetMediaType(IWMInputMediaProps* This,WM_MEDIA_TYPE *pType,DWORD *pcbType) {
+    return This->lpVtbl->GetMediaType(This,pType,pcbType);
+}
+static FORCEINLINE HRESULT IWMInputMediaProps_SetMediaType(IWMInputMediaProps* This,WM_MEDIA_TYPE *pType) {
+    return This->lpVtbl->SetMediaType(This,pType);
+}
+/*** IWMInputMediaProps methods ***/
+static FORCEINLINE HRESULT IWMInputMediaProps_GetConnectionName(IWMInputMediaProps* This,WCHAR *pwszName,WORD *pcchName) {
+    return This->lpVtbl->GetConnectionName(This,pwszName,pcchName);
+}
+static FORCEINLINE HRESULT IWMInputMediaProps_GetGroupName(IWMInputMediaProps* This,WCHAR *pwszName,WORD *pcchName) {
+    return This->lpVtbl->GetGroupName(This,pwszName,pcchName);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWMInputMediaProps_GetConnectionName_Proxy(
+    IWMInputMediaProps* This,
+    WCHAR *pwszName,
+    WORD *pcchName);
+void __RPC_STUB IWMInputMediaProps_GetConnectionName_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMInputMediaProps_GetGroupName_Proxy(
+    IWMInputMediaProps* This,
+    WCHAR *pwszName,
+    WORD *pcchName);
+void __RPC_STUB IWMInputMediaProps_GetGroupName_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWMInputMediaProps_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IWMWriterSink interface
+ */
+#ifndef __IWMWriterSink_INTERFACE_DEFINED__
+#define __IWMWriterSink_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWMWriterSink, 0x96406be4, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("96406be4-2b2b-11d3-b36b-00c04f6108ff")
+IWMWriterSink : public IUnknown
+{
+    virtual HRESULT STDMETHODCALLTYPE OnHeader(
+        INSSBuffer *pHeader) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE IsRealTime(
+        WINBOOL *pfRealTime) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE AllocateDataUnit(
+        DWORD cbDataUnit,
+        INSSBuffer **ppDataUnit) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE OnDataUnit(
+        INSSBuffer *pDataUnit) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE OnEndWriting(
+        ) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IWMWriterSink, 0x96406be4, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff)
+#endif
+#else
+typedef struct IWMWriterSinkVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWMWriterSink* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWMWriterSink* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWMWriterSink* This);
+
+    /*** IWMWriterSink methods ***/
+    HRESULT (STDMETHODCALLTYPE *OnHeader)(
+        IWMWriterSink* This,
+        INSSBuffer *pHeader);
+
+    HRESULT (STDMETHODCALLTYPE *IsRealTime)(
+        IWMWriterSink* This,
+        WINBOOL *pfRealTime);
+
+    HRESULT (STDMETHODCALLTYPE *AllocateDataUnit)(
+        IWMWriterSink* This,
+        DWORD cbDataUnit,
+        INSSBuffer **ppDataUnit);
+
+    HRESULT (STDMETHODCALLTYPE *OnDataUnit)(
+        IWMWriterSink* This,
+        INSSBuffer *pDataUnit);
+
+    HRESULT (STDMETHODCALLTYPE *OnEndWriting)(
+        IWMWriterSink* This);
+
+    END_INTERFACE
+} IWMWriterSinkVtbl;
+interface IWMWriterSink {
+    CONST_VTBL IWMWriterSinkVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IWMWriterSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWMWriterSink_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWMWriterSink_Release(This) (This)->lpVtbl->Release(This)
+/*** IWMWriterSink methods ***/
+#define IWMWriterSink_OnHeader(This,pHeader) (This)->lpVtbl->OnHeader(This,pHeader)
+#define IWMWriterSink_IsRealTime(This,pfRealTime) (This)->lpVtbl->IsRealTime(This,pfRealTime)
+#define IWMWriterSink_AllocateDataUnit(This,cbDataUnit,ppDataUnit) (This)->lpVtbl->AllocateDataUnit(This,cbDataUnit,ppDataUnit)
+#define IWMWriterSink_OnDataUnit(This,pDataUnit) (This)->lpVtbl->OnDataUnit(This,pDataUnit)
+#define IWMWriterSink_OnEndWriting(This) (This)->lpVtbl->OnEndWriting(This)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IWMWriterSink_QueryInterface(IWMWriterSink* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IWMWriterSink_AddRef(IWMWriterSink* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IWMWriterSink_Release(IWMWriterSink* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IWMWriterSink methods ***/
+static FORCEINLINE HRESULT IWMWriterSink_OnHeader(IWMWriterSink* This,INSSBuffer *pHeader) {
+    return This->lpVtbl->OnHeader(This,pHeader);
+}
+static FORCEINLINE HRESULT IWMWriterSink_IsRealTime(IWMWriterSink* This,WINBOOL *pfRealTime) {
+    return This->lpVtbl->IsRealTime(This,pfRealTime);
+}
+static FORCEINLINE HRESULT IWMWriterSink_AllocateDataUnit(IWMWriterSink* This,DWORD cbDataUnit,INSSBuffer **ppDataUnit) {
+    return This->lpVtbl->AllocateDataUnit(This,cbDataUnit,ppDataUnit);
+}
+static FORCEINLINE HRESULT IWMWriterSink_OnDataUnit(IWMWriterSink* This,INSSBuffer *pDataUnit) {
+    return This->lpVtbl->OnDataUnit(This,pDataUnit);
+}
+static FORCEINLINE HRESULT IWMWriterSink_OnEndWriting(IWMWriterSink* This) {
+    return This->lpVtbl->OnEndWriting(This);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWMWriterSink_OnHeader_Proxy(
+    IWMWriterSink* This,
+    INSSBuffer *pHeader);
+void __RPC_STUB IWMWriterSink_OnHeader_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterSink_IsRealTime_Proxy(
+    IWMWriterSink* This,
+    WINBOOL *pfRealTime);
+void __RPC_STUB IWMWriterSink_IsRealTime_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterSink_AllocateDataUnit_Proxy(
+    IWMWriterSink* This,
+    DWORD cbDataUnit,
+    INSSBuffer **ppDataUnit);
+void __RPC_STUB IWMWriterSink_AllocateDataUnit_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterSink_OnDataUnit_Proxy(
+    IWMWriterSink* This,
+    INSSBuffer *pDataUnit);
+void __RPC_STUB IWMWriterSink_OnDataUnit_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterSink_OnEndWriting_Proxy(
+    IWMWriterSink* This);
+void __RPC_STUB IWMWriterSink_OnEndWriting_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWMWriterSink_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IWMWriter interface
+ */
+#ifndef __IWMWriter_INTERFACE_DEFINED__
+#define __IWMWriter_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWMWriter, 0x96406bd4, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("96406bd4-2b2b-11d3-b36b-00c04f6108ff")
+IWMWriter : public IUnknown
+{
+    virtual HRESULT STDMETHODCALLTYPE SetProfileByID(
+        REFGUID guidProfile) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetProfile(
+        IWMProfile *pProfile) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetOutputFilename(
+        const WCHAR *pwszFilename) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetInputCount(
+        DWORD *pcInputs) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetInputProps(
+        DWORD dwInputNum,
+        IWMInputMediaProps **ppInput) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetInputProps(
+        DWORD dwInputNum,
+        IWMInputMediaProps *pInput) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetInputFormatCount(
+        DWORD dwInputNumber,
+        DWORD *pcFormats) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetInputFormat(
+        DWORD dwInputNumber,
+        DWORD dwFormatNumber,
+        IWMInputMediaProps **pProps) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE BeginWriting(
+        ) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE EndWriting(
+        ) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE AllocateSample(
+        DWORD dwSampleSize,
+        INSSBuffer **ppSample) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE WriteSample(
+        DWORD dwInputNum,
+        QWORD cnsSampleTime,
+        DWORD dwFlags,
+        INSSBuffer *pSample) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE Flush(
+        ) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IWMWriter, 0x96406bd4, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff)
+#endif
+#else
+typedef struct IWMWriterVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWMWriter* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWMWriter* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWMWriter* This);
+
+    /*** IWMWriter methods ***/
+    HRESULT (STDMETHODCALLTYPE *SetProfileByID)(
+        IWMWriter* This,
+        REFGUID guidProfile);
+
+    HRESULT (STDMETHODCALLTYPE *SetProfile)(
+        IWMWriter* This,
+        IWMProfile *pProfile);
+
+    HRESULT (STDMETHODCALLTYPE *SetOutputFilename)(
+        IWMWriter* This,
+        const WCHAR *pwszFilename);
+
+    HRESULT (STDMETHODCALLTYPE *GetInputCount)(
+        IWMWriter* This,
+        DWORD *pcInputs);
+
+    HRESULT (STDMETHODCALLTYPE *GetInputProps)(
+        IWMWriter* This,
+        DWORD dwInputNum,
+        IWMInputMediaProps **ppInput);
+
+    HRESULT (STDMETHODCALLTYPE *SetInputProps)(
+        IWMWriter* This,
+        DWORD dwInputNum,
+        IWMInputMediaProps *pInput);
+
+    HRESULT (STDMETHODCALLTYPE *GetInputFormatCount)(
+        IWMWriter* This,
+        DWORD dwInputNumber,
+        DWORD *pcFormats);
+
+    HRESULT (STDMETHODCALLTYPE *GetInputFormat)(
+        IWMWriter* This,
+        DWORD dwInputNumber,
+        DWORD dwFormatNumber,
+        IWMInputMediaProps **pProps);
+
+    HRESULT (STDMETHODCALLTYPE *BeginWriting)(
+        IWMWriter* This);
+
+    HRESULT (STDMETHODCALLTYPE *EndWriting)(
+        IWMWriter* This);
+
+    HRESULT (STDMETHODCALLTYPE *AllocateSample)(
+        IWMWriter* This,
+        DWORD dwSampleSize,
+        INSSBuffer **ppSample);
+
+    HRESULT (STDMETHODCALLTYPE *WriteSample)(
+        IWMWriter* This,
+        DWORD dwInputNum,
+        QWORD cnsSampleTime,
+        DWORD dwFlags,
+        INSSBuffer *pSample);
+
+    HRESULT (STDMETHODCALLTYPE *Flush)(
+        IWMWriter* This);
+
+    END_INTERFACE
+} IWMWriterVtbl;
+interface IWMWriter {
+    CONST_VTBL IWMWriterVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IWMWriter_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWMWriter_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWMWriter_Release(This) (This)->lpVtbl->Release(This)
+/*** IWMWriter methods ***/
+#define IWMWriter_SetProfileByID(This,guidProfile) (This)->lpVtbl->SetProfileByID(This,guidProfile)
+#define IWMWriter_SetProfile(This,pProfile) (This)->lpVtbl->SetProfile(This,pProfile)
+#define IWMWriter_SetOutputFilename(This,pwszFilename) (This)->lpVtbl->SetOutputFilename(This,pwszFilename)
+#define IWMWriter_GetInputCount(This,pcInputs) (This)->lpVtbl->GetInputCount(This,pcInputs)
+#define IWMWriter_GetInputProps(This,dwInputNum,ppInput) (This)->lpVtbl->GetInputProps(This,dwInputNum,ppInput)
+#define IWMWriter_SetInputProps(This,dwInputNum,pInput) (This)->lpVtbl->SetInputProps(This,dwInputNum,pInput)
+#define IWMWriter_GetInputFormatCount(This,dwInputNumber,pcFormats) (This)->lpVtbl->GetInputFormatCount(This,dwInputNumber,pcFormats)
+#define IWMWriter_GetInputFormat(This,dwInputNumber,dwFormatNumber,pProps) (This)->lpVtbl->GetInputFormat(This,dwInputNumber,dwFormatNumber,pProps)
+#define IWMWriter_BeginWriting(This) (This)->lpVtbl->BeginWriting(This)
+#define IWMWriter_EndWriting(This) (This)->lpVtbl->EndWriting(This)
+#define IWMWriter_AllocateSample(This,dwSampleSize,ppSample) (This)->lpVtbl->AllocateSample(This,dwSampleSize,ppSample)
+#define IWMWriter_WriteSample(This,dwInputNum,cnsSampleTime,dwFlags,pSample) (This)->lpVtbl->WriteSample(This,dwInputNum,cnsSampleTime,dwFlags,pSample)
+#define IWMWriter_Flush(This) (This)->lpVtbl->Flush(This)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IWMWriter_QueryInterface(IWMWriter* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IWMWriter_AddRef(IWMWriter* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IWMWriter_Release(IWMWriter* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IWMWriter methods ***/
+static FORCEINLINE HRESULT IWMWriter_SetProfileByID(IWMWriter* This,REFGUID guidProfile) {
+    return This->lpVtbl->SetProfileByID(This,guidProfile);
+}
+static FORCEINLINE HRESULT IWMWriter_SetProfile(IWMWriter* This,IWMProfile *pProfile) {
+    return This->lpVtbl->SetProfile(This,pProfile);
+}
+static FORCEINLINE HRESULT IWMWriter_SetOutputFilename(IWMWriter* This,const WCHAR *pwszFilename) {
+    return This->lpVtbl->SetOutputFilename(This,pwszFilename);
+}
+static FORCEINLINE HRESULT IWMWriter_GetInputCount(IWMWriter* This,DWORD *pcInputs) {
+    return This->lpVtbl->GetInputCount(This,pcInputs);
+}
+static FORCEINLINE HRESULT IWMWriter_GetInputProps(IWMWriter* This,DWORD dwInputNum,IWMInputMediaProps **ppInput) {
+    return This->lpVtbl->GetInputProps(This,dwInputNum,ppInput);
+}
+static FORCEINLINE HRESULT IWMWriter_SetInputProps(IWMWriter* This,DWORD dwInputNum,IWMInputMediaProps *pInput) {
+    return This->lpVtbl->SetInputProps(This,dwInputNum,pInput);
+}
+static FORCEINLINE HRESULT IWMWriter_GetInputFormatCount(IWMWriter* This,DWORD dwInputNumber,DWORD *pcFormats) {
+    return This->lpVtbl->GetInputFormatCount(This,dwInputNumber,pcFormats);
+}
+static FORCEINLINE HRESULT IWMWriter_GetInputFormat(IWMWriter* This,DWORD dwInputNumber,DWORD dwFormatNumber,IWMInputMediaProps **pProps) {
+    return This->lpVtbl->GetInputFormat(This,dwInputNumber,dwFormatNumber,pProps);
+}
+static FORCEINLINE HRESULT IWMWriter_BeginWriting(IWMWriter* This) {
+    return This->lpVtbl->BeginWriting(This);
+}
+static FORCEINLINE HRESULT IWMWriter_EndWriting(IWMWriter* This) {
+    return This->lpVtbl->EndWriting(This);
+}
+static FORCEINLINE HRESULT IWMWriter_AllocateSample(IWMWriter* This,DWORD dwSampleSize,INSSBuffer **ppSample) {
+    return This->lpVtbl->AllocateSample(This,dwSampleSize,ppSample);
+}
+static FORCEINLINE HRESULT IWMWriter_WriteSample(IWMWriter* This,DWORD dwInputNum,QWORD cnsSampleTime,DWORD dwFlags,INSSBuffer *pSample) {
+    return This->lpVtbl->WriteSample(This,dwInputNum,cnsSampleTime,dwFlags,pSample);
+}
+static FORCEINLINE HRESULT IWMWriter_Flush(IWMWriter* This) {
+    return This->lpVtbl->Flush(This);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWMWriter_SetProfileByID_Proxy(
+    IWMWriter* This,
+    REFGUID guidProfile);
+void __RPC_STUB IWMWriter_SetProfileByID_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_SetProfile_Proxy(
+    IWMWriter* This,
+    IWMProfile *pProfile);
+void __RPC_STUB IWMWriter_SetProfile_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_SetOutputFilename_Proxy(
+    IWMWriter* This,
+    const WCHAR *pwszFilename);
+void __RPC_STUB IWMWriter_SetOutputFilename_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_GetInputCount_Proxy(
+    IWMWriter* This,
+    DWORD *pcInputs);
+void __RPC_STUB IWMWriter_GetInputCount_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_GetInputProps_Proxy(
+    IWMWriter* This,
+    DWORD dwInputNum,
+    IWMInputMediaProps **ppInput);
+void __RPC_STUB IWMWriter_GetInputProps_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_SetInputProps_Proxy(
+    IWMWriter* This,
+    DWORD dwInputNum,
+    IWMInputMediaProps *pInput);
+void __RPC_STUB IWMWriter_SetInputProps_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_GetInputFormatCount_Proxy(
+    IWMWriter* This,
+    DWORD dwInputNumber,
+    DWORD *pcFormats);
+void __RPC_STUB IWMWriter_GetInputFormatCount_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_GetInputFormat_Proxy(
+    IWMWriter* This,
+    DWORD dwInputNumber,
+    DWORD dwFormatNumber,
+    IWMInputMediaProps **pProps);
+void __RPC_STUB IWMWriter_GetInputFormat_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_BeginWriting_Proxy(
+    IWMWriter* This);
+void __RPC_STUB IWMWriter_BeginWriting_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_EndWriting_Proxy(
+    IWMWriter* This);
+void __RPC_STUB IWMWriter_EndWriting_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_AllocateSample_Proxy(
+    IWMWriter* This,
+    DWORD dwSampleSize,
+    INSSBuffer **ppSample);
+void __RPC_STUB IWMWriter_AllocateSample_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_WriteSample_Proxy(
+    IWMWriter* This,
+    DWORD dwInputNum,
+    QWORD cnsSampleTime,
+    DWORD dwFlags,
+    INSSBuffer *pSample);
+void __RPC_STUB IWMWriter_WriteSample_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriter_Flush_Proxy(
+    IWMWriter* This);
+void __RPC_STUB IWMWriter_Flush_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWMWriter_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IWMWriterAdvanced interface
+ */
+#ifndef __IWMWriterAdvanced_INTERFACE_DEFINED__
+#define __IWMWriterAdvanced_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWMWriterAdvanced, 0x96406be3, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("96406be3-2b2b-11d3-b36b-00c04f6108ff")
+IWMWriterAdvanced : public IUnknown
+{
+    virtual HRESULT STDMETHODCALLTYPE GetSinkCount(
+        DWORD *pcSinks) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetSink(
+        DWORD dwSinkNum,
+        IWMWriterSink **ppSink) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE AddSink(
+        IWMWriterSink *pSink) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE RemoveSink(
+        IWMWriterSink *pSink) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE WriteStreamSample(
+        WORD wStreamNum,
+        QWORD cnsSampleTime,
+        DWORD msSampleSendTime,
+        QWORD cnsSampleDuration,
+        DWORD dwFlags,
+        INSSBuffer *pSample) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetLiveSource(
+        WINBOOL fIsLiveSource) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE IsRealTime(
+        WINBOOL *pfRealTime) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetWriterTime(
+        QWORD *pCurrentTime) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetStatistics(
+        WORD wStreamNum,
+        WM_WRITER_STATISTICS *pStats) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetSyncTolerance(
+        DWORD msWindow) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE GetSyncTolerance(
+        DWORD *pmsWindow) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IWMWriterAdvanced, 0x96406be3, 0x2b2b, 0x11d3, 0xb3,0x6b, 0x00,0xc0,0x4f,0x61,0x08,0xff)
+#endif
+#else
+typedef struct IWMWriterAdvancedVtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWMWriterAdvanced* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWMWriterAdvanced* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWMWriterAdvanced* This);
+
+    /*** IWMWriterAdvanced methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetSinkCount)(
+        IWMWriterAdvanced* This,
+        DWORD *pcSinks);
+
+    HRESULT (STDMETHODCALLTYPE *GetSink)(
+        IWMWriterAdvanced* This,
+        DWORD dwSinkNum,
+        IWMWriterSink **ppSink);
+
+    HRESULT (STDMETHODCALLTYPE *AddSink)(
+        IWMWriterAdvanced* This,
+        IWMWriterSink *pSink);
+
+    HRESULT (STDMETHODCALLTYPE *RemoveSink)(
+        IWMWriterAdvanced* This,
+        IWMWriterSink *pSink);
+
+    HRESULT (STDMETHODCALLTYPE *WriteStreamSample)(
+        IWMWriterAdvanced* This,
+        WORD wStreamNum,
+        QWORD cnsSampleTime,
+        DWORD msSampleSendTime,
+        QWORD cnsSampleDuration,
+        DWORD dwFlags,
+        INSSBuffer *pSample);
+
+    HRESULT (STDMETHODCALLTYPE *SetLiveSource)(
+        IWMWriterAdvanced* This,
+        WINBOOL fIsLiveSource);
+
+    HRESULT (STDMETHODCALLTYPE *IsRealTime)(
+        IWMWriterAdvanced* This,
+        WINBOOL *pfRealTime);
+
+    HRESULT (STDMETHODCALLTYPE *GetWriterTime)(
+        IWMWriterAdvanced* This,
+        QWORD *pCurrentTime);
+
+    HRESULT (STDMETHODCALLTYPE *GetStatistics)(
+        IWMWriterAdvanced* This,
+        WORD wStreamNum,
+        WM_WRITER_STATISTICS *pStats);
+
+    HRESULT (STDMETHODCALLTYPE *SetSyncTolerance)(
+        IWMWriterAdvanced* This,
+        DWORD msWindow);
+
+    HRESULT (STDMETHODCALLTYPE *GetSyncTolerance)(
+        IWMWriterAdvanced* This,
+        DWORD *pmsWindow);
+
+    END_INTERFACE
+} IWMWriterAdvancedVtbl;
+interface IWMWriterAdvanced {
+    CONST_VTBL IWMWriterAdvancedVtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IWMWriterAdvanced_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWMWriterAdvanced_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWMWriterAdvanced_Release(This) (This)->lpVtbl->Release(This)
+/*** IWMWriterAdvanced methods ***/
+#define IWMWriterAdvanced_GetSinkCount(This,pcSinks) (This)->lpVtbl->GetSinkCount(This,pcSinks)
+#define IWMWriterAdvanced_GetSink(This,dwSinkNum,ppSink) (This)->lpVtbl->GetSink(This,dwSinkNum,ppSink)
+#define IWMWriterAdvanced_AddSink(This,pSink) (This)->lpVtbl->AddSink(This,pSink)
+#define IWMWriterAdvanced_RemoveSink(This,pSink) (This)->lpVtbl->RemoveSink(This,pSink)
+#define IWMWriterAdvanced_WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample) (This)->lpVtbl->WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample)
+#define IWMWriterAdvanced_SetLiveSource(This,fIsLiveSource) (This)->lpVtbl->SetLiveSource(This,fIsLiveSource)
+#define IWMWriterAdvanced_IsRealTime(This,pfRealTime) (This)->lpVtbl->IsRealTime(This,pfRealTime)
+#define IWMWriterAdvanced_GetWriterTime(This,pCurrentTime) (This)->lpVtbl->GetWriterTime(This,pCurrentTime)
+#define IWMWriterAdvanced_GetStatistics(This,wStreamNum,pStats) (This)->lpVtbl->GetStatistics(This,wStreamNum,pStats)
+#define IWMWriterAdvanced_SetSyncTolerance(This,msWindow) (This)->lpVtbl->SetSyncTolerance(This,msWindow)
+#define IWMWriterAdvanced_GetSyncTolerance(This,pmsWindow) (This)->lpVtbl->GetSyncTolerance(This,pmsWindow)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced_QueryInterface(IWMWriterAdvanced* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IWMWriterAdvanced_AddRef(IWMWriterAdvanced* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IWMWriterAdvanced_Release(IWMWriterAdvanced* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IWMWriterAdvanced methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced_GetSinkCount(IWMWriterAdvanced* This,DWORD *pcSinks) {
+    return This->lpVtbl->GetSinkCount(This,pcSinks);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_GetSink(IWMWriterAdvanced* This,DWORD dwSinkNum,IWMWriterSink **ppSink) {
+    return This->lpVtbl->GetSink(This,dwSinkNum,ppSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_AddSink(IWMWriterAdvanced* This,IWMWriterSink *pSink) {
+    return This->lpVtbl->AddSink(This,pSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_RemoveSink(IWMWriterAdvanced* This,IWMWriterSink *pSink) {
+    return This->lpVtbl->RemoveSink(This,pSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_WriteStreamSample(IWMWriterAdvanced* This,WORD wStreamNum,QWORD cnsSampleTime,DWORD msSampleSendTime,QWORD cnsSampleDuration,DWORD dwFlags,INSSBuffer *pSample) {
+    return This->lpVtbl->WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_SetLiveSource(IWMWriterAdvanced* This,WINBOOL fIsLiveSource) {
+    return This->lpVtbl->SetLiveSource(This,fIsLiveSource);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_IsRealTime(IWMWriterAdvanced* This,WINBOOL *pfRealTime) {
+    return This->lpVtbl->IsRealTime(This,pfRealTime);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_GetWriterTime(IWMWriterAdvanced* This,QWORD *pCurrentTime) {
+    return This->lpVtbl->GetWriterTime(This,pCurrentTime);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_GetStatistics(IWMWriterAdvanced* This,WORD wStreamNum,WM_WRITER_STATISTICS *pStats) {
+    return This->lpVtbl->GetStatistics(This,wStreamNum,pStats);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_SetSyncTolerance(IWMWriterAdvanced* This,DWORD msWindow) {
+    return This->lpVtbl->SetSyncTolerance(This,msWindow);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced_GetSyncTolerance(IWMWriterAdvanced* This,DWORD *pmsWindow) {
+    return This->lpVtbl->GetSyncTolerance(This,pmsWindow);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_GetSinkCount_Proxy(
+    IWMWriterAdvanced* This,
+    DWORD *pcSinks);
+void __RPC_STUB IWMWriterAdvanced_GetSinkCount_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_GetSink_Proxy(
+    IWMWriterAdvanced* This,
+    DWORD dwSinkNum,
+    IWMWriterSink **ppSink);
+void __RPC_STUB IWMWriterAdvanced_GetSink_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_AddSink_Proxy(
+    IWMWriterAdvanced* This,
+    IWMWriterSink *pSink);
+void __RPC_STUB IWMWriterAdvanced_AddSink_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_RemoveSink_Proxy(
+    IWMWriterAdvanced* This,
+    IWMWriterSink *pSink);
+void __RPC_STUB IWMWriterAdvanced_RemoveSink_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_WriteStreamSample_Proxy(
+    IWMWriterAdvanced* This,
+    WORD wStreamNum,
+    QWORD cnsSampleTime,
+    DWORD msSampleSendTime,
+    QWORD cnsSampleDuration,
+    DWORD dwFlags,
+    INSSBuffer *pSample);
+void __RPC_STUB IWMWriterAdvanced_WriteStreamSample_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_SetLiveSource_Proxy(
+    IWMWriterAdvanced* This,
+    WINBOOL fIsLiveSource);
+void __RPC_STUB IWMWriterAdvanced_SetLiveSource_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_IsRealTime_Proxy(
+    IWMWriterAdvanced* This,
+    WINBOOL *pfRealTime);
+void __RPC_STUB IWMWriterAdvanced_IsRealTime_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_GetWriterTime_Proxy(
+    IWMWriterAdvanced* This,
+    QWORD *pCurrentTime);
+void __RPC_STUB IWMWriterAdvanced_GetWriterTime_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_GetStatistics_Proxy(
+    IWMWriterAdvanced* This,
+    WORD wStreamNum,
+    WM_WRITER_STATISTICS *pStats);
+void __RPC_STUB IWMWriterAdvanced_GetStatistics_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_SetSyncTolerance_Proxy(
+    IWMWriterAdvanced* This,
+    DWORD msWindow);
+void __RPC_STUB IWMWriterAdvanced_SetSyncTolerance_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced_GetSyncTolerance_Proxy(
+    IWMWriterAdvanced* This,
+    DWORD *pmsWindow);
+void __RPC_STUB IWMWriterAdvanced_GetSyncTolerance_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWMWriterAdvanced_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IWMWriterAdvanced2 interface
+ */
+#ifndef __IWMWriterAdvanced2_INTERFACE_DEFINED__
+#define __IWMWriterAdvanced2_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWMWriterAdvanced2, 0x962dc1ec, 0xc046, 0x4db8, 0x9c,0xc7, 0x26,0xce,0xae,0x50,0x08,0x17);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("962dc1ec-c046-4db8-9cc7-26ceae500817")
+IWMWriterAdvanced2 : public IWMWriterAdvanced
+{
+    virtual HRESULT STDMETHODCALLTYPE GetInputSetting(
+        DWORD dwInputNum,
+        LPCWSTR pszName,
+        WMT_ATTR_DATATYPE *pType,
+        BYTE *pValue,
+        WORD *pcbLength) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetInputSetting(
+        DWORD dwInputNum,
+        LPCWSTR pszName,
+        WMT_ATTR_DATATYPE Type,
+        const BYTE *pValue,
+        WORD cbLength) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IWMWriterAdvanced2, 0x962dc1ec, 0xc046, 0x4db8, 0x9c,0xc7, 0x26,0xce,0xae,0x50,0x08,0x17)
+#endif
+#else
+typedef struct IWMWriterAdvanced2Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWMWriterAdvanced2* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWMWriterAdvanced2* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWMWriterAdvanced2* This);
+
+    /*** IWMWriterAdvanced methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetSinkCount)(
+        IWMWriterAdvanced2* This,
+        DWORD *pcSinks);
+
+    HRESULT (STDMETHODCALLTYPE *GetSink)(
+        IWMWriterAdvanced2* This,
+        DWORD dwSinkNum,
+        IWMWriterSink **ppSink);
+
+    HRESULT (STDMETHODCALLTYPE *AddSink)(
+        IWMWriterAdvanced2* This,
+        IWMWriterSink *pSink);
+
+    HRESULT (STDMETHODCALLTYPE *RemoveSink)(
+        IWMWriterAdvanced2* This,
+        IWMWriterSink *pSink);
+
+    HRESULT (STDMETHODCALLTYPE *WriteStreamSample)(
+        IWMWriterAdvanced2* This,
+        WORD wStreamNum,
+        QWORD cnsSampleTime,
+        DWORD msSampleSendTime,
+        QWORD cnsSampleDuration,
+        DWORD dwFlags,
+        INSSBuffer *pSample);
+
+    HRESULT (STDMETHODCALLTYPE *SetLiveSource)(
+        IWMWriterAdvanced2* This,
+        WINBOOL fIsLiveSource);
+
+    HRESULT (STDMETHODCALLTYPE *IsRealTime)(
+        IWMWriterAdvanced2* This,
+        WINBOOL *pfRealTime);
+
+    HRESULT (STDMETHODCALLTYPE *GetWriterTime)(
+        IWMWriterAdvanced2* This,
+        QWORD *pCurrentTime);
+
+    HRESULT (STDMETHODCALLTYPE *GetStatistics)(
+        IWMWriterAdvanced2* This,
+        WORD wStreamNum,
+        WM_WRITER_STATISTICS *pStats);
+
+    HRESULT (STDMETHODCALLTYPE *SetSyncTolerance)(
+        IWMWriterAdvanced2* This,
+        DWORD msWindow);
+
+    HRESULT (STDMETHODCALLTYPE *GetSyncTolerance)(
+        IWMWriterAdvanced2* This,
+        DWORD *pmsWindow);
+
+    /*** IWMWriterAdvanced2 methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetInputSetting)(
+        IWMWriterAdvanced2* This,
+        DWORD dwInputNum,
+        LPCWSTR pszName,
+        WMT_ATTR_DATATYPE *pType,
+        BYTE *pValue,
+        WORD *pcbLength);
+
+    HRESULT (STDMETHODCALLTYPE *SetInputSetting)(
+        IWMWriterAdvanced2* This,
+        DWORD dwInputNum,
+        LPCWSTR pszName,
+        WMT_ATTR_DATATYPE Type,
+        const BYTE *pValue,
+        WORD cbLength);
+
+    END_INTERFACE
+} IWMWriterAdvanced2Vtbl;
+interface IWMWriterAdvanced2 {
+    CONST_VTBL IWMWriterAdvanced2Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IWMWriterAdvanced2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWMWriterAdvanced2_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWMWriterAdvanced2_Release(This) (This)->lpVtbl->Release(This)
+/*** IWMWriterAdvanced methods ***/
+#define IWMWriterAdvanced2_GetSinkCount(This,pcSinks) (This)->lpVtbl->GetSinkCount(This,pcSinks)
+#define IWMWriterAdvanced2_GetSink(This,dwSinkNum,ppSink) (This)->lpVtbl->GetSink(This,dwSinkNum,ppSink)
+#define IWMWriterAdvanced2_AddSink(This,pSink) (This)->lpVtbl->AddSink(This,pSink)
+#define IWMWriterAdvanced2_RemoveSink(This,pSink) (This)->lpVtbl->RemoveSink(This,pSink)
+#define IWMWriterAdvanced2_WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample) (This)->lpVtbl->WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample)
+#define IWMWriterAdvanced2_SetLiveSource(This,fIsLiveSource) (This)->lpVtbl->SetLiveSource(This,fIsLiveSource)
+#define IWMWriterAdvanced2_IsRealTime(This,pfRealTime) (This)->lpVtbl->IsRealTime(This,pfRealTime)
+#define IWMWriterAdvanced2_GetWriterTime(This,pCurrentTime) (This)->lpVtbl->GetWriterTime(This,pCurrentTime)
+#define IWMWriterAdvanced2_GetStatistics(This,wStreamNum,pStats) (This)->lpVtbl->GetStatistics(This,wStreamNum,pStats)
+#define IWMWriterAdvanced2_SetSyncTolerance(This,msWindow) (This)->lpVtbl->SetSyncTolerance(This,msWindow)
+#define IWMWriterAdvanced2_GetSyncTolerance(This,pmsWindow) (This)->lpVtbl->GetSyncTolerance(This,pmsWindow)
+/*** IWMWriterAdvanced2 methods ***/
+#define IWMWriterAdvanced2_GetInputSetting(This,dwInputNum,pszName,pType,pValue,pcbLength) (This)->lpVtbl->GetInputSetting(This,dwInputNum,pszName,pType,pValue,pcbLength)
+#define IWMWriterAdvanced2_SetInputSetting(This,dwInputNum,pszName,Type,pValue,cbLength) (This)->lpVtbl->SetInputSetting(This,dwInputNum,pszName,Type,pValue,cbLength)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced2_QueryInterface(IWMWriterAdvanced2* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IWMWriterAdvanced2_AddRef(IWMWriterAdvanced2* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IWMWriterAdvanced2_Release(IWMWriterAdvanced2* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IWMWriterAdvanced methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced2_GetSinkCount(IWMWriterAdvanced2* This,DWORD *pcSinks) {
+    return This->lpVtbl->GetSinkCount(This,pcSinks);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_GetSink(IWMWriterAdvanced2* This,DWORD dwSinkNum,IWMWriterSink **ppSink) {
+    return This->lpVtbl->GetSink(This,dwSinkNum,ppSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_AddSink(IWMWriterAdvanced2* This,IWMWriterSink *pSink) {
+    return This->lpVtbl->AddSink(This,pSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_RemoveSink(IWMWriterAdvanced2* This,IWMWriterSink *pSink) {
+    return This->lpVtbl->RemoveSink(This,pSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_WriteStreamSample(IWMWriterAdvanced2* This,WORD wStreamNum,QWORD cnsSampleTime,DWORD msSampleSendTime,QWORD cnsSampleDuration,DWORD dwFlags,INSSBuffer *pSample) {
+    return This->lpVtbl->WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_SetLiveSource(IWMWriterAdvanced2* This,WINBOOL fIsLiveSource) {
+    return This->lpVtbl->SetLiveSource(This,fIsLiveSource);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_IsRealTime(IWMWriterAdvanced2* This,WINBOOL *pfRealTime) {
+    return This->lpVtbl->IsRealTime(This,pfRealTime);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_GetWriterTime(IWMWriterAdvanced2* This,QWORD *pCurrentTime) {
+    return This->lpVtbl->GetWriterTime(This,pCurrentTime);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_GetStatistics(IWMWriterAdvanced2* This,WORD wStreamNum,WM_WRITER_STATISTICS *pStats) {
+    return This->lpVtbl->GetStatistics(This,wStreamNum,pStats);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_SetSyncTolerance(IWMWriterAdvanced2* This,DWORD msWindow) {
+    return This->lpVtbl->SetSyncTolerance(This,msWindow);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_GetSyncTolerance(IWMWriterAdvanced2* This,DWORD *pmsWindow) {
+    return This->lpVtbl->GetSyncTolerance(This,pmsWindow);
+}
+/*** IWMWriterAdvanced2 methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced2_GetInputSetting(IWMWriterAdvanced2* This,DWORD dwInputNum,LPCWSTR pszName,WMT_ATTR_DATATYPE *pType,BYTE *pValue,WORD *pcbLength) {
+    return This->lpVtbl->GetInputSetting(This,dwInputNum,pszName,pType,pValue,pcbLength);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced2_SetInputSetting(IWMWriterAdvanced2* This,DWORD dwInputNum,LPCWSTR pszName,WMT_ATTR_DATATYPE Type,const BYTE *pValue,WORD cbLength) {
+    return This->lpVtbl->SetInputSetting(This,dwInputNum,pszName,Type,pValue,cbLength);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced2_GetInputSetting_Proxy(
+    IWMWriterAdvanced2* This,
+    DWORD dwInputNum,
+    LPCWSTR pszName,
+    WMT_ATTR_DATATYPE *pType,
+    BYTE *pValue,
+    WORD *pcbLength);
+void __RPC_STUB IWMWriterAdvanced2_GetInputSetting_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced2_SetInputSetting_Proxy(
+    IWMWriterAdvanced2* This,
+    DWORD dwInputNum,
+    LPCWSTR pszName,
+    WMT_ATTR_DATATYPE Type,
+    const BYTE *pValue,
+    WORD cbLength);
+void __RPC_STUB IWMWriterAdvanced2_SetInputSetting_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWMWriterAdvanced2_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * IWMWriterAdvanced3 interface
+ */
+#ifndef __IWMWriterAdvanced3_INTERFACE_DEFINED__
+#define __IWMWriterAdvanced3_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IWMWriterAdvanced3, 0x2cd6492d, 0x7c37, 0x4e76, 0x9d,0x3b, 0x59,0x26,0x11,0x83,0xa2,0x2e);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+MIDL_INTERFACE("2cd6492d-7c37-4e76-9d3b-59261183a22e")
+IWMWriterAdvanced3 : public IWMWriterAdvanced2
+{
+    virtual HRESULT STDMETHODCALLTYPE GetStatisticsEx(
+        WORD wStreamNum,
+        WM_WRITER_STATISTICS_EX *pStats) = 0;
+
+    virtual HRESULT STDMETHODCALLTYPE SetNonBlocking(
+        ) = 0;
+
+};
+#ifdef __CRT_UUID_DECL
+__CRT_UUID_DECL(IWMWriterAdvanced3, 0x2cd6492d, 0x7c37, 0x4e76, 0x9d,0x3b, 0x59,0x26,0x11,0x83,0xa2,0x2e)
+#endif
+#else
+typedef struct IWMWriterAdvanced3Vtbl {
+    BEGIN_INTERFACE
+
+    /*** IUnknown methods ***/
+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+        IWMWriterAdvanced3* This,
+        REFIID riid,
+        void **ppvObject);
+
+    ULONG (STDMETHODCALLTYPE *AddRef)(
+        IWMWriterAdvanced3* This);
+
+    ULONG (STDMETHODCALLTYPE *Release)(
+        IWMWriterAdvanced3* This);
+
+    /*** IWMWriterAdvanced methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetSinkCount)(
+        IWMWriterAdvanced3* This,
+        DWORD *pcSinks);
+
+    HRESULT (STDMETHODCALLTYPE *GetSink)(
+        IWMWriterAdvanced3* This,
+        DWORD dwSinkNum,
+        IWMWriterSink **ppSink);
+
+    HRESULT (STDMETHODCALLTYPE *AddSink)(
+        IWMWriterAdvanced3* This,
+        IWMWriterSink *pSink);
+
+    HRESULT (STDMETHODCALLTYPE *RemoveSink)(
+        IWMWriterAdvanced3* This,
+        IWMWriterSink *pSink);
+
+    HRESULT (STDMETHODCALLTYPE *WriteStreamSample)(
+        IWMWriterAdvanced3* This,
+        WORD wStreamNum,
+        QWORD cnsSampleTime,
+        DWORD msSampleSendTime,
+        QWORD cnsSampleDuration,
+        DWORD dwFlags,
+        INSSBuffer *pSample);
+
+    HRESULT (STDMETHODCALLTYPE *SetLiveSource)(
+        IWMWriterAdvanced3* This,
+        WINBOOL fIsLiveSource);
+
+    HRESULT (STDMETHODCALLTYPE *IsRealTime)(
+        IWMWriterAdvanced3* This,
+        WINBOOL *pfRealTime);
+
+    HRESULT (STDMETHODCALLTYPE *GetWriterTime)(
+        IWMWriterAdvanced3* This,
+        QWORD *pCurrentTime);
+
+    HRESULT (STDMETHODCALLTYPE *GetStatistics)(
+        IWMWriterAdvanced3* This,
+        WORD wStreamNum,
+        WM_WRITER_STATISTICS *pStats);
+
+    HRESULT (STDMETHODCALLTYPE *SetSyncTolerance)(
+        IWMWriterAdvanced3* This,
+        DWORD msWindow);
+
+    HRESULT (STDMETHODCALLTYPE *GetSyncTolerance)(
+        IWMWriterAdvanced3* This,
+        DWORD *pmsWindow);
+
+    /*** IWMWriterAdvanced2 methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetInputSetting)(
+        IWMWriterAdvanced3* This,
+        DWORD dwInputNum,
+        LPCWSTR pszName,
+        WMT_ATTR_DATATYPE *pType,
+        BYTE *pValue,
+        WORD *pcbLength);
+
+    HRESULT (STDMETHODCALLTYPE *SetInputSetting)(
+        IWMWriterAdvanced3* This,
+        DWORD dwInputNum,
+        LPCWSTR pszName,
+        WMT_ATTR_DATATYPE Type,
+        const BYTE *pValue,
+        WORD cbLength);
+
+    /*** IWMWriterAdvanced3 methods ***/
+    HRESULT (STDMETHODCALLTYPE *GetStatisticsEx)(
+        IWMWriterAdvanced3* This,
+        WORD wStreamNum,
+        WM_WRITER_STATISTICS_EX *pStats);
+
+    HRESULT (STDMETHODCALLTYPE *SetNonBlocking)(
+        IWMWriterAdvanced3* This);
+
+    END_INTERFACE
+} IWMWriterAdvanced3Vtbl;
+interface IWMWriterAdvanced3 {
+    CONST_VTBL IWMWriterAdvanced3Vtbl* lpVtbl;
+};
+
+#ifdef COBJMACROS
+#ifndef WIDL_C_INLINE_WRAPPERS
+/*** IUnknown methods ***/
+#define IWMWriterAdvanced3_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define IWMWriterAdvanced3_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define IWMWriterAdvanced3_Release(This) (This)->lpVtbl->Release(This)
+/*** IWMWriterAdvanced methods ***/
+#define IWMWriterAdvanced3_GetSinkCount(This,pcSinks) (This)->lpVtbl->GetSinkCount(This,pcSinks)
+#define IWMWriterAdvanced3_GetSink(This,dwSinkNum,ppSink) (This)->lpVtbl->GetSink(This,dwSinkNum,ppSink)
+#define IWMWriterAdvanced3_AddSink(This,pSink) (This)->lpVtbl->AddSink(This,pSink)
+#define IWMWriterAdvanced3_RemoveSink(This,pSink) (This)->lpVtbl->RemoveSink(This,pSink)
+#define IWMWriterAdvanced3_WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample) (This)->lpVtbl->WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample)
+#define IWMWriterAdvanced3_SetLiveSource(This,fIsLiveSource) (This)->lpVtbl->SetLiveSource(This,fIsLiveSource)
+#define IWMWriterAdvanced3_IsRealTime(This,pfRealTime) (This)->lpVtbl->IsRealTime(This,pfRealTime)
+#define IWMWriterAdvanced3_GetWriterTime(This,pCurrentTime) (This)->lpVtbl->GetWriterTime(This,pCurrentTime)
+#define IWMWriterAdvanced3_GetStatistics(This,wStreamNum,pStats) (This)->lpVtbl->GetStatistics(This,wStreamNum,pStats)
+#define IWMWriterAdvanced3_SetSyncTolerance(This,msWindow) (This)->lpVtbl->SetSyncTolerance(This,msWindow)
+#define IWMWriterAdvanced3_GetSyncTolerance(This,pmsWindow) (This)->lpVtbl->GetSyncTolerance(This,pmsWindow)
+/*** IWMWriterAdvanced2 methods ***/
+#define IWMWriterAdvanced3_GetInputSetting(This,dwInputNum,pszName,pType,pValue,pcbLength) (This)->lpVtbl->GetInputSetting(This,dwInputNum,pszName,pType,pValue,pcbLength)
+#define IWMWriterAdvanced3_SetInputSetting(This,dwInputNum,pszName,Type,pValue,cbLength) (This)->lpVtbl->SetInputSetting(This,dwInputNum,pszName,Type,pValue,cbLength)
+/*** IWMWriterAdvanced3 methods ***/
+#define IWMWriterAdvanced3_GetStatisticsEx(This,wStreamNum,pStats) (This)->lpVtbl->GetStatisticsEx(This,wStreamNum,pStats)
+#define IWMWriterAdvanced3_SetNonBlocking(This) (This)->lpVtbl->SetNonBlocking(This)
+#else
+/*** IUnknown methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced3_QueryInterface(IWMWriterAdvanced3* This,REFIID riid,void **ppvObject) {
+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
+}
+static FORCEINLINE ULONG IWMWriterAdvanced3_AddRef(IWMWriterAdvanced3* This) {
+    return This->lpVtbl->AddRef(This);
+}
+static FORCEINLINE ULONG IWMWriterAdvanced3_Release(IWMWriterAdvanced3* This) {
+    return This->lpVtbl->Release(This);
+}
+/*** IWMWriterAdvanced methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetSinkCount(IWMWriterAdvanced3* This,DWORD *pcSinks) {
+    return This->lpVtbl->GetSinkCount(This,pcSinks);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetSink(IWMWriterAdvanced3* This,DWORD dwSinkNum,IWMWriterSink **ppSink) {
+    return This->lpVtbl->GetSink(This,dwSinkNum,ppSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_AddSink(IWMWriterAdvanced3* This,IWMWriterSink *pSink) {
+    return This->lpVtbl->AddSink(This,pSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_RemoveSink(IWMWriterAdvanced3* This,IWMWriterSink *pSink) {
+    return This->lpVtbl->RemoveSink(This,pSink);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_WriteStreamSample(IWMWriterAdvanced3* This,WORD wStreamNum,QWORD cnsSampleTime,DWORD msSampleSendTime,QWORD cnsSampleDuration,DWORD dwFlags,INSSBuffer *pSample) {
+    return This->lpVtbl->WriteStreamSample(This,wStreamNum,cnsSampleTime,msSampleSendTime,cnsSampleDuration,dwFlags,pSample);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_SetLiveSource(IWMWriterAdvanced3* This,WINBOOL fIsLiveSource) {
+    return This->lpVtbl->SetLiveSource(This,fIsLiveSource);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_IsRealTime(IWMWriterAdvanced3* This,WINBOOL *pfRealTime) {
+    return This->lpVtbl->IsRealTime(This,pfRealTime);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetWriterTime(IWMWriterAdvanced3* This,QWORD *pCurrentTime) {
+    return This->lpVtbl->GetWriterTime(This,pCurrentTime);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetStatistics(IWMWriterAdvanced3* This,WORD wStreamNum,WM_WRITER_STATISTICS *pStats) {
+    return This->lpVtbl->GetStatistics(This,wStreamNum,pStats);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_SetSyncTolerance(IWMWriterAdvanced3* This,DWORD msWindow) {
+    return This->lpVtbl->SetSyncTolerance(This,msWindow);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetSyncTolerance(IWMWriterAdvanced3* This,DWORD *pmsWindow) {
+    return This->lpVtbl->GetSyncTolerance(This,pmsWindow);
+}
+/*** IWMWriterAdvanced2 methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetInputSetting(IWMWriterAdvanced3* This,DWORD dwInputNum,LPCWSTR pszName,WMT_ATTR_DATATYPE *pType,BYTE *pValue,WORD *pcbLength) {
+    return This->lpVtbl->GetInputSetting(This,dwInputNum,pszName,pType,pValue,pcbLength);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_SetInputSetting(IWMWriterAdvanced3* This,DWORD dwInputNum,LPCWSTR pszName,WMT_ATTR_DATATYPE Type,const BYTE *pValue,WORD cbLength) {
+    return This->lpVtbl->SetInputSetting(This,dwInputNum,pszName,Type,pValue,cbLength);
+}
+/*** IWMWriterAdvanced3 methods ***/
+static FORCEINLINE HRESULT IWMWriterAdvanced3_GetStatisticsEx(IWMWriterAdvanced3* This,WORD wStreamNum,WM_WRITER_STATISTICS_EX *pStats) {
+    return This->lpVtbl->GetStatisticsEx(This,wStreamNum,pStats);
+}
+static FORCEINLINE HRESULT IWMWriterAdvanced3_SetNonBlocking(IWMWriterAdvanced3* This) {
+    return This->lpVtbl->SetNonBlocking(This);
+}
+#endif
+#endif
+
+#endif
+
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced3_GetStatisticsEx_Proxy(
+    IWMWriterAdvanced3* This,
+    WORD wStreamNum,
+    WM_WRITER_STATISTICS_EX *pStats);
+void __RPC_STUB IWMWriterAdvanced3_GetStatisticsEx_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+HRESULT STDMETHODCALLTYPE IWMWriterAdvanced3_SetNonBlocking_Proxy(
+    IWMWriterAdvanced3* This);
+void __RPC_STUB IWMWriterAdvanced3_SetNonBlocking_Stub(
+    IRpcStubBuffer* This,
+    IRpcChannelBuffer* pRpcChannelBuffer,
+    PRPC_MESSAGE pRpcMessage,
+    DWORD* pdwStubPhase);
+
+#endif  /* __IWMWriterAdvanced3_INTERFACE_DEFINED__ */
+
+HRESULT WINAPI WMCreateWriter(IUnknown*,IWMWriter**);
 EXTERN_GUID(WMMEDIASUBTYPE_Base,   0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
 EXTERN_GUID(WMMEDIATYPE_Video,     0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
 EXTERN_GUID(WMMEDIASUBTYPE_RGB1,   0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
diff --git a/mingw-w64-headers/include/wmsdkidl.idl b/mingw-w64-headers/include/wmsdkidl.idl
index 984e283..1618f86 100644
--- a/mingw-w64-headers/include/wmsdkidl.idl
+++ b/mingw-w64-headers/include/wmsdkidl.idl
@@ -35,6 +35,31 @@
     [size_is(cbFormat)] BYTE *pbFormat;
 } WM_MEDIA_TYPE;
 
+typedef struct _WMWriterStatistics
+{
+    QWORD qwSampleCount;
+    QWORD qwByteCount;
+    QWORD qwDroppedSampleCount;
+    QWORD qwDroppedByteCount;
+    DWORD dwCurrentBitrate;
+    DWORD dwAverageBitrate;
+    DWORD dwExpectedBitrate;
+    DWORD dwCurrentSampleRate;
+    DWORD dwAverageSampleRate;
+    DWORD dwExpectedSampleRate;
+} WM_WRITER_STATISTICS;
+
+typedef struct _WMWriterStatisticsEx
+{
+    DWORD dwBitratePlusOverhead;
+    DWORD dwCurrentSampleDropRateInQueue;
+    DWORD dwCurrentSampleDropRateInCodec;
+    DWORD dwCurrentSampleDropRateInMultiplexer;
+    DWORD dwTotalSampleDropsInQueue;
+    DWORD dwTotalSampleDropsInCodec;
+    DWORD dwTotalSampleDropsInMultiplexer;
+} WM_WRITER_STATISTICS_EX;
+
 typedef enum WMT_ATTR_DATATYPE
 {
     WMT_TYPE_DWORD      = 0,
@@ -516,6 +541,190 @@
         [in] IStream *pStream);
 };
 
+[
+    object,
+    uuid(96406bd5-2b2b-11d3-b36b-00c04f6108ff),
+    pointer_default(unique),
+    local
+]
+interface IWMInputMediaProps : IWMMediaProps
+{
+    HRESULT GetConnectionName(
+        [out, size_is(*pcchName)] WCHAR *pwszName,
+        [in, out] WORD *pcchName);
+
+    HRESULT GetGroupName(
+        [out, size_is(*pcchName)] WCHAR *pwszName,
+        [in, out] WORD *pcchName);
+}
+
+[
+    object,
+    uuid(96406be4-2b2b-11d3-b36b-00c04f6108ff),
+    pointer_default(unique),
+    local
+]
+interface IWMWriterSink : IUnknown
+{
+    HRESULT OnHeader(
+        [in] INSSBuffer *pHeader);
+
+    HRESULT IsRealTime(
+        [out] BOOL *pfRealTime);
+
+    HRESULT AllocateDataUnit(
+        [in] DWORD cbDataUnit,
+        [out] INSSBuffer **ppDataUnit);
+
+    HRESULT OnDataUnit(
+        [in] INSSBuffer *pDataUnit);
+
+    HRESULT OnEndWriting();
+}
+
+[
+    object,
+    uuid(96406bd4-2b2b-11d3-b36b-00c04f6108ff),
+    pointer_default(unique),
+    local
+]
+interface IWMWriter : IUnknown
+{
+    HRESULT SetProfileByID(
+        [in] REFGUID guidProfile);
+
+    HRESULT SetProfile(
+        [in] IWMProfile *pProfile);
+
+    HRESULT SetOutputFilename(
+        [in] const WCHAR *pwszFilename);
+
+    HRESULT GetInputCount(
+        [out] DWORD *pcInputs);
+
+    HRESULT GetInputProps(
+        [in] DWORD dwInputNum,
+        [out] IWMInputMediaProps **ppInput);
+
+    HRESULT SetInputProps(
+        [in] DWORD dwInputNum,
+        [in] IWMInputMediaProps *pInput);
+
+    HRESULT GetInputFormatCount(
+        [in] DWORD dwInputNumber,
+        [out] DWORD *pcFormats);
+
+    HRESULT GetInputFormat(
+        [in] DWORD dwInputNumber,
+        [in] DWORD dwFormatNumber,
+        [out] IWMInputMediaProps **pProps);
+
+    HRESULT BeginWriting();
+
+    HRESULT EndWriting();
+
+    HRESULT AllocateSample(
+        [in] DWORD dwSampleSize,
+        [out] INSSBuffer **ppSample);
+
+    HRESULT WriteSample(
+        [in] DWORD dwInputNum,
+        [in] QWORD cnsSampleTime,
+        [in] DWORD dwFlags,
+        [in] INSSBuffer *pSample);
+
+    HRESULT Flush();
+}
+
+[
+    object,
+    uuid(96406be3-2b2b-11d3-b36b-00C04f6108ff),
+    pointer_default(unique),
+    local
+]
+interface IWMWriterAdvanced : IUnknown
+{
+    HRESULT GetSinkCount(
+        [out] DWORD *pcSinks);
+
+    HRESULT GetSink(
+        [in] DWORD dwSinkNum,
+        [out] IWMWriterSink **ppSink);
+
+    HRESULT AddSink(
+        [in] IWMWriterSink *pSink);
+
+    HRESULT RemoveSink(
+        [in] IWMWriterSink *pSink);
+
+    HRESULT WriteStreamSample(
+        [in] WORD wStreamNum,
+        [in] QWORD cnsSampleTime,
+        [in] DWORD msSampleSendTime,
+        [in] QWORD cnsSampleDuration,
+        [in] DWORD dwFlags,
+        [in] INSSBuffer *pSample);
+
+    HRESULT SetLiveSource(
+        BOOL fIsLiveSource);
+
+    HRESULT IsRealTime(
+        [out] BOOL *pfRealTime);
+
+    HRESULT GetWriterTime(
+        [out] QWORD *pCurrentTime);
+
+    HRESULT GetStatistics(
+        [in] WORD wStreamNum,
+        [out] WM_WRITER_STATISTICS *pStats);
+
+    HRESULT SetSyncTolerance(
+        [in] DWORD msWindow);
+
+    HRESULT GetSyncTolerance(
+        [out] DWORD *pmsWindow);
+}
+
+[
+    object,
+    uuid(962dc1ec-c046-4db8-9cc7-26ceae500817),
+    pointer_default(unique),
+    local
+]
+interface IWMWriterAdvanced2 : IWMWriterAdvanced
+{
+    HRESULT GetInputSetting(
+        [in] DWORD dwInputNum,
+        [in] LPCWSTR pszName,
+        [out] WMT_ATTR_DATATYPE *pType,
+        [out, size_is(*pcbLength)] BYTE *pValue,
+        [in, out] WORD *pcbLength);
+
+    HRESULT SetInputSetting(
+        [in] DWORD dwInputNum,
+        [in] LPCWSTR pszName,
+        [in] WMT_ATTR_DATATYPE Type,
+        [in, size_is(cbLength)] const BYTE *pValue,
+        [in] WORD cbLength);
+}
+
+[
+    object,
+    uuid(2cd6492d-7c37-4e76-9d3b-59261183a22e),
+    pointer_default(unique),
+    local
+]
+interface IWMWriterAdvanced3 : IWMWriterAdvanced2
+{
+    HRESULT GetStatisticsEx(
+        [in] WORD wStreamNum,
+        [out] WM_WRITER_STATISTICS_EX *pStats);
+
+    HRESULT SetNonBlocking();
+}
+
+cpp_quote("HRESULT WINAPI WMCreateWriter(IUnknown*,IWMWriter**);")
+
 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_Base,   0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
 cpp_quote("EXTERN_GUID(WMMEDIATYPE_Video,     0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
 cpp_quote("EXTERN_GUID(WMMEDIASUBTYPE_RGB1,   0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")