Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Tue, 01 Jul 2008 04:15:36 +0530,    group: microsoft.public.win32.programmer.messaging        back       


Unable to open msg store if first prompt for password canceled   
Hi,
I have a situation in which I am calling MAPILogonEx with these flags
fMapiUnicode | MAPI_EXTENDED | MAPI_EXPLICIT_PROFILE | MAPI_NEW_SESSION 
  | MAPI_LOGON_UI

I am also passing the profile name. This profile has an exchange account 
configured via RPC over HTTP. The workstation is not part of the domain. 
Outlook is not running.

The MAPILgonEx call succeeds with value S_OK without any login prompt.

When I try try to open the exchange message store(with flags MDB_WRITE 
| MDB_ONLINE - I must use this flag), it shows the login box. If I 
cancel the login prompt and retry again from the beginning it fails 
continuously with the error 0x8004011D (FailOneProvider).

This whole code is running in a separate thread, it first initializes 
MAPI then logins and then open the message store. At exit it clears 
any/everything.

Even after the thread terminates and is re-started, the call for opening 
message store returns without showing the login dialog & returns the 
same error. It shows the login dialog only when the process is restarted.

Any idea how can I fix make it prompt for login/password?

Regards,
Ashutosh
date: Tue, 01 Jul 2008 04:15:36 +0530   author:   Ashutosh am

RE: Unable to open msg store if first prompt for password canceled   
Hi Ashutosh,
Thank you for your posting.

I understand that you used the method MAPILogonEx to log your client 
application on to a session with your Exchange server, however you could 
not see the logon dialog box, and also you encountered the error 0x8004011D 
when you used Exchange message store and cancelled the login prompt.
If I have misunderstood, please let me know.

First regarding the error 0x8004011D for Exchange message store, it is a 
known issue and you can find it in the following KB article:
You receive a 0x8004011D error message in Outlook after you cancel the 
Exchange Server logon for synchronization
http://support.microsoft.com/kb/289971/en-us

And for no dialog box when using MAPILogonEx, I would like to know if your 
application was an MFC application. If so, this issue should be related to 
the fact that the function was called within a thread which is not a UI 
thread. You may try running the function in a UI thread to see if it helps. 
I would like to recommend the following articles for your reference:
Multithreading with C++ and MFC  
http://msdn.microsoft.com/en-us/library/975t8ks0(VS.80).aspx
Multithreading: Creating User-Interface Threads  
http://msdn.microsoft.com/en-us/library/b807sta6(VS.80).aspx

If you have any other questions or concerns, please feel free to let me 
know. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your 
comments and suggestions about how we can improve the 
support we provide to you. Please feel free to let my manager 
know what you think of the level of service provided. You can 
send feedback directly to my manager at: msdnmg@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for 
non-urgent issues where an initial response from the community 
or a Microsoft Support Engineer within 1 business day is acceptable. 
Please note that each follow up response may take approximately 
2 business days as the support professional working with you may 
need further investigation to reach the most efficient resolution. 
The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by 
contacting Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
date: Tue, 01 Jul 2008 09:59:51 GMT   author:   (Charles Wang [MSFT])

Re: Unable to open msg store if first prompt for password canceled   
Hi Charels,
Thanks for your comments.

Yes my application is a MFC application, and the these work is being 
done in a background thread (not UI), but MAPILogonEx is being passed 
the window handle of the dialog that is visible. Also, if it can show 
the dialog first time why not second time?? Also the login dialog that 
is shown, it's shown as application modal!

However I will try to run the code in a UI thread.


-- 
Thanks & Regards,
Ashutosh Bhawasinka
[discussion@ashutosh.in]
MCSA - Messaging,
MCTS - .Net Windows Apps

Charles Wang [MSFT] wrote:
> Hi Ashutosh,
> Thank you for your posting.
> 
> I understand that you used the method MAPILogonEx to log your client 
> application on to a session with your Exchange server, however you could 
> not see the logon dialog box, and also you encountered the error 0x8004011D 
> when you used Exchange message store and cancelled the login prompt.
> If I have misunderstood, please let me know.
> 
> First regarding the error 0x8004011D for Exchange message store, it is a 
> known issue and you can find it in the following KB article:
> You receive a 0x8004011D error message in Outlook after you cancel the 
> Exchange Server logon for synchronization
> http://support.microsoft.com/kb/289971/en-us
> 
> And for no dialog box when using MAPILogonEx, I would like to know if your 
> application was an MFC application. If so, this issue should be related to 
> the fact that the function was called within a thread which is not a UI 
> thread. You may try running the function in a UI thread to see if it helps. 
> I would like to recommend the following articles for your reference:
> Multithreading with C++ and MFC  
> http://msdn.microsoft.com/en-us/library/975t8ks0(VS.80).aspx
> Multithreading: Creating User-Interface Threads  
> http://msdn.microsoft.com/en-us/library/b807sta6(VS.80).aspx
> 
> If you have any other questions or concerns, please feel free to let me 
> know. Have a nice day!
> 
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ===========================================================
> Delighting our customers is our #1 priority. We welcome your 
> comments and suggestions about how we can improve the 
> support we provide to you. Please feel free to let my manager 
> know what you think of the level of service provided. You can 
> send feedback directly to my manager at: msdnmg@microsoft.com.
> ===========================================================
> Get notification to my posts through email? Please refer to 
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> 
> Note: The MSDN Managed Newsgroup support offering is for 
> non-urgent issues where an initial response from the community 
> or a Microsoft Support Engineer within 1 business day is acceptable. 
> Please note that each follow up response may take approximately 
> 2 business days as the support professional working with you may 
> need further investigation to reach the most efficient resolution. 
> The offering is not appropriate for situations 
> that require urgent, real-time or phone-based interactions or complex 
> project analysis and dump analysis issues. Issues of this nature are best 
> handled working with a dedicated Microsoft Support Engineer by 
> contacting Microsoft Customer Support Services (CSS) at 
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ============================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
> =========================================================
> 

