Hi Julien, I was somewhat expecting an answer like that - I was hoping I was wrong because the change is moderately intrusive - but the upside is that I have to properly encapsulate mapi_id_t, which I'd been putting off forever ;-)
Anyway, thanks to your advice, I can go for it. Regards, Shaheed On 6 February 2012 11:13, Julien Kerihuel <j.kerih...@openchange.org> wrote: > Hi Shaheed, > > Sorry for the lack of replies to your previous emails. They were on the > top of my "to be replied" list, but several other urgent matters came > into the pipe. > > On Sun, 2012-02-05 at 22:54 +0000, Shaheed Haque wrote: >> First, I realised that I need to use GetDefaultPublicFolder() instead >> of GetDefaultFolder() to find the id for olFolderPublicOfflineAB (for >> example), and in order to do that, I need to have called >> OpenPublicFolder() instead of OpenMsgStore(). > > Correct. > > >> This seemed to work and I was able to find the various folders under >> olFolderPublicOfflineAB, but then I realised that olFolderContacts was >> broken. I was able to overcome that by passing in a different "store" >> variable to the second call: >> >> if (MAPI_E_SUCCESS != OpenMsgStore(m_session, &m_store)) { >> ... >> } >> if (MAPI_E_SUCCESS != OpenPublicFolder(m_session, &m_storeOther)) { >> ... >> } > > That is exactly what you have to do. > > If you plan on opening both the store of a user AND public folders, then > you have to use 2 different objects in the exact same way you did in > previous code snipset. > >> At this point, calls to GetDefaultPublicFolder (for >> olFolderPublicOfflineAB) and and GetDefaultFolder (for >> olFolderContacts) both worked. Unfortunately, OpenFolder on the >> olFolderPublicOfflineAB no longer works. > > Are you passing the correct object to OpenFolder? > > If you try to open a public folder using the mailbox store object, it > won't work. You need to pass the public folder's one. > > Kind Regards, > Julien. > > _______________________________________________ > devel mailing list > devel@lists.openchange.org > http://mailman.openchange.org/listinfo/devel > _______________________________________________ devel mailing list devel@lists.openchange.org http://mailman.openchange.org/listinfo/devel