Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
April 2021
- 70 participants
- 697 discussions
[PATCH resend 1/2] user32/tests: Add tests for maximizing and restoring windows without WS_CAPTION.
by Ziqing Hui 21 Apr '21
by Ziqing Hui 21 Apr '21
21 Apr '21
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
dlls/user32/tests/win.c | 55 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
2
2
The if condition here came from 47c54c4ae7f235780a55ddf670503db4afc11055,
which is to detect full screen window.
However, according to tests in 8ce2c739780a924a46eb272df19bc7c65c41586d,
there is possibility that a window without setting WS_CAPTION
is not full screen, for example, main window of Tencent WeChat.
And windows like this can also be maximized or restored.
So that we can not treat WS_CAPTION as our full screen condition.
This fixes maximizing Tencent WeChat by dragging it to screen edge.
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
dlls/winex11.drv/event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
1
0
From: Zebediah Figura <zfigura(a)codeweavers.com>
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41048
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
v2: Don't use a switch statement for XACTNOTIFICATIONTYPE_* constants.
configure | 3 +
configure.ac | 2 +
dlls/xactengine2_0/Makefile.in | 11 +++
dlls/xactengine2_0/xactengine2_0.spec | 4 +
dlls/xactengine3_7/xact_classes.idl | 4 +-
dlls/xactengine3_7/xact_dll.c | 115 ++++++++++++++++++++++++--
6 files changed, 132 insertions(+), 7 deletions(-)
create mode 100644 dlls/xactengine2_0/Makefile.in
create mode 100644 dlls/xactengine2_0/xactengine2_0.spec
diff --git a/configure b/configure
index 9d1df64891b..d7a88f0f499 100755
--- a/configure
+++ b/configure
@@ -1727,6 +1727,7 @@ enable_x3daudio1_4
enable_x3daudio1_5
enable_x3daudio1_6
enable_x3daudio1_7
+enable_xactengine2_0
enable_xactengine3_0
enable_xactengine3_1
enable_xactengine3_2
@@ -16424,6 +16425,7 @@ then
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
+ enable_xactengine2_0=${enable_xactengine2_0:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
enable_xactengine3_1=${enable_xactengine3_1:-no}
enable_xactengine3_2=${enable_xactengine3_2:-no}
@@ -21209,6 +21211,7 @@ wine_fn_config_makefile dlls/x3daudio1_4 enable_x3daudio1_4
wine_fn_config_makefile dlls/x3daudio1_5 enable_x3daudio1_5
wine_fn_config_makefile dlls/x3daudio1_6 enable_x3daudio1_6
wine_fn_config_makefile dlls/x3daudio1_7 enable_x3daudio1_7
+wine_fn_config_makefile dlls/xactengine2_0 enable_xactengine2_0
wine_fn_config_makefile dlls/xactengine3_0 enable_xactengine3_0
wine_fn_config_makefile dlls/xactengine3_1 enable_xactengine3_1
wine_fn_config_makefile dlls/xactengine3_2 enable_xactengine3_2
diff --git a/configure.ac b/configure.ac
index 30bbe7bc5cd..7f966e744a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1915,6 +1915,7 @@ then
enable_x3daudio1_5=${enable_x3daudio1_5:-no}
enable_x3daudio1_6=${enable_x3daudio1_6:-no}
enable_x3daudio1_7=${enable_x3daudio1_7:-no}
+ enable_xactengine2_0=${enable_xactengine2_0:-no}
enable_xactengine3_0=${enable_xactengine3_0:-no}
enable_xactengine3_1=${enable_xactengine3_1:-no}
enable_xactengine3_2=${enable_xactengine3_2:-no}
@@ -3892,6 +3893,7 @@ WINE_CONFIG_MAKEFILE(dlls/x3daudio1_4)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_5)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_6)
WINE_CONFIG_MAKEFILE(dlls/x3daudio1_7)
+WINE_CONFIG_MAKEFILE(dlls/xactengine2_0)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_0)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_1)
WINE_CONFIG_MAKEFILE(dlls/xactengine3_2)
diff --git a/dlls/xactengine2_0/Makefile.in b/dlls/xactengine2_0/Makefile.in
new file mode 100644
index 00000000000..3196ecd9b5a
--- /dev/null
+++ b/dlls/xactengine2_0/Makefile.in
@@ -0,0 +1,11 @@
+MODULE = xactengine2_0.dll
+IMPORTS = ole32 uuid
+EXTRADEFS = -DXACT3_VER=0x0200
+PARENTSRC = ../xactengine3_7
+EXTRALIBS = $(FAUDIO_LIBS)
+EXTRAINCL = $(FAUDIO_CFLAGS)
+
+C_SRCS = \
+ xact_dll.c
+
+IDL_SRCS = xact_classes.idl
diff --git a/dlls/xactengine2_0/xactengine2_0.spec b/dlls/xactengine2_0/xactengine2_0.spec
new file mode 100644
index 00000000000..b16365d0c9f
--- /dev/null
+++ b/dlls/xactengine2_0/xactengine2_0.spec
@@ -0,0 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/xactengine3_7/xact_classes.idl b/dlls/xactengine3_7/xact_classes.idl
index 40c00f4ff06..91a9c19ff67 100644
--- a/dlls/xactengine3_7/xact_classes.idl
+++ b/dlls/xactengine3_7/xact_classes.idl
@@ -22,7 +22,9 @@
[
threading(both),
-#if XACT3_VER == 0x0300
+#if XACT3_VER == 0x0200
+ uuid(0aa000aa-f404-11d9-bd7a-0010dc4f8f81)
+#elif XACT3_VER == 0x0300
uuid(3b80ee2a-b0f5-4780-9e30-90cb39685b03)
#elif XACT3_VER == 0x0301
uuid(962f5027-99be-4692-a468-85802cf8de61)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 3fbb4875930..d7ee07490de 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -25,12 +25,31 @@
#define COBJMACROS
#include "initguid.h"
+#if XACT3_VER < 0x0300
+#include "xact.h"
+#else
#include "xact3.h"
+#endif
#include "rpcproxy.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xact3);
+#if XACT3_VER < 0x0300
+#define IID_IXACT3Engine IID_IXACTEngine
+#define IXACT3Cue IXACTCue
+#define IXACT3CueVtbl IXACTCueVtbl
+#define IXACT3Engine IXACTEngine
+#define IXACT3EngineVtbl IXACTEngineVtbl
+#define IXACT3Engine_QueryInterface IXACTEngine_QueryInterface
+#define IXACT3SoundBank IXACTSoundBank
+#define IXACT3SoundBankVtbl IXACTSoundBankVtbl
+#define IXACT3Wave IXACTWave
+#define IXACT3WaveVtbl IXACTWaveVtbl
+#define IXACT3WaveBank IXACTWaveBank
+#define IXACT3WaveBankVtbl IXACTWaveBankVtbl
+#endif
+
static HINSTANCE instance;
typedef struct _XACT3CueImpl {
@@ -84,6 +103,39 @@ static HRESULT WINAPI IXACT3CueImpl_Destroy(IXACT3Cue *iface)
return S_OK;
}
+#if XACT3_VER < 0x0300
+
+static HRESULT WINAPI IXACT3CueImpl_GetChannelMap(IXACT3Cue *iface,
+ XACTCHANNELMAP *map, DWORD size, DWORD *needed_size)
+{
+ FIXME("(%p)->(%p, %u, %p)\n", iface, map, size, needed_size);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACT3CueImpl_SetChannelMap(IXACT3Cue *iface, XACTCHANNELMAP *map)
+{
+ FIXME("(%p)->(%p)\n", iface, map);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACT3CueImpl_GetChannelVolume(IXACT3Cue *iface, XACTCHANNELVOLUME *volume)
+{
+ FIXME("(%p)->(%p)\n", iface, volume);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IXACT3CueImpl_SetChannelVolume(IXACT3Cue *iface, XACTCHANNELVOLUME *volume)
+{
+ FIXME("(%p)->(%p)\n", iface, volume);
+
+ return E_NOTIMPL;
+}
+
+#endif
+
static HRESULT WINAPI IXACT3CueImpl_SetMatrixCoefficients(IXACT3Cue *iface,
UINT32 uSrcChannelCount, UINT32 uDstChannelCount,
float *pMatrixCoefficients)
@@ -136,6 +188,7 @@ static HRESULT WINAPI IXACT3CueImpl_Pause(IXACT3Cue *iface, BOOL fPause)
return FACTCue_Pause(This->fact_cue, fPause);
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACT3CueImpl_GetProperties(IXACT3Cue *iface,
XACT_CUE_INSTANCE_PROPERTIES **ppProperties)
{
@@ -152,7 +205,9 @@ static HRESULT WINAPI IXACT3CueImpl_GetProperties(IXACT3Cue *iface,
*ppProperties = (XACT_CUE_INSTANCE_PROPERTIES*) fProps;
return hr;
}
+#endif
+#if XACT3_VER >= 0x0300
static HRESULT WINAPI IXACT3CueImpl_SetOutputVoices(IXACT3Cue *iface,
const XAUDIO2_VOICE_SENDS *pSendList)
{
@@ -170,6 +225,7 @@ static HRESULT WINAPI IXACT3CueImpl_SetOutputVoiceMatrix(IXACT3Cue *iface,
DestinationChannels, pLevelMatrix);
return S_OK;
}
+#endif
static const IXACT3CueVtbl XACT3Cue_Vtbl =
{
@@ -177,14 +233,24 @@ static const IXACT3CueVtbl XACT3Cue_Vtbl =
IXACT3CueImpl_Stop,
IXACT3CueImpl_GetState,
IXACT3CueImpl_Destroy,
+#if XACT3_VER < 0x0300
+ IXACT3CueImpl_GetChannelMap,
+ IXACT3CueImpl_SetChannelMap,
+ IXACT3CueImpl_GetChannelVolume,
+ IXACT3CueImpl_SetChannelVolume,
+#endif
IXACT3CueImpl_SetMatrixCoefficients,
IXACT3CueImpl_GetVariableIndex,
IXACT3CueImpl_SetVariable,
IXACT3CueImpl_GetVariable,
IXACT3CueImpl_Pause,
+#if XACT3_VER >= 0x0205
IXACT3CueImpl_GetProperties,
+#endif
+#if XACT3_VER >= 0x0300
IXACT3CueImpl_SetOutputVoices,
IXACT3CueImpl_SetOutputVoiceMatrix
+#endif
};
typedef struct _XACT3SoundBankImpl {
@@ -208,6 +274,7 @@ static XACTINDEX WINAPI IXACT3SoundBankImpl_GetCueIndex(IXACT3SoundBank *iface,
return FACTSoundBank_GetCueIndex(This->fact_soundbank, szFriendlyName);
}
+#if XACT3_VER >= 0x0205
static HRESULT WINAPI IXACT3SoundBankImpl_GetNumCues(IXACT3SoundBank *iface,
XACTINDEX *pnNumCues)
{
@@ -228,6 +295,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_GetCueProperties(IXACT3SoundBank *ifac
return FACTSoundBank_GetCueProperties(This->fact_soundbank, nCueIndex,
(FACTCueProperties*) pProperties);
}
+#endif
static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
XACTINDEX nCueIndex, DWORD dwFlags, XACTTIME timeOffset,
@@ -342,8 +410,10 @@ static HRESULT WINAPI IXACT3SoundBankImpl_GetState(IXACT3SoundBank *iface,
static const IXACT3SoundBankVtbl XACT3SoundBank_Vtbl =
{
IXACT3SoundBankImpl_GetCueIndex,
+#if XACT3_VER >= 0x0205
IXACT3SoundBankImpl_GetNumCues,
IXACT3SoundBankImpl_GetCueProperties,
+#endif
IXACT3SoundBankImpl_Prepare,
IXACT3SoundBankImpl_Play,
IXACT3SoundBankImpl_Stop,
@@ -351,6 +421,8 @@ static const IXACT3SoundBankVtbl XACT3SoundBank_Vtbl =
IXACT3SoundBankImpl_GetState
};
+#if XACT3_VER >= 0x0205
+
typedef struct _XACT3WaveImpl {
IXACT3Wave IXACT3Wave_iface;
@@ -465,6 +537,8 @@ static const IXACT3WaveVtbl XACT3Wave_Vtbl =
IXACT3WaveImpl_GetProperties
};
+#endif
+
typedef struct _XACT3WaveBankImpl {
IXACT3WaveBank IXACT3WaveBank_iface;
@@ -488,6 +562,8 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Destroy(IXACT3WaveBank *iface)
return hr;
}
+#if XACT3_VER >= 0x0205
+
static HRESULT WINAPI IXACT3WaveBankImpl_GetNumWaves(IXACT3WaveBank *iface,
XACTINDEX *pnNumWaves)
{
@@ -607,6 +683,8 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Stop(IXACT3WaveBank *iface,
return FACTWaveBank_Stop(This->fact_wavebank, nWaveIndex, dwFlags);
}
+#endif
+
static HRESULT WINAPI IXACT3WaveBankImpl_GetState(IXACT3WaveBank *iface,
DWORD *pdwState)
{
@@ -620,12 +698,14 @@ static HRESULT WINAPI IXACT3WaveBankImpl_GetState(IXACT3WaveBank *iface,
static const IXACT3WaveBankVtbl XACT3WaveBank_Vtbl =
{
IXACT3WaveBankImpl_Destroy,
+#if XACT3_VER >= 0x0205
IXACT3WaveBankImpl_GetNumWaves,
IXACT3WaveBankImpl_GetWaveIndex,
IXACT3WaveBankImpl_GetWaveProperties,
IXACT3WaveBankImpl_Prepare,
IXACT3WaveBankImpl_Play,
IXACT3WaveBankImpl_Stop,
+#endif
IXACT3WaveBankImpl_GetState
};
@@ -737,6 +817,8 @@ static HRESULT WINAPI IXACT3EngineImpl_GetRendererDetails(IXACT3Engine *iface,
nRendererIndex, (FACTRendererDetails*) pRendererDetails);
}
+#if XACT3_VER >= 0x0205
+
static HRESULT WINAPI IXACT3EngineImpl_GetFinalMixFormat(IXACT3Engine *iface,
WAVEFORMATEXTENSIBLE *pFinalMixFormat)
{
@@ -748,6 +830,8 @@ static HRESULT WINAPI IXACT3EngineImpl_GetFinalMixFormat(IXACT3Engine *iface,
(FAudioWaveFormatExtensible*) pFinalMixFormat);
}
+#endif
+
static void FACTCALL fact_notification_cb(const FACTNotification *notification)
{
XACT3EngineImpl *engine = (XACT3EngineImpl *)notification->pvContext;
@@ -787,6 +871,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface,
params.pXAudio2 = NULL;
params.pMasteringVoice = NULL;
+#if XACT3_VER >= 0x0300
/* FIXME: pXAudio2 and pMasteringVoice are pointers to
* IXAudio2/IXAudio2MasteringVoice objects. FACT wants pointers to
* FAudio/FAudioMasteringVoice objects. In Wine's XAudio2 implementation, we
@@ -804,6 +889,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Initialize(IXACT3Engine *iface,
FIXME("pMasteringVoice parameter not supported!\n");
}
}
+#endif
/* Force Windows I/O, do NOT use the FACT default! */
This->pReadFile = (XACT_READFILE_CALLBACK)
@@ -968,6 +1054,8 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateStreamingWaveBank(IXACT3Engine *ifa
return S_OK;
}
+#if XACT3_VER >= 0x0205
+
static HRESULT WINAPI IXACT3EngineImpl_PrepareInMemoryWave(IXACT3Engine *iface,
DWORD dwFlags, WAVEBANKENTRY entry, DWORD *pdwSeekTable,
BYTE *pbWaveData, DWORD dwPlayOffset, XACTLOOPCOUNT nLoopCount,
@@ -1026,6 +1114,8 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
return S_OK;
}
+#endif
+
enum {
NOTIFY_SoundBank = 0x01,
NOTIFY_WaveBank = 0x02,
@@ -1062,17 +1152,22 @@ static inline void unwrap_notificationdesc(FACTNotificationDescription *fd,
{
flags = NOTIFY_SoundBank;
}
+ /* Supports SoundBank, SoundBank, Cue index, Cue instance, WaveBank, Wave instance */
+ else if (xd->type == XACTNOTIFICATIONTYPE_WAVEPLAY || xd->type == XACTNOTIFICATIONTYPE_WAVESTOP)
+ {
+ flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue | NOTIFY_WaveBank | NOTIFY_Wave;
+ }
+#if XACT3_VER >= 0x0205
+ else if (xd->type == XACTNOTIFICATIONTYPE_WAVELOOPED)
+ {
+ flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue | NOTIFY_WaveBank | NOTIFY_Wave;
+ }
/* Supports WaveBank, Wave index, Wave instance */
else if (xd->type == XACTNOTIFICATIONTYPE_WAVEPREPARED || xd->type == XACTNOTIFICATIONTYPE_WAVEDESTROYED)
{
flags = NOTIFY_WaveBank | NOTIFY_waveIndex | NOTIFY_Wave;
}
- /* Supports SoundBank, SoundBank, Cue index, Cue instance, WaveBank, Wave instance */
- else if (xd->type == XACTNOTIFICATIONTYPE_WAVEPLAY || xd->type == XACTNOTIFICATIONTYPE_WAVESTOP ||
- xd->type == XACTNOTIFICATIONTYPE_WAVELOOPED)
- {
- flags = NOTIFY_SoundBank | NOTIFY_cueIndex | NOTIFY_Cue | NOTIFY_WaveBank | NOTIFY_Wave;
- }
+#endif
/* We have to unwrap the FACT object first! */
fd->type = xd->type;
@@ -1080,8 +1175,10 @@ static inline void unwrap_notificationdesc(FACTNotificationDescription *fd,
fd->pvContext = xd->pvContext;
if (flags & NOTIFY_cueIndex)
fd->cueIndex = xd->cueIndex;
+#if XACT3_VER >= 0x0205
if (flags & NOTIFY_waveIndex)
fd->waveIndex = xd->waveIndex;
+#endif
if (flags & NOTIFY_Cue && xd->pCue != NULL)
{
@@ -1104,12 +1201,14 @@ static inline void unwrap_notificationdesc(FACTNotificationDescription *fd,
fd->pWaveBank = bank->fact_wavebank;
}
+#if XACT3_VER >= 0x0205
if (flags & NOTIFY_Wave && xd->pWave != NULL)
{
XACT3WaveImpl *wave = impl_from_IXACT3Wave(xd->pWave);
if (wave)
fd->pWave = wave->fact_wave;
}
+#endif
}
static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface,
@@ -1216,16 +1315,20 @@ static const IXACT3EngineVtbl XACT3Engine_Vtbl =
IXACT3EngineImpl_Release,
IXACT3EngineImpl_GetRendererCount,
IXACT3EngineImpl_GetRendererDetails,
+#if XACT3_VER >= 0x0205
IXACT3EngineImpl_GetFinalMixFormat,
+#endif
IXACT3EngineImpl_Initialize,
IXACT3EngineImpl_ShutDown,
IXACT3EngineImpl_DoWork,
IXACT3EngineImpl_CreateSoundBank,
IXACT3EngineImpl_CreateInMemoryWaveBank,
IXACT3EngineImpl_CreateStreamingWaveBank,
+#if XACT3_VER >= 0x0205
IXACT3EngineImpl_PrepareWave,
IXACT3EngineImpl_PrepareInMemoryWave,
IXACT3EngineImpl_PrepareStreamingWave,
+#endif
IXACT3EngineImpl_RegisterNotification,
IXACT3EngineImpl_UnRegisterNotification,
IXACT3EngineImpl_GetCategory,
--
2.30.2
1
3
From: Vijay Kiran Kamuju <infyquest(a)gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com>
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
Changes from wine-staging patch set: various stylistic tweaks, add some missing
differences between XACT versions.
include/Makefile.in | 1 +
include/xact.h | 801 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 802 insertions(+)
create mode 100644 include/xact.h
diff --git a/include/Makefile.in b/include/Makefile.in
index 2ae40ee484e..145c56980df 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -847,6 +847,7 @@ SOURCES = \
wtypes.idl \
wuapi.idl \
x3daudio.h \
+ xact.h \
xact3.h \
xact3wb.h \
xapo.idl \
diff --git a/include/xact.h b/include/xact.h
new file mode 100644
index 00000000000..5f9372a9366
--- /dev/null
+++ b/include/xact.h
@@ -0,0 +1,801 @@
+/*
+ * Copyright (C) 2020 Vijay Kiran Kamuju
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _XACT_H_
+#define _XACT_H_
+
+#include <windows.h>
+#include <objbase.h>
+#include <float.h>
+#include <limits.h>
+
+#if XACT3_VER == 0x0210
+ DEFINE_GUID(CLSID_XACTEngine, 0x65d822a4, 0x4799, 0x42c6, 0x9b, 0x18, 0xd2, 0x6c, 0xf6, 0x6d, 0xd3, 0x20);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x03dd980d, 0xeca1, 0x4de0, 0x98, 0x22, 0xeb, 0x22, 0x44, 0xa0, 0xe2, 0x75);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x871dc2b3, 0xc947, 0x4aed, 0xbf, 0xad, 0xa1, 0x79, 0x18, 0xfb, 0xcf, 0x05);
+ DEFINE_GUID(IID_IXACTEngine, 0x5ac3994b, 0xac77, 0x4c40, 0xb9, 0xfd, 0x7d, 0x5a, 0xfb, 0xe9, 0x64, 0xc5);
+#elif XACT3_VER == 0x0209
+ DEFINE_GUID(CLSID_XACTEngine, 0x343e68e6, 0x8f82, 0x4a8d, 0xa2, 0xda, 0x6e, 0x9a, 0x94, 0x4b, 0x37, 0x8c);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xcedde475, 0x50b5, 0x47ef, 0x91, 0xa7, 0x3b, 0x49, 0xa0, 0xe8, 0xe5, 0x88);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x3cbb606b, 0x06f1, 0x473e, 0x9d, 0xd5, 0x0e, 0x4a, 0x3b, 0x47, 0x14, 0x13);
+ DEFINE_GUID(IID_IXACTEngine, 0x893ff2e4, 0x8d03, 0x4d5f, 0xb0, 0xaa, 0x36, 0x3a, 0x9c, 0xbb, 0xf4, 0x37);
+#elif XACT3_VER == 0x0208
+ DEFINE_GUID(CLSID_XACTEngine, 0x77c56bf4, 0x18a1, 0x42b0, 0x88, 0xaf, 0x50, 0x72, 0xce, 0x81, 0x49, 0x49);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x46f7c2b1, 0x774b, 0x419e, 0x9a, 0xbe, 0xa4, 0x8f, 0xb0, 0x42, 0xa3, 0xb0);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x307473ef, 0xc3d4, 0x4d97, 0x9b, 0x9c, 0xce, 0x23, 0x92, 0x85, 0x21, 0xdb);
+ DEFINE_GUID(IID_IXACTEngine, 0xf1fff4f0, 0xec75, 0x45cb, 0x98, 0x6d, 0xe6, 0x37, 0xf7, 0xe7, 0xcd, 0xd5);
+#elif XACT3_VER == 0x0207
+ DEFINE_GUID(CLSID_XACTEngine, 0xcd0d66ec, 0x8057, 0x43f5, 0xac, 0xbd, 0x66, 0xdf, 0xb3, 0x6f, 0xd7, 0x8c);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x9b94bf7a, 0xce0f, 0x4c68, 0x8b, 0x5e, 0xd0, 0x62, 0xcb, 0x37, 0x30, 0xc3);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x1bd54a4b, 0xa1dc, 0x4e4c, 0x92, 0xa2, 0x73, 0xed, 0x33, 0x55, 0x21, 0x48);
+ DEFINE_GUID(IID_IXACTEngine, 0xc2f0af68, 0x1f6d, 0x40ed, 0x96, 0x4f, 0x26, 0x25, 0x68, 0x42, 0xed, 0xc4);
+#elif XACT3_VER == 0x0206
+ DEFINE_GUID(CLSID_XACTEngine, 0x3a2495ce, 0x31d0, 0x435b, 0x8c, 0xcf, 0xe9, 0xf0, 0x84, 0x3f, 0xd9, 0x60);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xa17e147b, 0xc168, 0x45d4, 0x95, 0xf6, 0xb2, 0x15, 0x15, 0xec, 0x1e, 0x66);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0xfe7e064f, 0xf9ea, 0x49ee, 0xba, 0x64, 0x84, 0x5e, 0x42, 0x35, 0x59, 0xc5);
+ DEFINE_GUID(IID_IXACTEngine, 0x5a5d41d0, 0x2161, 0x4a39, 0xaa, 0xdc, 0x11, 0x49, 0x30, 0x14, 0x7e, 0xaa);
+#elif XACT3_VER == 0x0205
+ DEFINE_GUID(CLSID_XACTEngine, 0x54b68bc7, 0x3a45, 0x416b, 0xa8, 0xc9, 0x19, 0xbf, 0x19, 0xec, 0x1d, 0xf5);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xaeaf4809, 0x6e94, 0x4663, 0x8f, 0xf8, 0x1b, 0x4c, 0x7c, 0x0e, 0x6d, 0xfd);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x290d0a8c, 0xa131, 0x4cf4, 0x8b, 0xbd, 0x37, 0xd0, 0x2b, 0x59, 0xcc, 0x4a);
+ DEFINE_GUID(IID_IXACTEngine, 0xf9df94ad, 0x6960, 0x4307, 0xbf, 0xad, 0x4e, 0x97, 0xac, 0x18, 0x94, 0xc6);
+#elif XACT3_VER == 0x0204
+ DEFINE_GUID(CLSID_XACTEngine, 0xbc3e0fc6, 0x2e0d, 0x4c45, 0xbc, 0x61, 0xd9, 0xc3, 0x28, 0x31, 0x9b, 0xd8);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x30bad9f7, 0x0018, 0x49e9, 0xbf, 0x94, 0x4a, 0xe8, 0x9c, 0xc5, 0x4d, 0x64);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x74ee14d5, 0xca1d, 0x44ac, 0x8b, 0xd3, 0xfa, 0x94, 0xf7, 0x34, 0x6e, 0x24);
+ DEFINE_GUID(IID_IXACTEngine, 0x43a0d4a8, 0x9387, 0x4e06, 0x94, 0x33, 0x65, 0x41, 0x8f, 0xe7, 0x0a, 0x67);
+#elif XACT3_VER == 0x0203
+ DEFINE_GUID(CLSID_XACTEngine, 0x1138472b, 0xd187, 0x44e9, 0x81, 0xf2, 0xae, 0x1b, 0x0e, 0x77, 0x85, 0xf1);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x07fb2b69, 0x0ee4, 0x4eee, 0xbb, 0xe8, 0xc7, 0x62, 0x89, 0x79, 0x87, 0x17);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x9ebf716a, 0x4c83, 0x4db0, 0x9a, 0x5a, 0xc7, 0x27, 0xde, 0x92, 0xb2, 0x73);
+ DEFINE_GUID(IID_IXACTEngine, 0xb28629f1, 0x0cb0, 0x47bc, 0xb4, 0x6a, 0xa2, 0xa1, 0xa7, 0x29, 0x6f, 0x02);
+#elif XACT3_VER == 0x0202
+ DEFINE_GUID(CLSID_XACTEngine, 0xc60fae90, 0x4183, 0x4a3f, 0xb2, 0xf7, 0xac, 0x1d, 0xc4, 0x9b, 0x0e, 0x5c);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x4cb2112c, 0x62e9, 0x43fc, 0x8d, 0x9d, 0x6c, 0xa0, 0x8c, 0xed, 0x45, 0xf1);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x3ec76fdc, 0xb626, 0x43fb, 0xbe, 0x22, 0x9b, 0x43, 0x1d, 0x06, 0xb9, 0x68);
+ DEFINE_GUID(IID_IXACTEngine, 0x9c454686, 0xb827, 0x4e5e, 0x88, 0xd9, 0x5b, 0x99, 0xd6, 0x6b, 0x02, 0x2f);
+#elif XACT3_VER == 0x0201
+ DEFINE_GUID(CLSID_XACTEngine, 0x1f1b577e, 0x5e5a, 0x4e8a, 0xba, 0x73, 0xc6, 0x57, 0xea, 0x8e, 0x85, 0x98);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0xfcecc8be, 0xb09a, 0x48cb, 0x92, 0x08, 0x95, 0xa7, 0xed, 0x45, 0x82, 0xa6);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x2b4a46bb, 0xae7a, 0x4072, 0xae, 0x18, 0x11, 0x28, 0x15, 0x4f, 0xba, 0x97);
+ DEFINE_GUID(IID_IXACTEngine, 0x7cdd1894, 0x643b, 0x4168, 0x83, 0x6f, 0xd1, 0x9d, 0x59, 0xd0, 0xce, 0x53);
+#else
+ DEFINE_GUID(CLSID_XACTEngine, 0x0aa000aa, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+ DEFINE_GUID(CLSID_XACTAuditionEngine, 0x0aa000ab, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+ DEFINE_GUID(CLSID_XACTDebugEngine, 0x0aa000ac, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+ DEFINE_GUID(IID_IXACTEngine, 0x0aa000a0, 0xf404, 0x11d9, 0xbd, 0x7a, 0x00, 0x10, 0xdc, 0x4f, 0x8f, 0x81);
+#endif
+
+typedef struct IXACTSoundBank IXACTSoundBank;
+typedef struct IXACTWaveBank IXACTWaveBank;
+typedef struct IXACTCue IXACTCue;
+typedef struct IXACTWave IXACTWave;
+typedef struct IXACTEngine IXACTEngine;
+
+typedef WORD XACTCATEGORY;
+typedef BYTE XACTCHANNEL;
+typedef WORD XACTINDEX;
+typedef BYTE XACTINSTANCELIMIT;
+typedef BYTE XACTLOOPCOUNT;
+typedef BYTE XACTNOTIFICATIONTYPE;
+typedef SHORT XACTPITCH;
+typedef BYTE XACTPRIORITY;
+typedef LONG XACTTIME;
+typedef WORD XACTVARIABLEINDEX;
+typedef FLOAT XACTVARIABLEVALUE;
+typedef BYTE XACTVARIATIONWEIGHT;
+typedef FLOAT XACTVOLUME;
+
+static const XACTCATEGORY XACTCATEGORY_MIN = 0x0;
+static const XACTCATEGORY XACTCATEGORY_MAX = 0xfffe;
+static const XACTCATEGORY XACTCATEGORY_INVALID = 0xffff;
+static const XACTCHANNEL XACTCHANNEL_MIN = 0;
+static const XACTCHANNEL XACTCHANNEL_MAX = 0xff;
+static const XACTINDEX XACTINDEX_MIN = 0x0;
+static const XACTINDEX XACTINDEX_MAX = 0xfffe;
+static const XACTINDEX XACTINDEX_INVALID = 0xffff;
+static const XACTINSTANCELIMIT XACTINSTANCELIMIT_INFINITE = 0xff;
+static const XACTINSTANCELIMIT XACTINSTANCELIMIT_MIN = 0x00;
+static const XACTINSTANCELIMIT XACTINSTANCELIMIT_MAX = 0xfe;
+static const XACTLOOPCOUNT XACTLOOPCOUNT_MIN = 0x0;
+static const XACTLOOPCOUNT XACTLOOPCOUNT_MAX = 0xfe;
+static const XACTLOOPCOUNT XACTLOOPCOUNT_INFINITE = 0xff;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MIN = 0x00;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MAX = 0xff;
+static const XACTPITCH XACTPITCH_MIN = -1200;
+static const XACTPITCH XACTPITCH_MAX = 1200;
+static const XACTPITCH XACTPITCH_MIN_TOTAL = -2400;
+static const XACTPITCH XACTPITCH_MAX_TOTAL = 2400;
+static const XACTTIME XACTTIME_MIN = INT_MIN;
+static const XACTTIME XACTTIME_MAX = INT_MAX;
+static const XACTTIME XACTTIME_INFINITE = INT_MAX;
+static const XACTVARIABLEINDEX XACTVARIABLEINDEX_MIN = 0x0000;
+static const XACTVARIABLEINDEX XACTVARIABLEINDEX_MAX = 0xfffe;
+static const XACTVARIABLEINDEX XACTVARIABLEINDEX_INVALID = 0xffff;
+static const XACTVARIABLEVALUE XACTPARAMETERVALUE_MIN = -FLT_MAX;
+static const XACTVARIABLEVALUE XACTPARAMETERVALUE_MAX = FLT_MAX;
+static const XACTVARIABLEVALUE XACTVARIABLEVALUE_MIN = -FLT_MAX;
+static const XACTVARIABLEVALUE XACTVARIABLEVALUE_MAX = FLT_MAX;
+static const XACTVOLUME XACTVOLUME_MIN = 0.0f;
+static const XACTVOLUME XACTVOLUME_MAX = FLT_MAX;
+static const DWORD XACTWAVEALIGNMENT_MIN = 2048;
+
+
+#define FACILITY_XACTENGINE 0xac7
+#define XACTENGINEERROR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_XACTENGINE, n)
+
+#define XACTENGINE_E_OUTOFMEMORY E_OUTOFMEMORY
+#define XACTENGINE_E_INVALIDARG E_INVALIDARG
+#define XACTENGINE_E_NOTIMPL E_NOTIMPL
+#define XACTENGINE_E_FAIL E_FAIL
+
+#define XACTENGINE_E_ALREADYINITIALIZED XACTENGINEERROR(0x001)
+#define XACTENGINE_E_NOTINITIALIZED XACTENGINEERROR(0x002)
+#define XACTENGINE_E_EXPIRED XACTENGINEERROR(0x003)
+#define XACTENGINE_E_NONOTIFICATIONCALLBACK XACTENGINEERROR(0x004)
+#define XACTENGINE_E_NOTIFICATIONREGISTERED XACTENGINEERROR(0x005)
+#define XACTENGINE_E_INVALIDUSAGE XACTENGINEERROR(0x006)
+#define XACTENGINE_E_INVALIDDATA XACTENGINEERROR(0x007)
+#define XACTENGINE_E_INSTANCELIMITFAILTOPLAY XACTENGINEERROR(0x008)
+#define XACTENGINE_E_NOGLOBALSETTINGS XACTENGINEERROR(0x009)
+#define XACTENGINE_E_INVALIDVARIABLEINDEX XACTENGINEERROR(0x00a)
+#define XACTENGINE_E_INVALIDCATEGORY XACTENGINEERROR(0x00b)
+#define XACTENGINE_E_INVALIDCUEINDEX XACTENGINEERROR(0x00c)
+#define XACTENGINE_E_INVALIDWAVEINDEX XACTENGINEERROR(0x00d)
+#define XACTENGINE_E_INVALIDTRACKINDEX XACTENGINEERROR(0x00e)
+#define XACTENGINE_E_INVALIDSOUNDOFFSETORINDEX XACTENGINEERROR(0x00f)
+#define XACTENGINE_E_READFILE XACTENGINEERROR(0x010)
+#define XACTENGINE_E_UNKNOWNEVENT XACTENGINEERROR(0x011)
+#define XACTENGINE_E_INCALLBACK XACTENGINEERROR(0x012)
+#define XACTENGINE_E_NOWAVEBANK XACTENGINEERROR(0x013)
+#define XACTENGINE_E_SELECTVARIATION XACTENGINEERROR(0x014)
+#define XACTENGINE_E_MULTIPLEAUDITIONENGINES XACTENGINEERROR(0x015)
+#define XACTENGINE_E_WAVEBANKNOTPREPARED XACTENGINEERROR(0x016)
+#define XACTENGINE_E_NORENDERER XACTENGINEERROR(0x017)
+#define XACTENGINE_E_INVALIDENTRYCOUNT XACTENGINEERROR(0x018)
+#define XACTENGINE_E_SEEKTIMEBEYONDCUEEND XACTENGINEERROR(0x019)
+#define XACTENGINE_E_SEEKTIMEBEYONDWAVEEND XACTENGINEERROR(0x019)
+#define XACTENGINE_E_NOFRIENDLYNAMES XACTENGINEERROR(0x01a)
+#define XACTENGINE_E_AUDITION_WRITEFILE XACTENGINEERROR(0x101)
+#define XACTENGINE_E_AUDITION_NOSOUNDBANK XACTENGINEERROR(0x102)
+#define XACTENGINE_E_AUDITION_INVALIDRPCINDEX XACTENGINEERROR(0x103)
+#define XACTENGINE_E_AUDITION_MISSINGDATA XACTENGINEERROR(0x104)
+#define XACTENGINE_E_AUDITION_UNKNOWNCOMMAND XACTENGINEERROR(0x105)
+#define XACTENGINE_E_AUDITION_INVALIDDSPINDEX XACTENGINEERROR(0x106)
+#define XACTENGINE_E_AUDITION_MISSINGWAVE XACTENGINEERROR(0x107)
+#define XACTENGINE_E_AUDITION_CREATEDIRECTORYFAILED XACTENGINEERROR(0x108)
+#define XACTENGINE_E_AUDITION_INVALIDSESSION XACTENGINEERROR(0x109)
+
+static const DWORD XACT_FLAG_STOP_RELEASE = 0x00000000;
+static const DWORD XACT_FLAG_STOP_IMMEDIATE = 0x00000001;
+static const DWORD XACT_FLAG_MANAGEDATA = 0x00000001;
+static const DWORD XACT_FLAG_BACKGROUND_MUSIC = 0x00000002;
+static const DWORD XACT_FLAG_UNITS_MS = 0x00000004;
+static const DWORD XACT_FLAG_UNITS_SAMPLES = 0x00000008;
+#define XACT_FLAG_CUE_STOP_RELEASE XACT_FLAG_STOP_RELEASE
+#define XACT_FLAG_CUE_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
+#define XACT_FLAG_GLOBAL_SETTINGS_MANAGEDATA XACT_FLAG_MANAGEDATA
+#define XACT_FLAG_SOUNDBANK_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
+#define XACT_FLAG_ENGINE_CREATE_MANAGEDATA XACT_FLAG_MANAGEDATA
+#define XACT_FLAG_ENGINE_STOP_IMMEDIATE XACT_FLAG_STOP_IMMEDIATE
+
+static const DWORD XACT_STATE_CREATED = 0x00000001;
+static const DWORD XACT_STATE_PREPARING = 0x00000002;
+static const DWORD XACT_STATE_PREPARED = 0x00000004;
+static const DWORD XACT_STATE_PLAYING = 0x00000008;
+static const DWORD XACT_STATE_STOPPING = 0x00000010;
+static const DWORD XACT_STATE_STOPPED = 0x00000020;
+static const DWORD XACT_STATE_PAUSED = 0x00000040;
+static const DWORD XACT_STATE_INUSE = 0x00000080;
+static const DWORD XACT_STATE_PREPAREFAILED = 0x80000000;
+#define XACT_CUESTATE_CREATED XACT_STATE_CREATED
+#define XACT_CUESTATE_PREPARING XACT_STATE_PREPARING
+#define XACT_CUESTATE_PREPARED XACT_STATE_PREPARED
+#define XACT_CUESTATE_PLAYING XACT_STATE_PLAYING
+#define XACT_CUESTATE_STOPPING XACT_STATE_STOPPING
+#define XACT_CUESTATE_STOPPED XACT_STATE_STOPPED
+#define XACT_CUESTATE_PAUSED XACT_STATE_PAUSED
+#define XACT_SOUNDBANKSTATE_INUSE XACT_STATE_INUSE
+#define XACT_WAVEBANKSTATE_INUSE XACT_STATE_INUSE
+#define XACT_WAVEBANKSTATE_PREPARED XACT_STATE_PREPARED
+#define XACT_WAVEBANKSTATE_PREPAREFAILED XACT_STATE_PREPAREFAILED
+
+#define XACT_RENDERER_ID_LENGTH 0xff
+#define XACT_RENDERER_NAME_LENGTH 0xff
+#define XACT_CUE_NAME_LENGTH 0xff
+
+#define XACT_ENGINE_LOOKAHEAD_DEFAULT 250
+
+static const DWORD XACT_FLAG_API_AUDITION_MODE = 0x00000001;
+static const DWORD XACT_FLAG_API_DEBUG_MODE = 0x00000002;
+
+#define XACT_DEBUGENGINE_REGISTRY_KEY TEXT("Software\\Microsoft\\XACT")
+#define XACT_DEBUGENGINE_REGISTRY_VALUE TEXT("DebugEngine")
+
+typedef struct XACT_RENDERER_DETAILS
+{
+ WCHAR rendererID[XACT_RENDERER_ID_LENGTH];
+ WCHAR displayName[XACT_RENDERER_NAME_LENGTH];
+ BOOL defaultDevice;
+} XACT_RENDERER_DETAILS, *LPXACT_RENDERER_DETAILS;
+
+typedef BOOL (__stdcall *XACT_READFILE_CALLBACK)(HANDLE file, void *buffer, DWORD size, DWORD *ret_size, OVERLAPPED *overlapped);
+typedef BOOL (__stdcall *XACT_GETOVERLAPPEDRESULT_CALLBACK)(HANDLE file, OVERLAPPED *overlapped, DWORD *ret_size, BOOL wait);
+
+typedef struct XACT_FILEIO_CALLBACKS
+{
+ XACT_READFILE_CALLBACK readFileCallback;
+ XACT_GETOVERLAPPEDRESULT_CALLBACK getOverlappedResultCallback;
+} XACT_FILEIO_CALLBACKS, *PXACT_FILEIO_CALLBACKS;
+typedef const XACT_FILEIO_CALLBACKS *PCXACT_FILEIO_CALLBACKS;
+
+typedef struct XACT_STREAMING_PARAMETERS
+{
+ HANDLE file;
+ DWORD offset;
+ DWORD flags;
+ WORD packetSize;
+} XACT_STREAMING_PARAMETERS, *LPXACT_STREAMING_PARAMETERS, XACT_WAVEBANK_STREAMING_PARAMETERS, *LPXACT_WAVEBANK_STREAMING_PARAMETERS;
+typedef const XACT_STREAMING_PARAMETERS *LPCXACT_STREAMING_PARAMETERS, *LPCXACT_WAVEBANK_STREAMING_PARAMETERS;
+
+typedef struct XACT_CUE_PROPERTIES
+{
+ char friendlyName[XACT_CUE_NAME_LENGTH];
+ BOOL interactive;
+ XACTINDEX iaVariableIndex;
+ XACTINDEX numVariations;
+ XACTINSTANCELIMIT maxInstances;
+ XACTINSTANCELIMIT currentInstances;
+} XACT_CUE_PROPERTIES, *LPXACT_CUE_PROPERTIES;
+
+typedef struct XACT_TRACK_PROPERTIES
+{
+ XACTTIME duration;
+ XACTINDEX numVariations;
+ XACTCHANNEL numChannels;
+ XACTINDEX waveVariation;
+ XACTLOOPCOUNT loopCount;
+} XACT_TRACK_PROPERTIES, *LPXACT_TRACK_PROPERTIES;
+
+typedef struct XACT_VARIATION_PROPERTIES
+{
+ XACTINDEX index;
+ XACTVARIATIONWEIGHT weight;
+ XACTVARIABLEVALUE iaVariableMin;
+ XACTVARIABLEVALUE iaVariableMax;
+ BOOL linger;
+} XACT_VARIATION_PROPERTIES, *LPXACT_VARIATION_PROPERTIES;
+
+typedef struct XACT_SOUND_PROPERTIES
+{
+ XACTCATEGORY category;
+ BYTE priority;
+ XACTPITCH pitch;
+ XACTVOLUME volume;
+ XACTINDEX numTracks;
+ XACT_TRACK_PROPERTIES arrTrackProperties[1];
+} XACT_SOUND_PROPERTIES, *LPXACT_SOUND_PROPERTIES;
+
+typedef struct XACT_SOUND_VARIATION_PROPERTIES
+{
+ XACT_VARIATION_PROPERTIES variationProperties;
+ XACT_SOUND_PROPERTIES soundProperties;
+} XACT_SOUND_VARIATION_PROPERTIES, *LPXACT_SOUND_VARIATION_PROPERTIES;
+
+typedef struct XACT_CUE_INSTANCE_PROPERTIES
+{
+ DWORD allocAttributes;
+ XACT_CUE_PROPERTIES cueProperties;
+ XACT_SOUND_VARIATION_PROPERTIES activeVariationProperties;
+} XACT_CUE_INSTANCE_PROPERTIES, *LPXACT_CUE_INSTANCE_PROPERTIES;
+
+typedef struct XACTCHANNELMAPENTRY
+{
+ XACTCHANNEL InputChannel;
+ XACTCHANNEL OutputChannel;
+ XACTVOLUME Volume;
+} XACTCHANNELMAPENTRY, *LPXACTCHANNELMAPENTRY;
+typedef const XACTCHANNELMAPENTRY *LPCXACTCHANNELMAPENTRY;
+
+typedef struct XACTCHANNELMAP
+{
+ XACTCHANNEL EntryCount;
+ XACTCHANNELMAPENTRY *paEntries;
+} XACTCHANNELMAP, *LPXACTCHANNELMAP;
+typedef const XACTCHANNELMAP *LPCXACTCHANNELMAP;
+
+typedef struct XACTCHANNELVOLUMEENTRY
+{
+ XACTCHANNEL EntryIndex;
+ XACTVOLUME Volume;
+} XACTCHANNELVOLUMEENTRY, *LPXACTCHANNELVOLUMEENTRY;
+typedef const XACTCHANNELVOLUMEENTRY *LPCXACTCHANNELVOLUMEENTRY;
+
+typedef struct XACTCHANNELVOLUME
+{
+ XACTCHANNEL EntryCount;
+ XACTCHANNELVOLUMEENTRY *paEntries;
+} XACTCHANNELVOLUME, *LPXACTCHANNELVOLUME;
+typedef const XACTCHANNELVOLUME *LPCXACTCHANNELVOLUME;
+
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEPREPARED = 1;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEPLAY = 2;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUESTOP = 3;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_CUEDESTROYED = 4;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_MARKER = 5;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_SOUNDBANKDESTROYED = 6;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED = 7;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_LOCALVARIABLECHANGED = 8;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GLOBALVARIABLECHANGED = 9;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GUICONNECTED = 10;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_GUIDISCONNECTED = 11;
+#if XACT3_VER >= 0x0205
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPREPARED = 12;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPLAY = 13;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVESTOP = 14;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVELOOPED = 15;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEDESTROYED = 16;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKPREPARED = 17;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT = 18;
+#else
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEPLAY = 12;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVESTOP = 13;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKPREPARED = 14;
+static const XACTNOTIFICATIONTYPE XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT = 15;
+#endif
+
+static const BYTE XACT_FLAG_NOTIFICATION_PERSIST = 0x01;
+
+#ifndef WAVE_FORMAT_IEEE_FLOAT
+#define WAVE_FORMAT_IEEE_FLOAT 0x0003
+#endif
+#ifndef WAVE_FORMAT_EXTENSIBLE
+#define WAVE_FORMAT_EXTENSIBLE 0xfffe
+#endif
+
+#include <pshpack1.h>
+
+#ifndef _WAVEFORMATEX_
+#define _WAVEFORMATEX_
+typedef struct _WAVEFORMATEX
+{
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
+} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
+#endif
+
+#ifndef _WAVEFORMATEXTENSIBLE_
+#define _WAVEFORMATEXTENSIBLE_
+typedef struct
+{
+ WAVEFORMATEX Format;
+ union
+ {
+ WORD wValidBitsPerSample;
+ WORD wSamplesPerBlock;
+ WORD wReserved;
+ } Samples;
+ DWORD dwChannelMask;
+ GUID SubFormat;
+} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
+#endif
+
+typedef struct XACT_NOTIFICATION_CUE
+{
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+} XACT_NOTIFICATION_CUE, *LPXACT_NOTIFICATION_CUE;
+typedef const XACT_NOTIFICATION_CUE *LPCXACT_NOTIFICATION_CUE;
+
+typedef struct XACT_NOTIFICATION_DESCRIPTION
+{
+ XACTNOTIFICATIONTYPE type;
+ BYTE flags;
+ IXACTSoundBank *pSoundBank;
+ IXACTWaveBank *pWaveBank;
+ IXACTCue *pCue;
+#if XACT3_VER >= 0x0205
+ IXACTWave *pWave;
+#endif
+ XACTINDEX cueIndex;
+#if XACT3_VER >= 0x0205
+ XACTINDEX waveIndex;
+#endif
+ void *pvContext;
+} XACT_NOTIFICATION_DESCRIPTION, *LPXACT_NOTIFICATION_DESCRIPTION;
+typedef const XACT_NOTIFICATION_DESCRIPTION *LPCXACT_NOTIFICATION_DESCRIPTION;
+
+typedef struct XACT_NOTIFICATION_GUI
+{
+ DWORD reserved;
+} XACT_NOTIFICATION_GUI, *LPXACT_NOTIFICATION_GUI;
+typedef const XACT_NOTIFICATION_GUI *LPCXACT_NOTIFICATION_GUI;
+
+typedef struct XACT_NOTIFICATION_MARKER
+{
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+ DWORD marker;
+} XACT_NOTIFICATION_MARKER, *LPXACT_NOTIFICATION_MARKER;
+typedef const XACT_NOTIFICATION_MARKER *LPCXACT_NOTIFICATION_MARKER;
+
+typedef struct XACT_NOTIFICATION_SOUNDBANK
+{
+ IXACTSoundBank *pSoundBank;
+} XACT_NOTIFICATION_SOUNDBANK, *LPXACT_NOTIFICATION_SOUNDBANK;
+typedef const XACT_NOTIFICATION_SOUNDBANK *LPCXACT_NOTIFICATION_SOUNDBANK;
+
+typedef struct XACT_NOTIFICATION_VARIABLE
+{
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+ XACTVARIABLEINDEX variableIndex;
+ XACTVARIABLEVALUE variableValue;
+ BOOL local;
+} XACT_NOTIFICATION_VARIABLE, *LPXACT_NOTIFICATION_VARIABLE;
+typedef const XACT_NOTIFICATION_VARIABLE *LPCXACT_NOTIFICATION_VARIABLE;
+
+typedef struct XACT_NOTIFICATION_WAVE
+{
+ IXACTWaveBank *pWaveBank;
+ XACTINDEX waveIndex;
+ XACTINDEX cueIndex;
+ IXACTSoundBank *pSoundBank;
+ IXACTCue *pCue;
+#if XACT3_VER >= 0x0205
+ IXACTWave *pWave;
+#endif
+} XACT_NOTIFICATION_WAVE, *LPXACT_NOTIFICATION_WAVE;
+typedef const XACT_NOTIFICATION_WAVE *LPCXACT_NOTIFICATION_NAME;
+
+typedef struct XACT_NOTIFICATION_WAVEBANK
+{
+ IXACTWaveBank *pWaveBank;
+} XACT_NOTIFICATION_WAVEBANK, *LPXACT_NOTIFICATION_WAVEBANK;
+typedef const XACT_NOTIFICATION_WAVEBANK *LPCXACT_NOTIFICATION_WAVEBANK;
+
+typedef struct XACT_NOTIFICATION
+{
+ XACTNOTIFICATIONTYPE type;
+ LONG timeStamp;
+ void *pvContext;
+ union
+ {
+ XACT_NOTIFICATION_CUE cue;
+ XACT_NOTIFICATION_MARKER marker;
+ XACT_NOTIFICATION_SOUNDBANK soundBank;
+ XACT_NOTIFICATION_WAVEBANK waveBank;
+ XACT_NOTIFICATION_VARIABLE variable;
+ XACT_NOTIFICATION_GUI gui;
+ XACT_NOTIFICATION_WAVE wave;
+ };
+} XACT_NOTIFICATION, *LPXACT_NOTIFICATION;
+typedef const XACT_NOTIFICATION *LPCXACT_NOTIFICATION;
+
+#include <poppack.h>
+
+typedef struct XACT_WAVE_PROPERTIES
+{
+ char friendlyName[WAVEBANK_ENTRYNAME_LENGTH];
+ WAVEBANKMINIWAVEFORMAT format;
+ DWORD durationInSamples;
+ WAVEBANKSAMPLEREGION loopRegion;
+ BOOL streaming;
+} XACT_WAVE_PROPERTIES, *LPXACT_WAVE_PROPERTIES;
+typedef const XACT_WAVE_PROPERTIES *LPCXACT_WAVE_PROPERTIES;
+
+typedef struct XACT_WAVE_INSTANCE_PROPERTIES
+{
+ XACT_WAVE_PROPERTIES properties;
+ BOOL backgroundMusic;
+} XACT_WAVE_INSTANCE_PROPERTIES, *LPXACT_WAVE_INSTANCE_PROPERTIES;
+typedef const XACT_WAVE_INSTANCE_PROPERTIES *LPCXACT_WAVE_INSTANCE_PROPERTIES;
+
+typedef void (__stdcall *XACT_NOTIFICATION_CALLBACK)(const XACT_NOTIFICATION *notification);
+
+typedef struct XACT_RUNTIME_PARAMETERS
+{
+ DWORD lookAheadTime;
+ void *pGlobalSettingsBuffer;
+ DWORD globalSettingsBufferSize;
+ DWORD globalSettingsFlags;
+ DWORD globalSettingsAllocAttributes;
+ XACT_FILEIO_CALLBACKS fileIOCallbacks;
+ XACT_NOTIFICATION_CALLBACK fnNotificationCallback;
+ const WCHAR *pRendererID;
+} XACT_RUNTIME_PARAMETERS, *LPXACT_RUNTIME_PARAMETERS;
+typedef const XACT_RUNTIME_PARAMETERS *LPCXACT_RUNTIME_PARAMETERS;
+
+#define INTERFACE IXACTCue
+DECLARE_INTERFACE(IXACTCue)
+{
+ STDMETHOD(Play)(THIS) PURE;
+ STDMETHOD(Stop)(THIS_ DWORD flags) PURE;
+ STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
+ STDMETHOD(Destroy)(THIS) PURE;
+ STDMETHOD(GetChannelMap)(THIS_ XACTCHANNELMAP *map, DWORD buffer_size, DWORD *needed_size) PURE;
+ STDMETHOD(SetChannelMap)(THIS_ XACTCHANNELMAP *map) PURE;
+ STDMETHOD(GetChannelVolume)(THIS_ XACTCHANNELVOLUME *volume) PURE;
+ STDMETHOD(SetChannelVolume)(THIS_ XACTCHANNELVOLUME *volume) PURE;
+ STDMETHOD(SetMatrixCoefficients)(THIS_ UINT32 src_count, UINT32 dst_count, float *coefficients) PURE;
+ STDMETHOD_(XACTVARIABLEINDEX,GetVariableIndex)(THIS_ const char *name) PURE;
+ STDMETHOD(SetVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE value) PURE;
+ STDMETHOD(GetVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE *value) PURE;
+ STDMETHOD(Pause)(THIS_ BOOL pause) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetProperties)(THIS_ XACT_CUE_INSTANCE_PROPERTIES **properties) PURE;
+#endif
+};
+#undef INTERFACE
+
+#ifndef __cplusplus
+#define IXACTCue_Play(p) (p)->lpVtbl->Destroy(p)
+#define IXACTCue_Stop(p,a) (p)->lpVtbl->Stop(p,a)
+#define IXACTCue_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#define IXACTCue_Destroy(p) (p)->lpVtbl->Destroy(p)
+#define IXACTCue_GetChannelMap(p,a,b,c) (p)->lpVtbl->GetChannelMap(p,a,b,c)
+#define IXACTCue_SetChannelMap(p,a) (p)->lpVtbl->SetChannelMap(p,a)
+#define IXACTCue_GetChannelVolume(p,a) (p)->lpVtbl->GetChannelVolume(p,a)
+#define IXACTCue_SetChannelVolume(p,a) (p)->lpVtbl->SetChannelVolume(p,a)
+#define IXACTCue_SetMatrixCoefficients(p,a,b,c) (p)->lpVtbl->SetMatrixCoefficients(p,a,b,c)
+#define IXACTCue_GetVariableIndex(p,a) (p)->lpVtbl->GetVariableIndex(p,a)
+#define IXACTCue_SetVariable(p,a,b) (p)->lpVtbl->SetVariable(p,a,b)
+#define IXACTCue_GetVariable(p,a,b) (p)->lpVtbl->GetVariable(p,a,b)
+#define IXACTCue_Pause(p,a) (p)->lpVtbl->Pause(p,a)
+#if XACT3_VER >= 0x0205
+#define IXACTCue_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a)
+#endif
+#else
+#define IXACTCue_Play(p) (p)->Destroy()
+#define IXACTCue_Stop(p,a) (p)->Stop(a)
+#define IXACTCue_GetState(p,a) (p)->Stop(a)
+#define IXACTCue_Destroy(p) (p)->Destroy()
+#define IXACTCue_GetChannelMap(p,a,b,c) (p)->GetChannelMap(a,b,c)
+#define IXACTCue_SetChannelMap(p,a) (p)->SetChannelMap(a)
+#define IXACTCue_GetChannelVolume(p,a) (p)->GetChannelVolume(a)
+#define IXACTCue_SetChannelVolume(p,a) (p)->SetChannelVolume(a)
+#define IXACTCue_SetMatrixCoefficients(p,a,b,c) (p)->SetMatrixCoefficients(a,b,c)
+#define IXACTCue_GetVariableIndex(p,a) (p)->GetVariableIndex(a)
+#define IXACTCue_SetVariable(p,a,b) (p)->SetVariable(a,b)
+#define IXACTCue_GetVariable(p,a,b) (p)->GetVariable(a,b)
+#define IXACTCue_Pause(p,a) (p)->Pause(a)
+#if XACT3_VER >= 0x0205
+#define IXACTCue_GetProperties(p,a) (p)->GetProperties(a)
+#endif
+#endif
+
+#define INTERFACE IXACTWave
+DECLARE_INTERFACE(IXACTWave)
+{
+ STDMETHOD(Destroy)(THIS) PURE;
+ STDMETHOD(Play)(THIS) PURE;
+ STDMETHOD(Stop)(THIS_ DWORD flags) PURE;
+ STDMETHOD(Pause)(THIS_ BOOL pause) PURE;
+ STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
+ STDMETHOD(SetPitch)(THIS_ XACTPITCH pitch) PURE;
+ STDMETHOD(SetVolume)(THIS_ XACTVOLUME volume) PURE;
+ STDMETHOD(SetMatrixCoefficients)(THIS_ UINT32 src_count, UINT32 dst_count, float *coefficients) PURE;
+ STDMETHOD(GetProperties)(THIS_ XACT_WAVE_INSTANCE_PROPERTIES *properties) PURE;
+};
+#undef INTERFACE
+
+#ifndef __cplusplus
+#define IXACTWave_Destroy(p) (p)->lpVtbl->Destroy(p)
+#define IXACTWave_Play(p) (p)->lpVtbl->Destroy(p)
+#define IXACTWave_Stop(p,a) (p)->lpVtbl->Stop(p,a)
+#define IXACTWave_Pause(p,a) (p)->lpVtbl->Pause(p,a)
+#define IXACTWave_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#define IXACTWave_SetPitch(p,a) (p)->lpVtbl->SetPitch(p,a)
+#define IXACTWave_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
+#define IXACTWave_SetMatrixCoefficients(p,a,b,c) (p)->lpVtbl->SetMatrixCoefficients(p,a,b,c)
+#define IXACTWave_GetProperties(p,a) (p)->lpVtbl->GetProperties(p,a)
+#else
+#define IXACTWave_Destroy(p) (p)->Destroy()
+#define IXACTWave_Play(p) (p)->Destroy()
+#define IXACTWave_Stop(p,a) (p)->Stop(a)
+#define IXACTWave_Pause(p,a) (p)->Pause(a)
+#define IXACTWave_GetState(p,a) (p)->Stop(a)
+#define IXACTWave_SetPitch(p,a) (p)->SetVariable(a)
+#define IXACTWave_SetVolume(p,a) (p)->SetVolume(a)
+#define IXACTWave_SetMatrixCoefficients(p,a,b,c) (p)->SetMatrixCoefficients(a,b,c)
+#define IXACTWave_GetProperties(p,a) (p)->GetProperties(a)
+#endif
+
+#define INTERFACE IXACTSoundBank
+DECLARE_INTERFACE(IXACTSoundBank)
+{
+ STDMETHOD_(XACTINDEX,GetCueIndex)(THIS_ const char *name) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetNumCues)(THIS_ XACTINDEX *count) PURE;
+ STDMETHOD(GetCueProperties)(THIS_ XACTINDEX index, XACT_CUE_PROPERTIES *properties) PURE;
+#endif
+ STDMETHOD(Prepare)(THIS_ XACTINDEX index, DWORD flags, XACTTIME offset, IXACTCue **cue) PURE;
+ STDMETHOD(Play)(THIS_ XACTINDEX index, DWORD flags, XACTTIME offset, IXACTCue **cue) PURE;
+ STDMETHOD(Stop)(THIS_ XACTINDEX index, DWORD flags) PURE;
+ STDMETHOD(Destroy)(THIS) PURE;
+ STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
+};
+#undef INTERFACE
+
+#ifndef __cplusplus
+#define IXACTSoundBank_GetCueIndex(p,a) (p)->lpVtbl->GetCueIndex(p,a)
+#if XACT3_VER >= 0x0205
+#define IXACTSoundBank_GetNumCues(p,a) (p)->lpVtbl->GetNumCues(p,a)
+#define IXACTSoundBank_GetCueProperties(p,a,b) (p)->lpVtbl->GetCueProperties(p,a,b)
+#endif
+#define IXACTSoundBank_Prepare(p,a,b,c,d) (p)->lpVtbl->Prepare(p,a,b,c,d)
+#define IXACTSoundBank_Play(p,a,b,c,d) (p)->lpVtbl->Play(p,a,b,c,d)
+#define IXACTSoundBank_Stop(p,a,b) (p)->lpVtbl->Stop(p,a,b)
+#define IXACTSoundBank_Destroy(p) (p)->lpVtbl->Destroy(p)
+#define IXACTSoundBank_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#else
+#define IXACTSoundBank_GetCueIndex(p,a) (p)->GetCueIndex(a)
+#if XACT3_VER >= 0x0205
+#define IXACTSoundBank_GetNumCues(p,a) (p)->GetNumCues(a)
+#define IXACTSoundBank_GetCueProperties(p,a,b) (p)->GetCueProperties(a,b)
+#endif
+#define IXACTSoundBank_Prepare(p,a,b,c,d) (p)->Prepare(a,b,c,d)
+#define IXACTSoundBank_Play(p,a,b,c,d) (p)->Play(a,b,c,d)
+#define IXACTSoundBank_Stop(p,a,b) (p)->Stop(a,b)
+#define IXACTSoundBank_Destroy(p) (p)->Destroy()
+#define IXACTSoundBank_GetState(p,a) (p)->GetState(a)
+#endif
+
+#define INTERFACE IXACTWaveBank
+DECLARE_INTERFACE(IXACTWaveBank)
+{
+ STDMETHOD(Destroy)(THIS) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetNumWaves)(THIS_ XACTINDEX *count) PURE;
+ STDMETHOD_(XACTINDEX,GetWaveIndex)(THIS_ const char *name) PURE;
+ STDMETHOD(GetWaveProperties)(THIS_ XACTINDEX index, LPXACT_WAVE_PROPERTIES pWaveProperties) PURE;
+ STDMETHOD(Prepare)(THIS_ XACTINDEX index, DWORD flags, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
+ STDMETHOD(Play)(THIS_ XACTINDEX index, DWORD flags, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
+ STDMETHOD(Stop)(THIS_ XACTINDEX index, DWORD flags) PURE;
+#endif
+ STDMETHOD(GetState)(THIS_ DWORD *state) PURE;
+};
+#undef INTERFACE
+
+#ifndef __cplusplus
+#define IXACTWaveBank_Destroy(p) (p)->lpVtbl->Destroy(p)
+#if XACT3_VER >= 0x0205
+#define IXACTWaveBank_GetNumWaves(p,a) (p)->lpVtbl->GetNumCues(p,a)
+#define IXACTWaveBank_GetWaveIndex(p,a) (p)->lpVtbl->GetWaveIndex(p,a)
+#define IXACTWaveBank_GetWaveProperties(p,a,b) (p)->lpVtbl->GetWaveProperties(p,a,b)
+#define IXACTWaveBank_Prepare(p,a,b,c,d,e) (p)->lpVtbl->Prepare(p,a,b,c,d,e)
+#define IXACTWaveBank_Play(p,a,b,c,d,e) (p)->lpVtbl->Play(p,a,b,c,d,e)
+#define IXACTWaveBank_Stop(p,a,b) (p)->lpVtbl->Stop(p,a,b)
+#endif
+#define IXACTWaveBank_GetState(p,a) (p)->lpVtbl->GetState(p,a)
+#else
+#define IXACTWaveBank_Destroy(p) (p)->Destroy()
+#if XACT3_VER >= 0x0205
+#define IXACTWaveBank_GetNumWaves(p,a) (p)->GetNumWaves(a)
+#define IXACTWaveBank_GetWaveIndex(p,a) (p)->GetWaveIndex(a)
+#define IXACTWaveBank_GetWaveProperties(p,a,b) (p)->GetWaveProperties(a,b)
+#define IXACTWaveBank_Prepare(p,a,b,c,d,e) (p)->Prepare(a,b,c,d,e)
+#define IXACTWaveBank_Play(p,a,b,c,d,e) (p)->Play(a,b,c,d,e)
+#define IXACTWaveBank_Stop(p,a,b) (p)->Stop(a,b)
+#endif
+#define IXACTWaveBank_GetState(p,a) (p)->GetState(a)
+#endif
+
+#define INTERFACE IXACTEngine
+DECLARE_INTERFACE_(IXACTEngine,IUnknown)
+{
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID iid, void **out) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD(GetRendererCount)(THIS_ XACTINDEX *count) PURE;
+ STDMETHOD(GetRendererDetails)(THIS_ XACTINDEX index, XACT_RENDERER_DETAILS *details) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(GetFinalMixFormat)(THIS_ WAVEFORMATEXTENSIBLE *format) PURE;
+#endif
+ STDMETHOD(Initialize)(THIS_ const XACT_RUNTIME_PARAMETERS *params) PURE;
+ STDMETHOD(Shutdown)(THIS) PURE;
+ STDMETHOD(DoWork)(THIS) PURE;
+ STDMETHOD(CreateSoundBank)(THIS_ const void *buffer, DWORD size, DWORD flags, DWORD alloc_flags, IXACTSoundBank **bank) PURE;
+ STDMETHOD(CreateInMemoryWaveBank)(THIS_ const void *buffer, DWORD size, DWORD flags, DWORD alloc_flags, IXACTWaveBank **bank) PURE;
+ STDMETHOD(CreateStreamingWaveBank)(THIS_ const XACT_WAVEBANK_STREAMING_PARAMETERS *params, IXACTWaveBank **bank) PURE;
+#if XACT3_VER >= 0x0205
+ STDMETHOD(PrepareWave)(THIS_ DWORD flags, const char *path, WORD packet_size, DWORD alignment, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
+ STDMETHOD(PrepareInMemoryWave)(THIS_ DWORD flags, WAVEBANKENTRY entry, DWORD *seek_table, BYTE *data, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
+ STDMETHOD(PrepareStreamingWave)(THIS_ DWORD flags, WAVEBANKENTRY entry, XACT_STREAMING_PARAMETERS params, DWORD alignment, DWORD *seek_table, DWORD offset, XACTLOOPCOUNT loop_count, IXACTWave **wave) PURE;
+#endif
+ STDMETHOD(RegisterNotification)(THIS_ const XACT_NOTIFICATION_DESCRIPTION *desc) PURE;
+ STDMETHOD(UnRegisterNotification)(THIS_ const XACT_NOTIFICATION_DESCRIPTION *desc) PURE;
+ STDMETHOD_(XACTCATEGORY,GetCategory)(THIS_ const char *name) PURE;
+ STDMETHOD(Stop)(THIS_ XACTCATEGORY category, DWORD flags) PURE;
+ STDMETHOD(SetVolume)(THIS_ XACTCATEGORY category, XACTVOLUME volume) PURE;
+ STDMETHOD(Pause)(THIS_ XACTCATEGORY category, BOOL pause) PURE;
+ STDMETHOD_(XACTVARIABLEINDEX,GetGlobalVariableIndex)(THIS_ const char *name) PURE;
+ STDMETHOD(SetGlobalVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE value) PURE;
+ STDMETHOD(GetGlobalVariable)(THIS_ XACTVARIABLEINDEX index, XACTVARIABLEVALUE *value) PURE;
+};
+#undef INTERFACE
+
+#ifndef __cplusplus
+#define IXACTEngine_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IXACTEngine_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IXACTEngine_Release(p) (p)->lpVtbl->Release(p)
+#define IXACTEngine_GetRendererCount(p,a) (p)->lpVtbl->GetRendererCount(p,a)
+#define IXACTEngine_GetRendererDetails(p,a,b) (p)->lpVtbl->GetRendererDetails(p,a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_GetFinalMixFormat(p,a) (p)->lpVtbl->GetFinalMixFormat(p,a)
+#endif
+#define IXACTEngine_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
+#define IXACTEngine_Shutdown(p) (p)->lpVtbl->Shutdown(p)
+#define IXACTEngine_DoWork(p) (p)->lpVtbl->DoWork(p)
+#define IXACTEngine_CreateSoundBank(p,a,b,c,d,e) (p)->lpVtbl->CreateSoundBank(p,a,b,c,d,e)
+#define IXACTEngine_CreateInMemoryWaveBank(p,a,b,c,d,e) (p)->lpVtbl->CreateInMemoryWaveBank(p,a,b,c,d,e)
+#define IXACTEngine_CreateStreamingWaveBank(p,a,b) (p)->lpVtbl->CreateStreamingWaveBank(p,a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_PrepareWave(p,a,b,c,d,e,f,g) (p)->lpVtbl->PrepareWave(p,a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareInMemoryWave(p,a,b,c,d,e,f,g) (p)->lpVtbl->PrepareInMemoryWave(p,a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareStreamingWave(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->PrepareStreamingWave(p,a,b,c,d,e,f,g,h)
+#endif
+#define IXACTEngine_RegisterNotification(p,a) (p)->lpVtbl->RegisterNotification(p,a)
+#define IXACTEngine_UnRegisterNotification(p,a) (p)->lpVtbl->UnRegisterNotification(p,a)
+#define IXACTEngine_GetCategory(p,a) (p)->lpVtbl->GetCategory(p,a)
+#define IXACTEngine_Stop(p,a,b) (p)->lpVtbl->Stop(a,b)
+#define IXACTEngine_SetVolume(p,a,b) (p)->lpVtbl->SetVolume(p,a,b)
+#define IXACTEngine_Pause(p,a,b) (p)->lpVtbl->Pause(a,b)
+#define IXACTEngine_GetGlobalVariableIndex(p,a) (p)->lpVtbl->GetGlobalVariableIndex(p,a)
+#define IXACTEngine_SetGlobalVariable(p,a,b) (p)->lpVtbl->SetGlobalVariable(p,a,b)
+#define IXACTEngine_GetGlobalVariable(p,a,b) (p)->lpVtbl->GetGlobalVariable(p,a,b)
+#else
+#define IXACTEngine_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
+#define IXACTEngine_AddRef(p) (p)->AddRef()
+#define IXACTEngine_Release(p) (p)->Release()
+#define IXACTEngine_GetRendererCount(p,a) (p)->GetRendererCount(a)
+#define IXACTEngine_GetRendererDetails(p,a,b) (p)->GetRendererDetails(a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_GetFinalMixFormat(p,a) (p)->GetFinalMixFormat(a)
+#endif
+#define IXACTEngine_Initialize(p,a) (p)->Initialize(a)
+#define IXACTEngine_Shutdown(p) (p)->Shutdown()
+#define IXACTEngine_DoWork(p) (p)->DoWork()
+#define IXACTEngine_CreateSoundBank(p,a,b,c,d,e) (p)->CreateSoundBank(a,b,c,d,e)
+#define IXACTEngine_CreateInMemoryWaveBank(p,a,b,c,d,e) (p)->CreateInMemoryWaveBank(a,b,c,d,e)
+#define IXACTEngine_CreateStreamingWaveBank(p,a,b) (p)->CreateStreamingWaveBank(a,b)
+#if XACT3_VER >= 0x0205
+#define IXACTEngine_PrepareWave(p,a,b,c,d,e,f,g) (p)->PrepareWave(a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareInMemoryWave(p,a,b,c,d,e,f,g) (p)->PrepareInMemoryWave(a,b,c,d,e,f,g)
+#define IXACTEngine_PrepareStreamingWave(p,a,b,c,d,e,f,g,h) (p)->PrepareStreamingWave(a,b,c,d,e,f,g,h)
+#endif
+#define IXACTEngine_RegisterNotification(p,a) (p)->RegisterNotification(a)
+#define IXACTEngine_UnRegisterNotification(p,a) (p)->UnRegisterNotification(a)
+#define IXACTEngine_GetCategory(p,a) (p)->GetCategory(a)
+#define IXACTEngine_Stop(p,a,b) (p)->Stop(a,b)
+#define IXACTEngine_SetVolume(p,a,b) (p)->SetVolume(a,b)
+#define IXACTEngine_Pause(p,a,b) (p)->Pause(a,b)
+#define IXACTEngine_GetGlobalVariableIndex(p,a) (p)->GetGlobalVariableIndex(a)
+#define IXACTEngine_SetGlobalVariable(p,a,b) (p)->SetGlobalVariable(a,b)
+#define IXACTEngine_GetGlobalVariable(p,a,b) (p)->GetGlobalVariable(a,b)
+#endif
+
+#endif /* _XACT_H_ */
--
2.30.2
3
7
[PATCH v3 resend 4/4] user32: Remove code that queries monitor information from SetupAPI device properties.
by Zhiyi Zhang 21 Apr '21
by Zhiyi Zhang 21 Apr '21
21 Apr '21
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/user32/sysparams.c | 156 ++--------------------------------------
1 file changed, 4 insertions(+), 152 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index 85f4446cc11..bde878f8401 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -102,25 +102,10 @@ DEFINE_DEVPROPKEY(DEVPROPKEY_MONITOR_OUTPUT_ID, 0xca085853, 0x16ce, 0x48aa, 0xb1
/* Wine specific monitor properties */
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_STATEFLAGS, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 2);
-DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCMONITOR, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 3);
-DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCWORK, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 4);
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 5);
#define NULLDRV_DEFAULT_HMONITOR ((HMONITOR)(UINT_PTR)(0x10000 + 1))
-/* Cached monitor information */
-static MONITORINFOEXW *monitors;
-static UINT monitor_count;
-static FILETIME last_query_monitors_time;
-static CRITICAL_SECTION monitors_section;
-static CRITICAL_SECTION_DEBUG monitors_critsect_debug =
-{
- 0, 0, &monitors_section,
- { &monitors_critsect_debug.ProcessLocksList, &monitors_critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": monitors_section") }
-};
-static CRITICAL_SECTION monitors_section = { &monitors_critsect_debug, -1 , 0, 0, 0, 0 };
-
static HDC display_dc;
static CRITICAL_SECTION display_dc_section;
static CRITICAL_SECTION_DEBUG critsect_debug =
@@ -144,7 +129,6 @@ static DPI_AWARENESS dpi_awareness;
static DPI_AWARENESS default_awareness = DPI_AWARENESS_UNAWARE;
static HKEY volatile_base_key;
-static HKEY video_key;
union sysparam_all_entry;
@@ -3782,100 +3766,8 @@ HMONITOR WINAPI MonitorFromWindow(HWND hWnd, DWORD dwFlags)
return MonitorFromRect( &rect, dwFlags );
}
-/* Return FALSE on failure and TRUE on success */
-static BOOL update_monitor_cache(void)
-{
- SP_DEVINFO_DATA device_data = {sizeof(device_data)};
- HDEVINFO devinfo = INVALID_HANDLE_VALUE;
- MONITORINFOEXW *monitor_array;
- FILETIME filetime = {0};
- DWORD device_count = 0;
- HANDLE mutex = NULL;
- DWORD state_flags;
- BOOL ret = FALSE;
- BOOL is_replica;
- DWORD i = 0, j;
- DWORD type;
-
- /* Update monitor cache from SetupAPI if it's outdated */
- if (!video_key && RegOpenKeyW( HKEY_LOCAL_MACHINE, L"HARDWARE\\DEVICEMAP\\VIDEO", &video_key ))
- return FALSE;
- if (RegQueryInfoKeyW( video_key, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &filetime ))
- return FALSE;
- if (CompareFileTime( &filetime, &last_query_monitors_time ) < 1)
- return TRUE;
-
- mutex = get_display_device_init_mutex();
- EnterCriticalSection( &monitors_section );
- devinfo = SetupDiGetClassDevsW( &GUID_DEVCLASS_MONITOR, L"DISPLAY", NULL, DIGCF_PRESENT );
-
- while (SetupDiEnumDeviceInfo( devinfo, i++, &device_data ))
- {
- /* Inactive monitors don't get enumerated */
- if (!SetupDiGetDevicePropertyW( devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_STATEFLAGS, &type,
- (BYTE *)&state_flags, sizeof(DWORD), NULL, 0 ))
- goto fail;
- if (state_flags & DISPLAY_DEVICE_ACTIVE)
- device_count++;
- }
-
- if (device_count && monitor_count < device_count)
- {
- monitor_array = heap_alloc( device_count * sizeof(*monitor_array) );
- if (!monitor_array)
- goto fail;
- heap_free( monitors );
- monitors = monitor_array;
- }
-
- for (i = 0, monitor_count = 0; SetupDiEnumDeviceInfo( devinfo, i, &device_data ); i++)
- {
- if (!SetupDiGetDevicePropertyW( devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_STATEFLAGS, &type,
- (BYTE *)&state_flags, sizeof(DWORD), NULL, 0 ))
- goto fail;
- if (!(state_flags & DISPLAY_DEVICE_ACTIVE))
- continue;
- if (!SetupDiGetDevicePropertyW( devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_RCMONITOR, &type,
- (BYTE *)&monitors[monitor_count].rcMonitor, sizeof(RECT), NULL, 0 ))
- goto fail;
-
- /* Replicas in mirroring monitor sets don't get enumerated */
- is_replica = FALSE;
- for (j = 0; j < monitor_count; j++)
- {
- if (EqualRect(&monitors[j].rcMonitor, &monitors[monitor_count].rcMonitor))
- {
- is_replica = TRUE;
- break;
- }
- }
- if (is_replica)
- continue;
-
- if (!SetupDiGetDevicePropertyW( devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_RCWORK, &type,
- (BYTE *)&monitors[monitor_count].rcWork, sizeof(RECT), NULL, 0 ))
- goto fail;
- if (!SetupDiGetDevicePropertyW( devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, &type,
- (BYTE *)monitors[monitor_count].szDevice, CCHDEVICENAME * sizeof(WCHAR), NULL, 0))
- goto fail;
- monitors[monitor_count].dwFlags =
- !wcscmp( L"\\\\.\\DISPLAY1", monitors[monitor_count].szDevice ) ? MONITORINFOF_PRIMARY : 0;
-
- monitor_count++;
- }
-
- last_query_monitors_time = filetime;
- ret = TRUE;
-fail:
- SetupDiDestroyDeviceInfoList( devinfo );
- LeaveCriticalSection( &monitors_section );
- release_display_device_init_mutex( mutex );
- return ret;
-}
-
BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, MONITORINFO *info )
{
- UINT index = (UINT_PTR)handle - 1;
NTSTATUS status;
TRACE("(%p, %p)\n", handle, info);
@@ -3917,29 +3809,8 @@ BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, MONITORINFO *info )
return TRUE;
}
- if (!update_monitor_cache())
- {
- SetLastError( ERROR_INVALID_MONITOR_HANDLE );
- return FALSE;
- }
-
- EnterCriticalSection( &monitors_section );
- if (index < monitor_count)
- {
- info->rcMonitor = monitors[index].rcMonitor;
- info->rcWork = monitors[index].rcWork;
- info->dwFlags = monitors[index].dwFlags;
- if (info->cbSize >= sizeof(MONITORINFOEXW))
- lstrcpyW( ((MONITORINFOEXW *)info)->szDevice, monitors[index].szDevice );
- LeaveCriticalSection( &monitors_section );
- return TRUE;
- }
- else
- {
- LeaveCriticalSection( &monitors_section );
- SetLastError( ERROR_INVALID_MONITOR_HANDLE );
- return FALSE;
- }
+ SetLastError( ERROR_INVALID_MONITOR_HANDLE );
+ return FALSE;
}
/***********************************************************************
@@ -4081,27 +3952,8 @@ BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC pro
if (i)
return TRUE;
- if (update_monitor_cache())
- {
- while (TRUE)
- {
- EnterCriticalSection( &monitors_section );
- if (i >= monitor_count)
- {
- LeaveCriticalSection( &monitors_section );
- return TRUE;
- }
- monitor_rect = monitors[i].rcMonitor;
- LeaveCriticalSection( &monitors_section );
-
- if (!proc( (HMONITOR)(UINT_PTR)(i + 1), hdc, &monitor_rect, lp ))
- return FALSE;
-
- ++i;
- }
- }
-
- /* Fallback to report one monitor if using SetupAPI failed */
+ /* Fallback to report one monitor if wineserver calls failed */
+ ERR("Failed to enumerate monitors, reporting a 640x480 monitor.\n");
SetRect( &monitor_rect, 0, 0, 640, 480 );
if (!proc( NULLDRV_DEFAULT_HMONITOR, hdc, &monitor_rect, lp ))
return FALSE;
--
2.27.0
1
0
[PATCH v3 resend 3/4] winex11.drv: Query virtual screen and primary screen rectangles from the wineserver.
by Zhiyi Zhang 21 Apr '21
by Zhiyi Zhang 21 Apr '21
21 Apr '21
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/winex11.drv/display.c | 39 ++++++++++++++++----------------------
1 file changed, 16 insertions(+), 23 deletions(-)
diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
index d10e1bb4b25..9de73926d18 100644
--- a/dlls/winex11.drv/display.c
+++ b/dlls/winex11.drv/display.c
@@ -47,7 +47,6 @@ DEFINE_DEVPROPKEY(DEVPROPKEY_MONITOR_OUTPUT_ID, 0xca085853, 0x16ce, 0x48aa, 0xb1
/* Wine specific properties */
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_GPU_VULKAN_UUID, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5c, 2);
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_STATEFLAGS, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 2);
-DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCMONITOR, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 3);
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 5);
static const WCHAR driver_date_dataW[] = {'D','r','i','v','e','r','D','a','t','e','D','a','t','a',0};
@@ -146,14 +145,11 @@ void release_display_device_init_mutex(HANDLE mutex)
static BOOL update_screen_cache(void)
{
RECT virtual_rect = {0}, primary_rect = {0}, monitor_rect;
- SP_DEVINFO_DATA device_data = {sizeof(device_data)};
- HDEVINFO devinfo = INVALID_HANDLE_VALUE;
FILETIME filetime = {0};
HANDLE mutex = NULL;
+ NTSTATUS status;
DWORD i = 0;
INT result;
- DWORD type;
- BOOL ret = FALSE;
EnterCriticalSection(&screen_section);
if ((!video_key && RegOpenKeyW(HKEY_LOCAL_MACHINE, video_keyW, &video_key))
@@ -169,15 +165,21 @@ static BOOL update_screen_cache(void)
mutex = get_display_device_init_mutex();
- devinfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_MONITOR, displayW, NULL, DIGCF_PRESENT);
- if (devinfo == INVALID_HANDLE_VALUE)
- goto fail;
-
- while (SetupDiEnumDeviceInfo(devinfo, i++, &device_data))
+ while (TRUE)
{
- if (!SetupDiGetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_RCMONITOR, &type,
- (BYTE *)&monitor_rect, sizeof(monitor_rect), NULL, 0))
- goto fail;
+ SERVER_START_REQ(enum_monitor)
+ {
+ req->index = i++;
+ if (!(status = wine_server_call(req)))
+ {
+ SetRect(&monitor_rect, reply->monitor_rect.left, reply->monitor_rect.top,
+ reply->monitor_rect.right, reply->monitor_rect.bottom);
+ }
+ }
+ SERVER_END_REQ;
+
+ if (status)
+ break;
UnionRect(&virtual_rect, &virtual_rect, &monitor_rect);
if (i == 1)
@@ -189,13 +191,8 @@ static BOOL update_screen_cache(void)
primary_monitor_rect = primary_rect;
last_query_screen_time = filetime;
LeaveCriticalSection(&screen_section);
- ret = TRUE;
-fail:
- SetupDiDestroyDeviceInfoList(devinfo);
release_display_device_init_mutex(mutex);
- if (!ret)
- WARN("Update screen cache failed!\n");
- return ret;
+ return TRUE;
}
POINT virtual_screen_to_root(INT x, INT y)
@@ -622,10 +619,6 @@ static BOOL X11DRV_InitMonitor(HDEVINFO devinfo, const struct x11drv_monitor *mo
if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_STATEFLAGS, DEVPROP_TYPE_UINT32,
(const BYTE *)&monitor->state_flags, sizeof(monitor->state_flags), 0))
goto done;
- /* RcMonitor */
- if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_RCMONITOR, DEVPROP_TYPE_BINARY,
- (const BYTE *)&monitor->rc_monitor, sizeof(monitor->rc_monitor), 0))
- goto done;
/* Adapter name */
length = sprintfW(bufferW, adapter_name_fmtW, video_index + 1);
if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, DEVPROP_TYPE_STRING,
--
2.27.0
1
0
[PATCH v3 resend 2/4] winemac.drv: Store monitor information in the wineserver for EnumDisplayMonitors().
by Zhiyi Zhang 21 Apr '21
by Zhiyi Zhang 21 Apr '21
21 Apr '21
Fix a regression that Office 2016/365 has a 640x480 main window.
Office 2016/365 hooks NtOpenKeyEx() and prevents access to SetupAPI device properties.
After querying monitor information from SetupAPI failed, EnumDisplayMonitors() reports
a fallback monitor of size 640x480.
As to why store the monitor information in the wineserver, it seems that EnumDisplayMonitors()
reports monitors connected to current user logon session. For instance, EnumDisplayMonitors()
always report one monitor when called by services.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/winemac.drv/display.c | 71 ++++++++++++++++++++++++++++++--------
1 file changed, 56 insertions(+), 15 deletions(-)
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c
index 6706c88341c..c09a7cc6249 100644
--- a/dlls/winemac.drv/display.c
+++ b/dlls/winemac.drv/display.c
@@ -32,6 +32,7 @@
#include "setupapi.h"
#define WIN32_NO_STATUS
#include "winternl.h"
+#include "wine/server.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(display);
@@ -57,8 +58,6 @@ DEFINE_DEVPROPKEY(DEVPROPKEY_MONITOR_OUTPUT_ID, 0xca085853, 0x16ce, 0x48aa, 0xb1
/* Wine specific monitor properties */
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_STATEFLAGS, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 2);
-DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCMONITOR, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 3);
-DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCWORK, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 4);
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 5);
static const char initial_mode_key[] = "Initial Display Mode";
@@ -1628,10 +1627,12 @@ static BOOL macdrv_init_monitor(HDEVINFO devinfo, const struct macdrv_monitor *m
int video_index, const LUID *gpu_luid, UINT output_id)
{
SP_DEVINFO_DATA device_data = {sizeof(SP_DEVINFO_DATA)};
+ RECT monitor_rect, work_rect;
WCHAR nameW[MAX_PATH];
WCHAR bufferW[MAX_PATH];
+ NTSTATUS status;
+ DWORD length;
HKEY hkey;
- RECT rect;
BOOL ret = FALSE;
/* Create GUID_DEVCLASS_MONITOR instance */
@@ -1666,22 +1667,36 @@ static BOOL macdrv_init_monitor(HDEVINFO devinfo, const struct macdrv_monitor *m
if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_STATEFLAGS, DEVPROP_TYPE_UINT32,
(const BYTE *)&monitor->state_flags, sizeof(monitor->state_flags), 0))
goto done;
- /* RcMonitor */
- rect = rect_from_cgrect(monitor->rc_monitor);
- if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_RCMONITOR, DEVPROP_TYPE_BINARY,
- (const BYTE *)&rect, sizeof(rect), 0))
- goto done;
- /* RcWork */
- rect = rect_from_cgrect(monitor->rc_work);
- if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_RCWORK, DEVPROP_TYPE_BINARY,
- (const BYTE *)&rect, sizeof(rect), 0))
- goto done;
/* Adapter name */
- sprintfW(bufferW, adapter_name_fmtW, video_index + 1);
+ length = sprintfW(bufferW, adapter_name_fmtW, video_index + 1);
if (!SetupDiSetDevicePropertyW(devinfo, &device_data, &WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, DEVPROP_TYPE_STRING,
- (const BYTE *)bufferW, (lstrlenW(bufferW) + 1) * sizeof(WCHAR), 0))
+ (const BYTE *)bufferW, (length + 1) * sizeof(WCHAR), 0))
goto done;
+ /* EnumDisplayMonitors() doesn't enumerate mirrored replicas and inactive monitors */
+ if (monitor_index == 0 && monitor->state_flags & DISPLAY_DEVICE_ACTIVE)
+ {
+ SERVER_START_REQ(create_monitor)
+ {
+ monitor_rect = rect_from_cgrect(monitor->rc_monitor);
+ work_rect = rect_from_cgrect(monitor->rc_work);
+ req->monitor_rect.top = monitor_rect.top;
+ req->monitor_rect.left = monitor_rect.left;
+ req->monitor_rect.right = monitor_rect.right;
+ req->monitor_rect.bottom = monitor_rect.bottom;
+ req->work_rect.top = work_rect.top;
+ req->work_rect.left = work_rect.left;
+ req->work_rect.right = work_rect.right;
+ req->work_rect.bottom = work_rect.bottom;
+ wine_server_add_data(req, bufferW, length * sizeof(WCHAR));
+ status = wine_server_call(req);
+ }
+ SERVER_END_REQ;
+
+ if (status)
+ goto done;
+ }
+
ret = TRUE;
done:
if (!ret)
@@ -1693,7 +1708,9 @@ static void prepare_devices(HKEY video_hkey)
{
static const BOOL not_present = FALSE;
SP_DEVINFO_DATA device_data = {sizeof(device_data)};
+ HMONITOR monitor = NULL;
HDEVINFO devinfo;
+ NTSTATUS status;
DWORD i = 0;
/* Remove all monitors */
@@ -1705,6 +1722,30 @@ static void prepare_devices(HKEY video_hkey)
}
SetupDiDestroyDeviceInfoList(devinfo);
+ while (TRUE)
+ {
+ SERVER_START_REQ(enum_monitor)
+ {
+ req->index = 0;
+ if (!(status = wine_server_call(req)))
+ monitor = wine_server_ptr_handle(reply->handle);
+ }
+ SERVER_END_REQ;
+
+ if (status)
+ break;
+
+ SERVER_START_REQ(destroy_monitor)
+ {
+ req->handle = wine_server_user_handle(monitor);
+ status = wine_server_call(req);
+ }
+ SERVER_END_REQ;
+
+ if (status)
+ ERR("Failed to destroy monitor %p.\n", monitor);
+ }
+
/* Clean up old adapter keys for reinitialization */
RegDeleteTreeW(video_hkey, NULL);
--
2.27.0
1
0
20 Apr '21
As some thread may use a different desktop from their process.
This fixes the user32 win tests, which leaks a desktop that never gets
closed. The test_shell_window test creates a new desktop, which spawns
explorer.exe process, incrementing the desktop user count to 1, then
associates the desktop to a thread, which closes it on exit.
Never the user count is incremented to 2, and closing the thread desktop
doesn't either check whether the desktop process should be terminated.
Reversely, it is possible to create a desktop, associate it with a
thread /and/ a process, and this time the desktop process would be
terminated when the process exits, although the thread may still be
using it.
Tracking the users per thread is more robust and fixes the problem as
set_thread_desktop increments the desktop user count, and thread exit
decrements it.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
v2: Close the system process threads desktops before setting the
is_system flag.
server/process.c | 5 +++-
server/thread.c | 10 +++++++-
server/user.h | 2 ++
server/winstation.c | 62 +++++++++++++++++++++++++++------------------
4 files changed, 52 insertions(+), 27 deletions(-)
diff --git a/server/process.c b/server/process.c
index 8ad5a59a20b..3419f82c153 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1503,6 +1503,7 @@ DECL_HANDLER(get_process_idle_event)
DECL_HANDLER(make_process_system)
{
struct process *process = current->process;
+ struct thread *thread;
if (!shutdown_event)
{
@@ -1515,8 +1516,10 @@ DECL_HANDLER(make_process_system)
if (!process->is_system)
{
- process->is_system = 1;
+ LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry )
+ close_thread_desktop( thread );
close_process_desktop( process );
+ process->is_system = 1;
if (!--user_processes && !shutdown_stage && master_socket_timeout != TIMEOUT_INFINITE)
shutdown_timeout = add_timeout_user( master_socket_timeout, server_shutdown_timeout, NULL );
}
diff --git a/server/thread.c b/server/thread.c
index fe9f9bdec37..5375b055758 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -306,6 +306,7 @@ static struct context *create_thread_context( struct thread *thread )
/* create a new thread */
struct thread *create_thread( int fd, struct process *process, const struct security_descriptor *sd )
{
+ struct desktop *desktop;
struct thread *thread;
int request_pipe[2];
@@ -342,7 +343,7 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
init_thread_structure( thread );
thread->process = (struct process *)grab_object( process );
- thread->desktop = process->desktop;
+ thread->desktop = 0;
thread->affinity = process->affinity;
if (!current) current = thread;
@@ -369,6 +370,13 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
return NULL;
}
+ if (process->desktop && (desktop = get_desktop_obj( process, process->desktop, 0 )))
+ {
+ set_thread_default_desktop( process, thread, desktop, process->desktop );
+ release_object( desktop );
+ }
+ clear_error(); /* ignore errors */
+
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
add_process_thread( thread->process, thread );
return thread;
diff --git a/server/user.h b/server/user.h
index 6267f3e2881..a5f906cea51 100644
--- a/server/user.h
+++ b/server/user.h
@@ -185,6 +185,8 @@ extern struct winstation *get_process_winstation( struct process *process, unsig
extern struct desktop *get_thread_desktop( struct thread *thread, unsigned int access );
extern void connect_process_winstation( struct process *process, struct thread *parent_thread,
struct process *parent_process );
+extern void set_thread_default_desktop( struct process *process, struct thread *thread,
+ struct desktop *desktop, obj_handle_t handle );
extern void set_process_default_desktop( struct process *process, struct desktop *desktop,
obj_handle_t handle );
extern void close_process_desktop( struct process *process );
diff --git a/server/winstation.c b/server/winstation.c
index 1c7552f0687..94527899311 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -324,15 +324,23 @@ static void add_desktop_user( struct desktop *desktop )
/* remove a user of the desktop and start the close timeout if necessary */
static void remove_desktop_user( struct desktop *desktop )
{
+ struct process *process;
assert( desktop->users > 0 );
desktop->users--;
/* if we have one remaining user, it has to be the manager of the desktop window */
- if (desktop->users == 1 && get_top_window_owner( desktop ))
- {
- assert( !desktop->close_timeout );
+ if ((process = get_top_window_owner( desktop )) && desktop->users == process->running_threads && !desktop->close_timeout)
desktop->close_timeout = add_timeout_user( -TICKS_PER_SEC, close_desktop_timeout, desktop );
- }
+}
+
+/* set the thread desktop to the process default desktop */
+void set_thread_default_desktop( struct process *process, struct thread *thread,
+ struct desktop *desktop, obj_handle_t handle )
+{
+ if (thread->desktop || thread->desktop == handle) return; /* nothing to do */
+ thread->desktop = handle;
+
+ if (!process->is_system) add_desktop_user( desktop );
}
/* set the process default desktop handle */
@@ -340,24 +348,13 @@ void set_process_default_desktop( struct process *process, struct desktop *deskt
obj_handle_t handle )
{
struct thread *thread;
- struct desktop *old_desktop;
if (process->desktop == handle) return; /* nothing to do */
-
- if (!(old_desktop = get_desktop_obj( process, process->desktop, 0 ))) clear_error();
process->desktop = handle;
/* set desktop for threads that don't have one yet */
LIST_FOR_EACH_ENTRY( thread, &process->thread_list, struct thread, proc_entry )
- if (!thread->desktop) thread->desktop = handle;
-
- if (!process->is_system && desktop != old_desktop)
- {
- add_desktop_user( desktop );
- if (old_desktop) remove_desktop_user( old_desktop );
- }
-
- if (old_desktop) release_object( old_desktop );
+ set_thread_default_desktop( process, thread, desktop, handle );
}
/* connect a process to its window station */
@@ -413,23 +410,31 @@ done:
/* close the desktop of a given process */
void close_process_desktop( struct process *process )
{
- struct desktop *desktop;
+ obj_handle_t handle;
- if (process->desktop && (desktop = get_desktop_obj( process, process->desktop, 0 )))
- {
- remove_desktop_user( desktop );
- release_object( desktop );
- }
- clear_error(); /* ignore errors */
+ if (!(handle = process->desktop)) return;
+ process->desktop = 0;
+
+ close_handle( process, handle );
}
/* close the desktop of a given thread */
void close_thread_desktop( struct thread *thread )
{
- obj_handle_t handle = thread->desktop;
+ struct desktop *desktop;
+ obj_handle_t handle;
+ if (!(handle = thread->desktop)) return;
thread->desktop = 0;
- if (handle) close_handle( thread->process, handle );
+
+ if (!thread->process->is_system && (desktop = get_desktop_obj( thread->process, handle, 0 )))
+ {
+ remove_desktop_user( desktop );
+ release_object( desktop );
+ }
+ clear_error(); /* ignore errors */
+
+ close_handle( thread->process, handle );
}
/* create a window station */
@@ -624,7 +629,14 @@ DECL_HANDLER(set_thread_desktop)
if (old_desktop != new_desktop && current->desktop_users > 0)
set_error( STATUS_DEVICE_BUSY );
else
+ {
current->desktop = req->handle; /* FIXME: should we close the old one? */
+ if (!current->process->is_system && old_desktop != new_desktop)
+ {
+ add_desktop_user( new_desktop );
+ if (old_desktop) remove_desktop_user( old_desktop );
+ }
+ }
if (!current->process->desktop)
set_process_default_desktop( current->process, new_desktop, req->handle );
--
2.31.0
2
2
[PATCH vkd3d v2 1/6] vkd3d-shader: "reg_size" is tracked in whole registers.
by Zebediah Figura 20 Apr '21
by Zebediah Figura 20 Apr '21
20 Apr '21
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
libs/vkd3d-shader/hlsl_codegen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c
index e254cede..81e60101 100644
--- a/libs/vkd3d-shader/hlsl_codegen.c
+++ b/libs/vkd3d-shader/hlsl_codegen.c
@@ -717,7 +717,7 @@ static struct hlsl_reg allocate_range(struct liveness *liveness,
static const char *debug_register(char class, struct hlsl_reg reg, const struct hlsl_type *type)
{
- if (type->reg_size > 4)
+ if (type->reg_size > 1)
return vkd3d_dbg_sprintf("%c%u-%c%u", class, reg.id, class,
reg.id + type->reg_size - 1);
return vkd3d_dbg_sprintf("%c%u%s", class, reg.id, debug_hlsl_writemask(reg.writemask));
--
2.31.1
6
27
[PATCH v2 1/2] advapi32/tests: Add a test for setting the SD owner of a directory to a group.
by Zebediah Figura 20 Apr '21
by Zebediah Figura 20 Apr '21
20 Apr '21
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
v2: rebase onto master...
dlls/advapi32/tests/security.c | 69 ++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index ce9c26d238e..08b73495aaa 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -8306,6 +8306,74 @@ static void test_elevation(void)
CloseHandle(token);
}
+static void test_group_as_file_owner(void)
+{
+ char sd_buffer[200], sid_buffer[100];
+ SECURITY_DESCRIPTOR *sd = (SECURITY_DESCRIPTOR *)sd_buffer;
+ char temp_path[MAX_PATH], path[MAX_PATH];
+ SID *admin_sid = (SID *)sid_buffer;
+ BOOL ret, present, defaulted;
+ SECURITY_DESCRIPTOR new_sd;
+ HANDLE file;
+ DWORD size;
+ ACL *dacl;
+
+ /* The EA Origin client sets the SD owner of a directory to Administrators,
+ * while using the default DACL, and subsequently tries to create
+ * subdirectories. */
+
+ size = sizeof(sid_buffer);
+ CreateWellKnownSid(WinBuiltinAdministratorsSid, NULL, admin_sid, &size);
+
+ ret = CheckTokenMembership(NULL, admin_sid, &present);
+ ok(ret, "got error %u\n", GetLastError());
+ if (!present)
+ {
+ skip("user is not an administrator\n");
+ return;
+ }
+
+ GetTempPathA(ARRAY_SIZE(temp_path), temp_path);
+ sprintf(path, "%s\\testdir", temp_path);
+
+ ret = CreateDirectoryA(path, NULL);
+ ok(ret, "got error %u\n", GetLastError());
+
+ file = CreateFileA(path, FILE_ALL_ACCESS, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
+ ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
+
+ ret = GetKernelObjectSecurity(file, DACL_SECURITY_INFORMATION, sd_buffer, sizeof(sd_buffer), &size);
+ ok(ret, "got error %u\n", GetLastError());
+ ret = GetSecurityDescriptorDacl(sd, &present, &dacl, &defaulted);
+ ok(ret, "got error %u\n", GetLastError());
+
+ InitializeSecurityDescriptor(&new_sd, SECURITY_DESCRIPTOR_REVISION);
+
+ ret = SetSecurityDescriptorOwner(&new_sd, admin_sid, FALSE);
+ ok(ret, "got error %u\n", GetLastError());
+
+ ret = GetSecurityDescriptorDacl(sd, &present, &dacl, &defaulted);
+ ok(ret, "got error %u\n", GetLastError());
+
+ ret = SetSecurityDescriptorDacl(&new_sd, present, dacl, defaulted);
+ ok(ret, "got error %u\n", GetLastError());
+
+ ret = SetKernelObjectSecurity(file, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, &new_sd);
+ ok(ret, "got error %u\n", GetLastError());
+
+ CloseHandle(file);
+
+ sprintf(path, "%s\\testdir\\subdir", temp_path);
+ ret = CreateDirectoryA(path, NULL);
+ todo_wine ok(ret, "got error %u\n", GetLastError());
+
+ ret = RemoveDirectoryA(path);
+ todo_wine ok(ret, "got error %u\n", GetLastError());
+ sprintf(path, "%s\\testdir", temp_path);
+ ret = RemoveDirectoryA(path);
+ ok(ret, "got error %u\n", GetLastError());
+}
+
START_TEST(security)
{
init();
@@ -8374,6 +8442,7 @@ START_TEST(security)
test_duplicate_token();
test_GetKernelObjectSecurity();
test_elevation();
+ test_group_as_file_owner();
/* Must be the last test, modifies process token */
test_token_security_descriptor();
--
2.30.2
1
1