Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
598cc8f4
Commit
598cc8f4
authored
Aug 16, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound/tests: Refcount tests for IDirectSoundCapture / IUnknown.
parent
9383affe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
capture.c
dlls/dsound/tests/capture.c
+13
-0
No files found.
dlls/dsound/tests/capture.c
View file @
598cc8f4
...
...
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdio.h>
#include "initguid.h"
#include "windows.h"
...
...
@@ -671,6 +672,7 @@ static void test_COM(void)
IDirectSoundCapture
*
dsc
=
(
IDirectSoundCapture
*
)
0xdeadbeef
;
IDirectSoundCaptureBuffer
*
buffer
=
(
IDirectSoundCaptureBuffer
*
)
0xdeadbeef
;
IDirectSoundNotify
*
notify
;
IUnknown
*
unk
;
DSCBUFFERDESC
bufdesc
;
WAVEFORMATEX
wfx
;
HRESULT
hr
;
...
...
@@ -688,6 +690,17 @@ static void test_COM(void)
}
ok
(
hr
==
DS_OK
,
"DirectSoundCaptureCreate failed: %08x, expected DS_OK
\n
"
,
hr
);
/* Different refcount for IDirectSoundCapture and for IUnknown */
refcount
=
IDirectSoundCapture_AddRef
(
dsc
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectSoundCapture_QueryInterface
(
dsc
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IUnknown_AddRef
(
unk
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IUnknown_Release
(
unk
);
IUnknown_Release
(
unk
);
IDirectSoundCapture_Release
(
dsc
);
init_format
(
&
wfx
,
WAVE_FORMAT_PCM
,
44100
,
16
,
1
);
ZeroMemory
(
&
bufdesc
,
sizeof
(
bufdesc
));
bufdesc
.
dwSize
=
sizeof
(
bufdesc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment