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
7a2e5b03
Commit
7a2e5b03
authored
Apr 14, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: IMimeMessage has a HBODY_ROOT node by default.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca8a0860
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
mimeole.c
dlls/inetcomm/mimeole.c
+8
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+22
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
7a2e5b03
...
...
@@ -1706,6 +1706,8 @@ static HRESULT WINAPI MimeMessage_Load(IMimeMessage *iface, IStream *pStm)
return
E_FAIL
;
}
empty_body_list
(
&
This
->
body_tree
);
IStream_AddRef
(
pStm
);
This
->
stream
=
pStm
;
offsets
.
cbBoundaryStart
=
offsets
.
cbHeaderStart
=
0
;
...
...
@@ -2544,6 +2546,8 @@ static const IMimeMessageVtbl MimeMessageVtbl =
HRESULT
MimeMessage_create
(
IUnknown
*
outer
,
void
**
obj
)
{
MimeMessage
*
This
;
MimeBody
*
mime_body
;
body_t
*
root_body
;
TRACE
(
"(%p, %p)
\n
"
,
outer
,
obj
);
...
...
@@ -2564,6 +2568,10 @@ HRESULT MimeMessage_create(IUnknown *outer, void **obj)
list_init
(
&
This
->
body_tree
);
This
->
next_index
=
1
;
mime_body
=
mimebody_create
();
root_body
=
new_body_entry
(
mime_body
,
This
->
next_index
++
,
NULL
);
list_add_head
(
&
This
->
body_tree
,
&
root_body
->
entry
);
*
obj
=
&
This
->
IMimeMessage_iface
;
return
S_OK
;
}
...
...
dlls/inetcomm/tests/mimeole.c
View file @
7a2e5b03
...
...
@@ -332,6 +332,27 @@ static void test_CreateMessage(void)
IStream_Release
(
stream
);
}
void
test_BindToObject
(
void
)
{
HRESULT
hr
;
IMimeMessage
*
msg
;
IMimeBody
*
body
;
ULONG
count
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeMessage_CountBodies
(
msg
,
HBODY_ROOT
,
TRUE
,
&
count
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
count
==
1
,
"got %d
\n
"
,
count
);
hr
=
IMimeMessage_BindToObject
(
msg
,
HBODY_ROOT
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
IMimeBody_Release
(
body
);
IMimeMessage_Release
(
msg
);
}
START_TEST
(
mimeole
)
{
OleInitialize
(
NULL
);
...
...
@@ -340,5 +361,6 @@ START_TEST(mimeole)
test_CreateBody
();
test_Allocator
();
test_CreateMessage
();
test_BindToObject
();
OleUninitialize
();
}
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