Source code of Windows XP (NT5)
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.

163 lines
4.9 KiB

  1. /*
  2. * mdbuix.h
  3. *
  4. * Private interface between EMSMDB.DLL and EMSUIX.DLL
  5. *
  6. * Copyright (C) 1995 Microsoft Corporation
  7. */
  8. /*
  9. * This GUID changes when the version changes, disabling access to those who
  10. * don't have the right version of the header file
  11. *
  12. * NOTE: I've actually generated this GUID from 0x03 to 0x16
  13. */
  14. #ifdef _ROG_CHANGED
  15. #define MDBX_VERSION 0x0B
  16. DEFINE_GUID(IID_IMDBX,
  17. 0x2F63F100+MDBX_VERSION,0x0A2E,0x11CF,0x9F,0xED,0x00,0xAA,0x00,0xB9,0x2B,0x87);
  18. #endif // _ROGCHANGED
  19. #ifndef __MDBUIX_H_
  20. #define __MDBUIX_H_
  21. #include "wmsuix.h"
  22. typedef BOOL (CALLBACK *CREATEPROC)(STDPROG *);
  23. typedef VOID (CALLBACK *UPDATEPROC)(STDPROG *, LPSTR, INT, INT);
  24. typedef VOID (CALLBACK *DESTROYPROC)(STDPROG *, BOOL);
  25. // To get the message underlying a form
  26. typedef HRESULT (CALLBACK *GETFORMMSGPROC) (LPMAPIFORMINFO, ULONG FAR *,
  27. LPSTR lpcClass, LPMESSAGE FAR *);
  28. // Flags to the Synchronize method
  29. #define SYNC_UPLOAD_HIERARCHY 0x0001
  30. #define SYNC_DOWNLOAD_HIERARCHY 0x0002
  31. #define SYNC_UPLOAD_FAVORITES 0x0004
  32. #define SYNC_DOWNLOAD_FAVORITES 0x0008
  33. #define SYNC_UPLOAD_VIEWS 0x0010
  34. #define SYNC_DOWNLOAD_VIEWS 0x0020
  35. #define SYNC_UPLOAD_CONTENTS 0x0040
  36. #define SYNC_DOWNLOAD_CONTENTS 0x0080
  37. #define SYNC_ONE_FOLDER 0x0100
  38. #define SYNC_OUTGOING_MAIL 0x0200
  39. #define SYNC_FORMS 0x0400
  40. #define MAPI_IMDBX_METHODS(IPURE) \
  41. MAPIMETHOD(GetLastError) \
  42. (THIS_ HRESULT hResult, \
  43. ULONG ulFlags, \
  44. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  45. MAPIMETHOD_(ULONG,GetFolderType) \
  46. (THIS_ ULONG cbEntryID, \
  47. LPENTRYID pbEntryID) IPURE; \
  48. MAPIMETHOD(EditFavorites) \
  49. (THIS_ LPENTRYLIST lpEntryList, \
  50. BOOL fAdd) IPURE; \
  51. MAPIMETHOD(Synchronize) \
  52. (THIS_ ULONG ulFlags, \
  53. LPMAPISESSION pses, \
  54. ULONG cbEntryID, \
  55. LPENTRYID lpEntryID, \
  56. STDPROG FAR * lpStdProgress, \
  57. UPDATEPROC lpUpdateProc, \
  58. GETFORMMSGPROC lpFormMsgProc) IPURE; \
  59. MAPIMETHOD(OnlineStoreLogon) \
  60. (THIS_ LPMSLOGON FAR * lppMSLogon, \
  61. LPMDB FAR * lppMDB) IPURE; \
  62. MAPIMETHOD(DownloadMessage) \
  63. (THIS_ ULONG ulFlags, \
  64. LPMESSAGE lpMsgSource, \
  65. LPMESSAGE lpMsgDest) IPURE; \
  66. MAPIMETHOD_(ULONG,GetStoreType) \
  67. (THIS) IPURE; \
  68. MAPIMETHOD(GetFolderSync) \
  69. (THIS_ ULONG cbEntryID, \
  70. LPENTRYID pbEntryID, \
  71. BOOL fFull, \
  72. FLDSYNC * pfldsync) IPURE; \
  73. MAPIMETHOD(SetFolderSync) \
  74. (THIS_ ULONG cbEntryID, \
  75. LPENTRYID pbEntryID, \
  76. ULONG cbParEntryID, \
  77. LPENTRYID pbParEntryID, \
  78. BOOL fEnable) IPURE; \
  79. MAPIMETHOD(ConfigureOffline) \
  80. (THIS_ ULONG ulUIParam) IPURE; \
  81. MAPIMETHOD(DownloadComplete) \
  82. (THIS) IPURE; \
  83. MAPIMETHOD(TestActiveCount) \
  84. (THIS_ ULONG ulFlags, \
  85. ULONG FAR * pulActiveCount) IPURE; \
  86. MAPIMETHOD(GetDCName) \
  87. (THIS_ char * szDomainName, \
  88. CHAR rgchDomainController[ 16+2 ]) IPURE; \
  89. MAPIMETHOD(GetTransferredViewCount) \
  90. (THIS_ ULONG ulFlags, \
  91. ULONG FAR * pulViewCount) IPURE; \
  92. typedef struct _fldsync
  93. {
  94. ULONG ulFlags;
  95. FILETIME ftLastSync;
  96. ULONG cItemOnline;
  97. ULONG cItemOffline;
  98. ULONG cbParEntryID;
  99. BYTE rgbParEntryID[46];
  100. } FLDSYNC, * PFLDSYNC;
  101. #define FLDSYNC_UNCONFIGURED 0x00000001 // Offline store not configured
  102. #define FLDSYNC_OFFLINE 0x00000002 // Currently viewing offline store
  103. #define FLDSYNC_REPLICATED 0x00000004 // Folder is marked for replication
  104. #define FLDSYNC_NOTFOUND 0x00000008 // Folder doesn't exist offline
  105. #define FLDSYNC_DELETED 0x00000010 // Folder has been deleted offline
  106. #define FLDSYNC_SPECIAL 0x00000020 // Folder is one of special four
  107. #define FLDSYNC_HASMODS 0x00000040 // Offline folder has unsync'd mods
  108. #undef INTERFACE
  109. #define INTERFACE IMDBX
  110. DECLARE_MAPI_INTERFACE_(IMDBX, IUnknown)
  111. {
  112. BEGIN_INTERFACE
  113. MAPI_IUNKNOWN_METHODS(PURE)
  114. MAPI_IMDBX_METHODS(PURE)
  115. };
  116. DECLARE_MAPI_INTERFACE_PTR(IMDBX, LPMDBX);
  117. #define MDBX_SIG (0x50554200 + MDBX_VERSION)
  118. // Flags returned from GetFolderType
  119. #define MDBX_FTYPE_UNKNOWN 0
  120. #define MDBX_FTYPE_PUB_IPM 1
  121. #define MDBX_FTYPE_FAV_ROOT 2
  122. #define MDBX_FTYPE_FAV 3
  123. #define MDBX_FTYPE_PUB_ROOT 4
  124. #define MDBX_FTYPE_PUB 5
  125. #define MDBX_FTYPE_PRV_IPM 6
  126. #define MDBX_FTYPE_PRV 7
  127. // Flags returned from GetStoreType
  128. #define MDBX_STORE_OFFLINE 0x80000000 // This is the offline store
  129. #define MDBX_STORE_PUBLIC 0x00000001
  130. #define MDBX_STORE_PRIVATE 0x00000002
  131. #define MDBX_STORE_OST_OPEN 0x40000000 // The OST is open
  132. #ifdef WIN32
  133. #define MDBX_SIG_OFFSET 48
  134. #else
  135. #define MDBX_SIG_OFFSET 44
  136. #endif
  137. #define MDBX_GetSig(_pmdb) \
  138. (IsBadWritePtr((_pmdb), MDBX_SIG_OFFSET + sizeof(DWORD)) ? 0 : \
  139. *(DWORD *)((LPBYTE)(_pmdb) + MDBX_SIG_OFFSET))
  140. #endif