• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...

  • Advanced search options...
  • Blog Home
  • About
  • Email Blog Author
  • Share this
  • RSS for posts
  • Atom
  • RSS for comments
  • CDO (20)
  • Code Snippet (42)
  • Custom Providers (15)
  • Debugging (7)
  • DevMsgTeam (268)
  • Documentation (96)
  • DST (8)
  • EWS (7)
  • Exchange (98)
  • Gotchas (89)
  • Hotfix (26)
  • MAPI (212)
  • MAPI Download (47)
  • MFCMAPI (87)
  • MSDN (49)
  • Non Dev (11)
  • OOM (17)
  • Outlook (154)
  • Outlook 2007 Auxiliary Reference (44)
  • Outlook Integration API (11)
  • Protocol Docs (20)
  • PST/OST (21)
  • Public Folders (3)
  • Vista (12)
  • WrapPST (14)
Links:
  • Download MFCMAPI
  • MFCMAPI on Facebook
  • Troubleshooting Outlook Crashes
  • Office Update Center
  • Developer Messaging Team Blog
This site is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.
Archives
  • January 2012 (1)
  • December 2011 (3)
  • November 2011 (1)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (4)
  • June 2011 (3)
  • May 2011 (3)
  • April 2011 (3)
  • March 2011 (5)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (1)
  • November 2010 (4)
  • October 2010 (1)
  • September 2010 (3)
  • August 2010 (5)
  • July 2010 (3)
  • June 2010 (3)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (2)
  • December 2009 (3)
  • November 2009 (5)
  • October 2009 (4)
  • September 2009 (5)
  • August 2009 (5)
  • July 2009 (11)
  • June 2009 (6)
  • May 2009 (5)
  • April 2009 (3)
  • March 2009 (18)
  • February 2009 (10)
  • January 2009 (3)
  • December 2008 (2)
  • November 2008 (2)
  • October 2008 (5)
  • September 2008 (4)
  • August 2008 (10)
  • July 2008 (6)
  • June 2008 (8)
  • May 2008 (2)
  • April 2008 (4)
  • March 2008 (2)
  • February 2008 (2)
  • January 2008 (5)
  • December 2007 (3)
  • November 2007 (2)
  • October 2007 (3)
  • September 2007 (1)
  • August 2007 (4)
  • July 2007 (5)
  • June 2007 (3)
  • May 2007 (4)
  • April 2007 (1)
  • March 2007 (6)
  • February 2007 (3)
  • January 2007 (2)
  • December 2006 (4)
  • November 2006 (3)
  • October 2006 (1)
  • August 2006 (1)
  • June 2006 (5)
  • May 2006 (5)
  • December 2005 (1)
  • November 2005 (4)
  • October 2005 (2)
  • September 2005 (1)
  • April 2005 (3)
  • December 2004 (2)
  • September 2004 (2)
  • August 2004 (3)
  • July 2004 (3)

Detecting Sharepoint PSTs

MSDN Blogs > SGriffin's MAPI Internals > Detecting Sharepoint PSTs

Detecting Sharepoint PSTs

Stephen Griffin - MSFT
28 Sep 2009 12:58 PM
  • Comments 15

We had a customer recently who was asking how to tell a PST had been configured as a Sharepoint PST, so they could exclude it from some processing they were doing. After some digging, I found the property that Outlook itself uses to determine a PST is a Sharepoint PST, and development gave me permission to document it:

#define PR_ASSOCIATED_SHARING_PROVIDER PROP_TAG(PT_CLSID, 0x0EA0)

To check if a PST is a Sharepoint PST, mount the PST using OpenMsgStore, then call GetProps on the message store object requesting this property. If it exists, you can assume the PST has been configured for Sharepoint. If it doesn’t exist, the PST has not been configured as a Sharepoint PST.

  • 15 Comments
