M
Michael
Hi,
I try to search a given Outlook profile for all the available calendar
folders using C# and Redemption.
I perform this search by recursively searching every store and folder
of the input profile.
Q1: Is there a better method to achieve this? Some sort of query that I
could make in order to avoid using the recursive approach?
I also encountered different errors when testing the recursive method.
My application crashes suddenly when I iterate message stores from an
IMAP configured account (despite any try-catch that I use).
I avoided the IMAP issue by comparing the StoreAccount.AccountType
property of every message store against
Redemption.rdoAccountType.atIMAP.
But this comparison is valid only if the StoreAccount property of the
message store is not null, which is false for profiles that have not
yet been initialized (profiles created from the Mail applet and not yet
opened in Outlook).
I thought this would be it, but I was wrong.
I added 5 profiles and didn't open them in Outlook.
For the first profile, the StoreAccount property of the profile's
message store was null, and the scenario worked.
But for all the other 4 profiles, accesing the StoreAccount property
thrown the following exception "Error in IOlkAccountManager.Init:
MAPI_E_NOT_ENOUGH_MEMORY".
Q2: Is there a safer/better way to check if a profile is properly
configured?
Q3: Can anyone see a better solution to my problem?
Thanks,
Michael
I try to search a given Outlook profile for all the available calendar
folders using C# and Redemption.
I perform this search by recursively searching every store and folder
of the input profile.
Q1: Is there a better method to achieve this? Some sort of query that I
could make in order to avoid using the recursive approach?
I also encountered different errors when testing the recursive method.
My application crashes suddenly when I iterate message stores from an
IMAP configured account (despite any try-catch that I use).
I avoided the IMAP issue by comparing the StoreAccount.AccountType
property of every message store against
Redemption.rdoAccountType.atIMAP.
But this comparison is valid only if the StoreAccount property of the
message store is not null, which is false for profiles that have not
yet been initialized (profiles created from the Mail applet and not yet
opened in Outlook).
I thought this would be it, but I was wrong.
I added 5 profiles and didn't open them in Outlook.
For the first profile, the StoreAccount property of the profile's
message store was null, and the scenario worked.
But for all the other 4 profiles, accesing the StoreAccount property
thrown the following exception "Error in IOlkAccountManager.Init:
MAPI_E_NOT_ENOUGH_MEMORY".
Q2: Is there a safer/better way to check if a profile is properly
configured?
Q3: Can anyone see a better solution to my problem?
Thanks,
Michael