home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / edkmdb.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  44KB  |  1,128 lines

  1. /*
  2.  *    EDKMDB.H
  3.  *
  4.  *    Microsoft Exchange Information Store
  5.  *    Copyright (C) 1986-1996, Microsoft Corporation
  6.  *
  7.  *    Contains declarations of additional properties and interfaces
  8.  *    offered by Microsoft Exchange Information Store
  9.  */
  10.  
  11. #ifndef    EDKMDB_INCLUDED
  12. #define    EDKMDB_INCLUDED
  13.  
  14. /*
  15.  *    WARNING: Many of the property id values contained within this
  16.  *  file are subject to change.  For best results please use the
  17.  *    literals declared here instead of the numerical values.
  18.  */
  19.  
  20. #define pidExchangeXmitReservedMin        0x3FE0
  21. #define pidExchangeNonXmitReservedMin    0x65E0
  22. #define    pidProfileMin                    0x6600
  23. #define    pidStoreMin                        0x6618
  24. #define    pidFolderMin                    0x6638
  25. #define    pidMessageReadOnlyMin            0x6640
  26. #define    pidMessageWriteableMin            0x6658
  27. #define    pidAttachReadOnlyMin            0x666C
  28. #define    pidSpecialMin                    0x6670
  29. #define    pidAdminMin                        0x6690
  30. #define pidSecureProfileMin                PROP_ID_SECURE_MIN
  31.  
  32. /*------------------------------------------------------------------------
  33.  *
  34.  *    PROFILE properties
  35.  *
  36.  *    These are used in profiles which contain the Exchange Messaging
  37.  *    Service.  These profiles contain a "global section" used to store
  38.  *    common data, plus individual sections for the transport provider,
  39.  *    one store provider for the user, one store provider for the public
  40.  *    store, and one store provider for each additional mailbox the user
  41.  *    has delegate access to.
  42.  *
  43.  *-----------------------------------------------------------------------*/
  44.  
  45. /* GUID of the global section */
  46.  
  47. #define    pbGlobalProfileSectionGuid    "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A"
  48.  
  49.  
  50. /* Properties in the global section */
  51.  
  52. #define    PR_PROFILE_VERSION                PROP_TAG( PT_LONG, pidProfileMin+0x00)
  53. #define    PR_PROFILE_CONFIG_FLAGS            PROP_TAG( PT_LONG, pidProfileMin+0x01)
  54. #define    PR_PROFILE_HOME_SERVER            PROP_TAG( PT_STRING8, pidProfileMin+0x02)
  55. #define    PR_PROFILE_HOME_SERVER_DN        PROP_TAG( PT_STRING8, pidProfileMin+0x12)
  56. #define    PR_PROFILE_HOME_SERVER_ADDRS    PROP_TAG( PT_MV_STRING8, pidProfileMin+0x13)
  57. #define    PR_PROFILE_USER                    PROP_TAG( PT_STRING8, pidProfileMin+0x03)
  58. #define    PR_PROFILE_CONNECT_FLAGS        PROP_TAG( PT_LONG, pidProfileMin+0x04)
  59. #define PR_PROFILE_TRANSPORT_FLAGS        PROP_TAG( PT_LONG, pidProfileMin+0x05)
  60. #define    PR_PROFILE_UI_STATE                PROP_TAG( PT_LONG, pidProfileMin+0x06)
  61. #define    PR_PROFILE_UNRESOLVED_NAME        PROP_TAG( PT_STRING8, pidProfileMin+0x07)
  62. #define    PR_PROFILE_UNRESOLVED_SERVER    PROP_TAG( PT_STRING8, pidProfileMin+0x08)
  63. #define PR_PROFILE_BINDING_ORDER        PROP_TAG( PT_STRING8, pidProfileMin+0x09)
  64. #define PR_PROFILE_MAX_RESTRICT            PROP_TAG( PT_LONG, pidProfileMin+0x0D)
  65. #define    PR_PROFILE_AB_FILES_PATH        PROP_TAG( PT_STRING8, pidProfileMin+0xE)
  66. #define PR_PROFILE_OFFLINE_STORE_PATH    PROP_TAG( PT_STRING8, pidProfileMin+0x10)
  67. #define PR_PROFILE_OFFLINE_INFO            PROP_TAG( PT_BINARY, pidProfileMin+0x11)
  68. #define PR_PROFILE_ADDR_INFO            PROP_TAG( PT_BINARY, pidSpecialMin+0x17)
  69. #define PR_PROFILE_OPTIONS_DATA            PROP_TAG( PT_BINARY, pidSpecialMin+0x19)
  70. #define PR_PROFILE_SECURE_MAILBOX        PROP_TAG( PT_BINARY, pidSecureProfileMin + 0)
  71. #define PR_DISABLE_WINSOCK                PROP_TAG( PT_LONG, pidProfileMin+0x18)
  72.  
  73. /* Properties passed through the Service Entry to the OST */
  74. #define PR_OST_ENCRYPTION                PROP_TAG(PT_LONG, 0x6702)
  75.  
  76. /* Values for PR_OST_ENCRYPTION */
  77. #define OSTF_NO_ENCRYPTION              ((DWORD)0x80000000)
  78. #define OSTF_COMPRESSABLE_ENCRYPTION    ((DWORD)0x40000000)
  79. #define OSTF_BEST_ENCRYPTION            ((DWORD)0x20000000)
  80.  
  81. /* Properties in each profile section */
  82.  
  83. #define    PR_PROFILE_OPEN_FLAGS            PROP_TAG( PT_LONG, pidProfileMin+0x09)
  84. #define    PR_PROFILE_TYPE                    PROP_TAG( PT_LONG, pidProfileMin+0x0A)
  85. #define    PR_PROFILE_MAILBOX                PROP_TAG( PT_STRING8, pidProfileMin+0x0B)
  86. #define    PR_PROFILE_SERVER                PROP_TAG( PT_STRING8, pidProfileMin+0x0C)
  87. #define    PR_PROFILE_SERVER_DN            PROP_TAG( PT_STRING8, pidProfileMin+0x14)
  88.  
  89. /* Properties in the Public Folders section */
  90.  
  91. #define PR_PROFILE_FAVFLD_DISPLAY_NAME    PROP_TAG(PT_STRING8, pidProfileMin+0x0F)
  92. #define PR_PROFILE_FAVFLD_COMMENT        PROP_TAG(PT_STRING8, pidProfileMin+0x15)
  93. #define PR_PROFILE_ALLPUB_DISPLAY_NAME    PROP_TAG(PT_STRING8, pidProfileMin+0x16)
  94. #define PR_PROFILE_ALLPUB_COMMENT        PROP_TAG(PT_STRING8, pidProfileMin+0x17)
  95.  
  96. // Current value for PR_PROFILE_VERSION
  97. #define    PROFILE_VERSION                        ((ULONG)0x501)
  98.  
  99. // Bit values for PR_PROFILE_CONFIG_FLAGS
  100.  
  101. #define    CONFIG_SERVICE                        ((ULONG)1)
  102. #define    CONFIG_SHOW_STARTUP_UI                ((ULONG)2)
  103. #define    CONFIG_SHOW_CONNECT_UI                ((ULONG)4)
  104. #define    CONFIG_PROMPT_FOR_CREDENTIALS        ((ULONG)8)
  105.  
  106. // Bit values for PR_PROFILE_CONNECT_FLAGS
  107.  
  108. #define    CONNECT_USE_ADMIN_PRIVILEGE            ((ULONG)1)
  109. #define    CONNECT_NO_RPC_ENCRYPTION            ((ULONG)2)
  110.  
  111. // Bit values for PR_PROFILE_TRANSPORT_FLAGS
  112.  
  113. #define    TRANSPORT_DOWNLOAD                    ((ULONG)1)
  114. #define TRANSPORT_UPLOAD                    ((ULONG)2)
  115.  
  116. // Bit values for PR_PROFILE_OPEN_FLAGS
  117.  
  118. #define    OPENSTORE_USE_ADMIN_PRIVILEGE        ((ULONG)1)
  119. #define OPENSTORE_PUBLIC                    ((ULONG)2)
  120. #define    OPENSTORE_HOME_LOGON                ((ULONG)4)
  121. #define OPENSTORE_TAKE_OWNERSHIP            ((ULONG)8)
  122. #define OPENSTORE_OVERRIDE_HOME_MDB            ((ULONG)16)
  123. #define OPENSTORE_TRANSPORT                    ((ULONG)32)
  124. #define OPENSTORE_REMOTE_TRANSPORT            ((ULONG)64)
  125.  
  126. // Values for PR_PROFILE_TYPE
  127.  
  128. #define    PROFILE_PRIMARY_USER                ((ULONG)1)
  129. #define    PROFILE_DELEGATE                    ((ULONG)2)
  130. #define    PROFILE_PUBLIC_STORE                ((ULONG)3)
  131. #define    PROFILE_SUBSCRIPTION                ((ULONG)4)
  132.  
  133.  
  134. /*------------------------------------------------------------------------
  135.  *
  136.  *    MDB object properties
  137.  *
  138.  *-----------------------------------------------------------------------*/
  139.  
  140. /* PR_MDB_PROVIDER GUID in stores table */
  141.  
  142. #define pbExchangeProviderPrimaryUserGuid    "\x54\x94\xA1\xC0\x29\x7F\x10\x1B\xA5\x87\x08\x00\x2B\x2A\x25\x17"
  143. #define pbExchangeProviderDelegateGuid        "\x9e\xb4\x77\x00\x74\xe4\x11\xce\x8c\x5e\x00\xaa\x00\x42\x54\xe2"
  144. #define pbExchangeProviderPublicGuid        "\x78\xb2\xfa\x70\xaf\xf7\x11\xcd\x9b\xc8\x00\xaa\x00\x2f\xc4\x5a"
  145. #define pbExchangeProviderXportGuid            "\xa9\x06\x40\xe0\xd6\x93\x11\xcd\xaf\x95\x00\xaa\x00\x4a\x35\xc3"
  146.  
  147. // All properties in this section are readonly
  148.  
  149. // Identity of store
  150.     // All stores
  151. #define    PR_USER_ENTRYID                    PROP_TAG( PT_BINARY, pidStoreMin+0x01)
  152. #define    PR_USER_NAME                    PROP_TAG( PT_STRING8, pidStoreMin+0x02)
  153.  
  154.     // All mailbox stores
  155. #define    PR_MAILBOX_OWNER_ENTRYID        PROP_TAG( PT_BINARY, pidStoreMin+0x03)
  156. #define    PR_MAILBOX_OWNER_NAME            PROP_TAG( PT_STRING8, pidStoreMin+0x04)
  157. #define PR_OOF_STATE                    PROP_TAG( PT_BOOLEAN, pidStoreMin+0x05)
  158.  
  159.     // Public stores -- name of hierarchy server
  160. #define    PR_HIERARCHY_SERVER                PROP_TAG( PT_TSTRING, pidStoreMin+0x1B)
  161.  
  162. // Entryids of special folders
  163.     // All mailbox stores
  164. #define    PR_SCHEDULE_FOLDER_ENTRYID        PROP_TAG( PT_BINARY, pidStoreMin+0x06)
  165.  
  166.     // All mailbox and gateway stores
  167. #define PR_IPM_DAF_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x07)
  168.  
  169.     // Public store
  170. #define    PR_NON_IPM_SUBTREE_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x08)
  171. #define    PR_EFORMS_REGISTRY_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x09)
  172. #define    PR_SPLUS_FREE_BUSY_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x0A)
  173. #define    PR_OFFLINE_ADDRBOOK_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x0B)
  174. #define    PR_EFORMS_FOR_LOCALE_ENTRYID            PROP_TAG( PT_BINARY, pidStoreMin+0x0C)
  175. #define    PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID        PROP_TAG( PT_BINARY, pidStoreMin+0x0D)
  176. #define    PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID        PROP_TAG( PT_BINARY, pidStoreMin+0x0E)
  177. #define    PR_OFFLINE_MESSAGE_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x0F)
  178. #define PR_IPM_FAVORITES_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x18)
  179. #define PR_IPM_PUBLIC_FOLDERS_ENTRYID            PROP_TAG( PT_BINARY, pidStoreMin+0x19)
  180.  
  181.     // Gateway stores
  182. #define    PR_GW_MTSIN_ENTRYID                PROP_TAG( PT_BINARY, pidStoreMin+0x10)
  183. #define    PR_GW_MTSOUT_ENTRYID            PROP_TAG( PT_BINARY, pidStoreMin+0x11)
  184. #define    PR_TRANSFER_ENABLED                PROP_TAG( PT_BOOLEAN, pidStoreMin+0x12)
  185.  
  186. // This property is preinitialized to 256 bytes of zeros
  187. // GetProp on this property is guaranteed to RPC.  May be used
  188. // to determine line speed of connection to server.
  189. #define    PR_TEST_LINE_SPEED                PROP_TAG( PT_BINARY, pidStoreMin+0x13)
  190.  
  191. // Used with OpenProperty to get interface, also on folders
  192. #define    PR_HIERARCHY_SYNCHRONIZER        PROP_TAG( PT_OBJECT, pidStoreMin+0x14)
  193. #define    PR_CONTENTS_SYNCHRONIZER        PROP_TAG( PT_OBJECT, pidStoreMin+0x15)
  194. #define    PR_COLLECTOR                    PROP_TAG( PT_OBJECT, pidStoreMin+0x16)
  195.  
  196. // Used with OpenProperty to get interface for folders, messages, attachmentson
  197. #define    PR_FAST_TRANSFER                PROP_TAG( PT_OBJECT, pidStoreMin+0x17)
  198.  
  199. // This property is available on mailbox and public stores.  If it exists
  200. // and its value is TRUE, the store is connected to the offline store provider.
  201. #define PR_STORE_OFFLINE                PROP_TAG( PT_BOOLEAN, pidStoreMin+0x1A)
  202.  
  203. // In transit state for store object.  This state is
  204. // set when mail is being moved and it pauses mail delivery
  205. // to the mail box
  206. #define    PR_IN_TRANSIT                    PROP_TAG( PT_BOOLEAN, pidStoreMin)
  207.  
  208. // Writable only with Admin rights, available on public stores and folders
  209. #define PR_REPLICATION_STYLE            PROP_TAG( PT_LONG, pidAdminMin)
  210. #define PR_REPLICATION_SCHEDULE            PROP_TAG( PT_BINARY, pidAdminMin+0x01)
  211. #define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG( PT_LONG, pidAdminMin+0x02)
  212.  
  213. // Writable only with Admin rights, available on public stores
  214. #define PR_OVERALL_MSG_AGE_LIMIT        PROP_TAG( PT_LONG, pidAdminMin+0x03 )
  215. #define PR_REPLICATION_ALWAYS_INTERVAL    PROP_TAG( PT_LONG, pidAdminMin+0x04 )
  216. #define PR_REPLICATION_MSG_SIZE            PROP_TAG( PT_LONG, pidAdminMin+0x05 )
  217.  
  218. // default replication style=always interval (minutes)
  219. #define STYLE_ALWAYS_INTERVAL_DEFAULT    (ULONG) 15
  220.  
  221. // default replication message size limit (KB)
  222. #define REPLICATION_MESSAGE_SIZE_LIMIT_DEFAULT    (ULONG) 100
  223.  
  224. // Values for PR_REPLICATION_STYLE
  225. #define STYLE_NEVER                (ULONG) 0    // never replicate
  226. #define STYLE_NORMAL            (ULONG) 1    // use 84 byte schedule TIB
  227. #define STYLE_ALWAYS            (ULONG) 2    // replicate at fastest rate
  228. #define STYLE_DEFAULT            (ULONG) -1    // default value
  229.  
  230. /*------------------------------------------------------------------------
  231.  *
  232.  *    INCREMENTAL CHANGE SYNCHRONIZATION
  233.  *    folder and message properties
  234.  *
  235.  *-----------------------------------------------------------------------*/
  236.  
  237. #define PR_SOURCE_KEY                    PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x0)
  238. #define PR_PARENT_SOURCE_KEY            PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x1)
  239. #define PR_CHANGE_KEY                    PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x2)
  240. #define PR_PREDECESSOR_CHANGE_LIST        PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x3)
  241.  
  242. /*------------------------------------------------------------------------
  243.  *
  244.  *    FOLDER object properties
  245.  *
  246.  *-----------------------------------------------------------------------*/
  247.  
  248. // Read only, available on all folders
  249. #define    PR_FOLDER_CHILD_COUNT            PROP_TAG( PT_LONG, pidFolderMin)
  250. #define    PR_RIGHTS                        PROP_TAG( PT_LONG, pidFolderMin+0x01)
  251. #define    PR_ACL_TABLE                    PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin)
  252. #define    PR_RULES_TABLE                    PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin+0x1)
  253. #define    PR_HAS_RULES                PROP_TAG( PT_BOOLEAN, pidFolderMin+0x02)
  254.  
  255. //Read only, available only for public folders
  256. #define    PR_ADDRESS_BOOK_ENTRYID        PROP_TAG( PT_BINARY, pidFolderMin+0x03)
  257.  
  258. //Writable, available on folders in all stores
  259. #define    PR_ACL_DATA                    PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin)
  260. #define    PR_RULES_DATA                PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x1)
  261. #define    PR_FOLDER_DESIGN_FLAGS        PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x2)
  262. #define    PR_DESIGN_IN_PROGRESS        PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x4)
  263. #define    PR_SECURE_ORIGINATION        PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x5)
  264.  
  265. //Writable, available only for public folders
  266. #define    PR_PUBLISH_IN_ADDRESS_BOOK    PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x6)
  267. #define    PR_RESOLVE_METHOD            PROP_TAG( PT_LONG,  pidExchangeXmitReservedMin+0x7)
  268. #define    PR_ADDRESS_BOOK_DISPLAY_NAME    PROP_TAG( PT_TSTRING, pidExchangeXmitReservedMin+0x8)
  269.  
  270. //Writable, used to indicate locale id for eforms registry subfolders
  271. #define    PR_EFORMS_LOCALE_ID            PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x9)
  272.  
  273. // Writable only with Admin rights, available only for public folders
  274. #define PR_REPLICA_LIST                PROP_TAG( PT_BINARY, pidAdminMin+0x8)
  275. #define PR_OVERALL_AGE_LIMIT        PROP_TAG( PT_LONG, pidAdminMin+0x9)
  276.  
  277. //PR_RESOLVE_METHOD values
  278. #define    RESOLVE_METHOD_DEFAULT            ((LONG)0)    // default handling attach conflicts
  279. #define    RESOLVE_METHOD_LAST_WRITER_WINS    ((LONG)1)    // the last writer will win conflict
  280. #define    RESOLVE_METHOD_NO_CONFLICT_NOTIFICATION ((LONG)2) // no conflict notif
  281.  
  282. //Read only, available only for public folder favorites
  283. #define PR_PUBLIC_FOLDER_ENTRYID    PROP_TAG( PT_BINARY, pidFolderMin+0x04)
  284.  
  285. /*------------------------------------------------------------------------
  286.  *
  287.  *    MESSAGE object properties
  288.  *
  289.  *-----------------------------------------------------------------------*/
  290.  
  291. // Read only, automatically set on all messages in all stores
  292. #define    PR_HAS_NAMED_PROPERTIES            PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x0A)
  293.  
  294. // Read only but outside the provider specific range for replication thru GDK-GWs
  295. #define    PR_CREATOR_NAME                    PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x18)
  296. #define    PR_CREATOR_ENTRYID                PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x19)
  297. #define    PR_LAST_MODIFIER_NAME            PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1A)
  298. #define    PR_LAST_MODIFIER_ENTRYID        PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1B)
  299.  
  300. // Read only, appears on messages which have DAM's pointing to them
  301. #define PR_HAS_DAMS                        PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0xA)
  302. #define PR_RULE_TRIGGER_HISTORY            PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x12)
  303. #define    PR_MOVE_TO_STORE_ENTRYID        PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x13)
  304. #define    PR_MOVE_TO_FOLDER_ENTRYID        PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x14)
  305.  
  306. // Read only, available only on messages in the public store
  307. #define    PR_REPLICA_SERVER                PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin+0x4)
  308.  
  309. // Writeable, used for recording send option dialog settings
  310. #define    PR_DEFERRED_SEND_NUMBER            PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xB)
  311. #define    PR_DEFERRED_SEND_UNITS            PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xC)
  312. #define    PR_EXPIRY_NUMBER                PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xD)
  313. #define    PR_EXPIRY_UNITS                    PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xE)
  314.  
  315. // Writeable, deferred send time
  316. #define PR_DEFERRED_SEND_TIME            PROP_TAG( PT_SYSTIME, pidExchangeXmitReservedMin+0xF)
  317.  
  318. //Writeable, intended for both folders and messages in gateway mailbox
  319. #define    PR_GW_ADMIN_OPERATIONS            PROP_TAG( PT_LONG, pidMessageWriteableMin)
  320.  
  321. //Writeable, used for DMS messages
  322. #define PR_P1_CONTENT                    PROP_TAG( PT_BINARY, 0x1100)
  323. #define PR_P1_CONTENT_TYPE                PROP_TAG( PT_BINARY, 0x1101)
  324.  
  325. // Properties on deferred action messages
  326. #define    PR_CLIENT_ACTIONS                  PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x5)
  327. #define    PR_DAM_ORIGINAL_ENTRYID            PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x6)
  328. #define PR_DAM_BACK_PATCHED                PROP_TAG( PT_BOOLEAN, pidMessageReadOnlyMin+0x7)
  329.  
  330. // Properties on deferred action error messages
  331. #define    PR_RULE_ERROR                    PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x8)
  332. #define    PR_RULE_ACTION_TYPE                PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x9)
  333. #define    PR_RULE_ACTION_NUMBER            PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x10)
  334. #define PR_RULE_FOLDER_ENTRYID            PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x11)
  335.  
  336. // Property on conflict notification indicating entryid of conflicting object
  337. #define    PR_CONFLICT_ENTRYID                PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x10)
  338.  
  339. // Property on messages to indicate the language client used to create this message
  340. #define    PR_MESSAGE_LOCALE_ID            PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x11)
  341.  
  342. // Properties on Quota warning messages to indicate Storage quota and Excess used
  343. #define    PR_STORAGE_QUOTA_LIMIT            PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x15)
  344. #define    PR_EXCESS_STORAGE_USED            PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x16)
  345. #define PR_SVR_GENERATING_QUOTA_MSG        PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x17)
  346.  
  347. // Property affixed by delegation rule and deleted on forwards
  348. #define PR_DELEGATED_BY_RULE            PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x3)
  349.  
  350. // Message status bit used to indicate message is in conflict
  351. #define    MSGSTATUS_IN_CONFLICT            ((ULONG) 0x800)
  352.  
  353. /*------------------------------------------------------------------------
  354.  *
  355.  *    ATTACHMENT object properties
  356.  *
  357.  *-----------------------------------------------------------------------*/
  358.  
  359. // Appears on attachments to a message marked to be in conflict.  Identifies
  360. // those attachments which are conflicting versions of the top level message
  361. #define    PR_IN_CONFLICT                    PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin)
  362.  
  363.  
  364. /*------------------------------------------------------------------------
  365.  *
  366.  *    TABLE object properties
  367.  *
  368.  *    Id Range: 0x662F-0x662F
  369.  *
  370.  *-----------------------------------------------------------------------*/
  371.  
  372. //This property can be used in a contents table to get PR_ENTRYID returned
  373. //as a long term entryid instead of a short term entryid.
  374. #define    PR_LONGTERM_ENTRYID_FROM_TABLE    PROP_TAG(PT_BINARY, pidSpecialMin)
  375.  
  376.  
  377. /*------------------------------------------------------------------------
  378.  *
  379.  *    Gateway "MTE" ENVELOPE properties
  380.  *
  381.  *    Id Range:  0x66E0-0x66FF
  382.  *
  383.  *-----------------------------------------------------------------------*/
  384.  
  385. #define PR_ORIGINATOR_NAME                PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x3)
  386. #define PR_ORIGINATOR_ADDR                PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x4)
  387. #define PR_ORIGINATOR_ADDRTYPE            PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x5)
  388. #define PR_ORIGINATOR_ENTRYID            PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x6)
  389. #define PR_ARRIVAL_TIME                    PROP_TAG( PT_SYSTIME, pidMessageWriteableMin+0x7)
  390. #define PR_TRACE_INFO                    PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x8)
  391. #define PR_INTERNAL_TRACE_INFO             PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x12)
  392. #define PR_SUBJECT_TRACE_INFO            PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x9)
  393. #define PR_RECIPIENT_NUMBER                PROP_TAG( PT_LONG, pidMessageWriteableMin+0xA)
  394. #define PR_MTS_SUBJECT_ID                PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xB)
  395. #define PR_REPORT_DESTINATION_NAME        PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0xC)
  396. #define PR_REPORT_DESTINATION_ENTRYID    PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xD)
  397. #define PR_CONTENT_SEARCH_KEY            PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xE)
  398. #define PR_FOREIGN_ID                    PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xF)
  399. #define PR_FOREIGN_REPORT_ID            PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x10)
  400. #define PR_FOREIGN_SUBJECT_ID            PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x11)
  401. #define PR_MTS_ID                        PR_MESSAGE_SUBMISSION_ID
  402. #define PR_MTS_REPORT_ID                PR_MESSAGE_SUBMISSION_ID
  403.  
  404.  
  405. /*------------------------------------------------------------------------
  406.  *
  407.  *    Trace properties format
  408.  *        PR_TRACE_INFO
  409.  *        PR_INTERNAL_TRACE_INFO
  410.  *
  411.  *-----------------------------------------------------------------------*/
  412.  
  413. #define MAX_ADMD_NAME_SIZ       17
  414. #define MAX_PRMD_NAME_SIZ       17
  415. #define MAX_COUNTRY_NAME_SIZ    4
  416. #define MAX_MTA_NAME_SIZ        33
  417.  
  418. #define    ADMN_PAD                3
  419. #define    PRMD_PAD                3
  420. #define    COUNTRY_PAD                0
  421. #define    MTA_PAD                    3
  422.  
  423. typedef struct {
  424.     LONG     lAction;                // The routing action the tracing site
  425.                                      // took.
  426.     FILETIME ftArrivalTime;          // The time at which the communique
  427.                                      // entered the tracing site.
  428.     FILETIME ftDeferredTime;         // The time are which the tracing site
  429.                                      // released the message.
  430.     char     rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD];               // ADMD
  431.     char     rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD];     // Country
  432.     char     rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD];                  // PRMD
  433.     char     rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD];           // Attempted ADMD
  434.     char     rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD];  // Attempted Country
  435.     char     rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD];                // Attempted PRMD
  436. }   TRACEENTRY, FAR * LPTRACEENTRY;
  437.  
  438. typedef struct {
  439.     ULONG       cEntries;               // Number of trace entries
  440.     TRACEENTRY  rgtraceentry[MAPI_DIM]; // array of trace entries
  441. } TRACEINFO, FAR * LPTRACEINFO;
  442.  
  443. typedef struct
  444. {
  445.     LONG        lAction;                // The routing action the tracing domain took.
  446.     FILETIME    ftArrivalTime;            // The time at which the communique entered the tracing domain.
  447.     FILETIME    ftDeferredTime;            // The time are which the tracing domain released the message.
  448.  
  449.     char        rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD];                // ADMD
  450.     char        rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD];         // Country
  451.     char        rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD];                 // PRMD
  452.     char        rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD];               // Attempted ADMD
  453.     char        rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD];    // Attempted Country
  454.     char        rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD];                // Attempted PRMD
  455.     char        rgchMTAName[MAX_MTA_NAME_SIZ+MTA_PAD];                     // MTA Name
  456.     char        rgchAttMTAName[MAX_MTA_NAME_SIZ+MTA_PAD];                // Attempted MTA Name
  457. }INTTRACEENTRY, *PINTTRACEENTRY;
  458.  
  459. typedef    struct
  460. {
  461.     ULONG              cEntries;                    // Number of trace entries
  462.     INTTRACEENTRY    rgIntTraceEntry[MAPI_DIM];    // array of internal trace entries
  463. }INTTRACEINFO, *PINTTRACEINFO;
  464.  
  465.  
  466. /*------------------------------------------------------------------------
  467.  *
  468.  *    "IExchangeModifyTable" Interface Declaration
  469.  *
  470.  *    Used for get/set rules and access control on folders.
  471.  *
  472.  *-----------------------------------------------------------------------*/
  473.  
  474.  
  475. /* ulRowFlags */
  476. #define ROWLIST_REPLACE        ((ULONG)1)
  477.  
  478. #define ROW_ADD                ((ULONG)1)
  479. #define ROW_MODIFY            ((ULONG)2)
  480. #define ROW_REMOVE            ((ULONG)4)
  481. #define ROW_EMPTY            (ROW_ADD|ROW_REMOVE)
  482.  
  483. typedef struct _ROWENTRY
  484. {
  485.     ULONG            ulRowFlags;
  486.     ULONG            cValues;
  487.     LPSPropValue    rgPropVals;
  488. } ROWENTRY, FAR * LPROWENTRY;
  489.  
  490. typedef struct _ROWLIST
  491. {
  492.     ULONG            cEntries;
  493.     ROWENTRY        aEntries[MAPI_DIM];
  494. } ROWLIST, FAR * LPROWLIST;
  495.  
  496. #define EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(IPURE)                    \
  497.     MAPIMETHOD(GetLastError)                                            \
  498.         (THIS_    HRESULT                        hResult,                    \
  499.                 ULONG                        ulFlags,                    \
  500.                 LPMAPIERROR FAR *            lppMAPIError) IPURE;        \
  501.     MAPIMETHOD(GetTable)                                                \
  502.         (THIS_    ULONG                        ulFlags,                    \
  503.                 LPMAPITABLE FAR *            lppTable) IPURE;            \
  504.     MAPIMETHOD(ModifyTable)                                                \
  505.         (THIS_    ULONG                        ulFlags,                    \
  506.                 LPROWLIST                    lpMods) IPURE;
  507.  
  508. #undef         INTERFACE
  509. #define         INTERFACE  IExchangeModifyTable
  510. DECLARE_MAPI_INTERFACE_(IExchangeModifyTable, IUnknown)
  511. {
  512.     MAPI_IUNKNOWN_METHODS(PURE)
  513.     EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(PURE)
  514. };
  515. #undef    IMPL
  516. #define IMPL
  517.  
  518. DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable,    LPEXCHANGEMODIFYTABLE);
  519.  
  520. /* Access Control Specifics */
  521.  
  522. //Properties
  523. #define    PR_MEMBER_ID                    PROP_TAG( PT_I8, pidSpecialMin+0x01)
  524. #define    PR_MEMBER_NAME                    PROP_TAG( PT_TSTRING, pidSpecialMin+0x02)
  525. #define    PR_MEMBER_ENTRYID                PR_ENTRYID
  526. #define    PR_MEMBER_RIGHTS                PROP_TAG( PT_LONG, pidSpecialMin+0x03)
  527.  
  528. //Security bits
  529. typedef DWORD RIGHTS;
  530. #define frightsReadAny            0x0000001L
  531. #define    frightsCreate            0x0000002L
  532. #define    frightsEditOwned        0x0000008L
  533. #define    frightsDeleteOwned        0x0000010L
  534. #define    frightsEditAny            0x0000020L
  535. #define    frightsDeleteAny        0x0000040L
  536. #define    frightsCreateSubfolder    0x0000080L
  537. #define    frightsOwner            0x0000100L
  538. #define    frightsContact            0x0000200L    // NOTE: not part of rightsAll
  539. #define    rightsNone                0x00000000
  540. #define    rightsReadOnly            frightsReadAny
  541. #define    rightsReadWrite            (frightsReadAny|frightsEditAny)
  542. #define    rightsAll                0x00001FBL
  543.  
  544. /* Rules specifics */
  545.  
  546. //Property types
  547. #define    PT_SRESTRICTION                ((ULONG) 0x00FD)
  548. #define    PT_ACTIONS                    ((ULONG) 0x00FE)
  549.  
  550. //Properties in rule table
  551. #define    PR_RULE_ID                        PROP_TAG( PT_I8, pidSpecialMin+0x04)
  552. #define    PR_RULE_IDS                        PROP_TAG( PT_BINARY, pidSpecialMin+0x05)
  553. #define    PR_RULE_SEQUENCE                PROP_TAG( PT_LONG, pidSpecialMin+0x06)
  554. #define    PR_RULE_STATE                    PROP_TAG( PT_LONG, pidSpecialMin+0x07)
  555. #define    PR_RULE_USER_FLAGS                PROP_TAG( PT_LONG, pidSpecialMin+0x08)
  556. #define    PR_RULE_CONDITION                PROP_TAG( PT_SRESTRICTION, pidSpecialMin+0x09)
  557. #define    PR_RULE_ACTIONS                    PROP_TAG( PT_ACTIONS, pidSpecialMin+0x10)
  558. #define    PR_RULE_PROVIDER                PROP_TAG( PT_STRING8, pidSpecialMin+0x11)
  559. #define    PR_RULE_NAME                    PROP_TAG( PT_TSTRING, pidSpecialMin+0x12)
  560. #define    PR_RULE_LEVEL                    PROP_TAG( PT_LONG, pidSpecialMin+0x13)
  561. #define    PR_RULE_PROVIDER_DATA            PROP_TAG( PT_BINARY, pidSpecialMin+0x14)
  562.  
  563. //PR_STATE property values
  564. #define ST_DISABLED            0x0000
  565. #define ST_ENABLED            0x0001
  566. #define ST_ERROR            0x0002
  567. #define ST_ONLY_WHEN_OOF    0x0004
  568. #define ST_KEEP_OOF_HIST    0x0008
  569. #define ST_EXIT_LEVEL        0x0010
  570.  
  571. #define ST_CLEAR_OOF_HIST    0x80000000
  572.  
  573. //Empty restriction
  574. #define NULL_RESTRICTION    0xff
  575.  
  576. // special RELOP for Member of DL
  577. #define RELOP_MEMBER_OF_DL    100
  578.  
  579. //Action types
  580. typedef enum
  581. {
  582.     OP_MOVE = 1,
  583.     OP_COPY,
  584.     OP_REPLY,
  585.     OP_OOF_REPLY,
  586.     OP_DEFER_ACTION,
  587.     OP_BOUNCE,
  588.     OP_FORWARD,
  589.     OP_DELEGATE,
  590.     OP_TAG,
  591.     OP_DELETE,
  592.     OP_MARK_AS_READ
  593. } ACTTYPE;
  594.  
  595. // action flavors
  596.  
  597. // for OP_REPLY
  598. #define    DO_NOT_SEND_TO_ORIGINATOR        1
  599.  
  600. //scBounceCode values
  601. #define    BOUNCE_MESSAGE_SIZE_TOO_LARGE    (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD
  602. #define BOUNCE_FORMS_MISMATCH            (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED
  603. #define BOUNCE_ACCESS_DENIED            (SCODE) MAPI_DIAG_MAIL_REFUSED
  604.  
  605. //Message class prefix for Reply and OOF Reply templates
  606. #define szReplyTemplateMsgClassPrefix    "IPM.Note.Rules.ReplyTemplate."
  607. #define szOofTemplateMsgClassPrefix        "IPM.Note.Rules.OofTemplate."
  608.  
  609. //Action structure
  610. typedef struct _action
  611. {
  612.     ACTTYPE        acttype;
  613.  
  614.     // to indicate which flavour of the action.
  615.     ULONG        ulActionFlavor;
  616.  
  617.     // Action restriction
  618.     // currently unsed and must be set to NULL
  619.     LPSRestriction    lpRes;
  620.  
  621.     // currently unused, must be set to 0.
  622.     LPSPropTagArray    lpPropTagArray;
  623.  
  624.     // User defined flags
  625.     ULONG        ulFlags;
  626.  
  627.     // padding to align the union on 8 byte boundary
  628.     ULONG        dwAlignPad;
  629.  
  630.     union
  631.     {
  632.         // used for OP_MOVE and OP_COPY actions
  633.         struct
  634.         {
  635.             ULONG        cbStoreEntryId;
  636.             LPENTRYID    lpStoreEntryId;
  637.             ULONG        cbFldEntryId;
  638.             LPENTRYID    lpFldEntryId;
  639.         } actMoveCopy;
  640.  
  641.         // used for OP_REPLY and OP_OOF_REPLY actions
  642.         struct
  643.         {
  644.             ULONG        cbEntryId;
  645.             LPENTRYID    lpEntryId;
  646.             GUID        guidReplyTemplate;
  647.         } actReply;
  648.  
  649.         // used for OP_DEFER_ACTION action
  650.         struct
  651.         {
  652.             ULONG        cbData;
  653.             BYTE        *pbData;
  654.         } actDeferAction;
  655.  
  656.         // Error code to set for OP_BOUNCE action
  657.         SCODE            scBounceCode;
  658.  
  659.         // list of address for OP_FORWARD and OP_DELEGATE action
  660.         LPADRLIST        lpadrlist;
  661.  
  662.         // prop value for OP_TAG action
  663.         SPropValue        propTag;
  664.     };
  665. } ACTION, FAR * LPACTION;
  666.  
  667. // Rules version
  668. #define EDK_RULES_VERSION        1
  669.  
  670. //Array of actions
  671. typedef struct _actions
  672. {
  673.     ULONG        ulVersion;        // use the #define above
  674.     UINT        cActions;
  675.     LPACTION    lpAction;
  676. } ACTIONS;
  677.  
  678. // message class definitions for Deferred Action and Deffered Error messages
  679. #define szDamMsgClass        "IPC.Microsoft Exchange 4.0.Deferred Action"
  680. #define szDemMsgClass        "IPC.Microsoft Exchange 4.0.Deferred Error"
  681.  
  682. /*
  683.  *    Rule error codes
  684.  *    Values for PR_RULE_ERROR
  685.  */
  686. #define    RULE_ERR_UNKNOWN        1            //general catchall error
  687. #define    RULE_ERR_LOAD            2            //unable to load folder rules
  688. #define    RULE_ERR_DELIVERY        3            //unable to deliver message temporarily
  689. #define    RULE_ERR_PARSING        4            //error while parsing
  690. #define    RULE_ERR_CREATE_DAE        5            //error creating DAE message
  691. #define    RULE_ERR_NO_FOLDER        6            //folder to move/copy doesn't exist
  692. #define    RULE_ERR_NO_RIGHTS        7            //no rights to move/copy into folder
  693. #define    RULE_ERR_CREATE_DAM        8            //error creating DAM
  694. #define RULE_ERR_NO_SENDAS        9            //can not send as another user
  695. #define RULE_ERR_NO_TEMPLATE    10            //reply template is missing
  696. #define RULE_ERR_EXECUTION        11            //error in rule execution
  697. #define RULE_ERR_QUOTA_EXCEEDED    12
  698.  
  699. #define RULE_ERR_FIRST        RULE_ERR_UNKNOWN
  700. #define RULE_ERR_LAST        RULE_ERR_QUOTA_EXCEEDED
  701.  
  702. /*------------------------------------------------------------------------
  703.  *
  704.  *    "IExchangeRuleAction" Interface Declaration
  705.  *
  706.  *    Used for get actions from a Deferred Action Message.
  707.  *
  708.  *-----------------------------------------------------------------------*/
  709.  
  710. #define EXCHANGE_IEXCHANGERULEACTION_METHODS(IPURE)                        \
  711.     MAPIMETHOD(ActionCount)                                                \
  712.         (THIS_    ULONG FAR *                    lpcActions) IPURE;            \
  713.     MAPIMETHOD(GetAction)                                                \
  714.         (THIS_    ULONG                        ulActionNumber,                \
  715.                 LARGE_INTEGER    *            lpruleid,                    \
  716.                 LPACTION FAR *                lppAction) IPURE;
  717.  
  718. #undef         INTERFACE
  719. #define         INTERFACE  IExchangeRuleAction
  720. DECLARE_MAPI_INTERFACE_(IExchangeRuleAction, IUnknown)
  721. {
  722.     MAPI_IUNKNOWN_METHODS(PURE)
  723.     EXCHANGE_IEXCHANGERULEACTION_METHODS(PURE)
  724. };
  725. #undef    IMPL
  726. #define IMPL
  727.  
  728. DECLARE_MAPI_INTERFACE_PTR(IExchangeRuleAction,    LPEXCHANGERULEACTION);
  729.  
  730. /*------------------------------------------------------------------------
  731.  *
  732.  *    "IExchangeManageStore" Interface Declaration
  733.  *
  734.  *    Used for store management functions.
  735.  *
  736.  *-----------------------------------------------------------------------*/
  737.  
  738. #define EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(IPURE)                    \
  739.     MAPIMETHOD(CreateStoreEntryID)                                        \
  740.         (THIS_    LPSTR                        lpszMsgStoreDN,                \
  741.                 LPSTR                        lpszMailboxDN,                \
  742.                 ULONG                        ulFlags,                    \
  743.                 ULONG FAR *                    lpcbEntryID,                \
  744.                 LPENTRYID FAR *                lppEntryID) IPURE;            \
  745.     MAPIMETHOD(EntryIDFromSourceKey)                                    \
  746.         (THIS_    ULONG                        cFolderKeySize,                \
  747.                 BYTE FAR *                    lpFolderSourceKey,            \
  748.                 ULONG                        cMessageKeySize,            \
  749.                 BYTE FAR *                    lpMessageSourceKey,            \
  750.                 ULONG FAR *                    lpcbEntryID,                \
  751.                 LPENTRYID FAR *                lppEntryID) IPURE;            \
  752.     MAPIMETHOD(GetRights)                                                \
  753.         (THIS_    ULONG                        cbUserEntryID,                \
  754.                 LPENTRYID                    lpUserEntryID,                \
  755.                 ULONG                        cbEntryID,                    \
  756.                 LPENTRYID                    lpEntryID,                    \
  757.                 ULONG FAR *                    lpulRights) IPURE;            \
  758.     MAPIMETHOD(GetMailboxTable)                                            \
  759.         (THIS_    LPSTR                        lpszServerName,                \
  760.                 LPMAPITABLE FAR *            lppTable,                    \
  761.                 ULONG                        ulFlags) IPURE;                \
  762.     MAPIMETHOD(GetPublicFolderTable)                                    \
  763.         (THIS_    LPSTR                        lpszServerName,                \
  764.                 LPMAPITABLE FAR *            lppTable,                    \
  765.                 ULONG                        ulFlags) IPURE;
  766.  
  767. #undef         INTERFACE
  768. #define         INTERFACE  IExchangeManageStore
  769. DECLARE_MAPI_INTERFACE_(IExchangeManageStore, IUnknown)
  770. {
  771.     MAPI_IUNKNOWN_METHODS(PURE)
  772.     EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE)
  773. };
  774. #undef    IMPL
  775. #define IMPL
  776.  
  777. DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore, LPEXCHANGEMANAGESTORE);
  778.  
  779.  
  780. // Properties for GetMailboxTable
  781. #define PR_NT_USER_NAME                         PROP_TAG( PT_TSTRING, pidAdminMin+0x10)
  782. #define PR_LOCALE_ID                            PROP_TAG( PT_LONG, pidAdminMin+0x11 )
  783. #define PR_LAST_LOGON_TIME                      PROP_TAG( PT_SYSTIME, pidAdminMin+0x12 )
  784. #define PR_LAST_LOGOFF_TIME                     PROP_TAG( PT_SYSTIME, pidAdminMin+0x13 )
  785. #define PR_STORAGE_LIMIT_INFORMATION            PROP_TAG( PT_LONG, pidAdminMin+0x14 )
  786.  
  787. // Properties for GetPublicFolderTable
  788. #define PR_FOLDER_FLAGS                         PROP_TAG( PT_LONG, pidAdminMin+0x18 )
  789. #define    PR_LAST_ACCESS_TIME                        PROP_TAG( PT_SYSTIME, pidAdminMin+0x19 )
  790. #define PR_RESTRICTION_COUNT                    PROP_TAG( PT_LONG, pidAdminMin+0x1A )
  791. #define PR_CATEG_COUNT                          PROP_TAG( PT_LONG, pidAdminMin+0x1B )
  792. #define PR_CACHED_COLUMN_COUNT                  PROP_TAG( PT_LONG, pidAdminMin+0x1C )
  793. #define PR_NORMAL_MSG_W_ATTACH_COUNT            PROP_TAG( PT_LONG, pidAdminMin+0x1D )
  794. #define PR_ASSOC_MSG_W_ATTACH_COUNT             PROP_TAG( PT_LONG, pidAdminMin+0x1E )
  795. #define PR_RECIPIENT_ON_NORMAL_MSG_COUNT        PROP_TAG( PT_LONG, pidAdminMin+0x1F )
  796. #define PR_RECIPIENT_ON_ASSOC_MSG_COUNT         PROP_TAG( PT_LONG, pidAdminMin+0x20 )
  797. #define PR_ATTACH_ON_NORMAL_MSG_COUNT           PROP_TAG( PT_LONG, pidAdminMin+0x21 )
  798. #define PR_ATTACH_ON_ASSOC_MSG_COUNT            PROP_TAG( PT_LONG, pidAdminMin+0x22 )
  799. #define PR_NORMAL_MESSAGE_SIZE                  PROP_TAG( PT_LONG, pidAdminMin+0x23 )
  800. #define PR_NORMAL_MESSAGE_SIZE_EXTENDED         PROP_TAG( PT_I8, pidAdminMin+0x23 )
  801. #define PR_ASSOC_MESSAGE_SIZE                   PROP_TAG( PT_LONG, pidAdminMin+0x24 )
  802. #define PR_ASSOC_MESSAGE_SIZE_EXTENDED          PROP_TAG( PT_I8, pidAdminMin+0x24 )
  803. #define PR_FOLDER_PATHNAME                      PROP_TAG(PT_TSTRING, pidAdminMin+0x25 )
  804. #define PR_OWNER_COUNT                            PROP_TAG( PT_LONG, pidAdminMin+0x26 )
  805. #define PR_CONTACT_COUNT                        PROP_TAG( PT_LONG, pidAdminMin+0x27 )
  806.  
  807. // PT_I8 version of PR_MESSAGE_SIZE defined in mapitags.h
  808. #define    PR_MESSAGE_SIZE_EXTENDED            PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE))
  809.  
  810. /* Bits in PR_FOLDER_FLAGS */
  811. #define MDB_FOLDER_IPM                  0x1
  812. #define MDB_FOLDER_SEARCH               0x2
  813. #define MDB_FOLDER_NORMAL               0x4
  814. #define MDB_FOLDER_RULES                0x8
  815.  
  816. /* Bits used in ulFlags in GetPublicFolderTable() */
  817. #define MDB_NON_IPM                     0x10
  818. #define MDB_IPM                         0x20
  819.  
  820. /* Bits in PR_STORAGE_LIMIT_INFORMATION */
  821. #define MDB_LIMIT_BELOW                    0x1
  822. #define MDB_LIMIT_ISSUE_WARNING            0x2
  823. #define MDB_LIMIT_PROHIBIT_SEND            0x4
  824. #define MDB_LIMIT_NO_CHECK                0x8
  825.  
  826.  
  827. /*------------------------------------------------------------------------
  828.  *
  829.  *    "IExchangeFastTransfer" Interface Declaration
  830.  *
  831.  *    Used for fast transfer interface used to
  832.  *    implement CopyTo, CopyProps, CopyFolder, and
  833.  *    CopyMessages.
  834.  *
  835.  *-----------------------------------------------------------------------*/
  836.  
  837. // Transfer flags
  838. // Use MAPI_MOVE for move option
  839.  
  840. // Transfer methods
  841. #define    TRANSFER_COPYTO            1
  842. #define    TRANSFER_COPYPROPS        2
  843. #define    TRANSFER_COPYMESSAGES    3
  844. #define    TRANSFER_COPYFOLDER        4
  845.  
  846.  
  847. #define EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(IPURE)            \
  848.     MAPIMETHOD(Config)                                            \
  849.         (THIS_    ULONG                ulFlags,                    \
  850.                 ULONG                ulTransferMethod) IPURE;    \
  851.     MAPIMETHOD(TransferBuffer)                                    \
  852.         (THIS_    ULONG                cb,                            \
  853.                 LPBYTE                lpb,                        \
  854.                 ULONG                *lpcbProcessed) IPURE;        \
  855.     STDMETHOD_(BOOL, IsInterfaceOk)                                \
  856.         (THIS_    ULONG                ulTransferMethod,            \
  857.                 REFIID                refiid,                        \
  858.                 LPSPropTagArray        lpptagList,                    \
  859.                 ULONG                ulFlags) IPURE;
  860.  
  861. #undef         INTERFACE
  862. #define         INTERFACE  IExchangeFastTransfer
  863. DECLARE_MAPI_INTERFACE_(IExchangeFastTransfer, IUnknown)
  864. {
  865.     MAPI_IUNKNOWN_METHODS(PURE)
  866.     EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(PURE)
  867. };
  868. #undef    IMPL
  869. #define IMPL
  870.  
  871. DECLARE_MAPI_INTERFACE_PTR(IExchangeFastTransfer, LPEXCHANGEFASTTRANSFER);
  872.  
  873.  
  874.  
  875. /*------------------------------------------------------------------------
  876.  *
  877.  *    "IExchangeExportChanges" Interface Declaration
  878.  *
  879.  *    Used for Incremental Synchronization
  880.  *
  881.  *-----------------------------------------------------------------------*/
  882.  
  883. #define EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(IPURE)        \
  884.     MAPIMETHOD(GetLastError)                                \
  885.         (THIS_    HRESULT                hResult,                \
  886.                  ULONG                ulFlags,                \
  887.                  LPMAPIERROR FAR *    lppMAPIError) IPURE;    \
  888.     MAPIMETHOD(Config)                                        \
  889.         (THIS_    LPSTREAM            lpStream,                \
  890.                 ULONG                ulFlags,                \
  891.                 LPUNKNOWN            lpUnk,                    \
  892.                  LPSRestriction        lpRestriction,            \
  893.                  LPSPropTagArray        lpIncludeProps,            \
  894.                  LPSPropTagArray        lpExcludeProps,            \
  895.                  ULONG                ulBufferSize) IPURE;    \
  896.     MAPIMETHOD(Synchronize)                                    \
  897.         (THIS_    ULONG FAR *            lpulSteps,                \
  898.                 ULONG FAR *            lpulProgress) IPURE;    \
  899.     MAPIMETHOD(UpdateState)                                    \
  900.         (THIS_    LPSTREAM            lpStream) IPURE;
  901.  
  902. #undef         INTERFACE
  903. #define         INTERFACE  IExchangeExportChanges
  904. DECLARE_MAPI_INTERFACE_(IExchangeExportChanges, IUnknown)
  905. {
  906.     MAPI_IUNKNOWN_METHODS(PURE)
  907.     EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE)
  908. };
  909. #undef    IMPL
  910. #define IMPL
  911.  
  912. DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges, LPEXCHANGEEXPORTCHANGES);
  913.  
  914.  
  915. typedef struct _ReadState
  916. {
  917.     ULONG        cbSourceKey;
  918.     BYTE    *    pbSourceKey;
  919.     ULONG        ulFlags;
  920. } READSTATE, *LPREADSTATE;
  921.  
  922. /*------------------------------------------------------------------------
  923.  *
  924.  *    "IExchangeImportContentsChanges" Interface Declaration
  925.  *
  926.  *    Used for Incremental Synchronization of folder contents (i.e. messages)
  927.  *
  928.  *-----------------------------------------------------------------------*/
  929.  
  930.  
  931. #define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(IPURE)        \
  932.     MAPIMETHOD(GetLastError)                                        \
  933.         (THIS_    HRESULT                hResult,                        \
  934.                  ULONG                ulFlags,                        \
  935.                  LPMAPIERROR FAR *    lppMAPIError) IPURE;            \
  936.     MAPIMETHOD(Config)                                                \
  937.         (THIS_    LPSTREAM                lpStream,                    \
  938.                  ULONG                    ulFlags) IPURE;                \
  939.     MAPIMETHOD(UpdateState)                                            \
  940.         (THIS_    LPSTREAM                lpStream) IPURE;            \
  941.     MAPIMETHOD(ImportMessageChange)                                    \
  942.         (THIS_    ULONG                    cpvalChanges,                \
  943.                 LPSPropValue            ppvalChanges,                \
  944.                 ULONG                    ulFlags,                    \
  945.                 LPMESSAGE                *lppmessage) IPURE;            \
  946.     MAPIMETHOD(ImportMessageDeletion)                                \
  947.         (THIS_    ULONG                    ulFlags,                    \
  948.                  LPENTRYLIST                lpSrcEntryList) IPURE;        \
  949.     MAPIMETHOD(ImportPerUserReadStateChange)                        \
  950.         (THIS_    ULONG                    cElements,                    \
  951.                  LPREADSTATE                 lpReadState) IPURE;            \
  952.     MAPIMETHOD(ImportMessageMove)                                    \
  953.         (THIS_    ULONG                    cbSourceKeySrcFolder,        \
  954.                  BYTE FAR *                pbSourceKeySrcFolder,        \
  955.                  ULONG                    cbSourceKeySrcMessage,        \
  956.                  BYTE FAR *                pbSourceKeySrcMessage,        \
  957.                  ULONG                    cbPCLMessage,                \
  958.                  BYTE FAR *                pbPCLMessage,                \
  959.                  ULONG                    cbSourceKeyDestMessage,        \
  960.                  BYTE FAR *                pbSourceKeyDestMessage,        \
  961.                  ULONG                    cbChangeNumDestMessage,        \
  962.                  BYTE FAR *                pbChangeNumDestMessage) IPURE;
  963.  
  964.  
  965. #undef         INTERFACE
  966. #define         INTERFACE  IExchangeImportContentsChanges
  967. DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges, IUnknown)
  968. {
  969.     MAPI_IUNKNOWN_METHODS(PURE)
  970.     EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE)
  971. };
  972. #undef    IMPL
  973. #define IMPL
  974.  
  975. DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges,
  976.                            LPEXCHANGEIMPORTCONTENTSCHANGES);
  977.  
  978. /*------------------------------------------------------------------------
  979.  *
  980.  *    "IExchangeImportHierarchyChanges" Interface Declaration
  981.  *
  982.  *    Used for Incremental Synchronization of folder hierarchy
  983.  *
  984.  *-----------------------------------------------------------------------*/
  985.  
  986. #define EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(IPURE)        \
  987.     MAPIMETHOD(GetLastError)                                        \
  988.         (THIS_    HRESULT                hResult,                        \
  989.                 ULONG                 ulFlags,                        \
  990.                 LPMAPIERROR FAR *    lppMAPIError) IPURE;            \
  991.     MAPIMETHOD(Config)                                                \
  992.         (THIS_    LPSTREAM                lpStream,                    \
  993.                  ULONG                    ulFlags) IPURE;                \
  994.     MAPIMETHOD(UpdateState)                                            \
  995.         (THIS_    LPSTREAM                lpStream) IPURE;            \
  996.     MAPIMETHOD(ImportFolderChange)                                    \
  997.         (THIS_    ULONG                        cpvalChanges,            \
  998.                 LPSPropValue                ppvalChanges) IPURE;    \
  999.     MAPIMETHOD(ImportFolderDeletion)                                \
  1000.         (THIS_    ULONG                        ulFlags,                \
  1001.                  LPENTRYLIST                    lpSrcEntryList) IPURE;
  1002.  
  1003. #undef         INTERFACE
  1004. #define         INTERFACE  IExchangeImportHierarchyChanges
  1005. DECLARE_MAPI_INTERFACE_(IExchangeImportHierarchyChanges, IUnknown)
  1006. {
  1007.     MAPI_IUNKNOWN_METHODS(PURE)
  1008.     EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(PURE)
  1009. };
  1010. #undef    IMPL
  1011. #define IMPL
  1012.  
  1013. DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges,
  1014.                            LPEXCHANGEIMPORTHIERARCHYCHANGES);
  1015.  
  1016. /*------------------------------------------------------------------------
  1017.  *
  1018.  *    Errors returned by Exchange Incremental Change Synchronization Interface
  1019.  *
  1020.  *-----------------------------------------------------------------------*/
  1021.  
  1022. #define MAKE_SYNC_E(err)    (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err))
  1023. #define MAKE_SYNC_W(warn)    (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn))
  1024.  
  1025. #define SYNC_E_UNKNOWN_FLAGS            MAPI_E_UNKNOWN_FLAGS
  1026. #define SYNC_E_INVALID_PARAMETER        E_INVALIDARG
  1027. #define SYNC_E_ERROR                    E_FAIL
  1028. #define SYNC_E_OBJECT_DELETED            MAKE_SYNC_E(0x800)
  1029. #define SYNC_E_IGNORE                    MAKE_SYNC_E(0x801)
  1030. #define SYNC_E_CONFLICT                    MAKE_SYNC_E(0x802)
  1031. #define SYNC_E_NO_PARENT                MAKE_SYNC_E(0x803)
  1032. #define SYNC_E_INCEST                    MAKE_SYNC_E(0x804)
  1033. #define SYNC_E_UNSYNCHRONIZED            MAKE_SYNC_E(0x805)
  1034.  
  1035. #define SYNC_W_PROGRESS                    MAKE_SYNC_W(0x820)
  1036. #define SYNC_W_CLIENT_CHANGE_NEWER        MAKE_SYNC_W(0x821)
  1037.  
  1038. /*------------------------------------------------------------------------
  1039.  *
  1040.  *    Flags used by Exchange Incremental Change Synchronization Interface
  1041.  *
  1042.  *-----------------------------------------------------------------------*/
  1043.  
  1044. #define    SYNC_UNICODE                0x01
  1045. #define SYNC_NO_DELETIONS            0x02
  1046. #define SYNC_NO_SOFT_DELETIONS        0x04
  1047. #define    SYNC_READ_STATE                0x08
  1048. #define SYNC_ASSOCIATED                0x10
  1049. #define SYNC_NORMAL                    0x20
  1050. #define    SYNC_NO_CONFLICTS            0x40
  1051. #define SYNC_ONLY_SPECIFIED_PROPS    0x80
  1052. #define SYNC_NO_FOREIGN_KEYS        0x100
  1053. #define SYNC_LIMITED_IMESSAGE        0x200
  1054.  
  1055.  
  1056. /*------------------------------------------------------------------------
  1057.  *
  1058.  *    Flags used by ImportMessageDeletion and ImportFolderDeletion methods
  1059.  *
  1060.  *-----------------------------------------------------------------------*/
  1061.  
  1062. #define SYNC_SOFT_DELETE            0x01
  1063. #define SYNC_EXPIRY                    0x02
  1064.  
  1065. /*------------------------------------------------------------------------
  1066.  *
  1067.  *    Flags used by ImportPerUserReadStateChange method
  1068.  *
  1069.  *-----------------------------------------------------------------------*/
  1070.  
  1071. #define SYNC_READ                    0x01
  1072.  
  1073. /*------------------------------------------------------------------------
  1074.  *
  1075.  *    "IExchangeFavorites" Interface Declaration
  1076.  *
  1077.  *    Used for adding or removing favorite folders from the public store.
  1078.  *    This interface is obtained by calling QueryInterface on the folder
  1079.  *    whose EntryID is specified by PR_IPM_FAVORITES_ENTRYID on the public
  1080.  *    store.
  1081.  *
  1082.  *-----------------------------------------------------------------------*/
  1083.  
  1084. #define EXCHANGE_IEXCHANGEFAVORITES_METHODS(IPURE)                        \
  1085.     MAPIMETHOD(GetLastError)                                            \
  1086.         (THIS_    HRESULT                        hResult,                    \
  1087.                 ULONG                        ulFlags,                    \
  1088.                 LPMAPIERROR FAR *            lppMAPIError) IPURE;        \
  1089.     MAPIMETHOD(AddFavorites)                                            \
  1090.         (THIS_    LPENTRYLIST                    lpEntryList) IPURE;            \
  1091.     MAPIMETHOD(DelFavorites)                                            \
  1092.         (THIS_    LPENTRYLIST                    lpEntryList) IPURE;            \
  1093.  
  1094. #undef         INTERFACE
  1095. #define         INTERFACE  IExchangeFavorites
  1096. DECLARE_MAPI_INTERFACE_(IExchangeFavorites, IUnknown)
  1097. {
  1098.     MAPI_IUNKNOWN_METHODS(PURE)
  1099.     EXCHANGE_IEXCHANGEFAVORITES_METHODS(PURE)
  1100. };
  1101.  
  1102. DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites,    LPEXCHANGEFAVORITES);
  1103.  
  1104.  
  1105. /*------------------------------------------------------------------------
  1106.  *
  1107.  *    Properties used by the Offline Folders API
  1108.  *
  1109.  *-----------------------------------------------------------------------*/
  1110.                                               
  1111. #define PR_OFFLINE_FLAGS                PROP_TAG( PT_LONG, pidFolderMin + 0x5)
  1112. #define PR_SYNCHRONIZE_FLAGS            PROP_TAG( PT_LONG, pidExchangeNonXmitReservedMin + 0x4)
  1113.                             
  1114.  
  1115. /*------------------------------------------------------------------------
  1116.  *
  1117.  *    Flags used by the Offline Folders API
  1118.  *
  1119.  *-----------------------------------------------------------------------*/
  1120.  
  1121. #define OF_AVAILABLE_OFFLINE                    ((ULONG) 0x00000001)
  1122. #define OF_FORCE                                ((ULONG) 0x80000000)
  1123.  
  1124. #define SF_DISABLE_STARTUP_SYNC                    ((ULONG) 0x00000001)
  1125.  
  1126.  
  1127. #endif    //EDKMDB_INCLUDED
  1128.