CDO app and Outlook won't work together
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
CDO app and Outlook won't work together

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Kimberlee Martin
Guest





Posted: Thu Nov 18, 2004 12:04 am    Post subject: CDO app and Outlook won't work together Reply with quote

I have created a VB6 app which connects to an inbox for a generic user
("OrderMonitor"), and processes all mail received in that box. We created a
profile to access the appropriate inbox, and the program is using that
profile. Program works great.

The problem is that this program runs on the system administrator's machine,
and he can't log in to Outlook to read HIS email when the program is
running. Every time he tries to open Outlook, he gets prompted to enter his
user name, password and domain. Even though he is entering correct values,
it says that it is unable to log him in. When the program is not running, he
gets run into Outlook without being prompted.

Any idea why this is happening, or how to fix it?

FYI: It's a VB6 application running on Windows XP. Exchange 2000 server.
Outlook 2002. CDO 1.21.

Any help would be appreciated. Thanks in advance.

Kim Martin

Back to top
Dan Mitchell
Guest





Posted: Thu Nov 18, 2004 3:50 am    Post subject: Re: CDO app and Outlook won't work together Reply with quote

"Kimberlee Martin" <kMartin@NorthPortSoftware.com> wrote in
news:O#O1f$MzEHA.3368@TK2MSFTNGP15.phx.gbl:
Quote:
I have created a VB6 app which connects to an inbox for a generic user
("OrderMonitor"), and processes all mail received in that box. We
created a profile to access the appropriate inbox, and the program is
using that profile. Program works great.

The problem is that this program runs on the system administrator's
machine, and he can't log in to Outlook to read HIS email when the
program is running. Every time he tries to open Outlook, he gets
prompted to enter his user name, password and domain. Even though he
is entering correct values, it says that it is unable to log him in.

The problem here is that your app is creating a shareable session, and
Outlook will always join a shared session if it can. There's no way to
tell CDO1.21 to create a session that other people can't join -- you
need to use MAPILogonEx() and not pass MAPI_ALLOW_OTHERS as a flag
there.

The problem is that MAPILogonEx() (extended MAPI in general) is only
usable from C++ -- one option would be to write a DLL in C++ that logs
into the session and then hands it on to your VB code; using the
MAPIOJECT property of a CDO session you can go from an ExMAPI session to
a CDO session.

Alternative 2: run your application _after_ Outlook, and set
newSession=true in the call to Logon there. That way Outlook'll start up
fine, and your app will start up, and you've told your app not to log
into any existing shared sessions so you should be okay.

-- dan
Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB