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
b8b7db8b
Commit
b8b7db8b
authored
Jul 12, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jul 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Improve IMimeBody GetHandle return value.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ac740f17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
mimeole.c
dlls/inetcomm/mimeole.c
+5
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+18
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
b8b7db8b
...
@@ -1314,6 +1314,9 @@ static HRESULT WINAPI MimeBody_GetHandle(
...
@@ -1314,6 +1314,9 @@ static HRESULT WINAPI MimeBody_GetHandle(
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
MimeBody
*
This
=
impl_from_IMimeBody
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
phBody
);
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
phBody
);
if
(
!
phBody
)
return
E_INVALIDARG
;
*
phBody
=
This
->
handle
;
*
phBody
=
This
->
handle
;
return
This
->
handle
?
S_OK
:
MIME_E_NO_DATA
;
return
This
->
handle
?
S_OK
:
MIME_E_NO_DATA
;
}
}
...
@@ -1819,6 +1822,8 @@ static body_t *new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
...
@@ -1819,6 +1822,8 @@ static body_t *new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
body
->
index
=
index
;
body
->
index
=
index
;
list_init
(
&
body
->
children
);
list_init
(
&
body
->
children
);
body
->
parent
=
parent
;
body
->
parent
=
parent
;
mime_body
->
handle
=
UlongToHandle
(
body
->
index
);
}
}
return
body
;
return
body
;
}
}
...
...
dlls/inetcomm/tests/mimeole.c
View file @
b8b7db8b
...
@@ -220,6 +220,7 @@ static void test_CreateMessage(void)
...
@@ -220,6 +220,7 @@ static void test_CreateMessage(void)
ULONG
count
;
ULONG
count
;
FINDBODY
find_struct
;
FINDBODY
find_struct
;
HCHARSET
hcs
;
HCHARSET
hcs
;
HBODY
handle
=
NULL
;
char
text
[]
=
"text"
;
char
text
[]
=
"text"
;
HBODY
*
body_list
;
HBODY
*
body_list
;
...
@@ -258,6 +259,13 @@ static void test_CreateMessage(void)
...
@@ -258,6 +259,13 @@ static void test_CreateMessage(void)
hr
=
IMimeMessage_GetBody
(
msg
,
IBL_ROOT
,
NULL
,
&
hbody
);
hr
=
IMimeMessage_GetBody
(
msg
,
IBL_ROOT
,
NULL
,
&
hbody
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetHandle
(
body
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetHandle
(
body
,
&
handle
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
handle
!=
NULL
,
"handle %p
\n
"
,
handle
);
PropVariantInit
(
&
prop
);
PropVariantInit
(
&
prop
);
hr
=
IMimeMessage_GetBodyProp
(
msg
,
hbody
,
att_pritype
,
0
,
&
prop
);
hr
=
IMimeMessage_GetBodyProp
(
msg
,
hbody
,
att_pritype
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
@@ -269,6 +277,11 @@ static void test_CreateMessage(void)
...
@@ -269,6 +277,11 @@ static void test_CreateMessage(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeMessage_BindToObject
(
msg
,
hbody
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
hr
=
IMimeMessage_BindToObject
(
msg
,
hbody
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetHandle
(
body
,
&
handle
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
handle
==
hbody
,
"handle %p
\n
"
,
handle
);
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
offsets
.
cbBoundaryStart
==
405
,
"got %d
\n
"
,
offsets
.
cbBoundaryStart
);
ok
(
offsets
.
cbBoundaryStart
==
405
,
"got %d
\n
"
,
offsets
.
cbBoundaryStart
);
...
@@ -289,6 +302,11 @@ static void test_CreateMessage(void)
...
@@ -289,6 +302,11 @@ static void test_CreateMessage(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeMessage_BindToObject
(
msg
,
hbody
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
hr
=
IMimeMessage_BindToObject
(
msg
,
hbody
,
&
IID_IMimeBody
,
(
void
**
)
&
body
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetHandle
(
body
,
&
handle
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
handle
==
hbody
,
"handle %p
\n
"
,
handle
);
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
hr
=
IMimeBody_GetOffsets
(
body
,
&
offsets
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
offsets
.
cbBoundaryStart
==
525
,
"got %d
\n
"
,
offsets
.
cbBoundaryStart
);
ok
(
offsets
.
cbBoundaryStart
==
525
,
"got %d
\n
"
,
offsets
.
cbBoundaryStart
);
...
...
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