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
760a3188
Commit
760a3188
authored
Mar 19, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Return more accurate error codes in IDirectMusicSegment::Load.
parent
aaf99d8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
segment.c
dlls/dmime/segment.c
+7
-5
No files found.
dlls/dmime/segment.c
View file @
760a3188
...
...
@@ -1204,7 +1204,11 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
TRACE
(
"(%p, %p): Loading
\n
"
,
This
,
pStm
);
IStream_Read
(
pStm
,
&
Chunk
,
sizeof
(
FOURCC
)
+
sizeof
(
DWORD
),
NULL
);
hr
=
IStream_Read
(
pStm
,
&
Chunk
,
sizeof
(
Chunk
),
NULL
);
if
(
hr
!=
S_OK
){
WARN
(
"IStream_Read failed: %08x
\n
"
,
hr
);
return
DMUS_E_UNSUPPORTED_STREAM
;
}
TRACE_
(
dmfile
)(
": %s chunk (size = %d)"
,
debugstr_fourcc
(
Chunk
.
fccID
),
Chunk
.
dwSize
);
switch
(
Chunk
.
fccID
)
{
case
FOURCC_RIFF
:
{
...
...
@@ -1246,7 +1250,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR
TRACE_
(
dmfile
)(
": unexpected chunk (loading failed)
\n
"
);
liMove
.
QuadPart
=
StreamSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
/* skip the rest of the chunk */
return
E_FAIL
;
return
DMUS_E_UNSUPPORTED_STREAM
;
}
}
TRACE_
(
dmfile
)(
": reading finished
\n
"
);
...
...
@@ -1254,9 +1258,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR
}
default:
{
TRACE_
(
dmfile
)(
": unexpected chunk; loading failed)
\n
"
);
liMove
.
QuadPart
=
Chunk
.
dwSize
;
IStream_Seek
(
pStm
,
liMove
,
STREAM_SEEK_CUR
,
NULL
);
/* skip the rest of the chunk */
return
E_FAIL
;
return
DMUS_E_UNSUPPORTED_STREAM
;
}
}
...
...
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