[PATCH] dsound/tests: Use GetModuleHandleA instead of LoadLibraryA.

Andrey Gusev andrey.goosev at gmail.com
Mon Jan 22 02:24:12 CST 2018


Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
---
 dlls/dsound/tests/capture.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c
index 4eae28bd4e..de60aa9dae 100644
--- a/dlls/dsound/tests/capture.c
+++ b/dlls/dsound/tests/capture.c
@@ -755,11 +755,8 @@ static void test_COM(void)
 
 START_TEST(capture)
 {
-    HMODULE hDsound;
+    HMODULE hDsound = GetModuleHandleA("dsound.dll");
 
-    CoInitialize(NULL);
-
-    hDsound = LoadLibraryA("dsound.dll");
     if (!hDsound) {
         skip("dsound.dll not found - skipping all tests\n");
         return;
@@ -772,10 +769,11 @@ START_TEST(capture)
         return;
     }
 
+    CoInitialize();
+
     test_COM();
     test_capture();
     test_enumerate();
 
-    FreeLibrary(hDsound);
     CoUninitialize();
 }
-- 
2.13.6




More information about the wine-devel mailing list