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

GetMailboxTable

2 views
Skip to first unread message

xingcheng

unread,
Sep 19, 2003, 2:23:10 PM9/19/03
to
Hi all,

I am getting a MAPI error 0x80070057 (E_INVALIDARG) error calling
GetMailboxTable after I have Office 2003 installed. MS Office XP used to
have problem with this method and they fixed it in OXP SP1. The code worked
with every other version of Office. It's clear to me that something changed
in Office 2003. Anyone can shed light on how to get the code going?
Eventually, it's clear to me that I need to drop that MAPI stuff, but
Exchange 5.5 is still around...

Thanks!
XC


abc5594def

unread,
Sep 19, 2003, 6:11:23 PM9/19/03
to
if you post relevant part of your code, someone in this group may be able to
point you in right direction.


Huaxc

unread,
Sep 22, 2003, 4:44:05 PM9/22/03
to
Here's the code, cookie cutter stuff. Got the failure code at the end on the
call to GetMailboxTable

// create profile stuff
hr = MAPILogonEx(0, (LPTSTR)rcProfile, NULL,
MAPI_NEW_SESSION| MAPI_EXTENDED |MAPI_NO_MAIL | MAPI_NT_SERVICE,
&m_pSession);
if (FAILED(hr))
{
// error handling
}

// only have general error codes.
hr =HrOpenExchangePrivateStore(m_pSession, &m_pMsgStore);
if (FAILED (hr))
{
// error handling
}

if(S_OK != m_pMsgStore->QueryInterface(IID_IExchangeManageStore,(LPVOID*)
&m_pExManageStore))
{
// error handling
}

// grab the server, site,org names in ANSI
sprintf(rpServerDN,"/o=%s/ou=%s/cn=servers/cn=%s", rpOrg, rpSite,
rpServer);
IMAPITablePtr pMAPITable;
hr = m_pExManageStore->GetMailboxTable(rpServerDN, &pMAPITable, 0);
...

"abc5594def" <som...@somewhere.com> wrote in message
news:eakA8rv...@TK2MSFTNGP10.phx.gbl...

Dmitry Streblechenko

unread,
Sep 22, 2003, 5:05:54 PM9/22/03
to
Are you sure the rpServerDN is what GetMailBoxTable() expects? Can you open
the mailbox table in OutlookSpy (click IMsgStore, then
IExchangeManageStore) - it will also show the properly formatted server DN;
are you using the same value?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Huaxc" <xing...@netiq.com> wrote in message
news:%23wTxHpU...@TK2MSFTNGP09.phx.gbl...

Huaxc

unread,
Sep 22, 2003, 5:57:27 PM9/22/03
to
Well, the same code worked in every previous Office version, so the question
will be, have MS changed what GetMailboxTable() expects? I could try
OutlookSpy but unfortunately I don't have the right to logon interactively
with sufficient right to open the server msg store, I only have a service
account that I can play with.

Xingcheng


"Dmitry Streblechenko" <dmi...@dimastr.com> wrote in message
news:%23eUEK1U...@TK2MSFTNGP09.phx.gbl...

0 new messages