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
02ceeef2
Commit
02ceeef2
authored
Feb 12, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Feb 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeMessage_GetAttachments.
parent
869b10b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
mimeole.c
dlls/inetcomm/mimeole.c
+32
-2
mimeole.c
dlls/inetcomm/tests/mimeole.c
+6
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
02ceeef2
...
...
@@ -2279,8 +2279,38 @@ static HRESULT WINAPI MimeMessage_GetAttachments(
ULONG
*
pcAttach
,
LPHBODY
*
pprghAttach
)
{
FIXME
(
"(%p)->(%p, %p)
\n
"
,
iface
,
pcAttach
,
pprghAttach
);
return
E_NOTIMPL
;
HRESULT
hr
;
FINDBODY
find_struct
;
HBODY
hbody
;
LPHBODY
array
;
ULONG
size
=
10
;
TRACE
(
"(%p)->(%p, %p)
\n
"
,
iface
,
pcAttach
,
pprghAttach
);
*
pcAttach
=
0
;
array
=
CoTaskMemAlloc
(
size
*
sizeof
(
HBODY
));
find_struct
.
pszPriType
=
find_struct
.
pszSubType
=
NULL
;
hr
=
IMimeMessage_FindFirst
(
iface
,
&
find_struct
,
&
hbody
);
while
(
hr
==
S_OK
)
{
hr
=
IMimeMessage_IsContentType
(
iface
,
hbody
,
"multipart"
,
NULL
);
TRACE
(
"IsCT rets %08x %d
\n
"
,
hr
,
*
pcAttach
);
if
(
hr
!=
S_OK
)
{
if
(
*
pcAttach
+
1
>
size
)
{
size
*=
2
;
array
=
CoTaskMemRealloc
(
array
,
size
*
sizeof
(
HBODY
));
}
array
[
*
pcAttach
]
=
hbody
;
(
*
pcAttach
)
++
;
}
hr
=
IMimeMessage_FindNext
(
iface
,
&
find_struct
,
&
hbody
);
}
*
pprghAttach
=
array
;
return
S_OK
;
}
static
HRESULT
WINAPI
MimeMessage_GetAddressTable
(
...
...
dlls/inetcomm/tests/mimeole.c
View file @
02ceeef2
...
...
@@ -215,6 +215,7 @@ static void test_CreateMessage(void)
ULONG
count
;
FINDBODY
find_struct
;
char
text
[]
=
"text"
;
HBODY
*
body_list
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
...
@@ -282,6 +283,11 @@ static void test_CreateMessage(void)
hr
=
IMimeMessage_FindNext
(
msg
,
&
find_struct
,
&
hbody
);
ok
(
hr
==
MIME_E_NOT_FOUND
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeMessage_GetAttachments
(
msg
,
&
count
,
&
body_list
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
count
==
2
,
"got %d
\n
"
,
count
);
CoTaskMemFree
(
body_list
);
IMimeMessage_Release
(
msg
);
ref
=
IStream_AddRef
(
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