From 42d25ef95d62e73b045c6fed4845fc8a4beb16b8 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 11 Jan 2007 15:40:08 +0100 Subject: [PATCH] dsound/tests: The tests link with dsound.dll so use GetModuleHandle() instead of LoadLibrary(). --- dlls/dsound/tests/capture.c | 12 ++++-------- dlls/dsound/tests/ds3d8.c | 8 ++------ dlls/dsound/tests/dsound8.c | 8 ++------ dlls/dsound/tests/duplex.c | 8 ++------ dlls/dsound/tests/propset.c | 8 ++------ 5 files changed, 12 insertions(+), 32 deletions(-) diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c index e409aee4b5a..2fb46b77319 100644 --- a/dlls/dsound/tests/capture.c +++ b/dlls/dsound/tests/capture.c @@ -645,9 +645,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, } /* try a non PCM format */ - if (0) - { - /* FIXME: Why is this commented out? */ +#if 0 init_format(&wfx,WAVE_FORMAT_MULAW,8000,8,1); ZeroMemory(&bufdesc, sizeof(bufdesc)); bufdesc.dwSize=sizeof(bufdesc); @@ -666,12 +664,10 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " "should have 0\n",ref); } - } +#endif /* Try an invalid format to test error handling */ - if (0) - { - /* FIXME: Remove this test altogether? */ +#if 0 init_format(&wfx,WAVE_FORMAT_PCM,2000000,16,2); ZeroMemory(&bufdesc, sizeof(bufdesc)); bufdesc.dwSize=sizeof(bufdesc); @@ -684,7 +680,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); ok(rc!=DS_OK,"IDirectSoundCapture_CreateCaptureBuffer() should have failed " "at 2 MHz %s\n",DXGetErrorString8(rc)); - } +#endif EXIT: if (dsco!=NULL) { diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 15f87801031..0a45a7dc90e 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -1162,12 +1162,8 @@ START_TEST(ds3d8) CoInitialize(NULL); - hDsound = LoadLibraryA("dsound.dll"); - if (!hDsound) { - trace("dsound.dll not found\n"); - return; - } - + hDsound = GetModuleHandleA("dsound.dll"); + ok(hDsound != NULL, "dsound.dll not loaded!\n"); trace("DLL Version: %s\n", get_file_version("dsound.dll")); pDirectSoundCreate8 = (void*)GetProcAddress(hDsound, "DirectSoundCreate8"); diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 53913452208..02373f5d7f0 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -852,12 +852,8 @@ START_TEST(dsound8) CoInitialize(NULL); - hDsound = LoadLibraryA("dsound.dll"); - if (!hDsound) { - trace("dsound.dll not found\n"); - return; - } - + hDsound = GetModuleHandleA("dsound.dll"); + ok(hDsound != NULL, "dsound.dll not loaded!\n"); trace("DLL Version: %s\n", get_file_version("dsound.dll")); pDirectSoundCreate8 = (void*)GetProcAddress(hDsound, "DirectSoundCreate8"); diff --git a/dlls/dsound/tests/duplex.c b/dlls/dsound/tests/duplex.c index dda7e47609f..d0be144b9b9 100644 --- a/dlls/dsound/tests/duplex.c +++ b/dlls/dsound/tests/duplex.c @@ -237,12 +237,8 @@ START_TEST(duplex) CoInitialize(NULL); - hDsound = LoadLibraryA("dsound.dll"); - if (!hDsound) { - trace("dsound.dll not found\n"); - goto done; - } - + hDsound = GetModuleHandleA("dsound.dll"); + ok(hDsound != NULL, "dsound.dll not loaded!\n"); trace("DLL Version: %s\n", get_file_version("dsound.dll")); pDirectSoundFullDuplexCreate=(void*)GetProcAddress(hDsound,"DirectSoundFullDuplexCreate"); diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index 3c9a3d4185a..21e91df0611 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -722,12 +722,8 @@ START_TEST(propset) CoInitialize(NULL); - hDsound = LoadLibraryA("dsound.dll"); - if (!hDsound) { - trace("dsound.dll not found\n"); - return; - } - + hDsound = GetModuleHandleA("dsound.dll"); + ok(hDsound != NULL, "dsound.dll not loaded!\n"); trace("DLL Version: %s\n", get_file_version("dsound.dll")); pDirectSoundCreate8 = (void*)GetProcAddress(hDsound, "DirectSoundCreate8"); -- 2.11.4.GIT