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
9d16a422
Commit
9d16a422
authored
Mar 11, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Assign to structs instead of using memcpy.
parent
3ca73da9
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
21 deletions
+20
-21
olefont.c
dlls/oleaut32/olefont.c
+1
-1
olepicture.c
dlls/oleaut32/olepicture.c
+3
-3
recinfo.c
dlls/oleaut32/recinfo.c
+4
-4
tmarshal.c
dlls/oleaut32/tmarshal.c
+2
-2
typelib.c
dlls/oleaut32/typelib.c
+6
-7
ungif.c
dlls/oleaut32/ungif.c
+1
-1
variant.c
dlls/oleaut32/variant.c
+3
-3
No files found.
dlls/oleaut32/olefont.c
View file @
9d16a422
...
...
@@ -1556,7 +1556,7 @@ static HRESULT WINAPI OLEFontImpl_GetClassID(
if
(
pClassID
==
0
)
return
E_POINTER
;
memcpy
(
pClassID
,
&
CLSID_StdFont
,
sizeof
(
CLSID_StdFont
))
;
*
pClassID
=
CLSID_StdFont
;
return
S_OK
;
}
...
...
dlls/oleaut32/olepicture.c
View file @
9d16a422
...
...
@@ -316,7 +316,7 @@ static OLEPictureImpl* OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn)
newObject
->
bIsDirty
=
FALSE
;
if
(
pictDesc
)
{
memcpy
(
&
newObject
->
desc
,
pictDesc
,
sizeof
(
PICTDESC
))
;
newObject
->
desc
=
*
pictDesc
;
switch
(
pictDesc
->
picType
)
{
case
PICTYPE_BITMAP
:
...
...
@@ -955,7 +955,7 @@ static HRESULT WINAPI OLEPictureImpl_GetClassID(
IPersistStream
*
iface
,
CLSID
*
pClassID
)
{
TRACE
(
"(%p)
\n
"
,
pClassID
);
memcpy
(
pClassID
,
&
CLSID_StdPicture
,
sizeof
(
*
pClassID
))
;
*
pClassID
=
CLSID_StdPicture
;
return
S_OK
;
}
...
...
@@ -2077,7 +2077,7 @@ static int serializeIcon(HICON hIcon, void ** ppBuffer, unsigned int * pLength)
/* Fill out the BITMAPINFOHEADER */
pIconBitmapHeader
=
(
BITMAPINFOHEADER
*
)(
pIconData
+
3
*
sizeof
(
WORD
)
+
sizeof
(
CURSORICONFILEDIRENTRY
));
memcpy
(
pIconBitmapHeader
,
&
pInfoBitmap
->
bmiHeader
,
sizeof
(
BITMAPINFOHEADER
))
;
*
pIconBitmapHeader
=
pInfoBitmap
->
bmiHeader
;
/* Find out whether a palette exists for the bitmap */
if
(
(
pInfoBitmap
->
bmiHeader
.
biBitCount
==
16
&&
pInfoBitmap
->
bmiHeader
.
biCompression
==
BI_RGB
)
...
...
dlls/oleaut32/recinfo.c
View file @
9d16a422
...
...
@@ -268,7 +268,7 @@ static HRESULT WINAPI IRecordInfoImpl_GetGuid(IRecordInfo *iface, GUID *pguid)
if
(
!
pguid
)
return
E_INVALIDARG
;
memcpy
(
pguid
,
&
This
->
guid
,
sizeof
(
GUID
))
;
*
pguid
=
This
->
guid
;
return
S_OK
;
}
...
...
@@ -557,7 +557,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
if
(
typeattr
->
typekind
==
TKIND_ALIAS
)
{
hres
=
ITypeInfo_GetRefTypeInfo
(
pTI
,
typeattr
->
tdescAlias
.
u
.
hreftype
,
&
pTypeInfo
);
memcpy
(
&
guid
,
&
typeattr
->
guid
,
sizeof
(
GUID
))
;
guid
=
typeattr
->
guid
;
ITypeInfo_ReleaseTypeAttr
(
pTI
,
typeattr
);
if
(
FAILED
(
hres
))
{
WARN
(
"GetRefTypeInfo failed: %08x
\n
"
,
hres
);
...
...
@@ -567,7 +567,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
}
else
{
pTypeInfo
=
pTI
;
ITypeInfo_AddRef
(
pTypeInfo
);
memcpy
(
&
guid
,
&
typeattr
->
guid
,
sizeof
(
GUID
))
;
guid
=
typeattr
->
guid
;
}
if
(
typeattr
->
typekind
!=
TKIND_RECORD
)
{
...
...
@@ -585,7 +585,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
ret
->
size
=
typeattr
->
cbSizeInstance
;
ITypeInfo_ReleaseTypeAttr
(
pTypeInfo
,
typeattr
);
memcpy
(
&
ret
->
guid
,
&
guid
,
sizeof
(
GUID
))
;
ret
->
guid
=
guid
;
/* NOTE: Windows implementation calls ITypeInfo::GetCantainingTypeLib and
* ITypeLib::GetLibAttr, but we currently don't need this.
...
...
dlls/oleaut32/tmarshal.c
View file @
9d16a422
...
...
@@ -1802,7 +1802,7 @@ PSFacBuf_CreateProxy(
/* one reference for the proxy */
proxy
->
ref
=
1
;
proxy
->
tinfo
=
tinfo
;
memcpy
(
&
proxy
->
iid
,
riid
,
sizeof
(
*
riid
))
;
proxy
->
iid
=
*
riid
;
proxy
->
chanbuf
=
0
;
InitializeCriticalSection
(
&
proxy
->
crit
);
...
...
@@ -2218,7 +2218,7 @@ PSFacBuf_CreateStub(
stub
->
tinfo
=
tinfo
;
stub
->
dispatch_stub
=
NULL
;
stub
->
dispatch_derivative
=
FALSE
;
memcpy
(
&
(
stub
->
iid
),
riid
,
sizeof
(
*
riid
))
;
stub
->
iid
=
*
riid
;
hres
=
IRpcStubBuffer_Connect
((
LPRPCSTUBBUFFER
)
stub
,
pUnkServer
);
*
ppStub
=
(
LPRPCSTUBBUFFER
)
stub
;
TRACE
(
"IRpcStubBuffer: %p
\n
"
,
stub
);
...
...
dlls/oleaut32/typelib.c
View file @
9d16a422
...
...
@@ -3477,8 +3477,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
pOtherTypeInfoBlks
[
i
].
name_offs
+
pNameTable
);
(
*
ppTypeInfoImpl
)
->
dwHelpContext
=
pOtherTypeInfoBlks
[
i
].
helpcontext
;
memcpy
(
&
((
*
ppTypeInfoImpl
)
->
TypeAttr
.
guid
),
&
pOtherTypeInfoBlks
[
i
].
uuid
,
sizeof
(
GUID
));
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
guid
=
pOtherTypeInfoBlks
[
i
].
uuid
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
typekind
=
pTIHeader
->
typekind
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
wMajorVerNum
=
pTIHeader
->
major_version
;
(
*
ppTypeInfoImpl
)
->
TypeAttr
.
wMinorVerNum
=
pTIHeader
->
minor_version
;
...
...
@@ -3849,7 +3848,7 @@ static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
ITypeLibImpl
*
This
=
(
ITypeLibImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
*
ppTLibAttr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
**
ppTLibAttr
));
memcpy
(
*
ppTLibAttr
,
&
This
->
LibAttr
,
sizeof
(
**
ppTLibAttr
))
;
**
ppTLibAttr
=
This
->
LibAttr
;
return
S_OK
;
}
...
...
@@ -4589,7 +4588,7 @@ static HRESULT WINAPI ITypeInfo_fnGetTypeAttr( ITypeInfo2 *iface,
if
(
!*
ppTypeAttr
)
return
E_OUTOFMEMORY
;
memcpy
(
*
ppTypeAttr
,
&
This
->
TypeAttr
,
sizeof
(
**
ppTypeAttr
))
;
**
ppTypeAttr
=
This
->
TypeAttr
;
if
(
This
->
TypeAttr
.
typekind
==
TKIND_ALIAS
)
TLB_CopyTypeDesc
(
&
(
*
ppTypeAttr
)
->
tdescAlias
,
...
...
@@ -4632,14 +4631,14 @@ static SIZE_T TLB_SizeElemDesc( const ELEMDESC *elemdesc )
static
HRESULT
TLB_CopyElemDesc
(
const
ELEMDESC
*
src
,
ELEMDESC
*
dest
,
char
**
buffer
)
{
memcpy
(
dest
,
src
,
sizeof
(
ELEMDESC
))
;
*
dest
=
*
src
;
*
buffer
=
TLB_CopyTypeDesc
(
&
dest
->
tdesc
,
&
src
->
tdesc
,
*
buffer
);
if
(
src
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FHASDEFAULT
)
{
const
PARAMDESCEX
*
pparamdescex_src
=
src
->
u
.
paramdesc
.
pparamdescex
;
PARAMDESCEX
*
pparamdescex_dest
=
dest
->
u
.
paramdesc
.
pparamdescex
=
(
PARAMDESCEX
*
)
*
buffer
;
*
buffer
+=
sizeof
(
PARAMDESCEX
);
memcpy
(
pparamdescex_dest
,
pparamdescex_src
,
sizeof
(
PARAMDESCEX
))
;
*
pparamdescex_dest
=
*
pparamdescex_src
;
VariantInit
(
&
pparamdescex_dest
->
varDefaultValue
);
return
VariantCopy
(
&
pparamdescex_dest
->
varDefaultValue
,
(
VARIANTARG
*
)
&
pparamdescex_src
->
varDefaultValue
);
...
...
@@ -4674,7 +4673,7 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
dest
=
(
FUNCDESC
*
)
SysAllocStringByteLen
(
NULL
,
size
);
if
(
!
dest
)
return
E_OUTOFMEMORY
;
memcpy
(
dest
,
src
,
sizeof
(
FUNCDESC
))
;
*
dest
=
*
src
;
if
(
dispinterface
)
/* overwrite funckind */
dest
->
funckind
=
FUNC_DISPATCH
;
buffer
=
(
char
*
)(
dest
+
1
);
...
...
dlls/oleaut32/ungif.c
View file @
9d16a422
...
...
@@ -404,7 +404,7 @@ DGifGetImageDesc(GifFileType * GifFile) {
}
sp
=
&
GifFile
->
SavedImages
[
GifFile
->
ImageCount
];
memcpy
(
&
sp
->
ImageDesc
,
&
GifFile
->
Image
,
sizeof
(
GifImageDesc
))
;
sp
->
ImageDesc
=
GifFile
->
Image
;
if
(
GifFile
->
Image
.
ColorMap
!=
NULL
)
{
sp
->
ImageDesc
.
ColorMap
=
MakeMapObject
(
GifFile
->
Image
.
ColorMap
->
ColorCount
,
...
...
dlls/oleaut32/variant.c
View file @
9d16a422
...
...
@@ -1254,7 +1254,7 @@ INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME lpSt, double *pDateOut)
if
(
lpSt
->
wMonth
>
12
)
return
FALSE
;
memcpy
(
&
ud
.
st
,
lpSt
,
sizeof
(
ud
.
st
))
;
ud
.
st
=
*
lpSt
;
return
!
VarDateFromUdate
(
&
ud
,
0
,
pDateOut
);
}
...
...
@@ -1280,7 +1280,7 @@ INT WINAPI VariantTimeToSystemTime(double dateIn, LPSYSTEMTIME lpSt)
if
(
FAILED
(
VarUdateFromDate
(
dateIn
,
0
,
&
ud
)))
return
FALSE
;
memcpy
(
lpSt
,
&
ud
.
st
,
sizeof
(
ud
.
st
))
;
*
lpSt
=
ud
.
st
;
return
TRUE
;
}
...
...
@@ -1313,7 +1313,7 @@ HRESULT WINAPI VarDateFromUdateEx(UDATE *pUdateIn, LCID lcid, ULONG dwFlags, DAT
if
(
lcid
!=
MAKELCID
(
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
SORT_DEFAULT
))
FIXME
(
"lcid possibly not handled, treating as en-us
\n
"
);
memcpy
(
&
ud
,
pUdateIn
,
sizeof
(
ud
))
;
ud
=
*
pUdateIn
;
if
(
dwFlags
&
VAR_VALIDDATE
)
WARN
(
"Ignoring VAR_VALIDDATE
\n
"
);
...
...
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