wasapi: Fixed compilation with MinGW (mingw32): gcc version 6.3.0 (MinGW.org GCC-6.3.0-1), include /mingw-include folder explicitly (when compiling with mingw-w64 the /mingw-include folder must not be included).

This commit is contained in:
dmitrykos 2020-10-26 18:25:10 +02:00
commit b3592b0749
9 changed files with 729 additions and 3 deletions

View file

@ -0,0 +1,58 @@
/**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#include <winapifamily.h>
#ifndef __AUDIOSESSIONTYPES__
#define __AUDIOSESSIONTYPES__
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
#if defined (__WIDL__)
#define MIDL_SIZE_IS(x) [size_is (x)]
#define MIDL_STRING [string]
#define MIDL_ANYSIZE_ARRAY
#else
#define MIDL_SIZE_IS(x)
#define MIDL_STRING
#define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY
#endif
typedef enum _AudioSessionState {
AudioSessionStateInactive = 0,
AudioSessionStateActive = 1,
AudioSessionStateExpired = 2
} AudioSessionState;
typedef enum _AUDCLNT_SHAREMODE {
AUDCLNT_SHAREMODE_SHARED,
AUDCLNT_SHAREMODE_EXCLUSIVE
} AUDCLNT_SHAREMODE;
typedef enum _AUDIO_STREAM_CATEGORY {
AudioCategory_Other = 0,
AudioCategory_ForegroundOnlyMedia,
AudioCategory_BackgroundCapableMedia,
AudioCategory_Communications,
AudioCategory_Alerts,
AudioCategory_SoundEffects,
AudioCategory_GameEffects,
AudioCategory_GameMedia,
AudioCategory_GameChat,
AudioCategory_Speech,
AudioCategory_Movie,
AudioCategory_Media
} AUDIO_STREAM_CATEGORY;
#define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000
#define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000
#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000
#define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000
#define AUDCLNT_STREAMFLAGS_RATEADJUST 0x00100000
#define AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED 0x10000000
#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE 0x20000000
#define AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED 0x40000000
#endif
#endif

View file

@ -0,0 +1,19 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the PortAudio library.
*/
#ifndef _INC_PROPIDL_PA
#define _INC_PROPIDL_PA
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif
typedef const PROPVARIANT *REFPROPVARIANT;
#define PropVariantInit(VAR) memset((VAR), 0, sizeof(PROPVARIANT))
WINOLEAPI PropVariantClear(PROPVARIANT *pvar);
#endif /* _INC_PROPIDL_PA */

View file

