Fix crash in dsound test
Francois Gouget
fgouget at codeweavers.com
Fri Jul 16 16:43:59 CDT 2004
Changelog:
* dlls/dsound/tests/dsound.c
Francois Gouget <fgouget at codeweavers.com>
Call IDirectSound::Initialize() as per MSDN before using the
DirectSound object. Fixes a crash on Windows.
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/dsound/tests/dsound.c
===================================================================
RCS file: /var/cvs/wine/dlls/dsound/tests/dsound.c,v
retrieving revision 1.24
diff -u -r1.24 dsound.c
--- dlls/dsound/tests/dsound.c 13 Jul 2004 23:35:09 -0000 1.24
+++ dlls/dsound/tests/dsound.c 16 Jul 2004 16:23:51 -0000
@@ -69,6 +69,9 @@
if (rc==DS_OK)
IDirectSound8_Release(ds8);
+ rc=IDirectSound_Initialize(dso,NULL);
+ ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString9(rc));
+
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
@@ -168,6 +171,9 @@
if (rc==DS_OK)
IDirectSound8_Release(ds8);
+ rc=IDirectSound8_Initialize(dso,NULL);
+ ok(rc==DS_OK,"IDirectSound_Initialize(NULL) failed: %s\n",DXGetErrorString9(rc));
+
/* DSOUND: Error: Invalid caps buffer */
rc=IDirectSound8_GetCaps(dso,0);
ok(rc==DSERR_INVALIDPARAM,"GetCaps should have failed: %s\n",DXGetErrorString9(rc));
More information about the wine-patches
mailing list