c++commapiistorage

Save MAPI IMsgStore in IStream implementation


I'm trying to create pst msg store using IMAPISession method:

pses_->OpenMsgStore(0, prows->aRow[0].lpProps[1].Value.bin.cb, (LPENTRYID)prows->aRow[0].lpProps[1].Value.bin.lpb, NULL, MDB_WRITE | MAPI_DEFERRED_ERRORS | MAPI_BEST_ACCESS | MDB_NO_MAIL, &tmpPtr);

It uses PR_PST_PATH property provided in prows.

But now I need to open pst file in memory, i.e. using IStream in-memory stream implementation. someone tried to do something similar?


Solution

  • You cannot do that. More than that, you cannot even open a PST file with the read-only bit set or on a read-only meadia.