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
6f370dff
Commit
6f370dff
authored
Mar 29, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Remove AddRef hacks for the parent DirectPlay object.
parent
b78f7290
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
41 deletions
+2
-41
dplaysp.c
dlls/dplayx/dplaysp.c
+0
-23
lobbysp.c
dlls/dplayx/lobbysp.c
+0
-16
dplayx.c
dlls/dplayx/tests/dplayx.c
+2
-2
No files found.
dlls/dplayx/dplaysp.c
View file @
6f370dff
...
...
@@ -173,21 +173,6 @@ static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp )
This
->
sp
->
dplay
=
dp
;
/* Normally we should be keeping a reference, but since only the dplay
* interface that created us can destroy us, we do not keep a reference
* to it (ie we'd be stuck with always having one reference to the dplay
* object, and hence us, around).
* NOTE: The dp object does reference count us.
*
* FIXME: This is a kludge to get around a problem where a queryinterface
* is used to get a new interface and then is closed. We will then
* reference garbage. However, with this we will never deallocate
* the interface we store. The correct fix is to require all
* DP internal interfaces to use the This->dp2 interface which
* should be changed to This->dp
*/
IDirectPlayX_AddRef
(
(
LPDIRECTPLAY2
)
dp
);
return
TRUE
;
}
...
...
@@ -195,14 +180,6 @@ static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP )
{
IDirectPlaySPImpl
*
This
=
lpSP
;
/* Normally we should be keeping a reference, but since only the dplay
* interface that created us can destroy us, we do not keep a reference
* to it (ie we'd be stuck with always having one reference to the dplay
* object, and hence us, around).
* NOTE: The dp object does reference count us.
*/
/*IDirectPlayX_Release( (LPDIRECTPLAY2)This->sp->dplay ); */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
sp
->
lpSpRemoteData
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
sp
->
lpSpLocalData
);
...
...
dlls/dplayx/lobbysp.c
View file @
6f370dff
...
...
@@ -148,22 +148,6 @@ static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp )
This
->
sp
->
dplay
=
dp
;
/* Normally we should be keeping a reference, but since only the dplay
* interface that created us can destroy us, we do not keep a reference
* to it (ie we'd be stuck with always having one reference to the dplay
* object, and hence us, around).
* NOTE: The dp object does reference count us.
*
* FIXME: This is a kludge to get around a problem where a queryinterface
* is used to get a new interface and then is closed. We will then
* reference garbage. However, with this we will never deallocate
* the interface we store. The correct fix is to require all
* DP internal interfaces to use the This->dp2 interface which
* should be changed to This->dp
*/
IDirectPlayX_AddRef
(
(
LPDIRECTPLAY2
)
dp
);
return
TRUE
;
}
...
...
dlls/dplayx/tests/dplayx.c
View file @
6f370dff
...
...
@@ -6394,7 +6394,7 @@ static void test_COM(void)
(
void
**
)
&
dp4
);
ok
(
hr
==
S_OK
,
"DirectPlay create failed: %08x, expected S_OK
\n
"
,
hr
);
refcount
=
IDirectPlayX_AddRef
(
dp4
);
todo_wine
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IDirectPlayX_QueryInterface
(
dp4
,
&
IID_IDirectPlay2A
,
(
void
**
)
&
dp2A
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IDirectPlay2A failed: %08x
\n
"
,
hr
);
...
...
@@ -6441,7 +6441,7 @@ static void test_COM(void)
IDirectPlay2_Release
(
dp2A
);
IDirectPlayX_Release
(
dp4
);
refcount
=
IDirectPlayX_Release
(
dp4
);
todo_wine
ok
(
refcount
==
0
,
"refcount == %u, expected 0
\n
"
,
refcount
);
ok
(
refcount
==
0
,
"refcount == %u, expected 0
\n
"
,
refcount
);
}
...
...
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