Programmatically accessing password protected pst file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to write a outlook plug-in that reads pst files. I want to know how
do I know

1. Which pst files are used in the curent open outlook session
2. Which of these pst files are password protected
3. APis that support password parameter while reading a pst file.

thanks in advance.
Ashutosh
 
Hi Dmitry,

thanks for response.

It is a COM add-in using managed C++ (using MFC in static library and
static link to ATL).

regards,
Ashutosh
 
I don't use C++, but I don't think you can use natively use MFC or ATL in a
*managed* code.
If you are using unmanaged C++, you can resort to Extended MAPI, otherwise
you will need to use something like mapi33 library (/Net wrapper for
Extended MAPI).
1. You will need to loop through the stores in the current session
(IMAPISession::GetMsgStoresTable) and for each store check if the value of
the PR_MDB_PROVIDER property is MSPST_UID_PROVIDER
2. You can check the value of the PR_PST_ENCRYPTION property in the
corresponding PST profile section - see
http://www.google.com/search?hl=en&lr=&as_qdr=all&q=createmsgservice+mspst
3. When adding a new PST file to the session, you will need to specify the
PR_PST_PW_SZ_OLD and PR_PST_PW_SZ_NEW properties - see

<plug>
You can use Redemption for that (usable from any language, managed or
unmanaged, see the url below) - RDOStore object
(http://www.dimastr.com/redemption/rdo/rdostore.htm) exposes the StoreKind
property. You can also use the RDOStores.AddPstStoreWithPassword method.
</plug>

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top