winmm/tests: Call CoInitialize() to enable tests to run on Win 10.
Huw Davies
huw at codeweavers.com
Thu Sep 8 05:48:20 CDT 2016
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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();
}
--
2.8.2
More information about the wine-patches
mailing list