Welcome to Exchange Team Blog Sign in | Join | Help

Syndication

This Blog

You have HOW MANY mailboxes?

Once you’ve got the new edkmdb.h, you can take advantage of some new interfaces we’ve introduced: IExchangeManageStore3 and IExchangeManageStore4. First, some background.

 

IExchangeManageStore is a useful interface for managing an Exchange server from MAPI. Two important functions in this interface are GetMailboxTable and GetPublicFolderTable. GetMailboxTable returns a MAPI table with information on all the mailboxes which exist on the target Exchange server. GetPublicFolderTable does the same for Public Folders.

 

The functions exposed by the new interfaces do the exact same thing. So why do we need them? Remember that the functions return MAPI tables. There’s a design limitation to the number of rows that the Exchange MAPI provider can return in a table – 65,536 (64k) rows. This presents a problem when attempting to use these interfaces against truly massive servers.

 

The Exchange System Manager in Exchange 2000 hit this limit for both mailboxes and Public Folders. In each case, we made two fixes:

 

  • Fix the original API so it will return the maximum number of entries and not return an error (they used to return MAPI_E_TABLE_TOO_BIG). This allows apps using the original API to still ‘limp by’
  • Introduce the new API which takes an offset.

All of the fixes made it into Exchange 2003 in time for RTM.

 

The new interfaces will return a maximum of 64k entries starting at the offset you specify. They don’t return an error if there are more entries available. Instead, you simply increase your offset and make the call again – as soon as you get an empty table back, you know you’ve gotten all the entries. The API is really simple to use and incorporating it into existing code only required a few minor changes.

 

There is already an article in the Knowledge Base which shows how to use GetMailboxTable. I started to update the code in the article to use the new API and ended up writing a new sample, which I’ve shared out here.

- Stephen Griffin

Published Monday, November 08, 2004 10:21 AM by Exchange
Filed Under: , ,

Comments

 

lp said:

I have 2 users ...
November 9, 2004 7:10 AM
 

MarkDG said:

Thanks for this info... I have a client with an Exchange 2000 server that has >60,000 public folders and he could no longer administer them with ESM. I suspected some limit but had no confirmation.
December 1, 2004 6:06 PM
 

Stephen Griffin said:

I left out the fix which allows the ESM to take advantage of the new interface for public folders:
http://support.microsoft.com/default.aspx?scid=kb;en-us;818531
December 2, 2004 11:49 AM
New Comments to this post are disabled

News


This blog and its contents are provided "AS IS" with no warranties, and they confer no rights. Use of any included script samples are subject to the terms specified in the Terms of Use.
New! Would you like to suggest a topic for the Exchange team to blog about? Send suggestions to us.

Exchange Server 2010 - Get the Release Candidate



Poll:

Other Exchange Blogs from MSFT