What should be the value of pszServerDN in GetMailboxTable fun???

  • Thread starter Thread starter bharati
  • Start date Start date
B

bharati

Hi,
I am developing one tool , which will find out the count of messages
in mailbox.
I am using the code which is available in below mensioned URL
http://support.microsoft.com/kb/200160.

I want to access local server as well as remote server.
My Directory Hierarchy of Exchange Server is....
Organization->org
Site Name->site
Server Name->srv

sprintf(pszServerDN,"/o=org/ou=site/cn=Servers/cn=srv") ;
if (FAILED(hRes =
lpIManageStore->GetMailboxTable(pszServerDN,&lpMailBoxTable,0)))
{
AfxMessageBox("Mailbox Table Not Available.\n");
return MAPI_E_NOT_FOUND;
}

this fun gets failed and error code is -2147024809.
I am unable to find out the reason.

So Please help me ...

Thanks in advance.
Bharati
 
Hi Bharati,

The 1st param given to GetMailboxTable should be Exch Store DN. For
this, fetch msExchHomeServerName property of LDAP and append
/cn=Microsoft Private MDB.


Regards,

Avinav Thakur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top