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
13afbc02
Commit
13afbc02
authored
Feb 23, 2008
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Assign to structs instead of using memcpy.
parent
ea85c5b1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
26 deletions
+26
-26
audiopath.c
dlls/dmime/audiopath.c
+10
-10
dmutils.c
dlls/dmime/dmutils.c
+2
-2
graph.c
dlls/dmime/graph.c
+10
-10
markertrack.c
dlls/dmime/markertrack.c
+1
-1
paramcontroltrack.c
dlls/dmime/paramcontroltrack.c
+2
-2
performance.c
dlls/dmime/performance.c
+1
-1
No files found.
dlls/dmime/audiopath.c
View file @
13afbc02
...
...
@@ -255,12 +255,12 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicObject_GetDescriptor
static
HRESULT
WINAPI
IDirectMusicAudioPathImpl_IDirectMusicObject_SetDescriptor
(
LPDIRECTMUSICOBJECT
iface
,
LPDMUS_OBJECTDESC
pDesc
)
{
ICOM_THIS_MULTI
(
IDirectMusicAudioPathImpl
,
ObjectVtbl
,
iface
);
TRACE
(
"(%p, %p): setting descriptor:
\n
%s
\n
"
,
This
,
pDesc
,
debugstr_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
)
...
...
@@ -268,9 +268,9 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_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
));
memcpy
(
This
->
pDesc
->
pbMemData
,
pDesc
->
pbMemData
,
sizeof
(
pDesc
->
pbMemData
));
...
...
@@ -293,11 +293,11 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicObject_ParseDescript
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
TRACE
(
"(%p, %p, %p)
\n
"
,
This
,
pStream
,
pDesc
);
/* FIXME: should this be determined from stream? */
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
pDesc
->
guidClass
,
&
CLSID_DirectMusicAudioPath
,
sizeof
(
CLSID
))
;
pDesc
->
guidClass
=
CLSID_DirectMusicAudioPath
;
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
)
{
...
...
@@ -649,8 +649,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID* p
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_DirectMusicAudioPath
,
sizeof
(
CLSID
))
;
obj
->
pDesc
->
guidClass
=
CLSID_DirectMusicAudioPath
;
obj
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicAudioPathImpl_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
obj
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
}
dlls/dmime/dmutils.c
View file @
13afbc02
...
...
@@ -207,9 +207,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
"
);
...
...
dlls/dmime/graph.c
View file @
13afbc02
...
...
@@ -221,12 +221,12 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicObject_GetDescriptor (LP
static
HRESULT
WINAPI
IDirectMusicGraphImpl_IDirectMusicObject_SetDescriptor
(
LPDIRECTMUSICOBJECT
iface
,
LPDMUS_OBJECTDESC
pDesc
)
{
ICOM_THIS_MULTI
(
IDirectMusicGraphImpl
,
ObjectVtbl
,
iface
);
TRACE
(
"(%p, %p): setting descriptor:
\n
%s
\n
"
,
This
,
pDesc
,
debugstr_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
)
...
...
@@ -234,9 +234,9 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicObject_SetDescriptor (LP
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
));
memcpy
(
This
->
pDesc
->
pbMemData
,
pDesc
->
pbMemData
,
sizeof
(
pDesc
->
pbMemData
));
...
...
@@ -259,11 +259,11 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicObject_ParseDescriptor (
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
TRACE
(
"(%p, %p, %p)
\n
"
,
This
,
pStream
,
pDesc
);
/* FIXME: should this be determined from stream? */
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
memcpy
(
&
pDesc
->
guidClass
,
&
CLSID_DirectMusicGraph
,
sizeof
(
CLSID
))
;
pDesc
->
guidClass
=
CLSID_DirectMusicGraph
;
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
)
{
...
...
@@ -614,9 +614,9 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (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_DirectMusicGraph
,
sizeof
(
CLSID
))
;
obj
->
pDesc
->
guidClass
=
CLSID_DirectMusicGraph
;
obj
->
ref
=
0
;
/* will be inited by QueryInterface */
list_init
(
&
obj
->
Tools
);
return
IDirectMusicGraphImpl_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
obj
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
}
dlls/dmime/markertrack.c
View file @
13afbc02
...
...
@@ -279,7 +279,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID *ppo
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_DirectMusicMarkerTrack
,
sizeof
(
CLSID
))
;
track
->
pDesc
->
guidClass
=
CLSID_DirectMusicMarkerTrack
;
track
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicMarkerTrack_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
track
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
...
...
dlls/dmime/paramcontroltrack.c
View file @
13afbc02
...
...
@@ -279,8 +279,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOI
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_DirectMusicParamControlTrack
,
sizeof
(
CLSID
))
;
track
->
pDesc
->
guidClass
=
CLSID_DirectMusicParamControlTrack
;
track
->
ref
=
0
;
/* will be inited by QueryInterface */
return
IDirectMusicParamControlTrack_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
track
->
UnknownVtbl
,
lpcGUID
,
ppobj
);
}
dlls/dmime/performance.c
View file @
13afbc02
...
...
@@ -770,7 +770,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio (LPDIRECTMUSICPERFO
/* as seen in msdn we need params init before audio path creation */
if
(
NULL
!=
pParams
)
{
memcpy
(
&
This
->
pParams
,
pParams
,
sizeof
(
DMUS_AUDIOPARAMS
))
;
This
->
pParams
=
*
pParams
;
}
else
{
/**
* TODO, how can i fill the struct
...
...
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