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
45c265f0
Commit
45c265f0
authored
Oct 01, 2009
by
Owen Rudge
Committed by
Alexandre Julliard
Oct 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32: Log on via Extended MAPI and get the default message store.
parent
82f25f54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
1 deletion
+72
-1
sendmail.c
dlls/mapi32/sendmail.c
+72
-1
No files found.
dlls/mapi32/sendmail.c
View file @
45c265f0
...
...
@@ -30,6 +30,9 @@
#include "winerror.h"
#include "objbase.h"
#include "mapi.h"
#include "mapix.h"
#include "mapiutil.h"
#include "mapidefs.h"
#include "winreg.h"
#include "shellapi.h"
#include "shlwapi.h"
...
...
@@ -45,10 +48,78 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi);
static
ULONG
sendmail_extended_mapi
(
LHANDLE
mapi_session
,
ULONG_PTR
uiparam
,
lpMapiMessage
message
,
FLAGS
flags
,
ULONG
reserved
)
{
ULONG
retval
=
MAPI_E_FAILURE
;
IMAPISession
*
session
=
NULL
;
IMAPITable
*
msg_table
;
LPSRowSet
rows
=
NULL
;
HRESULT
ret
;
TRACE
(
"Using Extended MAPI wrapper for MAPISendMail
\n
"
);
/* Attempt to log on via Extended MAPI */
ret
=
MAPILogonEx
(
0
,
NULL
,
NULL
,
MAPI_EXTENDED
|
MAPI_USE_DEFAULT
|
MAPI_NEW_SESSION
,
&
session
);
TRACE
(
"MAPILogonEx: %x
\n
"
,
ret
);
if
(
ret
!=
S_OK
)
{
retval
=
MAPI_E_LOGIN_FAILURE
;
goto
cleanup
;
}
/* Open the default message store */
if
(
IMAPISession_GetMsgStoresTable
(
session
,
0
,
&
msg_table
)
==
S_OK
)
{
/* We want the default store */
SizedSPropTagArray
(
2
,
columns
)
=
{
2
,
{
PR_ENTRYID
,
PR_DEFAULT_STORE
}};
/* Set the columns we want */
if
(
IMAPITable_SetColumns
(
msg_table
,
(
LPSPropTagArray
)
&
columns
,
0
)
==
S_OK
)
{
while
(
1
)
{
if
(
IMAPITable_QueryRows
(
msg_table
,
1
,
0
,
&
rows
)
!=
S_OK
)
{
MAPIFreeBuffer
(
rows
);
rows
=
NULL
;
}
else
if
(
rows
->
cRows
!=
1
)
{
FreeProws
(
rows
);
rows
=
NULL
;
}
else
{
/* If it's not the default store, try the next row */
if
(
!
rows
->
aRow
[
0
].
lpProps
[
1
].
Value
.
b
)
{
FreeProws
(
rows
);
continue
;
}
}
break
;
}
}
IMAPITable_Release
(
msg_table
);
}
/* Did we manage to get the right store? */
if
(
!
rows
)
goto
logoff
;
/* We don't need this any more */
FreeProws
(
rows
);
logoff:
;
IMAPISession_Logoff
(
session
,
(
ULONG
)
NULL
,
0
,
0
);
IMAPISession_Release
(
session
);
cleanup:
;
MAPIUninitialize
();
return
MAPI_E_FAILURE
;
return
retval
;
}
/**************************************************************************
...
...
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