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
9a436a98
Commit
9a436a98
authored
Mar 04, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: COM cleanup for the IStream iface.
parent
c7d05df8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
37 deletions
+25
-37
mimeole.c
dlls/inetcomm/mimeole.c
+25
-37
No files found.
dlls/inetcomm/mimeole.c
View file @
9a436a98
...
...
@@ -572,19 +572,14 @@ static HRESULT WINAPI MimeBody_IsDirty(
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeBody_Load
(
IMimeBody
*
iface
,
LPSTREAM
pStm
)
static
HRESULT
WINAPI
MimeBody_Load
(
IMimeBody
*
iface
,
IStream
*
pStm
)
{
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pStm
);
return
parse_headers
(
This
,
pStm
);
}
static
HRESULT
WINAPI
MimeBody_Save
(
IMimeBody
*
iface
,
LPSTREAM
pStm
,
BOOL
fClearDirty
)
static
HRESULT
WINAPI
MimeBody_Save
(
IMimeBody
*
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
...
...
@@ -1150,62 +1145,58 @@ HRESULT MimeBody_create(IUnknown *outer, void **ppv)
typedef
struct
{
IStreamVtbl
*
lpVtbl
;
LONG
refs
;
IStream
IStream_iface
;
LONG
ref
;
IStream
*
base
;
ULARGE_INTEGER
pos
,
start
,
length
;
}
sub_stream_t
;
static
inline
sub_stream_t
*
impl_from_IStream
(
IStream
*
iface
)
static
inline
sub_stream_t
*
impl_from_IStream
(
IStream
*
iface
)
{
return
(
sub_stream_t
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
sub_stream_t
,
lpVtbl
)
);
return
CONTAINING_RECORD
(
iface
,
sub_stream_t
,
IStream_iface
);
}
static
HRESULT
WINAPI
sub_stream_QueryInterface
(
IStream
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
static
HRESULT
WINAPI
sub_stream_QueryInterface
(
IStream
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
sub_stream_t
*
This
=
impl_from_IStream
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
Object
);
*
ppv
Object
=
NULL
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_ISequentialStream
)
||
IsEqualIID
(
riid
,
&
IID_IStream
))
{
IStream_AddRef
(
iface
);
*
ppv
Object
=
iface
;
*
ppv
=
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
sub_stream_AddRef
(
IStream
*
iface
)
static
ULONG
WINAPI
sub_stream_AddRef
(
IStream
*
iface
)
{
sub_stream_t
*
This
=
impl_from_IStream
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
\n
"
,
This
);
return
InterlockedIncrement
(
&
This
->
refs
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
sub_stream_Release
(
IStream
*
iface
)
static
ULONG
WINAPI
sub_stream_Release
(
IStream
*
iface
)
{
sub_stream_t
*
This
=
impl_from_IStream
(
iface
);
LONG
ref
s
;
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
)
;
TRACE
(
"(%p)
\n
"
,
This
);
refs
=
InterlockedDecrement
(
&
This
->
refs
);
if
(
!
ref
s
)
TRACE
(
"(%p)
ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IStream_Release
(
This
->
base
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
s
;
return
ref
;
}
static
HRESULT
WINAPI
sub_stream_Read
(
...
...
@@ -1422,15 +1413,15 @@ static HRESULT create_sub_stream(IStream *stream, ULARGE_INTEGER start, ULARGE_I
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
sub_stream_vtbl
;
This
->
ref
s
=
1
;
This
->
IStream_iface
.
lpVtbl
=
&
sub_stream_vtbl
;
This
->
ref
=
1
;
This
->
start
=
start
;
This
->
length
=
length
;
This
->
pos
.
QuadPart
=
0
;
IStream_AddRef
(
stream
);
This
->
base
=
stream
;
*
out
=
(
IStream
*
)
&
This
->
lpVtbl
;
*
out
=
&
This
->
IStream_iface
;
return
S_OK
;
}
...
...
@@ -1733,10 +1724,7 @@ static HRESULT WINAPI MimeMessage_Load(IMimeMessage *iface, IStream *pStm)
return
S_OK
;
}
static
HRESULT
WINAPI
MimeMessage_Save
(
IMimeMessage
*
iface
,
LPSTREAM
pStm
,
BOOL
fClearDirty
)
static
HRESULT
WINAPI
MimeMessage_Save
(
IMimeMessage
*
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
)
{
FIXME
(
"(%p)->(%p, %s)
\n
"
,
iface
,
pStm
,
fClearDirty
?
"TRUE"
:
"FALSE"
);
return
E_NOTIMPL
;
...
...
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