-- 
Ashutosh Bhawasinka
[discussion@ashutosh.in]
MCSA - Messaging,
MCTS - .Net Windows Apps
date: Tue, 01 Jul 2008 15:38:49 +0530   author:   Ashutosh am

Re: Unable to open msg store if first prompt for password canceled   
If there's any chance of making this work, you'll need to make sure that 
during your thread tear down you're cleaning up *everything* you tried to 
do. That means releasing the message store table, logging off of the 
session, releasing the session, and uninitializing MAPI. Check if 
emsmdb32.dll is unloading when your thread shuts down. If it's not 
unloading, chances are you missed something.

"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message 
news:uVx$FMw2IHA.4500@TK2MSFTNGP06.phx.gbl...
> Hi,
> I have a situation in which I am calling MAPILogonEx with these flags
> fMapiUnicode | MAPI_EXTENDED | MAPI_EXPLICIT_PROFILE | MAPI_NEW_SESSION | 
> MAPI_LOGON_UI
>
> I am also passing the profile name. This profile has an exchange account 
> configured via RPC over HTTP. The workstation is not part of the domain. 
> Outlook is not running.
>
> The MAPILgonEx call succeeds with value S_OK without any login prompt.
>
> When I try try to open the exchange message store(with flags MDB_WRITE | 
> MDB_ONLINE - I must use this flag), it shows the login box. If I cancel 
> the login prompt and retry again from the beginning it fails continuously 
> with the error 0x8004011D (FailOneProvider).
>
> This whole code is running in a separate thread, it first initializes MAPI 
> then logins and then open the message store. At exit it clears 
> any/everything.
>
> Even after the thread terminates and is re-started, the call for opening 
> message store returns without showing the login dialog & returns the same 
> error. It shows the login dialog only when the process is restarted.
>
> Any idea how can I fix make it prompt for login/password?
>
> Regards,
> Ashutosh
date: Tue, 1 Jul 2008 10:04:06 -0400   author:   Stephen Griffin

Re: Unable to open msg store if first prompt for password canceled   
Hi Stephen,
Thanks for your comments!

I checked the dlls, and the code. There is no leaks. Everything is 
released/initialized properly.

The emsmdb32.dll, contab32.dll (Outlook Address Book Service) & 
mapir.dll (ExOlk Intl Pluggable UI) is un-loading after every retry(when 
calling MAPIUninitialize). Even the MAPI session is released & MAPI 
un-initialized. There is one dll which doesn't unload during this 
process "credui.dll" (Credential Manager User Interface)

And during this whole process, the MSMAPI32.dll and MAPI32.dll is never 
un-loaded even when there is no reference of any MAPI object from within 
my code.

-- 
Regards,
Ashutosh Bhawasinka
[discussion@ashutosh.in]
MCSA - Messaging,
MCTS - .Net Windows Apps
date: Tue, 01 Jul 2008 20:27:52 +0530   author:   Ashutosh am

Re: Unable to open msg store if first prompt for password canceled   
Hrmm - I'd have to debug it then. Any chance you can get a case opened?

"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message 
news:O9A%23Xr42IHA.5024@TK2MSFTNGP03.phx.gbl...
> Hi Stephen,
> Thanks for your comments!
>
> I checked the dlls, and the code. There is no leaks. Everything is 
> released/initialized properly.
>
> The emsmdb32.dll, contab32.dll (Outlook Address Book Service) & mapir.dll 
> (ExOlk Intl Pluggable UI) is un-loading after every retry(when calling 
> MAPIUninitialize). Even the MAPI session is released & MAPI 
> un-initialized. There is one dll which doesn't unload during this process 
> "credui.dll" (Credential Manager User Interface)
>
> And during this whole process, the MSMAPI32.dll and MAPI32.dll is never 
> un-loaded even when there is no reference of any MAPI object from within 
> my code.
>
> -- 
> Regards,
> Ashutosh Bhawasinka
> [discussion@ashutosh.in]
> MCSA - Messaging,
> MCTS - .Net Windows Apps
date: Tue, 1 Jul 2008 11:34:32 -0400   author:   Stephen Griffin

Google
 
Web ureader.com


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