|
|
|
| Author |
Message |
xingcheng
Joined: 05 Aug 2007 Posts: 1
|
Posted: Fri Sep 19, 2003 3:23 pm Post subject: GetMailboxTable |
|
|
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 |
|
 |
abc5594def
Joined: 05 Aug 2007 Posts: 1
|
Posted: Fri Sep 19, 2003 7:11 pm Post subject: Re: GetMailboxTable |
|
|
if you post relevant part of your code, someone in this group may be able to
point you in right direction. |
|
| Back to top |
|
 |
Huaxc
Joined: 05 Aug 2007 Posts: 2
|
Posted: Mon Sep 22, 2003 5:44 pm Post subject: Re: GetMailboxTable |
|
|
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 |
|
 |
Dmitry Streblechenko
Joined: 05 Aug 2007 Posts: 21
|
Posted: Mon Sep 22, 2003 6:05 pm Post subject: Re: GetMailboxTable |
|
|
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 |
|
 |
Huaxc
Joined: 05 Aug 2007 Posts: 2
|
Posted: Mon Sep 22, 2003 6:57 pm Post subject: Re: GetMailboxTable |
|
|
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 |
|
 |
|
|