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
4ccd8720
Commit
4ccd8720
authored
Mar 29, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Merge the IDirectPlay4_GetGroupData helper.
parent
7cd17803
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
53 deletions
+35
-53
dplay.c
dlls/dplayx/dplay.c
+35
-53
No files found.
dlls/dplayx/dplay.c
View file @
4ccd8720
...
...
@@ -86,9 +86,6 @@ static HRESULT DP_IF_DestroyGroup
(
IDirectPlay2Impl
*
This
,
LPVOID
lpMsgHdr
,
DPID
idGroup
,
BOOL
bAnsi
);
static
HRESULT
DP_IF_DestroyPlayer
(
IDirectPlay2Impl
*
This
,
LPVOID
lpMsgHdr
,
DPID
idPlayer
,
BOOL
bAnsi
);
static
HRESULT
DP_IF_GetGroupData
(
IDirectPlay2Impl
*
This
,
DPID
idGroup
,
LPVOID
lpData
,
LPDWORD
lpdwDataSize
,
DWORD
dwFlags
,
BOOL
bAnsi
);
static
HRESULT
DP_IF_GetGroupName
(
IDirectPlay2Impl
*
This
,
DPID
idGroup
,
LPVOID
lpData
,
LPDWORD
lpdwDataSize
,
BOOL
bAnsi
);
...
...
@@ -2113,63 +2110,48 @@ static HRESULT WINAPI DirectPlay2WImpl_GetCaps
return
DP_IF_GetCaps
(
This
,
lpDPCaps
,
dwFlags
);
}
static
HRESULT
DP_IF_GetGroupData
(
IDirectPlay2Impl
*
This
,
DPID
idGroup
,
LPVOID
lpData
,
LPDWORD
lpdwDataSize
,
DWORD
dwFlags
,
BOOL
bAnsi
)
static
HRESULT
WINAPI
IDirectPlay4AImpl_GetGroupData
(
IDirectPlay4A
*
iface
,
DPID
group
,
void
*
data
,
DWORD
*
size
,
DWORD
flags
)
{
lpGroupData
lpGData
;
DWORD
dwRequiredBufferSize
;
LPVOID
lpCopyDataFrom
;
TRACE
(
"(%p)->(0x%08x,%p,%p,0x%08x,%u)
\n
"
,
This
,
idGroup
,
lpData
,
lpdwDataSize
,
dwFlags
,
bAnsi
);
IDirectPlayImpl
*
This
=
impl_from_IDirectPlay4A
(
iface
);
return
IDirectPlayX_GetGroupData
(
&
This
->
IDirectPlay4_iface
,
group
,
data
,
size
,
flags
);
}
if
(
(
lpGData
=
DP_FindAnyGroup
(
This
,
idGroup
)
)
==
NULL
)
{
return
DPERR_INVALIDGROUP
;
}
static
HRESULT
WINAPI
IDirectPlay4Impl_GetGroupData
(
IDirectPlay4
*
iface
,
DPID
group
,
void
*
data
,
DWORD
*
size
,
DWORD
flags
)
{
IDirectPlayImpl
*
This
=
impl_from_IDirectPlay4
(
iface
);
lpGroupData
gdata
;
DWORD
bufsize
;
void
*
src
;
/* How much buffer is required? */
if
(
dwFlags
&
DPSET_LOCAL
)
{
dwRequiredBufferSize
=
lpGData
->
dwLocalDataSize
;
lpCopyDataFrom
=
lpGData
->
lpLocalData
;
}
else
{
dwRequiredBufferSize
=
lpGData
->
dwRemoteDataSize
;
lpCopyDataFrom
=
lpGData
->
lpRemoteData
;
}
TRACE
(
"(%p)->(0x%08x,%p,%p,0x%08x)
\n
"
,
This
,
group
,
data
,
size
,
flags
);
/* Is the user requesting to know how big a buffer is required? */
if
(
(
lpData
==
NULL
)
||
(
*
lpdwDataSize
<
dwRequiredBufferSize
)
)
{
*
lpdwDataSize
=
dwRequiredBufferSize
;
return
DPERR_BUFFERTOOSMALL
;
}
if
(
(
gdata
=
DP_FindAnyGroup
(
This
,
group
)
)
==
NULL
)
return
DPERR_INVALIDGROUP
;
CopyMemory
(
lpData
,
lpCopyDataFrom
,
dwRequiredBufferSize
);
/* How much buffer is required? */
if
(
flags
&
DPSET_LOCAL
)
{
bufsize
=
gdata
->
dwLocalDataSize
;
src
=
gdata
->
lpLocalData
;
}
else
{
bufsize
=
gdata
->
dwRemoteDataSize
;
src
=
gdata
->
lpRemoteData
;
}
return
DP_OK
;
}
/* Is the user requesting to know how big a buffer is required? */
if
(
!
data
||
*
size
<
bufsize
)
{
*
size
=
bufsize
;
return
DPERR_BUFFERTOOSMALL
;
}
static
HRESULT
WINAPI
IDirectPlay4AImpl_GetGroupData
(
IDirectPlay4A
*
iface
,
DPID
idGroup
,
void
*
lpData
,
DWORD
*
lpdwDataSize
,
DWORD
dwFlags
)
{
IDirectPlayImpl
*
This
=
impl_from_IDirectPlay4A
(
iface
);
return
DP_IF_GetGroupData
(
This
,
idGroup
,
lpData
,
lpdwDataSize
,
dwFlags
,
TRUE
);
}
CopyMemory
(
data
,
src
,
bufsize
);
static
HRESULT
WINAPI
DirectPlay2WImpl_GetGroupData
(
LPDIRECTPLAY2
iface
,
DPID
idGroup
,
LPVOID
lpData
,
LPDWORD
lpdwDataSize
,
DWORD
dwFlags
)
{
IDirectPlay2Impl
*
This
=
(
IDirectPlay2Impl
*
)
iface
;
return
DP_IF_GetGroupData
(
This
,
idGroup
,
lpData
,
lpdwDataSize
,
dwFlags
,
FALSE
);
return
DP_OK
;
}
static
HRESULT
DP_IF_GetGroupName
...
...
@@ -4527,7 +4509,7 @@ static const IDirectPlay4Vtbl dp4_vt =
IDirectPlay4Impl_EnumPlayers
,
XCAST
(
EnumSessions
)
DirectPlay2WImpl_EnumSessions
,
XCAST
(
GetCaps
)
DirectPlay2WImpl_GetCaps
,
XCAST
(
GetGroupData
)
DirectPlay2W
Impl_GetGroupData
,
IDirectPlay4
Impl_GetGroupData
,
XCAST
(
GetGroupName
)
DirectPlay2WImpl_GetGroupName
,
IDirectPlay4Impl_GetMessageCount
,
IDirectPlay4Impl_GetPlayerAddress
,
...
...
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