Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

213 lines
4.4 KiB

  1. /*
  2. * GLOBALS.C
  3. *
  4. * Global constant structures
  5. *
  6. */
  7. #define _GLOBALS_C
  8. #include "_apipch.h"
  9. // Columns of the Root Contents Table
  10. //
  11. const SizedSPropTagArray(ircMax, ITableColumnsRoot) = {
  12. ircMax, // count of entries
  13. {
  14. PR_DISPLAY_NAME,
  15. PR_DISPLAY_TYPE,
  16. PR_ENTRYID,
  17. PR_INSTANCE_KEY,
  18. PR_OBJECT_TYPE,
  19. PR_RECORD_KEY,
  20. PR_ROWID,
  21. PR_DEPTH,
  22. PR_CONTAINER_FLAGS,
  23. PR_AB_PROVIDER_ID,
  24. PR_WAB_LDAP_SERVER,
  25. PR_WAB_RESOLVE_FLAG,
  26. }
  27. };
  28. //
  29. // Default set of properties to return from a ResolveNames.
  30. // May be overridden by passing in lptagaColSet to ResolveNames.
  31. //
  32. const SizedSPropTagArray(irdMax, ptaResolveDefaults)=
  33. {
  34. irdMax,
  35. {
  36. PR_ADDRTYPE,
  37. PR_DISPLAY_NAME,
  38. PR_EMAIL_ADDRESS,
  39. PR_ENTRYID,
  40. PR_OBJECT_TYPE,
  41. PR_RECORD_KEY,
  42. PR_SEARCH_KEY,
  43. PR_SURNAME,
  44. PR_GIVEN_NAME,
  45. PR_INSTANCE_KEY,
  46. PR_SEND_INTERNET_ENCODING
  47. }
  48. };
  49. // default set of regular table columns
  50. //
  51. const SizedSPropTagArray(itcMax, ITableColumns) = {
  52. itcMax, // count of entries
  53. {
  54. PR_ADDRTYPE,
  55. PR_DISPLAY_NAME,
  56. PR_DISPLAY_TYPE,
  57. PR_ENTRYID,
  58. PR_INSTANCE_KEY,
  59. PR_OBJECT_TYPE,
  60. PR_EMAIL_ADDRESS,
  61. PR_RECORD_KEY,
  62. PR_NICKNAME,
  63. //PR_WAB_THISISME
  64. }
  65. };
  66. // [PaulHi] 2/25/99 ANSI version of ITableColumns
  67. const SizedSPropTagArray(itcMax, ITableColumns_A) =
  68. {
  69. itcMax,
  70. {
  71. PR_ADDRTYPE_A,
  72. PR_DISPLAY_NAME_A,
  73. PR_DISPLAY_TYPE,
  74. PR_ENTRYID,
  75. PR_INSTANCE_KEY,
  76. PR_OBJECT_TYPE,
  77. PR_EMAIL_ADDRESS_A,
  78. PR_RECORD_KEY,
  79. PR_NICKNAME_A,
  80. //PR_WAB_THISISME
  81. }
  82. };
  83. const SizedSPropTagArray(iwdesMax, tagaDLEntriesProp) =
  84. {
  85. iwdesMax,
  86. {
  87. PR_WAB_DL_ENTRIES,
  88. }
  89. };
  90. const SizedSPropTagArray(ildapcMax, ptaLDAPCont) =
  91. {
  92. ildapcMax,
  93. {
  94. PR_WAB_LDAP_SERVER
  95. }
  96. };
  97. //
  98. // Properties to get for each container in a Resolve
  99. //
  100. const SizedSPropTagArray(irnMax, irnColumns) =
  101. {
  102. irnMax,
  103. {
  104. PR_OBJECT_TYPE,
  105. PR_WAB_RESOLVE_FLAG,
  106. PR_ENTRYID,
  107. PR_DISPLAY_NAME,
  108. }
  109. };
  110. //
  111. // container default properties
  112. // Put essential props first
  113. //
  114. const SizedSPropTagArray(ivMax, tagaValidate) = {
  115. ivMax,
  116. {
  117. PR_DISPLAY_NAME,
  118. PR_SURNAME,
  119. PR_GIVEN_NAME,
  120. PR_OBJECT_TYPE,
  121. PR_EMAIL_ADDRESS,
  122. PR_ADDRTYPE,
  123. PR_CONTACT_EMAIL_ADDRESSES,
  124. PR_CONTACT_ADDRTYPES,
  125. PR_MIDDLE_NAME,
  126. PR_COMPANY_NAME,
  127. PR_NICKNAME
  128. }
  129. };
  130. // Default creation templates for the WAB
  131. //
  132. const SizedSPropTagArray(icrMax, ptaCreate)=
  133. {
  134. icrMax,
  135. {
  136. PR_DEF_CREATE_MAILUSER,
  137. PR_DEF_CREATE_DL,
  138. }
  139. };
  140. const SizedSPropTagArray(ieidMax, ptaEid)=
  141. {
  142. ieidMax,
  143. {
  144. PR_DISPLAY_NAME,
  145. PR_ENTRYID,
  146. }
  147. };
  148. //
  149. // IMPORTANT NOTE: If you change this array, you must change
  150. // _IndexType in mpswab.h to match!
  151. //
  152. // This is the set of Indexes from the WAB Data store and is closely
  153. // tied to the physical layout of data in the WAB store - therefore
  154. // *Do NOT* modify this array
  155. //
  156. const ULONG rgIndexArray[indexMax] =
  157. {
  158. PR_ENTRYID,
  159. PR_DISPLAY_NAME,
  160. PR_SURNAME,
  161. PR_GIVEN_NAME,
  162. PR_EMAIL_ADDRESS,
  163. PR_NICKNAME,
  164. };
  165. //
  166. // IMPORTANT NOTE: If you change this, you must change _AddrBookColumns in uimisc.h!
  167. //
  168. const int lprgAddrBookColHeaderIDs[NUM_COLUMNS] =
  169. {
  170. idsColDisplayName,
  171. idsColEmailAddress,
  172. idsColOfficePhone,
  173. idsColHomePhone
  174. };
  175. // External memory allocators (passed in on WABOpenEx)
  176. int g_nExtMemAllocCount = 0;
  177. ALLOCATEBUFFER * lpfnAllocateBufferExternal = NULL;
  178. ALLOCATEMORE * lpfnAllocateMoreExternal = NULL;
  179. FREEBUFFER * lpfnFreeBufferExternal = NULL;
  180. LPUNKNOWN pmsessOutlookWabSPI = NULL;
  181. LPWABOPENSTORAGEPROVIDER lpfnWABOpenStorageProvider = NULL;
  182. // for registry property tags
  183. LPTSTR szPropTag1 = TEXT("PropTag1");
  184. LPTSTR szPropTag2 = TEXT("PropTag2");
  185. // registry key constants
  186. LPCTSTR lpNewWABRegKey = TEXT("Software\\Microsoft\\WAB\\WAB4");
  187. LPCTSTR lpRegUseOutlookVal = TEXT("UseOutlook");