https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9c982d0105311c3cb2473…
commit 9c982d0105311c3cb24733bded8649b809a519c5
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Mar 17 13:23:10 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Mar 17 13:23:10 2018 +0100
[MMDEVAPI] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/mmdevapi/CMakeLists.txt | 4 ++--
dll/win32/mmdevapi/audiovolume.c | 22 ++++++++++++++++++++++
dll/win32/mmdevapi/devenum.c | 32 +++++++++++++++++++++++++-------
dll/win32/mmdevapi/main.c | 29 ++++++++++++++++++++++++++++-
dll/win32/mmdevapi/mmdevapi.h | 33 ++++-----------------------------
dll/win32/mmdevapi/precomp.h | 31 +++++++++++++++++++++++++++++++
media/doc/README.WINE | 2 +-
7 files changed, 113 insertions(+), 40 deletions(-)
diff --git a/dll/win32/mmdevapi/CMakeLists.txt b/dll/win32/mmdevapi/CMakeLists.txt
index 8d9b5fbc80..5d4245ca09 100644
--- a/dll/win32/mmdevapi/CMakeLists.txt
+++ b/dll/win32/mmdevapi/CMakeLists.txt
@@ -10,7 +10,7 @@ list(APPEND SOURCE
audiovolume.c
devenum.c
main.c
- mmdevapi.h
+ precomp.h
${CMAKE_CURRENT_BINARY_DIR}/mmdevapi_stubs.c)
add_library(mmdevapi SHARED
@@ -22,6 +22,6 @@ add_library(mmdevapi SHARED
set_module_type(mmdevapi win32dll)
target_link_libraries(mmdevapi uuid wine)
add_importlibs(mmdevapi ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll)
-add_pch(mmdevapi mmdevapi.h SOURCE)
+add_pch(mmdevapi precomp.h SOURCE)
add_dependencies(mmdevapi dxsdk)
add_cd_file(TARGET mmdevapi DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/mmdevapi/audiovolume.c b/dll/win32/mmdevapi/audiovolume.c
index 22613fe33e..76f9f4ec1e 100644
--- a/dll/win32/mmdevapi/audiovolume.c
+++ b/dll/win32/mmdevapi/audiovolume.c
@@ -16,8 +16,30 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "winreg.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#include "ole2.h"
+#include "mmdeviceapi.h"
+#include "mmsystem.h"
+#include "dsound.h"
+#include "audioclient.h"
+#include "endpointvolume.h"
+#include "audiopolicy.h"
+
#include "mmdevapi.h"
+WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi);
+
typedef struct AEVImpl {
IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
LONG ref;
diff --git a/dll/win32/mmdevapi/devenum.c b/dll/win32/mmdevapi/devenum.c
index 3cfe661c0f..b189e8e060 100644
--- a/dll/win32/mmdevapi/devenum.c
+++ b/dll/win32/mmdevapi/devenum.c
@@ -16,15 +16,33 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "mmdevapi.h"
+#include "config.h"
+
+#include <stdarg.h>
+
+#define NONAMELESSUNION
+#define COBJMACROS
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "winreg.h"
+#include "wine/debug.h"
+#include "wine/list.h"
+#include "wine/unicode.h"
+
+#include "initguid.h"
+#include "ole2.h"
+#include "mmdeviceapi.h"
+#include "dshow.h"
+#include "dsound.h"
+#include "audioclient.h"
+#include "endpointvolume.h"
+#include "audiopolicy.h"
-#include <wine/list.h>
+#include "mmdevapi.h"
+#include "devpkey.h"
-#include <oleauto.h>
-#include <initguid.h>
-#define _WINDOWS_H
-#include <dshow.h>
-#include <devpkey.h>
+WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi);
static const WCHAR software_mmdevapi[] =
{
'S','o','f','t','w','a','r','e','\\',
diff --git a/dll/win32/mmdevapi/main.c b/dll/win32/mmdevapi/main.c
index db5a1168e1..2b0a6f946b 100644
--- a/dll/win32/mmdevapi/main.c
+++ b/dll/win32/mmdevapi/main.c
@@ -17,9 +17,36 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#define COBJMACROS
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "wine/library.h"
+
+#include "ole2.h"
+#include "olectl.h"
+#include "rpcproxy.h"
+#include "propsys.h"
+#include "propkeydef.h"
+#include "mmdeviceapi.h"
+#include "mmsystem.h"
+#include "dsound.h"
+#include "audioclient.h"
+#include "endpointvolume.h"
+#include "audiopolicy.h"
+#include "devpkey.h"
+#include "winreg.h"
+
#include "mmdevapi.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
-#include <rpcproxy.h>
+WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi);
static HINSTANCE instance;
diff --git a/dll/win32/mmdevapi/mmdevapi.h b/dll/win32/mmdevapi/mmdevapi.h
index 4358901d13..ecf44c6e9f 100644
--- a/dll/win32/mmdevapi/mmdevapi.h
+++ b/dll/win32/mmdevapi/mmdevapi.h
@@ -16,34 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#ifndef _MMDEVAPI_H_
-#define _MMDEVAPI_H_
+#pragma once
-#include <wine/config.h>
-#include <wine/port.h>
-
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <winreg.h>
-#include <objbase.h>
-#include <audiopolicy.h>
-#include <endpointvolume.h>
-#include <mmdeviceapi.h>
-
-#include <wine/debug.h>
-#include <wine/unicode.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi);
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN;
extern void MMDevEnum_Free(void) DECLSPEC_HIDDEN;
@@ -102,5 +79,3 @@ extern HRESULT AudioClient_Create(MMDevice *parent, IAudioClient **ppv)
DECLSPEC
extern HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolumeEx **ppv)
DECLSPEC_HIDDEN;
extern const WCHAR drv_keyW[] DECLSPEC_HIDDEN;
-
-#endif /* _MMDEVAPI_H_ */
diff --git a/dll/win32/mmdevapi/precomp.h b/dll/win32/mmdevapi/precomp.h
new file mode 100644
index 0000000000..9d554feba0
--- /dev/null
+++ b/dll/win32/mmdevapi/precomp.h
@@ -0,0 +1,31 @@
+
+#ifndef _MMDEVAPI_PRECOMP_H_
+#define _MMDEVAPI_PRECOMP_H_
+
+#include <wine/config.h>
+#include <wine/port.h>
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <winreg.h>
+#include <objbase.h>
+#include <audiopolicy.h>
+#include <endpointvolume.h>
+#include <mmdeviceapi.h>
+
+#include <wine/debug.h>
+#include <wine/unicode.h>
+
+#include "mmdevapi.h"
+
+#endif /* !_MMDEVAPI_PRECOMP_H_ */
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 3a0bdb184f..869affc759 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -97,7 +97,7 @@ reactos/dll/win32/mciseq # Synced to WineStaging-3.3
reactos/dll/win32/mciwave # Synced to WineStaging-3.3
reactos/dll/win32/mgmtapi # Synced to WineStaging-3.3
reactos/dll/win32/mlang # Synced to WineStaging-3.3
-reactos/dll/win32/mmdevapi # Synced to Wine-3.0
+reactos/dll/win32/mmdevapi # Synced to WineStaging-3.3
reactos/dll/win32/mpr # Synced to Wine-3.0
reactos/dll/win32/mprapi # Synced to WineStaging-2.9
reactos/dll/win32/msacm32 # Synced to WineStaging-2.16