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

OpenMsgStore fails with error 0x8004011D in Exch 2007 CAS

4 views
Skip to first unread message

PKatz

unread,
Sep 5, 2007, 5:04:38 PM9/5/07
to
I have the following problem. My code fails calling mapi_session-
>OpenMsgStore(...) with error: 0x8004011D (I think it is
MAPI_E_FAILONEPROVIDER).

// Code summary
...
MAPIInitialize(&mapicfg);
...
MAPIAdminProfiles(0, &pa);
...
mapi_tmpprofile = GenUniqueProfName();
...
pa->CreateProfile(mapi_tmpprofile, NULL, 0, 0)
...
pa->AdminServices(mapi_tmpprofile, NULL, 0, 0, &sa)
...
sa->CreateMsgService(_T("MSEMS"), _T("Microsoft Exchange"), 0, 0)
...
HrQueryAllRows(msg_svcs_tbl, (LPSPropTagArray)&svc_props, &res, NULL,
0, &msg_svcs)
...
hr = sa->ConfigureMsgService((LPMAPIUID) msg_svcs->aRow-
>lpProps[ SVC_PROP_UID ].Value.bin.lpb, 0, NULL, 2, cfg);
...
hr = MAPILogonEx(0L, mapi_tmpprofile, NULL, MAPI_EXTENDED |
MAPI_NEW_SESSION | MAPI_NO_MAIL, &mapi_session);
...
mapi_session->GetMsgStoresTable(0, &tbl_stores)
...
HrQueryAllRows(tbl_stores, (LPSPropTagArray)(&props), NULL, NULL, 0,
&rs_stores);
...
hr = mapi_session->OpenMsgStore(NULL, eid->cb, (LPENTRYID)(eid->lpb),
NULL, MAPI_BEST_ACCESS | MDB_NO_DIALOG | MDB_NO_MAIL, &mapi_mdb); //
fails here
...
pa->DeleteProfile(mapi_tmpprofile);
...


My code is running in a COM+ application in the Exchange Server 2007
server with the Identity of the user who owns the Mailbox "myadmin"

And "myadmin" is a member of the following groups:
-Local Administrator
-Domain User
-Exchange Organization Administrator
-Exchange View-Only Administrator
-Exchange Server Administrator

It also has the following rights:
-Logon Locally
-Logon as a batch
-Logon as a service

This works fine on Exchange 2003 and it does in some configurations of
Exchange 2007. But it is failing when using a Client Access Servers -
Mailbox Servers configuration.

Any clue why? Is there any new issue with CDO I am not aware of?
Please anything you can suggest...

Thanks in advance for looking at this.

Pkatz

SvenC

unread,
Sep 6, 2007, 3:06:22 AM9/6/07
to
Hi,

> I have the following problem. My code fails calling mapi_session-
>> OpenMsgStore(...) with error: 0x8004011D (I think it is
>> MAPI_E_FAILONEPROVIDER).

That might be because of the new PF flag. See here:

http://blogs.msdn.com/stephen_griffin/archive/2007/03/19/mapi-and-exchange-2007.aspx

and

http://blogs.msdn.com/stephen_griffin/archive/2007/08/07/making-the-new-cdo-work-with-the-old-exchange.aspx

--
SvenC

PKatz

unread,
Sep 6, 2007, 10:25:59 AM9/6/07
to
On Sep 6, 3:06 am, "SvenC" <Sv...@community.nospam> wrote:
> Hi,
>
> > I have the following problem. My code fails calling mapi_session-
> >> OpenMsgStore(...) with error: 0x8004011D (I think it is
> >> MAPI_E_FAILONEPROVIDER).
>
> That might be because of the new PF flag. See here:
>
> http://blogs.msdn.com/stephen_griffin/archive/2007/03/19/mapi-and-exc...
>
> and
>
> http://blogs.msdn.com/stephen_griffin/archive/2007/08/07/making-the-n...
>
> --
> SvenC

Thank you very much!!!

-pkatz

0 new messages