Close Exchange security window

D

DenisSSSS

Hi.
I have cached exchange profile. When I create Outlook::Application and
displays it the exchange security window appears. User has to enter exchange
login and password. However the code continues execution and I quit from
Outlook application but exchange window still displays and Outlook still in
memory. Please, see code below

Outlook::_ApplicationPtr ol_app =
Outlook::_ApplicationPtr(L"Outlook.Application");

// exchange window appears after that line
ol_app->GetNamespace(L"MAPI")->GetDefaultFolder(Outlook::eek:lFolderInbox)->Display();

ol_app->Quit();
//the Outlook window is closed but exchange window is still displayed and
Outlook process in memory.

Is it possible to close OL in such way that exchange window would be closed
as well. And Outlook would be removed from memory?
 
D

Dmitry Streblechenko

Firstly, if you don not want the credentials prompt, make sure your code
runs in te hcontext of the Windows use rwho owns the primary Exchange
mailbox in the profile.
Secondly, retrieve the Namespace obejct (Application.GetNamespace)> then
call Namespace.Logon. It is a blockign call: your code will not continue
until the prompt goes away.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
D

DenisSSSS

Thanks, Dmitry for reply.
Unfortunately GetNameSpace->Login isn't blocking call in cached Exchange.
The Logon displays exchange security prompt and execution continues.
 
D

DenisSSSS

Is there any call MAPI or OOM that will be blocking when security prompt
appears?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top