GetFolderFromID fail on multiple database environment

  • Thread starter Thread starter Thomas Tseng
  • Start date Start date
T

Thomas Tseng

I try to traveral all mailbox on Exchnage and get PR_ENTRYID and
PR_STORE_ENTRYID from MAPI. I pass the ids to GetFolderFromID(). It's
ok if the folder is at the same database with the mailbox specified in
MAPI profile. But GetFolderFromID() will fail if the folder is on
another database.
The error codes are 0xab440154, 0xb9b40154, 0xc4140154...

Do anyone have similar problem when converting folder between MAPI and
OOM in multiple database environment?

Thanks
Thomas
 
Are you using both EntryID and StoreID in your call to
GetFolderFromID? Are you getting a short-term or long-term ID from
MAPI?
 
Thanks for your reply.
I use HrOpenOneProp(lpFolder, PR_ENTRYID...) and HrOpenOneProp(lpFolder,
PR_STORE_ENTRYID,...) to get ids. It's long-term id, right?
I also do the following test.
Environment: Exchange 2000 with two databases. One is DB1 the other is
DB2.
Test case1: I create a profile to point to mailbox on DB1. The
GetFolderFromID() success on all mailboxs on DB1 but fail on DB2.
Test case2: I create another profile to point to mailbox on DB2. The
GetFolderFromID() success on all mailbox on DB2 but fail on DB1.

Thomas
 
Please post some of the preceding messages in the thread when you post
a reply. Otherwise it's very hard to follow a thread and know what
went on before in it.

Are you logged into the second database? You would need something like
the equivalent of a login using a dynamic profile.
 
Back
Top