Outlook, MAPI, Documentation, PST/OST, DevMsgTeam, MSDN
Comments
  • Peter Ricker
    13 Jan 2010 1:05 PM

    Could you also compare the returned PR_MDB_PROVIDER property value to the one identifying a SharePoint PST? I was under the impression this property would be the same for all instances of that store type (e.g. Wrapped PST, standard PST, Live Connector, Exchange Store, etc...)

  • Sushant Srivastava
    14 Apr 2010 7:11 AM

    I tried 0x0EA0, but not getting the value in proper format, so this one is not working out for me.

    I tried PR_MDB_PROVIDER, but this property failed for some PSTs in outlook 2003.(Works fine with outlook 2007)

    Finally i took 0x0E38 an un named property whose value is always 3 for sharepoint PST, for normal PSTs this property can not be found(I'd to consume the exception ;)). Till now this one is working out for me. If any other property is is there Keep Posting pls.

  • Stephen Griffin - MSFT
    14 Apr 2010 7:33 AM

    What do you mean by "proper format"? Are you getting back an error, or just a data type you don't know how to parse?

  • Sushant Srivastava
    14 Apr 2010 7:46 AM

    I am getting mostly "null" while getting the value from 0x0EA0.

  • Stephen Griffin - MSFT
    14 Apr 2010 8:53 AM

    Which member of the union are you looking at?

  • Sushant Srivastava
    14 Apr 2010 10:40 PM

    Union???

    I am using the below code to get the property value in to an object

    object obj = rfolder.get_Fields("http://schemas.microsoft.com/mapi/proptag/0x0E380003");

    where rfolder is RDOStore object.

  • Stephen Griffin - MSFT
    14 Apr 2010 11:33 PM

    Ah - you never said you were using the object model. I don't know if the object model can handle a CLSID. The intention here was to access the property using MAPI.

  • Sushant Srivastava
    15 Apr 2010 12:51 AM

    So I think,

    I can say that for object model I can use the above property(0x0E38) for detecting Sharepoint PSTs?

  • Stephen Griffin - MSFT
    15 Apr 2010 6:59 AM

    That property is PidTagReplFlags, documented in [MS-PST]. I wouldn't assume that a value of 3 can only be set on Sharepoint PSTs.

  • Sushant Srivastava
    16 Apr 2010 2:48 AM

    Is it safe to assume property which you have mentioned(0x0EA0) as a flag for Sharepoint PST. Because I can't find the reference of this property anywhere(even in [MS-PST])

  • Eric Legault
    16 Apr 2010 12:55 PM

    I don't even see PR_ASSOCIATED_SHARING_PROVIDER in the IMsgStore object for my SharePoint Lists store using OutlookSpy...

  • Stephen Griffin - MSFT
    17 Apr 2010 12:12 AM

    Eric - did you request it?

  • Sushant Srivastava
    18 Apr 2010 11:21 PM

    request it???

    I don't understand this. Is this property not accessible by Outlook Spy itself? Or some work around is there to access this property?

    Pls clarify...

  • Stephen Griffin - MSFT
    19 Apr 2010 5:38 AM

    >Is this property not accessible by Outlook Spy itself?

    Never said that - I asked if he asked Outlook Spy to go get the prop. I don't use the tool myself, but from screen shots I'd try the "Add Property" button.

  • Sushant Srivastava
    28 Apr 2010 5:58 AM

    Now I am using the below code for filtering out Sharepoint PSTs

    For Outlook 2007

    MAPIFolder.Store.FilePath.ToLower().Contains("sharepoint lists")

    For Outlook 2003

    Get the file path from MAPIFolder.StoreId(http://www.outlookcode.com/codedetail.aspx?id=1434)

    and apply the above filter on the file path.

    I tried PSTs generated with different locale settings(Japancese, Korean, etc.) and this code is working out well.

    By default sharepoint pst file is generated in English.

Page 1 of 1 (15 items)
Leave a Comment
  • Please add 1 and 6 and type the answer here:
  • Post
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.131.143