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
5423c35d
Commit
5423c35d
authored
Mar 28, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Mar 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Assign to structs instead of using CopyMemory.
parent
05ea03c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
20 deletions
+15
-20
dplay.c
dlls/dplayx/dplay.c
+1
-1
dplayx_global.c
dlls/dplayx/dplayx_global.c
+6
-6
dplobby.c
dlls/dplayx/dplobby.c
+6
-11
name_server.c
dlls/dplayx/name_server.c
+2
-2
No files found.
dlls/dplayx/dplay.c
View file @
5423c35d
...
...
@@ -2303,7 +2303,7 @@ static HRESULT WINAPI DP_IF_EnumSessions
/* FIXME: need to kill the thread on object deletion */
lpData
->
lpSpData
=
&
This
->
dp2
->
spData
;
CopyMemory
(
&
lpData
->
requestGuid
,
&
lpsd
->
guidApplication
,
sizeof
(
GUID
)
)
;
lpData
->
requestGuid
=
lpsd
->
guidApplication
;
lpData
->
dwEnumSessionFlags
=
dwFlags
;
lpData
->
dwTimeout
=
dwTimeout
;
...
...
dlls/dplayx/dplayx_global.c
View file @
5423c35d
...
...
@@ -662,7 +662,7 @@ void DPLAYX_CopyConnStructA( LPDPLCONNECTION dest, const DPLCONNECTION *src )
{
BYTE
*
lpStartOfFreeSpace
;
CopyMemory
(
dest
,
src
,
sizeof
(
DPLCONNECTION
)
)
;
*
dest
=
*
src
;
lpStartOfFreeSpace
=
((
BYTE
*
)
dest
)
+
sizeof
(
DPLCONNECTION
);
...
...
@@ -671,7 +671,7 @@ void DPLAYX_CopyConnStructA( LPDPLCONNECTION dest, const DPLCONNECTION *src )
{
dest
->
lpSessionDesc
=
(
LPDPSESSIONDESC2
)
lpStartOfFreeSpace
;
lpStartOfFreeSpace
+=
sizeof
(
DPSESSIONDESC2
);
CopyMemory
(
dest
->
lpSessionDesc
,
src
->
lpSessionDesc
,
sizeof
(
DPSESSIONDESC2
)
)
;
*
dest
->
lpSessionDesc
=
*
src
->
lpSessionDesc
;
/* Session names may or may not exist */
if
(
src
->
lpSessionDesc
->
u1
.
lpszSessionNameA
)
...
...
@@ -696,7 +696,7 @@ void DPLAYX_CopyConnStructA( LPDPLCONNECTION dest, const DPLCONNECTION *src )
{
dest
->
lpPlayerName
=
(
LPDPNAME
)
lpStartOfFreeSpace
;
lpStartOfFreeSpace
+=
sizeof
(
DPNAME
);
CopyMemory
(
dest
->
lpPlayerName
,
src
->
lpPlayerName
,
sizeof
(
DPNAME
)
)
;
*
dest
->
lpPlayerName
=
*
src
->
lpPlayerName
;
if
(
src
->
lpPlayerName
->
u1
.
lpszShortNameA
)
{
...
...
@@ -784,7 +784,7 @@ void DPLAYX_CopyConnStructW( LPDPLCONNECTION dest, const DPLCONNECTION *src )
{
BYTE
*
lpStartOfFreeSpace
;
CopyMemory
(
dest
,
src
,
sizeof
(
DPLCONNECTION
)
)
;
*
dest
=
*
src
;
lpStartOfFreeSpace
=
(
(
BYTE
*
)
dest
)
+
sizeof
(
DPLCONNECTION
);
...
...
@@ -793,7 +793,7 @@ void DPLAYX_CopyConnStructW( LPDPLCONNECTION dest, const DPLCONNECTION *src )
{
dest
->
lpSessionDesc
=
(
LPDPSESSIONDESC2
)
lpStartOfFreeSpace
;
lpStartOfFreeSpace
+=
sizeof
(
DPSESSIONDESC2
);
CopyMemory
(
dest
->
lpSessionDesc
,
src
->
lpSessionDesc
,
sizeof
(
DPSESSIONDESC2
)
)
;
*
dest
->
lpSessionDesc
=
*
src
->
lpSessionDesc
;
/* Session names may or may not exist */
if
(
src
->
lpSessionDesc
->
u1
.
lpszSessionName
)
...
...
@@ -818,7 +818,7 @@ void DPLAYX_CopyConnStructW( LPDPLCONNECTION dest, const DPLCONNECTION *src )
{
dest
->
lpPlayerName
=
(
LPDPNAME
)
lpStartOfFreeSpace
;
lpStartOfFreeSpace
+=
sizeof
(
DPNAME
);
CopyMemory
(
dest
->
lpPlayerName
,
src
->
lpPlayerName
,
sizeof
(
DPNAME
)
)
;
*
dest
->
lpPlayerName
=
*
src
->
lpPlayerName
;
if
(
src
->
lpPlayerName
->
u1
.
lpszShortName
)
{
...
...
dlls/dplayx/dplobby.c
View file @
5423c35d
...
...
@@ -1574,7 +1574,7 @@ HRESULT DPL_CreateCompoundAddress
{
LPDPADDRESS
lpdpAddress
=
(
LPDPADDRESS
)
lpAddress
;
CopyMemory
(
&
lpdpAddress
->
guidDataType
,
&
DPAID_TotalSize
,
sizeof
(
GUID
)
)
;
lpdpAddress
->
guidDataType
=
DPAID_TotalSize
;
lpdpAddress
->
dwDataSize
=
sizeof
(
DWORD
);
lpAddress
=
(
char
*
)
lpAddress
+
sizeof
(
DPADDRESS
);
...
...
@@ -1593,8 +1593,7 @@ HRESULT DPL_CreateCompoundAddress
{
LPDPADDRESS
lpdpAddress
=
(
LPDPADDRESS
)
lpAddress
;
CopyMemory
(
&
lpdpAddress
->
guidDataType
,
&
lpElements
->
guidDataType
,
sizeof
(
GUID
)
);
lpdpAddress
->
guidDataType
=
lpElements
->
guidDataType
;
lpdpAddress
->
dwDataSize
=
sizeof
(
GUID
);
lpAddress
=
(
char
*
)
lpAddress
+
sizeof
(
DPADDRESS
);
...
...
@@ -1608,8 +1607,7 @@ HRESULT DPL_CreateCompoundAddress
{
LPDPADDRESS
lpdpAddress
=
(
LPDPADDRESS
)
lpAddress
;
CopyMemory
(
&
lpdpAddress
->
guidDataType
,
&
lpElements
->
guidDataType
,
sizeof
(
GUID
)
);
lpdpAddress
->
guidDataType
=
lpElements
->
guidDataType
;
lpdpAddress
->
dwDataSize
=
lpElements
->
dwDataSize
;
lpAddress
=
(
char
*
)
lpAddress
+
sizeof
(
DPADDRESS
);
...
...
@@ -1625,8 +1623,7 @@ HRESULT DPL_CreateCompoundAddress
{
LPDPADDRESS
lpdpAddress
=
(
LPDPADDRESS
)
lpAddress
;
CopyMemory
(
&
lpdpAddress
->
guidDataType
,
&
lpElements
->
guidDataType
,
sizeof
(
GUID
)
);
lpdpAddress
->
guidDataType
=
lpElements
->
guidDataType
;
lpdpAddress
->
dwDataSize
=
lpElements
->
dwDataSize
;
lpAddress
=
(
char
*
)
lpAddress
+
sizeof
(
DPADDRESS
);
...
...
@@ -1639,8 +1636,7 @@ HRESULT DPL_CreateCompoundAddress
{
LPDPADDRESS
lpdpAddress
=
(
LPDPADDRESS
)
lpAddress
;
CopyMemory
(
&
lpdpAddress
->
guidDataType
,
&
lpElements
->
guidDataType
,
sizeof
(
GUID
)
);
lpdpAddress
->
guidDataType
=
lpElements
->
guidDataType
;
lpdpAddress
->
dwDataSize
=
lpElements
->
dwDataSize
;
lpAddress
=
(
char
*
)
lpAddress
+
sizeof
(
DPADDRESS
);
...
...
@@ -1651,8 +1647,7 @@ HRESULT DPL_CreateCompoundAddress
{
LPDPADDRESS
lpdpAddress
=
(
LPDPADDRESS
)
lpAddress
;
CopyMemory
(
&
lpdpAddress
->
guidDataType
,
&
lpElements
->
guidDataType
,
sizeof
(
GUID
)
);
lpdpAddress
->
guidDataType
=
lpElements
->
guidDataType
;
lpdpAddress
->
dwDataSize
=
lpElements
->
dwDataSize
;
lpAddress
=
(
char
*
)
lpAddress
+
sizeof
(
DPADDRESS
);
...
...
dlls/dplayx/name_server.c
View file @
5423c35d
...
...
@@ -140,7 +140,7 @@ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr
return
;
}
CopyMemory
(
lpCacheNode
->
data
,
&
lpcMsg
->
sd
,
sizeof
(
*
lpCacheNode
->
data
)
)
;
*
lpCacheNode
->
data
=
lpcMsg
->
sd
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)(
lpcMsg
+
1
),
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
((
lpCacheNode
->
data
->
u1
.
lpszSessionNameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
{
...
...
@@ -240,7 +240,7 @@ HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid,
lpMsg
->
dwPasswordSize
=
0
;
/* FIXME: If enumerating passwords..? */
lpMsg
->
dwFlags
=
dwFlags
;
CopyMemory
(
&
lpMsg
->
guidApplication
,
lpcGuid
,
sizeof
(
*
lpcGuid
)
)
;
lpMsg
->
guidApplication
=
*
lpcGuid
;
return
(
lpSpData
->
lpCB
->
EnumSessions
)(
&
data
);
}
...
...
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