Retrieving folder list in exchange
Hi, I'm trying to retrieve list of all folders of all users in exchange
server.
I get all users from gc and iterate over their distinguished name with:
lpManageStore3->CreateStoreEntryID( pszServerDN, userDN[i],
OPENSTORE_TAKE_OWNERSHIP | OPENSTORE_USE_ADMIN_PRIVILEGE, &lpcbEntryID,
(LPENTRYID *)&lpTempFolder );
hRes = lpMAPISession->OpenMsgStore(NULL, lpcbEntryID,
(LPENTRYID)lpTempFolder, NULL, MDB_NO_DIALOG | MDB_NO_MAIL |
MDB_TEMPORARY | MAPI_BEST_ACCESS, &lppMailboxMDB);
and the try to get child folders of mailbox root folders.
However on OpenMsgStore I get 'profile not configured'.
I am logging using MapiLogonEx to default profile and also some profiles
I've created by hand.
I guess I have to create profile with administrative rights, but how to
do that in c++ program ? Or maybe I'm wrong and problem lies somewhere
else ?
Thanks for Your reply.
Best regards
Witek
date: 23 Jun 2005 03:39:23 -0700
author: (Witek Wasilewski)