none
Difference between mailbox store and public folder store in MAPI RRS feed

  • Question

  • Hi everybody,

    I am developing an application to find the attachment name sent in an email in Microsoft Exchange. For that, I am implementing AdviseSink notifications on the message stores that can send email. But how to distinguish between message stores and public folder stores.

    Thanks & regards,

    Talib Hussain

    Tuesday, June 10, 2014 10:47 AM

Answers

  • Read the PR_MDB_PROVIDER property from any object from the store. For the PF stores, the value will be pbExchangeProviderPublicGuid (78B2FA70AFF711CD9BC800AA002FC45A)

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by talib2608 Wednesday, June 11, 2014 11:14 AM
    Tuesday, June 10, 2014 1:49 PM
  • EdkMdb.h declares the pbExchangeProviderPublicGuid constant. SPropValue.bin,cb must be set to its size (16) and SpropValue.bin.lpb must be a pointer to that constant.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by talib2608 Thursday, June 12, 2014 4:07 AM
    Wednesday, June 11, 2014 2:14 PM

All replies

  • Hello Talib,

    Why do you need to use Extended MAPI notifications and not the Outlook object model?

    Anyway, you can check out the PR_STORE_SUPPORT_MASK (PR_STORE_UNICODE_MASK) property of the store (represented by the IMsgStore interface). Look for the STORE_NOTIFY_OK and STORE_SUBMIT_OK values.

    Tuesday, June 10, 2014 11:59 AM
  • Hi Eugene,

    To use Outlook Object Model, Outlook is necessary. I don't wan't to have that constraint. I don't want to force my company's clients to buy Outlook.

    And thanks for answering.

    By comparing PR_STORE_SUPPORT_MASK of mailbox store and public folder store I found:

    STORE_SEARCH_OK, STORE_SUBMIT_OK, STORE_LOCALSTORE, STORE_ITEMPROC in mailbox store, and

    STORE_PUBLIC_FOLDERS, STORE_FILTER_SEARCH_OK in public folder store.

    I was not checking PR_STORE_SUPPORT_MASK because this property is not trustworthy. There is no difference in PR_STORE_SUPPORT_MASK's values when there is a public folder, or if the public folder database is dismounted/deleted. PR_STORE_SUPPORT_MASK gives wrong values in other cases and of other things ( folder(s) ) also. You can try for public folders.

    Tuesday, June 10, 2014 1:29 PM
  • > STORE_PUBLIC_FOLDERS

    It looks like this is exactly what you are looking for. Am I right?

    Try to check out multiple indicators, not a single. May be then you will find the results trustworthy.

    Tuesday, June 10, 2014 1:47 PM
  • Read the PR_MDB_PROVIDER property from any object from the store. For the PF stores, the value will be pbExchangeProviderPublicGuid (78B2FA70AFF711CD9BC800AA002FC45A)

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by talib2608 Wednesday, June 11, 2014 11:14 AM
    Tuesday, June 10, 2014 1:49 PM
  • Hi Eugene,

    msdn.microsoft.com/en-us/library/cc815750(v=office.12).aspx gives all values and their meanings that PR_STORE_SUPPORT_MASK can have. Thanks.


    • Edited by talib2608 Wednesday, June 11, 2014 4:12 AM
    Wednesday, June 11, 2014 4:06 AM
  • Hi Dmitry,

    MAPIProfileFunctions.cpp & MAPISVC.INF also have these 16 bit values.

    PR_MDB_PROVIDER = 78B2FA70AFF711CD9BC800AA002FC45A for public folders store &

    PR_MDB_PROVIDER = 5494A1C0297F101BA58708002B2A2517 for message store. Are you sure that developers should rely on these values? If one profile have added 100 mailboxes and 100 public stores, then what would be in that case? Although, I would also be checking it in different scenarios if there is any discrepancy in these values.

    Thanks.


    • Edited by talib2608 Wednesday, June 11, 2014 4:15 AM
    Wednesday, June 11, 2014 4:12 AM
  • Yes, PR_MDB_PROVIDER depends on the message store kind, not on a particular instance of a store.

    See http://msdn.microsoft.com/en-us/library/office/cc839682(v=office.15).aspx

    You can look at that property using MFCMAPI or OutlookSpy.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, June 11, 2014 4:18 AM
  • Thanks Dmitry,

    I am having difficult in building restriction using this property?

    		SPropValue storeProviderValue;
    		storeProviderValue.ulPropTag = PR_MDB_PROVIDER; // tag type
    		storeProviderValue.Value.bin.cb = 16; // tag value length		
    		storeProviderValue.Value.bin.lpb = What value should come here?; // tag value
    
    		restriction.rt = RES_PROPERTY;  // gonna compare a property
    		restriction.res.resProperty.relop = RELOP_EQ; // gonna test equality
    		restriction.res.resProperty.ulPropTag = PR_MDB_PROVIDER; // tag to compare
    		restriction.res.resProperty.lpProp = &storeProviderValue; // prop tag to compare against
    What should come storeProviderValue.Value.bin.lpb accept?
    • Edited by talib2608 Thursday, June 12, 2014 4:05 AM
    Wednesday, June 11, 2014 11:21 AM
  • EdkMdb.h declares the pbExchangeProviderPublicGuid constant. SPropValue.bin,cb must be set to its size (16) and SpropValue.bin.lpb must be a pointer to that constant.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by talib2608 Thursday, June 12, 2014 4:07 AM
    Wednesday, June 11, 2014 2:14 PM