Huw Davies : winmm/tests: Call CoInitialize() to enable tests to run on Win 10.
Alexandre Julliard
julliard at winehq.org
Thu Sep 8 10:39:21 CDT 2016
Module: wine
Branch: master
Commit: 5b622cfd84a1d690c5b1ccea4470c404f09f5c36
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b622cfd84a1d690c5b1ccea4470c404f09f5c36
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Sep 8 11:48:20 2016 +0100
winmm/tests: Call CoInitialize() to enable tests to run on Win 10.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winmm/tests/Makefile.in | 2 +-
dlls/winmm/tests/midi.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/winmm/tests/Makefile.in b/dlls/winmm/tests/Makefile.in
index 5d81e38..1b191cb 100644
--- a/dlls/winmm/tests/Makefile.in
+++ b/dlls/winmm/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = winmm.dll
-IMPORTS = winmm user32 advapi32
+IMPORTS = winmm ole32 user32 advapi32
C_SRCS = \
capture.c \
diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c
index f3ea62c..1024c2c 100644
--- a/dlls/winmm/tests/midi.c
+++ b/dlls/winmm/tests/midi.c
@@ -22,6 +22,7 @@
#include <stddef.h>
#include "windows.h"
#include "mmsystem.h"
+#include "objbase.h"
#include "wine/test.h"
extern const char* mmsys_error(MMRESULT error); /* from wave.c */
@@ -835,10 +836,15 @@ static void test_midi_outfns(HWND hwnd)
START_TEST(midi)
{
HWND hwnd = 0;
+
+ CoInitialize(NULL); /* Needed for Win 10 */
+
if (1) /* select 1 for CALLBACK_WINDOW or 0 for CALLBACK_FUNCTION */
hwnd = CreateWindowExA(0, "static", "winmm midi test", WS_POPUP, 0,0,100,100,
0, 0, 0, NULL);
test_midi_infns(hwnd);
test_midi_outfns(hwnd);
if (hwnd) DestroyWindow(hwnd);
+
+ CoUninitialize();
}
More information about the wine-cvs
mailing list