Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MAPI, cached mode, and connections to the Exchange server

1 view
Skip to first unread message

Shomano

unread,
Jun 16, 2009, 9:24:01 AM6/16/09
to
Hi,

I'm working on a stand alone application (not an Outlook plugin) that uses
MAPI to access Outlook/Exchange mailboxes. The Exchange accounts are
configured in Cached Exchange Mode. However, when I programmatically open the
message stores (IMAPISession::OpenMsgStore()) a connection is established
with the Exchange server.

One important note: The connections are not created immediately on the
OpenMsgStore() call. They seem to be established only if my application pumps
messages in the thread that has initialized MAPI. I made a test application
that simply open the store and pump messages. I get 2 connections established
after a delay of about 40 seconds.

Here is flags I pass to the API functions:
MAPIInitialize: {0, MAPI_MULTITHREAD_NOTIFICATIONS}
MAPILogonEx: MAPI_USE_DEFAULT | MAPI_NO_MAIL | MAPI_EXTENDED
IMAPISession::OpenMsgStore: MDB_NO_DIALOG | MDB_NO_MAIL

So, is there any flag that could help me to prevent these connections to the
Exchange server and work only offline?

Thanks.

Dmitry Streblechenko

unread,
Jun 16, 2009, 7:41:37 PM6/16/09
to
Where does the store id comes from? Is that the primary or a delegate
mailbox?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Shomano" <Sho...@discussions.microsoft.com> wrote in message
news:6A6A5415-2341-4E11...@microsoft.com...

Shomano

unread,
Jun 16, 2009, 11:40:01 PM6/16/09
to
The StoreId is the PR_ENTRYID property obtained from the session's message
store table (IMAPISession::GetMsgStoresTable()) where PR_DEFAULT_STORE==true.
This is the primary mailbox.

Dmitry Streblechenko

unread,
Jun 17, 2009, 4:54:41 PM6/17/09
to
Why is it a problem? I would imagine the cached store would want to sync
with the server...

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Shomano" <Sho...@discussions.microsoft.com> wrote in message

news:AF745C1C-F9B7-4701...@microsoft.com...

Shomano

unread,
Jun 17, 2009, 8:19:02 PM6/17/09
to
The application will be deployed on many computers connected to the same
Exchange server. The IT department noticed that the number of connections to
the server increases when the application is running and they are worrying
about the impact on the server performance.

I know messages are still downloaded only once since the store is cached,
but does the increased number of connections will impact the server
performance?

Thanks again Dimitry

Dmitry Streblechenko

unread,
Jun 18, 2009, 1:19:46 AM6/18/09
to
Of course it will. But the extent of that impact can only be judged by
actually looking at the particular server performance.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Shomano" <Sho...@discussions.microsoft.com> wrote in message

news:47FF3C4F-F200-45A4...@microsoft.com...

0 new messages