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
e7b0f07c
Commit
e7b0f07c
authored
Mar 10, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Mar 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Assign to structs instead of using memcpy.
parent
4971f2f6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
ftmarshal.c
dlls/ole32/ftmarshal.c
+2
-2
oleobj.c
dlls/ole32/oleobj.c
+1
-1
rpc.c
dlls/ole32/rpc.c
+5
-5
stg_prop.c
dlls/ole32/stg_prop.c
+10
-10
storage32.c
dlls/ole32/storage32.c
+1
-1
No files found.
dlls/ole32/ftmarshal.c
View file @
e7b0f07c
...
...
@@ -141,9 +141,9 @@ FTMarshalImpl_GetUnmarshalClass (LPMARSHAL iface, REFIID riid, void *pv, DWORD d
TRACE
(
"(%s, %p, 0x%x, %p, 0x%x, %p)
\n
"
,
debugstr_guid
(
riid
),
pv
,
dwDestContext
,
pvDestContext
,
mshlflags
,
pCid
);
if
(
dwDestContext
==
MSHCTX_INPROC
||
dwDestContext
==
MSHCTX_CROSSCTX
)
memcpy
(
pCid
,
&
CLSID_InProcFreeMarshaler
,
sizeof
(
CLSID_InProcFreeMarshaler
))
;
*
pCid
=
CLSID_InProcFreeMarshaler
;
else
memcpy
(
pCid
,
&
CLSID_DfMarshal
,
sizeof
(
CLSID_InProcFreeMarshaler
))
;
*
pCid
=
CLSID_DfMarshal
;
return
S_OK
;
}
...
...
dlls/ole32/oleobj.c
View file @
e7b0f07c
...
...
@@ -724,7 +724,7 @@ static HRESULT WINAPI DataAdviseHolder_Advise(
*/
This
->
Connections
[
index
].
sink
=
pAdvise
;
This
->
Connections
[
index
].
advf
=
advf
&
~
WINE_ADVF_REMOTE
;
memcpy
(
&
(
This
->
Connections
[
index
].
fmat
),
pFetc
,
sizeof
(
FORMATETC
))
;
This
->
Connections
[
index
].
fmat
=
*
pFetc
;
if
(
pFetc
->
ptd
)
{
This
->
Connections
[
index
].
fmat
.
ptd
=
CoTaskMemAlloc
(
pFetc
->
ptd
->
tdSize
);
...
...
dlls/ole32/rpc.c
View file @
e7b0f07c
...
...
@@ -242,7 +242,7 @@ static unsigned char * ChannelHooks_ClientFillBuffer(SChannelHookCallInfo *info,
wire_orpc_extent
->
conformance
=
(
extension_size
+
7
)
&~
7
;
wire_orpc_extent
->
size
=
extension_size
;
memcpy
(
&
wire_orpc_extent
->
id
,
&
entry
->
id
,
sizeof
(
wire_orpc_extent
->
id
))
;
wire_orpc_extent
->
id
=
entry
->
id
;
buffer
+=
FIELD_OFFSET
(
WIRE_ORPC_EXTENT
,
data
[
wire_orpc_extent
->
conformance
]);
}
...
...
@@ -362,7 +362,7 @@ static unsigned char * ChannelHooks_ServerFillBuffer(SChannelHookCallInfo *info,
wire_orpc_extent
->
conformance
=
(
extension_size
+
7
)
&~
7
;
wire_orpc_extent
->
size
=
extension_size
;
memcpy
(
&
wire_orpc_extent
->
id
,
&
entry
->
id
,
sizeof
(
wire_orpc_extent
->
id
))
;
wire_orpc_extent
->
id
=
entry
->
id
;
buffer
+=
FIELD_OFFSET
(
WIRE_ORPC_EXTENT
,
data
[
wire_orpc_extent
->
conformance
]);
}
...
...
@@ -411,7 +411,7 @@ HRESULT RPC_RegisterChannelHook(REFGUID rguid, IChannelHook *hook)
if
(
!
entry
)
return
E_OUTOFMEMORY
;
memcpy
(
&
entry
->
id
,
rguid
,
sizeof
(
entry
->
id
))
;
entry
->
id
=
*
rguid
;
entry
->
hook
=
hook
;
IChannelHook_AddRef
(
hook
);
...
...
@@ -553,7 +553,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
{
WIRE_ORPC_EXTENT
*
wire_orpc_extent
=
msg
->
Buffer
;
wire_orpc_extent
->
conformance
=
0
;
memcpy
(
&
wire_orpc_extent
->
id
,
&
GUID_NULL
,
sizeof
(
wire_orpc_extent
->
id
))
;
wire_orpc_extent
->
id
=
GUID_NULL
;
wire_orpc_extent
->
size
=
0
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
+
FIELD_OFFSET
(
WIRE_ORPC_EXTENT
,
data
[
0
]);
}
...
...
@@ -737,7 +737,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
{
WIRE_ORPC_EXTENT
*
wire_orpc_extent
=
msg
->
Buffer
;
wire_orpc_extent
->
conformance
=
0
;
memcpy
(
&
wire_orpc_extent
->
id
,
&
GUID_NULL
,
sizeof
(
wire_orpc_extent
->
id
))
;
wire_orpc_extent
->
id
=
GUID_NULL
;
wire_orpc_extent
->
size
=
0
;
msg
->
Buffer
=
(
char
*
)
msg
->
Buffer
+
FIELD_OFFSET
(
WIRE_ORPC_EXTENT
,
data
[
0
]);
}
...
...
dlls/ole32/stg_prop.c
View file @
e7b0f07c
...
...
@@ -913,12 +913,12 @@ static HRESULT WINAPI IPropertyStorage_fnStat(
hr
=
IStream_Stat
(
This
->
stm
,
&
stat
,
STATFLAG_NONAME
);
if
(
SUCCEEDED
(
hr
))
{
memcpy
(
&
statpsstg
->
fmtid
,
&
This
->
fmtid
,
sizeof
(
statpsstg
->
fmtid
))
;
memcpy
(
&
statpsstg
->
clsid
,
&
This
->
clsid
,
sizeof
(
statpsstg
->
clsid
))
;
statpsstg
->
fmtid
=
This
->
fmtid
;
statpsstg
->
clsid
=
This
->
clsid
;
statpsstg
->
grfFlags
=
This
->
grfFlags
;
memcpy
(
&
statpsstg
->
mtime
,
&
stat
.
mtime
,
sizeof
(
statpsstg
->
mtime
))
;
memcpy
(
&
statpsstg
->
ctime
,
&
stat
.
ctime
,
sizeof
(
statpsstg
->
ctime
))
;
memcpy
(
&
statpsstg
->
atime
,
&
stat
.
atime
,
sizeof
(
statpsstg
->
atime
))
;
statpsstg
->
mtime
=
stat
.
mtime
;
statpsstg
->
ctime
=
stat
.
ctime
;
statpsstg
->
atime
=
stat
.
atime
;
statpsstg
->
dwOSVersion
=
This
->
originatorOS
;
}
return
hr
;
...
...
@@ -1309,7 +1309,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
goto
end
;
}
This
->
format
=
hdr
.
wFormat
;
memcpy
(
&
This
->
clsid
,
&
hdr
.
clsid
,
sizeof
(
This
->
clsid
))
;
This
->
clsid
=
hdr
.
clsid
;
This
->
originatorOS
=
hdr
.
dwOSVer
;
if
(
PROPSETHDR_OSVER_KIND
(
hdr
.
dwOSVer
)
==
PROPSETHDR_OSVER_KIND_MAC
)
WARN
(
"File comes from a Mac, strings will probably be screwed up
\n
"
);
...
...
@@ -1969,7 +1969,7 @@ static HRESULT PropertyStorage_BaseConstruct(IStream *stm,
InitializeCriticalSection
(
&
(
*
pps
)
->
cs
);
(
*
pps
)
->
cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": PropertyStorage_impl.cs"
);
(
*
pps
)
->
stm
=
stm
;
memcpy
(
&
(
*
pps
)
->
fmtid
,
rfmtid
,
sizeof
((
*
pps
)
->
fmtid
))
;
(
*
pps
)
->
fmtid
=
*
rfmtid
;
(
*
pps
)
->
grfMode
=
grfMode
;
hr
=
PropertyStorage_CreateDictionaries
(
*
pps
);
...
...
@@ -2314,7 +2314,7 @@ static HRESULT create_EnumSTATPROPSETSTG(
statpss
.
atime
=
stat
.
atime
;
statpss
.
ctime
=
stat
.
ctime
;
statpss
.
grfFlags
=
stat
.
grfMode
;
memcpy
(
&
statpss
.
clsid
,
&
stat
.
clsid
,
sizeof
stat
.
clsid
)
;
statpss
.
clsid
=
stat
.
clsid
;
enumx_add_element
(
enumx
,
&
statpss
);
}
CoTaskMemFree
(
stat
.
pwcsName
);
...
...
@@ -2570,12 +2570,12 @@ HRESULT WINAPI PropStgNameToFmtId(const LPOLESTR str, FMTID *rfmtid)
if
(
!
lstrcmpiW
(
str
,
szDocSummaryInfo
))
{
memcpy
(
rfmtid
,
&
FMTID_DocSummaryInformation
,
sizeof
(
*
rfmtid
))
;
*
rfmtid
=
FMTID_DocSummaryInformation
;
hr
=
S_OK
;
}
else
if
(
!
lstrcmpiW
(
str
,
szSummaryInfo
))
{
memcpy
(
rfmtid
,
&
FMTID_SummaryInformation
,
sizeof
(
*
rfmtid
))
;
*
rfmtid
=
FMTID_SummaryInformation
;
hr
=
S_OK
;
}
else
...
...
dlls/ole32/storage32.c
View file @
e7b0f07c
...
...
@@ -7908,7 +7908,7 @@ HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid)
return
E_INVALIDARG
;
/* clear the output args */
memcpy
(
pclsid
,
&
CLSID_NULL
,
sizeof
(
*
pclsid
))
;
*
pclsid
=
CLSID_NULL
;
res
=
IStream_Read
(
pStm
,(
void
*
)
pclsid
,
sizeof
(
CLSID
),
&
nbByte
);
...
...
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