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
1cfdeb0e
Commit
1cfdeb0e
authored
Feb 20, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmcompos: Assign to structs instead of using memcpy.
parent
e7d91129
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
chordmap.c
dlls/dmcompos/chordmap.c
+7
-7
chordmaptrack.c
dlls/dmcompos/chordmaptrack.c
+1
-1
signposttrack.c
dlls/dmcompos/signposttrack.c
+1
-1
No files found.
dlls/dmcompos/chordmap.c
View file @
1cfdeb0e
...
...
@@ -148,9 +148,9 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_SetDescriptor
/* According to MSDN, we should copy only given values, not whole struct */
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_OBJECT
)
memcpy
(
&
This
->
pDesc
->
guidObject
,
&
pDesc
->
guidObject
,
sizeof
(
pDesc
->
guidObject
))
;
This
->
pDesc
->
guidObject
=
pDesc
->
guidObject
;
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_CLASS
)
memcpy
(
&
This
->
pDesc
->
guidClass
,
&
pDesc
->
guidClass
,
sizeof
(
pDesc
->
guidClass
));
This
->
pDesc
->
guidClass
=
pDesc
->
guidClass
;
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_NAME
)
lstrcpynW
(
This
->
pDesc
->
wszName
,
pDesc
->
wszName
,
DMUS_MAX_NAME
);
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_CATEGORY
)
...
...
@@ -158,11 +158,11 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_SetDescriptor
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_FILENAME
)
lstrcpynW
(
This
->
pDesc
->
wszFileName
,
pDesc
->
wszFileName
,
DMUS_MAX_FILENAME
);
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_VERSION
)
memcpy
(
&
This
->
pDesc
->
vVersion
,
&
pDesc
->
vVersion
,
sizeof
(
pDesc
->
vVersion
));
This
->
pDesc
->
vVersion
=
pDesc
->
vVersion
;
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_DATE
)
memcpy
(
&
This
->
pDesc
->
ftDate
,
&
pDesc
->
ftDate
,
sizeof
(
pDesc
->
ftDate
));
This
->
pDesc
->
ftDate
=
pDesc
->
ftDate
;
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_MEMORY
)
{
memcpy
(
&
This
->
pDesc
->
llMemLength
,
&
pDesc
->
llMemLength
,
sizeof
(
pDesc
->
llMemLength
));
This
->
pDesc
->
llMemLength
=
pDesc
->
llMemLength
;
memcpy
(
This
->
pDesc
->
pbMemData
,
pDesc
->
pbMemData
,
sizeof
(
pDesc
->
pbMemData
));
}
if
(
pDesc
->
dwValidData
&
DMUS_OBJ_STREAM
)
{
...
...
@@ -185,7 +185,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_ParseDescripto
/* FIXME: should this be determined from stream? */
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
pDesc
->
guidClass
,
&
CLSID_DirectMusicChordMap
,
sizeof
(
CLSID
))
;
pDesc
->
guidClass
=
CLSID_DirectMusicChordMap
;
IStream_Read
(
pStream
,
&
Chunk
,
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
),
NULL
);
TRACE_
(
dmfile
)(
": %s chunk (size = 0x%04x)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
...
...
@@ -539,7 +539,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapImpl (LPCGUID lpcGUID, LPVOID* pp
obj
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
DM_STRUCT_INIT
(
obj
->
pDesc
);
obj
->
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
obj
->
pDesc
->
guidClass
,
&
CLSID_DirectMusicChordMap
,
sizeof
(
CLSID
))
;
obj
->
pDesc
->
guidClass
=
CLSID_DirectMusicChordMap
;
obj
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicChordMapImpl_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
obj
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
...
...
dlls/dmcompos/chordmaptrack.c
View file @
1cfdeb0e
...
...
@@ -283,7 +283,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapTrack (LPCGUID lpcGUID, LPVOID *p
track
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
DM_STRUCT_INIT
(
track
->
pDesc
);
track
->
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
track
->
pDesc
->
guidClass
,
&
CLSID_DirectMusicChordMapTrack
,
sizeof
(
CLSID
))
;
track
->
pDesc
->
guidClass
=
CLSID_DirectMusicChordMapTrack
;
track
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicChordMapTrack_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
track
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
...
...
dlls/dmcompos/signposttrack.c
View file @
1cfdeb0e
...
...
@@ -281,7 +281,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSignPostTrack (LPCGUID lpcGUID, LPVOID *p
track
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
DM_STRUCT_INIT
(
track
->
pDesc
);
track
->
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
track
->
pDesc
->
guidClass
,
&
CLSID_DirectMusicSignPostTrack
,
sizeof
(
CLSID
))
;
track
->
pDesc
->
guidClass
=
CLSID_DirectMusicSignPostTrack
;
track
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicSignPostTrack_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
track
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
...
...
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