exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GetMailboxTable

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications
Author Message
xingcheng



Joined: 05 Aug 2007
Posts: 1

PostPosted: Fri Sep 19, 2003 3:23 pm    Post subject: GetMailboxTable Reply with quote

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

Archived from group: microsoft>public>exchange>applications
Back to top
View user's profile Send private message
abc5594def



Joined: 05 Aug 2007
Posts: 1

PostPosted: Fri Sep 19, 2003 7:11 pm    Post subject: Re: GetMailboxTable Reply with quote

if you post relevant part of your code, someone in this group may be able to
point you in right direction.
Back to top
View user's profile Send private message
Huaxc



Joined: 05 Aug 2007
Posts: 2

PostPosted: Mon Sep 22, 2003 5:44 pm    Post subject: Re: GetMailboxTable Reply with quote

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" wrote in message@TK2MSFTNGP10.phx.gbl...
> if you post relevant part of your code, someone in this group may be able
to
> point you in right direction.
>
>
Back to top
View user's profile Send private message
Dmitry Streblechenko



Joined: 05 Aug 2007
Posts: 21

PostPosted: Mon Sep 22, 2003 6:05 pm    Post subject: Re: GetMailboxTable Reply with quote

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" wrote in message
news:%23wTxHpUgDHA.1200@TK2MSFTNGP09.phx.gbl...
> 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" wrote in message
> @TK2MSFTNGP10.phx.gbl...
> > if you post relevant part of your code, someone in this group may be
able
> to
> > point you in right direction.
> >
> >
>
>
Back to top
View user's profile Send private message
Huaxc



Joined: 05 Aug 2007
Posts: 2

PostPosted: Mon Sep 22, 2003 6:57 pm    Post subject: Re: GetMailboxTable Reply with quote

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" wrote in message
news:%23eUEK1UgDHA.2172@TK2MSFTNGP09.phx.gbl...
> 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" wrote in message
> news:%23wTxHpUgDHA.1200@TK2MSFTNGP09.phx.gbl...
> > 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" wrote in message
> > @TK2MSFTNGP10.phx.gbl...
> > > if you post relevant part of your code, someone in this group may be
> able
> > to
> > > point you in right direction.
> > >
> > >
> >
> >
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group