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
0c4ffe4f
Commit
0c4ffe4f
authored
Feb 19, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmband: Assign to struct instead of using memcpy.
parent
8063d657
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
band.c
dlls/dmband/band.c
+12
-12
bandtrack.c
dlls/dmband/bandtrack.c
+3
-3
dmutils.c
dlls/dmband/dmutils.c
+2
-2
No files found.
dlls/dmband/band.c
View file @
0c4ffe4f
...
...
@@ -155,12 +155,12 @@ static HRESULT WINAPI IDirectMusicBandImpl_IDirectMusicObject_GetDescriptor (LPD
static
HRESULT
WINAPI
IDirectMusicBandImpl_IDirectMusicObject_SetDescriptor
(
LPDIRECTMUSICOBJECT
iface
,
LPDMUS_OBJECTDESC
pDesc
)
{
ICOM_THIS_MULTI
(
IDirectMusicBandImpl
,
ObjectVtbl
,
iface
);
TRACE
(
"(%p, %p): setting descriptor:
\n
"
,
This
,
pDesc
);
debug_DMUS_OBJECTDESC
(
pDesc
);
/* 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
)
...
...
@@ -168,11 +168,11 @@ static HRESULT WINAPI IDirectMusicBandImpl_IDirectMusicObject_SetDescriptor (LPD
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
)
{
...
...
@@ -192,11 +192,11 @@ static HRESULT WINAPI IDirectMusicBandImpl_IDirectMusicObject_ParseDescriptor (L
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
TRACE
(
"(%p, %p)
\n
"
,
pStream
,
pDesc
);
/* FIXME: should this be determined from stream? */
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
pDesc
->
guidClass
,
&
CLSID_DirectMusicBand
,
sizeof
(
CLSID
))
;
pDesc
->
guidClass
=
CLSID_DirectMusicBand
;
IStream_Read
(
pStream
,
&
Chunk
,
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
),
NULL
);
TRACE_
(
dmfile
)(
": %s chunk (size = 0x%04x)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
switch
(
Chunk
.
fccID
)
{
...
...
@@ -361,7 +361,7 @@ static ULONG WINAPI IDirectMusicBandImpl_IPersistStream_Release (LPPERSISTSTREAM
static
HRESULT
WINAPI
IDirectMusicBandImpl_IPersistStream_GetClassID
(
LPPERSISTSTREAM
iface
,
CLSID
*
pClassID
)
{
ICOM_THIS_MULTI
(
IDirectMusicBandImpl
,
PersistStreamVtbl
,
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
pClassID
);
memcpy
(
pClassID
,
&
CLSID_DirectMusicBand
,
sizeof
(
CLSID
))
;
*
pClassID
=
CLSID_DirectMusicBand
;
return
S_OK
;
}
...
...
@@ -702,9 +702,9 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj,
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_DirectMusicBand
,
sizeof
(
CLSID
))
;
obj
->
pDesc
->
guidClass
=
CLSID_DirectMusicBand
;
obj
->
ref
=
0
;
/* will be inited by QueryInterface */
list_init
(
&
obj
->
Instruments
);
return
IDirectMusicBandImpl_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
obj
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
}
dlls/dmband/bandtrack.c
View file @
0c4ffe4f
...
...
@@ -255,7 +255,7 @@ static ULONG WINAPI IDirectMusicBandTrack_IPersistStream_Release (LPPERSISTSTREA
static
HRESULT
WINAPI
IDirectMusicBandTrack_IPersistStream_GetClassID
(
LPPERSISTSTREAM
iface
,
CLSID
*
pClassID
)
{
ICOM_THIS_MULTI
(
IDirectMusicBandTrack
,
PersistStreamVtbl
,
iface
);
TRACE
(
"(%p, %p)
\n
"
,
This
,
pClassID
);
memcpy
(
pClassID
,
&
CLSID_DirectMusicBandTrack
,
sizeof
(
CLSID
))
;
*
pClassID
=
CLSID_DirectMusicBandTrack
;
return
S_OK
;
}
...
...
@@ -604,9 +604,9 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID *ppobj
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_DirectMusicBandTrack
,
sizeof
(
CLSID
))
;
track
->
pDesc
->
guidClass
=
CLSID_DirectMusicBandTrack
;
track
->
ref
=
0
;
/* will be inited by QueryInterface */
list_init
(
&
track
->
Bands
);
return
IDirectMusicBandTrack_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
track
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
}
dlls/dmband/dmutils.c
View file @
0c4ffe4f
...
...
@@ -309,9 +309,9 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
}
TRACE_
(
dmfile
)(
": ListCount[0] = %d < ListSize[0] = %d
\n
"
,
ListCount
[
0
],
ListSize
[
0
]);
}
while
(
ListCount
[
0
]
<
ListSize
[
0
]);
ref_desc
.
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
ref_desc
.
guidClass
,
&
ref
.
guidClassID
,
sizeof
(
ref
.
guidClassID
))
;
ref_desc
.
guidClass
=
ref
.
guidClassID
;
TRACE_
(
dmfile
)(
"** DM Reference Begin of Load ***
\n
"
);
TRACE_
(
dmfile
)(
"With Desc:
\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