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
4ba3aa50
Commit
4ba3aa50
authored
Feb 08, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Feb 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Add the beginnings of IMimeMessage_Load.
parent
9438ebfa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
3 deletions
+48
-3
mimeole.c
dlls/inetcomm/mimeole.c
+19
-3
mimeole.c
dlls/inetcomm/tests/mimeole.c
+29
-0
No files found.
dlls/inetcomm/mimeole.c
View file @
4ba3aa50
...
...
@@ -1091,6 +1091,7 @@ typedef struct MimeMessage
const
IMimeMessageVtbl
*
lpVtbl
;
LONG
refs
;
IStream
*
stream
;
}
MimeMessage
;
static
HRESULT
WINAPI
MimeMessage_QueryInterface
(
IMimeMessage
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -1130,6 +1131,7 @@ static ULONG WINAPI MimeMessage_Release(IMimeMessage *iface)
refs
=
InterlockedDecrement
(
&
This
->
refs
);
if
(
!
refs
)
{
if
(
This
->
stream
)
IStream_Release
(
This
->
stream
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -1155,9 +1157,22 @@ static HRESULT WINAPI MimeMessage_IsDirty(
static
HRESULT
WINAPI
MimeMessage_Load
(
IMimeMessage
*
iface
,
LPSTREAM
pStm
){
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
pStm
);
return
E_NOTIMPL
;
LPSTREAM
pStm
)
{
MimeMessage
*
This
=
(
MimeMessage
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pStm
);
if
(
This
->
stream
)
{
FIXME
(
"already loaded a message
\n
"
);
return
E_FAIL
;
}
IStream_AddRef
(
pStm
);
This
->
stream
=
pStm
;
return
S_OK
;
}
static
HRESULT
WINAPI
MimeMessage_Save
(
...
...
@@ -1721,6 +1736,7 @@ HRESULT WINAPI MimeOleCreateMessage(IUnknown *pUnkOuter, IMimeMessage **ppMessag
This
->
lpVtbl
=
&
MimeMessageVtbl
;
This
->
refs
=
1
;
This
->
stream
=
NULL
;
*
ppMessage
=
(
IMimeMessage
*
)
&
This
->
lpVtbl
;
return
S_OK
;
...
...
dlls/inetcomm/tests/mimeole.c
View file @
4ba3aa50
...
...
@@ -202,6 +202,34 @@ static void test_Allocator(void)
IMimeAllocator_Release
(
alloc
);
}
static
void
test_CreateMessage
(
void
)
{
HRESULT
hr
;
IMimeMessage
*
msg
;
IStream
*
stream
;
LARGE_INTEGER
pos
;
LONG
ref
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
IStream_Write
(
stream
,
msg1
,
sizeof
(
msg1
)
-
1
,
NULL
);
pos
.
QuadPart
=
0
;
IStream_Seek
(
stream
,
pos
,
STREAM_SEEK_SET
,
NULL
);
hr
=
IMimeMessage_Load
(
msg
,
stream
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
IMimeMessage_Release
(
msg
);
ref
=
IStream_AddRef
(
stream
);
ok
(
ref
==
2
,
"ref %d
\n
"
,
ref
);
IStream_Release
(
stream
);
IStream_Release
(
stream
);
}
START_TEST
(
mimeole
)
{
OleInitialize
(
NULL
);
...
...
@@ -209,5 +237,6 @@ START_TEST(mimeole)
test_CreateSecurity
();
test_CreateBody
();
test_Allocator
();
test_CreateMessage
();
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