Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3b7f969a
Commit
3b7f969a
authored
Apr 08, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: IDirectPlay and IUnknown share a refcount.
parent
de65abb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
dplay.c
dlls/dplayx/dplay.c
+1
-1
dplayx.c
dlls/dplayx/tests/dplayx.c
+11
-2
No files found.
dlls/dplayx/dplay.c
View file @
3b7f969a
...
...
@@ -643,7 +643,7 @@ static HRESULT WINAPI IDirectPlay4Impl_QueryInterface( IDirectPlay4 *iface, REFI
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
)
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IDirectPlay
4A
_iface
;
*
ppv
=
&
This
->
IDirectPlay_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDirectPlay
,
riid
)
)
{
...
...
dlls/dplayx/tests/dplayx.c
View file @
3b7f969a
...
...
@@ -6367,6 +6367,7 @@ static void test_host_migration(void)
static
void
test_COM
(
void
)
{
IDirectPlay
*
dp
;
IDirectPlay2A
*
dp2A
;
IDirectPlay2
*
dp2
;
IDirectPlay3A
*
dp3A
;
...
...
@@ -6426,14 +6427,22 @@ static void test_COM(void)
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlayX_Release
(
dp4A
);
/* IDirectPlay and IUnknown share a refcount */
hr
=
IDirectPlayX_QueryInterface
(
dp4
,
&
IID_IDirectPlay
,
(
void
**
)
&
dp
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlay failed: %08x
\n
"
,
hr
);
refcount
=
IDirectPlayX_AddRef
(
dp
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IDirectPlay_Release
(
dp
);
hr
=
IDirectPlayX_QueryInterface
(
dp4
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IUnknown_AddRef
(
unk
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
ok
(
refcount
==
3
,
"refcount == %u, expected 3
\n
"
,
refcount
);
refcount
=
IUnknown_Release
(
unk
);
todo_wine
ok
(
refcount
==
1
,
"refcount == %u, expected 1
\n
"
,
refcount
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
IUnknown_Release
(
unk
);
IDirectPlay_Release
(
dp
);
IDirectPlayX_Release
(
dp4A
);
IDirectPlay3_Release
(
dp3
);
IDirectPlay3_Release
(
dp3A
);
...
...
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