Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting mapi error 0x80040111

80 views
Skip to first unread message

san

unread,
Dec 10, 2009, 1:58:01 AM12/10/09
to

I have a small application written in C++. I am using the following function
to connect to exchange 2007 sp1 server. I have outlook 2007 installed on the
machine from which I am running the application. Exchange server is
installed on different machine. I am creating a profile programatically using
createorofile.

MAPILogonEx (NULL, (LPTSTR) (LPCTSTR) m_strProfile, (LPTSTR) lpcszPassword,

MAPI_EXTENDED|MAPI_UNICODE|MAPI_NEW_SESSION|MAPI_NO_MAIL|MAPI_TIMEOUT_SHORT,

&m_pSession);

I am getting the following error when tried to connect. I am creating a
random profile and using it in the function call.

Errors:-

ERROR: hr: 0x80040111

ERROR: ClassFactory cannot supply requested class

I have searched the error codes it maps to MAPI_E_LOGON_FAILED. The user in
whose context the application is running has exchange admin rights.

Any pointer to resolve this error will be helpful

Dmitry Streblechenko

unread,
Dec 10, 2009, 12:13:12 PM12/10/09
to
Are you passing the profile name as a Unicode string? Don't.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"san" <s...@discussions.microsoft.com> wrote in message
news:EA2CA62D-166D-4A0A...@microsoft.com...

0 new messages