Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Wed, 16 Apr 2008 08:22:58 -0500,    group: microsoft.public.platformsdk.mapi        back       


MAPI Logon/Logoff question   
I need to be able to Logon/Logoff a MAPI session in an application without restarting the application.

I have added a call to IMAPISession::Logoff, before the session is released, but it "seems" the next 
call to MAPILogonEx does not open a new session.

MAPILogonEx(NULL, (sProfile.IsEmpty() ? NULL : szProfile), NULL, 
MAPI_EXTENDED|MAPI_NEW_SESSION|MAPI_LOGON_UI|MAPI_UNICODE, &m_pSession);

(I say "seems" because the ability to access a public folder does not change, even though I have 
tried to open a new session with a different online/offline mode.)

What conditions would cause a Logoff to fail? How can I test for these conditions, and ensure they 
do not occur?

Thanks,

Frank
date: Wed, 16 Apr 2008 08:22:58 -0500   author:   Frank S am

Re: MAPI Logon/Logoff question   
Have you tried to expliitl yspecify a different profiel name?
How di yo umodify the online mode? Why not ismply use the odl session and 
open any store object in the online mode using MAPI_NO_CACHE?

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
"Frank S" <OldGrouch@community.nospam> wrote in message 
news:O7eB%23T8nIHA.4616@TK2MSFTNGP05.phx.gbl...
>I need to be able to Logon/Logoff a MAPI session in an application without 
>restarting the application.
>
> I have added a call to IMAPISession::Logoff, before the session is 
> released, but it "seems" the next call to MAPILogonEx does not open a new 
> session.
>
> MAPILogonEx(NULL, (sProfile.IsEmpty() ? NULL : szProfile), NULL, 
> MAPI_EXTENDED|MAPI_NEW_SESSION|MAPI_LOGON_UI|MAPI_UNICODE, &m_pSession);
>
> (I say "seems" because the ability to access a public folder does not 
> change, even though I have tried to open a new session with a different 
> online/offline mode.)
>
> What conditions would cause a Logoff to fail? How can I test for these 
> conditions, and ensure they do not occur?
>
> Thanks,
>
> Frank
date: Sat, 19 Apr 2008 00:05:02 -0700   author:   Dmitry Streblechenko

Re: MAPI Logon/Logoff question   
Dmitry Streblechenko wrote:
> Have you tried to expliitl yspecify a different profiel name?
> How di yo umodify the online mode? Why not ismply use the odl session and 
> open any store object in the online mode using MAPI_NO_CACHE?
> 
Dmitry,

By calling MAPIUninitialize after Logoff, I can now get the results I wanted.

Thanks,

Frank
date: Sun, 20 Apr 2008 15:02:15 -0500   author:   Frank S am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us