dsound/tests: The tests link with dsound.dll so use GetModuleHandle() instead of LoadLibrary().

This commit is contained in:
Francois Gouget 2007-01-11 15:40:08 +01:00 committed by Alexandre Julliard
parent e48d86308d
commit 42d25ef95d
5 changed files with 12 additions and 32 deletions

View File

@ -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) {

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");