![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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: ![]() 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
|
|||
|
|||
![]()
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: ![]() 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
|
|||
|
|||
![]()
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: ![]() 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
|
|||
|
|||
![]()
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: ![]() 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 |
Display Modes | |
|
|
![]() |
||||
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 |