A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Close Exchange security window



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 3rd 08, 08:43 PM posted to microsoft.public.outlook.program_addins
DenisSSSS
external usenet poster
 
Posts: 5
Default Close Exchange security window

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: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?
  #2  
Old September 3rd 08, 10:00 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Close Exchange security window

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
-
"DenisSSSS" wrote in message
...
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: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?



  #3  
Old September 4th 08, 09:51 AM posted to microsoft.public.outlook.program_addins
DenisSSSS
external usenet poster
 
Posts: 5
Default Close Exchange security window

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

"Dmitry Streblechenko" wrote:

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
-
"DenisSSSS" wrote in message
...
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: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?




  #4  
Old September 4th 08, 11:15 AM posted to microsoft.public.outlook.program_addins
DenisSSSS
external usenet poster
 
Posts: 5
Default Close Exchange security window

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

"DenisSSSS" wrote:

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

"Dmitry Streblechenko" wrote:

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
-
"DenisSSSS" wrote in message
...
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: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?




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
close reminder window programatically soworl Outlook and VBA 23 February 7th 08 06:03 PM
Close Task Window? ryguy7272 Outlook and VBA 5 February 4th 08 07:06 PM
Auto Close Security Window in Outlook strictlyleeds@gmail.com Outlook - General Queries 3 August 8th 07 11:10 AM
Close New Mail Window programmatically Steffen Heinzl Add-ins for Outlook 4 January 19th 07 12:54 PM
Window Won't Close Jan Groshan Outlook - General Queries 2 June 23rd 06 03:21 PM


All times are GMT +1. The time now is 05:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.