@ -0,0 +1,359 @@
/*** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit ***/
#ifdef _WIN32
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include <rpc.h>
#include <rpcndr.h>
#endif
#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif
#ifndef __shtypes_h__
#define __shtypes_h__
/* Forward declarations */
/* Headers for imported files */
#include <unknwn.h>
#include <wtypes.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef DUMMYUNIONNAME
#ifdef NONAMELESSUNION
#define DUMMYUNIONNAME u
#define DUMMYUNIONNAME2 u2
#define DUMMYUNIONNAME3 u3
#define DUMMYUNIONNAME4 u4
#define DUMMYUNIONNAME5 u5
#else
#define DUMMYUNIONNAME
#define DUMMYUNIONNAME2
#define DUMMYUNIONNAME3
#define DUMMYUNIONNAME4
#define DUMMYUNIONNAME5
#endif
#endif
#include <pshpack1.h>
typedef struct _SHITEMID {
USHORT cb;
BYTE abID[1];
} SHITEMID;
#include <poppack.h>
#if (defined(_X86_) && !defined(__x86_64))
#undef __unaligned
#define __unaligned
#endif
typedef SHITEMID *LPSHITEMID;
typedef const SHITEMID *LPCSHITEMID;
#include <pshpack1.h>
typedef struct _ITEMIDLIST {
SHITEMID mkid;
} ITEMIDLIST;
#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
typedef struct _ITEMIDLIST_RELATIVE : ITEMIDLIST { } ITEMIDLIST_RELATIVE;
typedef struct _ITEMID_CHILD : ITEMIDLIST_RELATIVE { } ITEMID_CHILD;
typedef struct _ITEMIDLIST_ABSOLUTE : ITEMIDLIST_RELATIVE { } ITEMIDLIST_ABSOLUTE;
#else
typedef ITEMIDLIST ITEMIDLIST_RELATIVE;
typedef ITEMIDLIST ITEMID_CHILD;
typedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;
#endif
#include <poppack.h>
typedef BYTE_BLOB *wirePIDL;
typedef ITEMIDLIST *LPITEMIDLIST;
typedef const ITEMIDLIST *LPCITEMIDLIST;
#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
typedef ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;
typedef const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;
typedef const ITEMIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE;
typedef ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;
typedef const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;
typedef ITEMIDLIST_RELATIVE *PUIDLIST_RELATIVE;
typedef const ITEMIDLIST_RELATIVE *PCUIDLIST_RELATIVE;
typedef ITEMID_CHILD *PITEMID_CHILD;
typedef const ITEMID_CHILD *PCITEMID_CHILD;
typedef ITEMID_CHILD *PUITEMID_CHILD;
typedef const ITEMID_CHILD *PCUITEMID_CHILD;
typedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;
typedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;
typedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;
typedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;
#else
#define PIDLIST_ABSOLUTE LPITEMIDLIST
#define PCIDLIST_ABSOLUTE LPCITEMIDLIST
#define PCUIDLIST_ABSOLUTE LPCITEMIDLIST
#define PIDLIST_RELATIVE LPITEMIDLIST
#define PCIDLIST_RELATIVE LPCITEMIDLIST
#define PUIDLIST_RELATIVE LPITEMIDLIST
#define PCUIDLIST_RELATIVE LPCITEMIDLIST
#define PITEMID_CHILD LPITEMIDLIST
#define PCITEMID_CHILD LPCITEMIDLIST
#define PUITEMID_CHILD LPITEMIDLIST
#define PCUITEMID_CHILD LPCITEMIDLIST
#define PCUITEMID_CHILD_ARRAY LPCITEMIDLIST *
#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *
#define PCIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *
#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *
#endif
#if 0
typedef struct _WIN32_FIND_DATAA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
CHAR cFileName[260];
CHAR cAlternateFileName[14];
} WIN32_FIND_DATAA;
typedef struct _WIN32_FIND_DATAA *PWIN32_FIND_DATAA;
typedef struct _WIN32_FIND_DATAA *LPWIN32_FIND_DATAA;
typedef struct _WIN32_FIND_DATAW {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
WCHAR cFileName[260];
WCHAR cAlternateFileName[14];
} WIN32_FIND_DATAW;
typedef struct _WIN32_FIND_DATAW *PWIN32_FIND_DATAW;
typedef struct _WIN32_FIND_DATAW *LPWIN32_FIND_DATAW;
#endif
typedef enum tagSTRRET_TYPE {
STRRET_WSTR = 0x0,
STRRET_OFFSET = 0x1,
STRRET_CSTR = 0x2
} STRRET_TYPE;
#include <pshpack8.h>
typedef struct _STRRET {
UINT uType;
__C89_NAMELESS union {
LPWSTR pOleStr;
UINT uOffset;
char cStr[260];
} __C89_NAMELESSUNIONNAME;
} STRRET;
#include <poppack.h>
typedef STRRET *LPSTRRET;
#include <pshpack1.h>
typedef struct _SHELLDETAILS {
int fmt;
int cxChar;
STRRET str;
} SHELLDETAILS;
typedef struct _SHELLDETAILS *LPSHELLDETAILS;
#include <poppack.h>
#if _WIN32_IE >= _WIN32_IE_IE60SP2
typedef enum tagPERCEIVED {
PERCEIVED_TYPE_FIRST = -3,
PERCEIVED_TYPE_CUSTOM = -3,
PERCEIVED_TYPE_UNSPECIFIED = -2,
PERCEIVED_TYPE_FOLDER = -1,
PERCEIVED_TYPE_UNKNOWN = 0,
PERCEIVED_TYPE_TEXT = 1,
PERCEIVED_TYPE_IMAGE = 2,
PERCEIVED_TYPE_AUDIO = 3,
PERCEIVED_TYPE_VIDEO = 4,
PERCEIVED_TYPE_COMPRESSED = 5,
PERCEIVED_TYPE_DOCUMENT = 6,
PERCEIVED_TYPE_SYSTEM = 7,
PERCEIVED_TYPE_APPLICATION = 8,
PERCEIVED_TYPE_GAMEMEDIA = 9,
PERCEIVED_TYPE_CONTACTS = 10,
PERCEIVED_TYPE_LAST = 10
} PERCEIVED;
#define PERCEIVEDFLAG_UNDEFINED 0x0000
#define PERCEIVEDFLAG_SOFTCODED 0x0001
#define PERCEIVEDFLAG_HARDCODED 0x0002
#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004
#define PERCEIVEDFLAG_GDIPLUS 0x0010
#define PERCEIVEDFLAG_WMSDK 0x0020
#define PERCEIVEDFLAG_ZIPFOLDER 0x0040
typedef DWORD PERCEIVEDFLAG;
#endif
typedef struct _COMDLG_FILTERSPEC {
LPCWSTR pszName;
LPCWSTR pszSpec;
} COMDLG_FILTERSPEC;
typedef GUID KNOWNFOLDERID;
#if 0
typedef KNOWNFOLDERID *REFKNOWNFOLDERID;
#endif
#ifdef __cplusplus
#define REFKNOWNFOLDERID const KNOWNFOLDERID &
#else
#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST
#endif
typedef DWORD KF_REDIRECT_FLAGS;
typedef GUID FOLDERTYPEID;
#if 0
typedef FOLDERTYPEID *REFFOLDERTYPEID;
#endif
#ifdef __cplusplus
#define REFFOLDERTYPEID const FOLDERTYPEID &
#else
#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST
#endif
typedef GUID TASKOWNERID;
#if 0
typedef TASKOWNERID *REFTASKOWNERID;
#endif
#ifdef __cplusplus
#define REFTASKOWNERID const TASKOWNERID &
#else
#define REFTASKOWNERID const TASKOWNERID * __MIDL_CONST
#endif
typedef GUID ELEMENTID;
#if 0
typedef ELEMENTID *REFELEMENTID;
#endif
#ifdef __cplusplus
#define REFELEMENTID const ELEMENTID &
#else
#define REFELEMENTID const ELEMENTID * __MIDL_CONST
#endif
#ifndef LF_FACESIZE
typedef struct tagLOGFONTA {
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
CHAR lfFaceName[32];
} LOGFONTA;
typedef struct tagLOGFONTW {
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
WCHAR lfFaceName[32];
} LOGFONTW;
typedef LOGFONTA LOGFONT;
#endif
typedef enum tagSHCOLSTATE {
SHCOLSTATE_DEFAULT = 0x0,
SHCOLSTATE_TYPE_STR = 0x1,
SHCOLSTATE_TYPE_INT = 0x2,
SHCOLSTATE_TYPE_DATE = 0x3,
SHCOLSTATE_TYPEMASK = 0xf,
SHCOLSTATE_ONBYDEFAULT = 0x10,
SHCOLSTATE_SLOW = 0x20,
SHCOLSTATE_EXTENDED = 0x40,
SHCOLSTATE_SECONDARYUI = 0x80,
SHCOLSTATE_HIDDEN = 0x100,
SHCOLSTATE_PREFER_VARCMP = 0x200,
SHCOLSTATE_PREFER_FMTCMP = 0x400,
SHCOLSTATE_NOSORTBYFOLDERNESS = 0x800,
SHCOLSTATE_VIEWONLY = 0x10000,
SHCOLSTATE_BATCHREAD = 0x20000,
SHCOLSTATE_NO_GROUPBY = 0x40000,
SHCOLSTATE_FIXED_WIDTH = 0x1000,
SHCOLSTATE_NODPISCALE = 0x2000,
SHCOLSTATE_FIXED_RATIO = 0x4000,
SHCOLSTATE_DISPLAYMASK = 0xf000
} SHCOLSTATE;
typedef DWORD SHCOLSTATEF;
typedef PROPERTYKEY SHCOLUMNID;
typedef const SHCOLUMNID *LPCSHCOLUMNID;
typedef enum DEVICE_SCALE_FACTOR {
DEVICE_SCALE_FACTOR_INVALID = 0,
SCALE_100_PERCENT = 100,
SCALE_120_PERCENT = 120,
SCALE_125_PERCENT = 125,
SCALE_140_PERCENT = 140,
SCALE_150_PERCENT = 150,
SCALE_160_PERCENT = 160,
SCALE_175_PERCENT = 175,
SCALE_180_PERCENT = 180,
SCALE_200_PERCENT = 200,
SCALE_225_PERCENT = 225,
SCALE_250_PERCENT = 250,
SCALE_300_PERCENT = 300,
SCALE_350_PERCENT = 350,
SCALE_400_PERCENT = 400,
SCALE_450_PERCENT = 450,
SCALE_500_PERCENT = 500
} DEVICE_SCALE_FACTOR;
/* Begin additional prototypes for all interfaces */
/* End additional prototypes */
#ifdef __cplusplus
}
#endif
#endif /* __shtypes_h__ */

