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
0b806667
Commit
0b806667
authored
Jan 27, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Return a new instance of stream in IMimeBody::GetData.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
393512d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
mimeole.c
dlls/inetcomm/mimeole.c
+24
-3
No files found.
dlls/inetcomm/mimeole.c
View file @
0b806667
...
...
@@ -442,6 +442,22 @@ static HRESULT create_sub_stream(IStream *stream, ULARGE_INTEGER start, ULARGE_I
return
S_OK
;
}
static
HRESULT
get_stream_size
(
IStream
*
stream
,
ULARGE_INTEGER
*
size
)
{
STATSTG
statstg
=
{
NULL
};
LARGE_INTEGER
zero
;
HRESULT
hres
;
hres
=
IStream_Stat
(
stream
,
&
statstg
,
STATFLAG_NONAME
);
if
(
SUCCEEDED
(
hres
))
{
*
size
=
statstg
.
cbSize
;
return
S_OK
;
}
zero
.
QuadPart
=
0
;
return
IStream_Seek
(
stream
,
zero
,
STREAM_SEEK_END
,
size
);
}
static
inline
MimeBody
*
impl_from_IMimeBody
(
IMimeBody
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
MimeBody
,
IMimeBody_iface
);
...
...
@@ -1505,11 +1521,16 @@ static HRESULT WINAPI MimeBody_GetData(
IStream
**
ppStream
)
{
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
ULARGE_INTEGER
start
,
size
;
HRESULT
hres
;
FIXME
(
"(%p)->(%d, %p). Ignoring encoding type.
\n
"
,
This
,
ietEncoding
,
ppStream
);
*
ppStream
=
This
->
data
;
IStream_AddRef
(
*
ppStream
);
return
S_OK
;
start
.
QuadPart
=
0
;
hres
=
get_stream_size
(
This
->
data
,
&
size
);
if
(
SUCCEEDED
(
hres
))
hres
=
create_sub_stream
(
This
->
data
,
start
,
size
,
ppStream
);
return
hres
;
}
static
HRESULT
WINAPI
MimeBody_SetData
(
...
...
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