View file

@ -19,7 +19,7 @@
/* verify that the <rpcndr.h> version is high enough to compile this file*/ /* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__ #ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500 #define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif #endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/ /* verify that the <rpcsal.h> version is high enough to compile this file*/

View file

@ -0,0 +1,13 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _INC_FUNCTIONDISCOVERYKEYS
#define _INC_FUNCTIONDISCOVERYKEYS
#include <propkeydef.h>
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
#endif /* _INC_FUNCTIONDISCOVERYKEYS */

View file

@ -0,0 +1,13 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the PortAudio library.
*/
#ifndef _INC_PROPKEY_PA
#define _INC_PROPKEY_PA
#ifndef DEFINE_API_PKEY
#define DEFINE_API_PKEY(name, managed_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid)
#endif
#endif /* _INC_PROPKEY_PA */

View file

@ -0,0 +1,220 @@
/**
* sdkddkver.h: Version definitions for SDK and DDK. Originally
* from ReactOS PSDK/DDK, this file is in the public domain:
*
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef _INC_SDKDDKVER
#define _INC_SDKDDKVER
/* _WIN32_WINNT */
#define _WIN32_WINNT_NT4 0x0400
#define _WIN32_WINNT_WIN2K 0x0500
#define _WIN32_WINNT_WINXP 0x0501
#define _WIN32_WINNT_WS03 0x0502
#define _WIN32_WINNT_WIN6 0x0600
#define _WIN32_WINNT_VISTA 0x0600
#define _WIN32_WINNT_WS08 0x0600
#define _WIN32_WINNT_LONGHORN 0x0600
#define _WIN32_WINNT_WIN7 0x0601
#define _WIN32_WINNT_WIN8 0x0602
#define _WIN32_WINNT_WINBLUE 0x0603
#define _WIN32_WINNT_WINTHRESHOLD 0x0A00
#define _WIN32_WINNT_WIN10 0x0A00
/* _WIN32_IE */
#define _WIN32_IE_IE20 0x0200
#define _WIN32_IE_IE30 0x0300
#define _WIN32_IE_IE302 0x0302
#define _WIN32_IE_IE40 0x0400
#define _WIN32_IE_IE401 0x0401
#define _WIN32_IE_IE50 0x0500
#define _WIN32_IE_IE501 0x0501
#define _WIN32_IE_IE55 0x0550
#define _WIN32_IE_IE60 0x0600
#define _WIN32_IE_IE60SP1 0x0601
#define _WIN32_IE_IE60SP2 0x0603
#define _WIN32_IE_IE70 0x0700
#define _WIN32_IE_IE80 0x0800
#define _WIN32_IE_IE90 0x0900
#define _WIN32_IE_IE100 0x0a00
#define _WIN32_IE_IE110 0x0A00
/* Mappings Between IE Version and Windows Version */
#define _WIN32_IE_NT4 _WIN32_IE_IE20
#define _WIN32_IE_NT4SP1 _WIN32_IE_IE20
#define _WIN32_IE_NT4SP2 _WIN32_IE_IE20
#define _WIN32_IE_NT4SP3 _WIN32_IE_IE302
#define _WIN32_IE_NT4SP4 _WIN32_IE_IE401
#define _WIN32_IE_NT4SP5 _WIN32_IE_IE401
#define _WIN32_IE_NT4SP6 _WIN32_IE_IE50
#define _WIN32_IE_WIN98 _WIN32_IE_IE401
#define _WIN32_IE_WIN98SE _WIN32_IE_IE50
#define _WIN32_IE_WINME _WIN32_IE_IE55
#define _WIN32_IE_WIN2K _WIN32_IE_IE501
#define _WIN32_IE_WIN2KSP1 _WIN32_IE_IE501
#define _WIN32_IE_WIN2KSP2 _WIN32_IE_IE501
#define _WIN32_IE_WIN2KSP3 _WIN32_IE_IE501
#define _WIN32_IE_WIN2KSP4 _WIN32_IE_IE501
#define _WIN32_IE_XP _WIN32_IE_IE60
#define _WIN32_IE_XPSP1 _WIN32_IE_IE60SP1
#define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2
#define _WIN32_IE_WS03 0x0602
#define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2
#define _WIN32_IE_WIN6 _WIN32_IE_IE70
#define _WIN32_IE_LONGHORN _WIN32_IE_IE70
#define _WIN32_IE_WIN7 _WIN32_IE_IE80
#define _WIN32_IE_WIN8 _WIN32_IE_IE100
#define _WIN32_IE_WINBLUE _WIN32_IE_IE100
#define _WIN32_IE_WINTHRESHOLD _WIN32_IE_IE110
#define _WIN32_IE_WIN10 _WIN32_IE_IE110
/* NTDDI_VERSION */
#ifndef NTDDI_WIN2K
#define NTDDI_WIN2K 0x05000000
#endif
#ifndef NTDDI_WIN2KSP1
#define NTDDI_WIN2KSP1 0x05000100
#endif
#ifndef NTDDI_WIN2KSP2
#define NTDDI_WIN2KSP2 0x05000200
#endif
#ifndef NTDDI_WIN2KSP3
#define NTDDI_WIN2KSP3 0x05000300
#endif
#ifndef NTDDI_WIN2KSP4
#define NTDDI_WIN2KSP4 0x05000400
#endif
#ifndef NTDDI_WINXP
#define NTDDI_WINXP 0x05010000
#endif
#ifndef NTDDI_WINXPSP1
#define NTDDI_WINXPSP1 0x05010100
#endif
#ifndef NTDDI_WINXPSP2
#define NTDDI_WINXPSP2 0x05010200
#endif
#ifndef NTDDI_WINXPSP3
#define NTDDI_WINXPSP3 0x05010300
#endif
#ifndef NTDDI_WINXPSP4
#define NTDDI_WINXPSP4 0x05010400
#endif
#define NTDDI_WS03 0x05020000
#define NTDDI_WS03SP1 0x05020100
#define NTDDI_WS03SP2 0x05020200
#define NTDDI_WS03SP3 0x05020300
#define NTDDI_WS03SP4 0x05020400
#define NTDDI_WIN6 0x06000000
#define NTDDI_WIN6SP1 0x06000100
#define NTDDI_WIN6SP2 0x06000200
#define NTDDI_WIN6SP3 0x06000300
#define NTDDI_WIN6SP4 0x06000400
#define NTDDI_VISTA NTDDI_WIN6
#define NTDDI_VISTASP1 NTDDI_WIN6SP1
#define NTDDI_VISTASP2 NTDDI_WIN6SP2
#define NTDDI_VISTASP3 NTDDI_WIN6SP3
#define NTDDI_VISTASP4 NTDDI_WIN6SP4
#define NTDDI_LONGHORN NTDDI_VISTA
#define NTDDI_WS08 NTDDI_WIN6SP1
#define NTDDI_WS08SP2 NTDDI_WIN6SP2
#define NTDDI_WS08SP3 NTDDI_WIN6SP3
#define NTDDI_WS08SP4 NTDDI_WIN6SP4
#define NTDDI_WIN7 0x06010000
#define NTDDI_WIN8 0x06020000
#define NTDDI_WINBLUE 0x06030000
#define NTDDI_WINTHRESHOLD 0x0A000000
#define NTDDI_WIN10 0x0A000000
#define NTDDI_WIN10_TH2 0x0A000001
#define NTDDI_WIN10_RS1 0x0A000002
#define NTDDI_WIN10_RS2 0x0A000003
#define NTDDI_WIN10_RS3 0x0A000004
#define NTDDI_WIN10_RS4 0x0A000005
#define NTDDI_WIN10_RS5 0x0A000006
#define NTDDI_WIN10_19H1 0x0A000007
#define NTDDI_WIN10_VB 0x0A000008
#define NTDDI_WIN10_MN 0x0A000009
#define NTDDI_WIN10_FE 0x0A00000A
#define WDK_NTDDI_VERSION NTDDI_WIN10_FE
/* Version Fields in NTDDI_VERSION */
#define OSVERSION_MASK 0xFFFF0000U
#define SPVERSION_MASK 0x0000FF00
#define SUBVERSION_MASK 0x000000FF
/* Macros to Extract Version Fields From NTDDI_VERSION */
#define OSVER(Version) ((Version) & OSVERSION_MASK)
#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)
#define SUBVER(Version) (((Version) & SUBVERSION_MASK))
/* Macros to get the NTDDI for a given WIN32 */
#define NTDDI_VERSION_FROM_WIN32_WINNT2(Version) Version##0000
#define NTDDI_VERSION_FROM_WIN32_WINNT(Version) NTDDI_VERSION_FROM_WIN32_WINNT2(Version)
/* Select Default WIN32_WINNT Value */
#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
#define _WIN32_WINNT _WIN32_WINNT_WS03
#endif
/* Choose NTDDI Version */
#ifndef NTDDI_VERSION
#ifdef _WIN32_WINNT
#define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
#else
#define NTDDI_VERSION NTDDI_WS03
#endif
#endif
/* Choose WINVER Value */
#ifndef WINVER
#ifdef _WIN32_WINNT
#define WINVER _WIN32_WINNT
#else
#define WINVER 0x0502
#endif
#endif
/* Choose IE Version */
#ifndef _WIN32_IE
#ifdef _WIN32_WINNT
#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
#define _WIN32_IE _WIN32_IE_IE50
#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
#define _WIN32_IE _WIN32_IE_IE501
#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
#define _WIN32_IE _WIN32_IE_IE60
#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
#define _WIN32_IE _WIN32_IE_WS03
#elif (_WIN32_WINNT <= _WIN32_WINNT_VISTA)
#define _WIN32_IE _WIN32_IE_LONGHORN
#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN7)
#define _WIN32_IE _WIN32_IE_WIN7
#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN8)
#define _WIN32_IE _WIN32_IE_WIN8
#else
#define _WIN32_IE 0x0a00
#endif
#else
#define _WIN32_IE 0x0700
#endif
#endif
/* Make Sure NTDDI_VERSION and _WIN32_WINNT Match */
#if ((OSVER(NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K)) || \
((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP)) || \
((OSVER(NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03)) || \
((OSVER(NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
#error NTDDI_VERSION and _WIN32_WINNT mismatch!
#endif
#endif /* _INC_SDKDDKVER */

View file

@ -0,0 +1,24 @@
/**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_WINAPIFAMILY
#define _INC_WINAPIFAMILY
#define WINAPI_PARTITION_DESKTOP 0x1
#define WINAPI_PARTITION_APP 0x2
#define WINAPI_FAMILY_APP WINAPI_PARTITION_APP
#define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP \
| WINAPI_PARTITION_APP)
/* WINAPI_FAMILY can be either desktop + App, or App. */
#ifndef WINAPI_FAMILY
#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
#endif
#define WINAPI_FAMILY_PARTITION(v) ((WINAPI_FAMILY & v) == v)
#define WINAPI_FAMILY_ONE_PARTITION(vset, v) ((WINAPI_FAMILY & vset) == v)
#endif

View file

@ -92,6 +92,9 @@
#include <malloc.h> #include <malloc.h>
#include <memory.h> #include <memory.h>
#endif #endif
#ifndef PA_WINRT
#include <mmsystem.h>
#endif
#include "pa_util.h" #include "pa_util.h"
#include "pa_allocation.h" #include "pa_allocation.h"
@ -104,13 +107,25 @@
#include "pa_ringbuffer.h" #include "pa_ringbuffer.h"
#include "pa_win_coinitialize.h" #include "pa_win_coinitialize.h"
#if !defined(NTDDI_VERSION) #if !defined(NTDDI_VERSION) || (defined(__GNUC__) && (__GNUC__ <= 6) && !defined(__MINGW64__))
#undef WINVER #undef WINVER
#undef _WIN32_WINNT #undef _WIN32_WINNT
#define WINVER 0x0600 // VISTA #define WINVER 0x0600 // VISTA
#define _WIN32_WINNT WINVER #define _WIN32_WINNT WINVER
#ifndef WINAPI
#define WINAPI __stdcall
#endif
#ifndef __unaligned
#define __unaligned
#endif
#ifndef __C89_NAMELESS
#define __C89_NAMELESS
#endif
#ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY #ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY
typedef enum _AVRT_PRIORITY typedef enum _AVRT_PRIORITY
{ {
@ -129,6 +144,8 @@
#define __LPCGUID_DEFINED__ #define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID; typedef const GUID *LPCGUID;
#endif #endif
typedef GUID IID;
typedef GUID CLSID;
#ifndef PROPERTYKEY_DEFINED #ifndef PROPERTYKEY_DEFINED
#define PROPERTYKEY_DEFINED #define PROPERTYKEY_DEFINED
@ -147,7 +164,6 @@
#ifdef WIN64 #ifdef WIN64
#include <wtypes.h> #include <wtypes.h>
typedef LONG NTSTATUS;
#define FASTCALL #define FASTCALL
#include <oleidl.h> #include <oleidl.h>
#include <objidl.h> #include <objidl.h>
@ -162,6 +178,10 @@
#define NONAMELESSUNION #define NONAMELESSUNION
#endif #endif
#ifndef NT_SUCCESS
typedef LONG NTSTATUS;
#endif
#ifndef WAVE_FORMAT_IEEE_FLOAT #ifndef WAVE_FORMAT_IEEE_FLOAT
#define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point
#endif #endif