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.

614 lines
36 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Copyright (C) Microsoft Corporation, 1997-1998
  4. //
  5. // File: oestore.idl
  6. //
  7. // Contents: Outlook Express API
  8. //
  9. // History: 11-Oct-1997 SteveBailey Created
  10. //
  11. //--------------------------------------------------------------------------
  12. import "ocidl.idl";
  13. import "objidl.idl";
  14. cpp_quote("#ifndef OE5_BETA2")
  15. import "mimeole.idl";
  16. cpp_quote("#endif")
  17. //+-------------------------------------------------------------------------
  18. // Interfaces
  19. //--------------------------------------------------------------------------
  20. interface IOutlookExpress;
  21. cpp_quote("#ifndef OE5_BETA2")
  22. interface IStoreNamespace;
  23. interface IStoreFolder;
  24. cpp_quote("#endif")
  25. interface IOEMenuExtension;
  26. interface IOEExtension;
  27. cpp_quote("//+-------------------------------------------------------------------------")
  28. cpp_quote("// GUID Definitions")
  29. cpp_quote("//--------------------------------------------------------------------------")
  30. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  31. cpp_quote("")
  32. cpp_quote("// {3338DF69-4660-11d1-8A8D-00C04FB951F3}")
  33. cpp_quote("DEFINE_GUID(CLSID_OutlookExpress, 0x3338df69, 0x4660, 0x11d1, 0x8a, 0x8d, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf3);")
  34. cpp_quote("")
  35. cpp_quote("// {0006F01A-0000-0000-C000-0000000046}")
  36. cpp_quote("DEFINE_GUID(CLSID_Envelope, 0x0006F01A, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);")
  37. cpp_quote("")
  38. cpp_quote("// {3338DF6A-4660-11d1-8A8D-00C04FB951F3}")
  39. cpp_quote("DEFINE_GUID(IID_IOutlookExpress, 0x3338df6a, 0x4660, 0x11d1, 0x8a, 0x8d, 0x00, 0xc0, 0x4f, 0xb9, 0x51, 0xf3);")
  40. cpp_quote("")
  41. cpp_quote("#ifndef OE5_BETA2")
  42. cpp_quote("// {E70C92A9-4BFD-11d1-8A95-00C04FB951F3}")
  43. cpp_quote("DEFINE_GUID(CLSID_StoreNamespace, 0xe70c92a9, 0x4bfd, 0x11d1, 0x8a, 0x95, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf3);")
  44. cpp_quote("")
  45. cpp_quote("// {E70C92AA-4BFD-11d1-8A95-00C04FB951F3}")
  46. cpp_quote("DEFINE_GUID(IID_IStoreNamespace, 0xe70c92aa, 0x4bfd, 0x11d1, 0x8a, 0x95, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf3);")
  47. cpp_quote("")
  48. cpp_quote("// {E70C92AC-4BFD-11d1-8A95-00C04FB951F3}")
  49. cpp_quote("DEFINE_GUID(IID_IStoreFolder, 0xe70c92ac, 0x4bfd, 0x11d1, 0x8a, 0x95, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf3);")
  50. cpp_quote("#endif")
  51. cpp_quote("")
  52. cpp_quote("//+-------------------------------------------------------------------------")
  53. cpp_quote("// Errors Definition Macros")
  54. cpp_quote("//--------------------------------------------------------------------------")
  55. cpp_quote("#ifndef FACILITY_INTERNET")
  56. cpp_quote("#define FACILITY_INTERNET 12")
  57. cpp_quote("#endif")
  58. cpp_quote("#ifndef HR_E")
  59. cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)")
  60. cpp_quote("#endif")
  61. cpp_quote("#ifndef HR_S")
  62. cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)")
  63. cpp_quote("#endif")
  64. cpp_quote("#ifndef HR_CODE")
  65. cpp_quote("#define HR_CODE(hr) (INT)(hr & 0xffff)")
  66. cpp_quote("#endif")
  67. cpp_quote("")
  68. cpp_quote("//+-------------------------------------------------------------------------")
  69. cpp_quote("// MSOEAPI Failure Return Values")
  70. cpp_quote("//--------------------------------------------------------------------------")
  71. cpp_quote("#define MSOEAPI_E_FILE_NOT_FOUND HR_E(0xCF65)")
  72. cpp_quote("#define MSOEAPI_E_STORE_INITIALIZE HR_E(0xCF66)")
  73. cpp_quote("#define MSOEAPI_E_INVALID_STRUCT_SIZE HR_E(0xCF67)")
  74. cpp_quote("#define MSOEAPI_E_CANT_LOAD_MSOERT HR_E(0xCF68)")
  75. cpp_quote("#define MSOEAPI_E_CANT_LOAD_INETCOMM HR_E(0xCF69)")
  76. cpp_quote("#define MSOEAPI_E_CANT_LOAD_MSOEACCT HR_E(0xCF70)")
  77. cpp_quote("#define MSOEAPI_E_CANT_MSOERT_BADVER HR_E(0xCF71)")
  78. cpp_quote("#define MSOEAPI_E_CANT_INETCOMM_BADVER HR_E(0xCF72)")
  79. cpp_quote("#define MSOEAPI_E_CANT_MSOEACCT_BADVER HR_E(0xCF73)")
  80. cpp_quote("")
  81. cpp_quote("//+-------------------------------------------------------------------------")
  82. cpp_quote("// String Definition Macros")
  83. cpp_quote("//--------------------------------------------------------------------------")
  84. cpp_quote("#ifdef __cplusplus")
  85. cpp_quote("#define EXTERN_C extern \"C\"")
  86. cpp_quote("#else")
  87. cpp_quote("#define EXTERN_C extern")
  88. cpp_quote("#endif")
  89. cpp_quote("")
  90. cpp_quote("#ifndef STRCONSTA")
  91. cpp_quote("#ifdef DEFINE_STRCONST")
  92. cpp_quote("#define STRCONSTA(x,y) EXTERN_C const char x[] = y")
  93. cpp_quote("#define STRCONSTW(x,y) EXTERN_C const WCHAR x[] = L##y")
  94. cpp_quote("#else")
  95. cpp_quote("#define STRCONSTA(x,y) EXTERN_C const char x[]")
  96. cpp_quote("#define STRCONSTW(x,y) EXTERN_C const WCHAR x[]")
  97. cpp_quote("#endif STRCONSTA")
  98. cpp_quote("#endif")
  99. cpp_quote("")
  100. cpp_quote("//+-------------------------------------------------------------------------")
  101. cpp_quote("// Strings")
  102. cpp_quote("//--------------------------------------------------------------------------")
  103. cpp_quote("STRCONSTW(STRW_MSOEAPI_INSTANCECLASS, \"OutlookExpressHiddenWindow\");")
  104. cpp_quote("STRCONSTW(STRW_MSOEAPI_IPSERVERCLASS, \"OutlookExpressInProccessServer\");")
  105. cpp_quote("STRCONSTA(STR_MSOEAPI_INSTANCEMUTEX, \"OutlookExpress_InstanceMutex_101897\");")
  106. cpp_quote("STRCONSTA(STR_MSOEAPI_DLLNAME, \"MSOE.DLL\");")
  107. cpp_quote("STRCONSTA(STR_MSOEAPI_START, \"CoStartOutlookExpress\");")
  108. cpp_quote("STRCONSTA(STR_MSOEAPI_SHUTDOWN, \"CoShutdownOutlookExpress\");")
  109. cpp_quote("STRCONSTA(STR_MSOEAPI_CREATE, \"CoCreateOutlookExpress\");")
  110. cpp_quote("")
  111. cpp_quote("//+-------------------------------------------------------------------------")
  112. cpp_quote("// Function Typedefs")
  113. cpp_quote("//--------------------------------------------------------------------------")
  114. cpp_quote("typedef HRESULT (APIENTRY *PFNSTART)(DWORD dwFlags, LPCWSTR pwszCmdLine, INT nCmdShow);")
  115. cpp_quote("typedef HRESULT (APIENTRY *PFNSHUTDOWN)(DWORD dwReserved);")
  116. cpp_quote("typedef HRESULT (APIENTRY *PFNCREATE)(IUnknown *pUnkOuter, IUnknown **ppUnknown);")
  117. cpp_quote("")
  118. //+-------------------------------------------------------------------------
  119. // Constants
  120. //--------------------------------------------------------------------------
  121. const DWORD MSOEAPI_ACDM_CMDLINE = 1;
  122. const DWORD MSOEAPI_ACDM_NOTIFY = 2;
  123. const DWORD MSOEAPI_ACDM_ODBNOTIFY = 3;
  124. const DWORD MSOEAPI_ACDM_STGNOTIFY = 4;
  125. //+-------------------------------------------------------------------------
  126. // DECLARE_HANDLE Macro
  127. //--------------------------------------------------------------------------
  128. #ifndef DECLARE_HANDLE
  129. #define DECLARE_HANDLE(name) \
  130. struct name##__ { DWORD unused; }; \
  131. typedef struct name##__ _far* name
  132. #endif
  133. //+-------------------------------------------------------------------------
  134. // HENUMSTORE
  135. //--------------------------------------------------------------------------
  136. cpp_quote("#ifndef OE5_BETA2")
  137. DECLARE_HANDLE(HENUMSTORE);
  138. typedef HENUMSTORE *LPHENUMSTORE;
  139. cpp_quote("#endif // OE5_BETA2")
  140. //+-------------------------------------------------------------------------
  141. //
  142. // Copyright (C) Microsoft Corporation, 1995-1998.
  143. //
  144. // Contents: IOutlookExpress
  145. //
  146. // History: 11-Oct-1997 SteveBailey Created
  147. //
  148. //--------------------------------------------------------------------------
  149. cpp_quote("#ifndef __LPOUTLOOKEXPRESS_DEFINED")
  150. cpp_quote("#define __LPOUTLOOKEXPRESS_DEFINED")
  151. [
  152. object,
  153. uuid(3338DF6A-4660-11d1-8A8D-00C04FB951F3),
  154. pointer_default(unique)
  155. ]
  156. interface IOutlookExpress : IUnknown
  157. {
  158. typedef IOutlookExpress *LPOUTLOOKEXPRESS;
  159. //+---------------------------------------------------------------------
  160. // Flags used in IOutlookExpress::Start
  161. //----------------------------------------------------------------------
  162. cpp_quote("#define MSOEAPI_START_SHOWSPLASH 0x00000001")
  163. cpp_quote("#define MSOEAPI_START_MESSAGEPUMP 0x00000002")
  164. cpp_quote("#define MSOEAPI_START_ALLOWCOMPACTION 0x00000004")
  165. cpp_quote("#define MSOEAPI_START_INSTANCEMUTEX 0x00000008")
  166. cpp_quote("#define MSOEAPI_START_SHOWERRORS 0x00000010")
  167. cpp_quote("#define MSOEAPI_START_APPWINDOW 0x00000020")
  168. cpp_quote("#define MSOEAPI_START_DEFAULTIDENTITY 0x00000040")
  169. cpp_quote("#define MSOEAPI_START_ALREADY_RUNNING 0x00000080")
  170. cpp_quote("#define MSOEAPI_START_STOREVALIDNODELETE 0x00000100")
  171. //+---------------------------------------------------------------------
  172. // MSOEAPI_START_APPLICATION
  173. //----------------------------------------------------------------------
  174. cpp_quote("#define MSOEAPI_START_APPLICATION \\")
  175. cpp_quote(" (MSOEAPI_START_SHOWSPLASH | \\")
  176. cpp_quote(" MSOEAPI_START_SHOWERRORS | \\")
  177. cpp_quote(" MSOEAPI_START_MESSAGEPUMP | \\")
  178. cpp_quote(" MSOEAPI_START_ALLOWCOMPACTION | \\")
  179. cpp_quote(" MSOEAPI_START_INSTANCEMUTEX | \\")
  180. cpp_quote(" MSOEAPI_START_APPWINDOW)")
  181. //+---------------------------------------------------------------------
  182. // MSOEAPI_START_COMOBJECT
  183. //----------------------------------------------------------------------
  184. cpp_quote("#define MSOEAPI_START_COMOBJECT \\")
  185. cpp_quote(" MSOEAPI_START_SHOWERRORS")
  186. //+---------------------------------------------------------------------
  187. // Methods
  188. //----------------------------------------------------------------------
  189. HRESULT Start(
  190. [in] DWORD dwFlags,
  191. [in] LPCWSTR pwszCmdLine,
  192. [in] INT nCmdShow);
  193. }
  194. cpp_quote("#endif")
  195. cpp_quote("#ifndef OE5_BETA2")
  196. //+-------------------------------------------------------------------------
  197. //
  198. // Copyright (C) Microsoft Corporation, 1995-1998.
  199. //
  200. // Contents: IStoreNamespace
  201. //
  202. // History: 11-Oct-1997 SteveBailey Created
  203. //
  204. //--------------------------------------------------------------------------
  205. cpp_quote("#ifndef __LPSTORENAMESPACE_DEFINED")
  206. cpp_quote("#define __LPSTORENAMESPACE_DEFINED")
  207. [
  208. object,
  209. uuid(E70C92AA-4BFD-11d1-8A95-00C04FB951F3),
  210. pointer_default(unique)
  211. ]
  212. interface IStoreNamespace : IUnknown
  213. {
  214. typedef IStoreNamespace *LPSTORENAMESPACE;
  215. //+---------------------------------------------------------------------
  216. // STOREFOLDERID - folderIds are persistable
  217. //----------------------------------------------------------------------
  218. typedef DWORD STOREFOLDERID;
  219. typedef STOREFOLDERID *LPSTOREFOLDERID;
  220. //+---------------------------------------------------------------------
  221. // Some Special FOLDER Values
  222. //----------------------------------------------------------------------
  223. const DWORD FOLDERID_ROOT = 0;
  224. const DWORD FOLDERID_INVALID = -1;
  225. //+---------------------------------------------------------------------
  226. // MESSAGEID
  227. //----------------------------------------------------------------------
  228. typedef DWORD MESSAGEID;
  229. typedef MESSAGEID *LPMESSAGEID;
  230. //+---------------------------------------------------------------------
  231. // Some Special MESSAGEID values
  232. //----------------------------------------------------------------------
  233. const DWORD MESSAGEID_INVALID = -1;
  234. const DWORD MESSAGEID_FIRST = -1;
  235. //+---------------------------------------------------------------------
  236. // Consts
  237. //----------------------------------------------------------------------
  238. const DWORD CCHMAX_FOLDER_NAME = 256;
  239. //+---------------------------------------------------------------------
  240. // Notification Messages
  241. //----------------------------------------------------------------------
  242. cpp_quote("#define WM_FOLDERNOTIFY (WM_USER + 1600) // IStoreNamespace Notification - lparam=LPFOLDERNOTIFYEX, client must call CoTaskMemFree(lParam)")
  243. cpp_quote("#define WM_NEWMSGS (WM_USER + 1650) // IStoreFolder Notification: wParam=MESSAGEID, lParam=Reserved")
  244. cpp_quote("#define WM_DELETEMSGS (WM_USER + 1651) // IStoreFolder Notification: wParam=prgdwMsgId, lParam=cMsgs")
  245. cpp_quote("#define WM_DELETEFOLDER (WM_USER + 1652) // IStoreFolder Notification: wParam=STOREFOLDERID or HFOLDER")
  246. // If wParam is equal to 0xffffffff then that means that all messages in the folder
  247. // were either marked as read (WM_MARKEDASREAD) or unread (WM_MARKEDASUNREAD)
  248. cpp_quote("#define WM_MARKEDASREAD (WM_USER + 1653) // IStoreFolder Notification: wParamprgdwMsgId, lParam=cMsgs")
  249. cpp_quote("#define WM_MARKEDASUNREAD (WM_USER + 1654) // IStoreFolder Notification: wParamprgdwMsgId, lParam=cMsgs")
  250. //+---------------------------------------------------------------------
  251. // FOLDERNOTIFYTYPE
  252. //----------------------------------------------------------------------
  253. typedef enum tagFOLDERNOTIFYTYPE {
  254. NEW_FOLDER = 1,
  255. DELETE_FOLDER,
  256. RENAME_FOLDER,
  257. MOVE_FOLDER,
  258. UNREAD_CHANGE,
  259. IMAPFLAG_CHANGE,
  260. UPDATEFLAG_CHANGE,
  261. FOLDER_PROPS_CHANGED
  262. } FOLDERNOTIFYTYPE;
  263. //+---------------------------------------------------------------------
  264. // FOLDERNOTIFYEX
  265. //----------------------------------------------------------------------
  266. typedef struct tagFOLDERNOTIFYEX {
  267. FOLDERNOTIFYTYPE type;
  268. STOREFOLDERID idFolderOld; // not used for CREATEFOLDER and DELETEFOLDER
  269. STOREFOLDERID idFolderNew;
  270. } FOLDERNOTIFYEX, *LPFOLDERNOTIFYEX;
  271. //+---------------------------------------------------------------------
  272. // MESSAGEIDLIST - A list of message ids (DWORDs)
  273. //----------------------------------------------------------------------
  274. typedef struct tagMESSAGEIDLIST {
  275. DWORD cbSize; // Sizeof this structure
  276. DWORD cMsgs; // Number of elements in prghMessage
  277. LPMESSAGEID prgdwMsgId; // Array of handles to messages
  278. } MESSAGEIDLIST, *LPMESSAGEIDLIST;
  279. //+---------------------------------------------------------------------
  280. // SPECIALFOLDER - How to identify a special folder
  281. //----------------------------------------------------------------------
  282. typedef enum tagSPECIALFOLDER {
  283. FOLDER_NOTSPECIAL = -1, // Not a special folder
  284. FOLDER_INBOX, // Default receive folder
  285. FOLDER_OUTBOX, // Default send folder
  286. FOLDER_SENT, // Things that have been sent
  287. FOLDER_DELETED, // Things that have been deleted
  288. FOLDER_DRAFT, // Things that are in progress
  289. FOLDER_MAX // Don't use
  290. } SPECIALFOLDER;
  291. //+---------------------------------------------------------------------
  292. // FOLDERPROPS - Properties of a folder
  293. //----------------------------------------------------------------------
  294. typedef struct tagFOLDERPROPS {
  295. DWORD cbSize; // Size of this structure
  296. STOREFOLDERID dwFolderId; // Handle of this folder
  297. INT cSubFolders; // Number of sub-folders
  298. SPECIALFOLDER sfType; // Special folder type
  299. DWORD cUnread; // Number of un-read messages
  300. DWORD cMessage; // Total # of messages
  301. CHAR szName[CCHMAX_FOLDER_NAME]; // The Folder Name
  302. } FOLDERPROPS, *LPFOLDERPROPS;
  303. //+---------------------------------------------------------------------
  304. // Methods
  305. //----------------------------------------------------------------------
  306. HRESULT Initialize( // Initialize the object
  307. [in] HWND hwndOwner, // Window owner for things like compaction dialog
  308. [in] DWORD dwReserved); // Reserved for future use
  309. HRESULT GetDirectory( // Get the location of the store (filepath)
  310. [in,out,size_is(cchMaxPath)] LPSTR pszPath, // Buffer to put path of store into
  311. [in] DWORD cchMaxPath); // in: byte count size of pszPath, out: char count size of pszPath
  312. HRESULT OpenSpecialFolder(
  313. [in] SPECIALFOLDER sfType, // Special folder type
  314. [in] DWORD dwReserved, // Reserved for future use
  315. [out] IStoreFolder **ppFolder); // Pointer to an IStoreFolder
  316. HRESULT OpenFolder(
  317. [in] STOREFOLDERID dwFolderId, // Folder to open
  318. [in] DWORD dwReserved, // Reserved for future use
  319. [out] IStoreFolder **ppFolder); // Pointer to an IStoreFolder
  320. HRESULT CreateFolder(
  321. [in] STOREFOLDERID dwParentId, // Parent of the new folder, can use FOLDERID_ROOT
  322. [in] LPCSTR pszName, // Name of new folder, must be less than MAX_FOLDER_NAME
  323. [in] DWORD dwReserved, // Reserved for future use
  324. [out] LPSTOREFOLDERID pdwFolderId); // Handle to the new folder
  325. HRESULT RenameFolder(
  326. [in] STOREFOLDERID dwFolderId, // Folder to rename
  327. [in] DWORD dwReserved, // Reserved for future use
  328. [in] LPCSTR pszNewName); // New folder name, must be less than MAX_FOLDER_NAME
  329. HRESULT MoveFolder(
  330. [in] STOREFOLDERID dwFolderId, // Folder to move
  331. [in] STOREFOLDERID dwParentId, // FolderId of the new Parent
  332. [in] DWORD dwReserved); // Reserved for future use
  333. HRESULT DeleteFolder(
  334. [in] STOREFOLDERID dwFolderId, // Folder to delete
  335. [in] DWORD dwReserved); // Reserved for future use
  336. HRESULT GetFolderProps(
  337. [in] STOREFOLDERID dwFolderId, // FolderId to get info for
  338. [in] DWORD dwReserved, // Reserved for future use
  339. [in,out] LPFOLDERPROPS pProps); // in: set cbSize, out: Holds folder information
  340. cpp_quote("// CLocalStore::CopyMoveMessages flags - dwFlags == 0 is copy")
  341. cpp_quote("#define CMF_MOVE 0x0001 // msgs deleted from src fldr after copy")
  342. cpp_quote("#define CMF_DELETE 0x0002 // same as CMF_MOVE but uses delete string for status")
  343. HRESULT CopyMoveMessages(
  344. [in] IStoreFolder *pSource, // Source store folder
  345. [in] IStoreFolder *pDest, // Destination Store Folder
  346. [in] LPMESSAGEIDLIST pMsgIdList, // List of MESSAGEIDs to move/copy
  347. [in] DWORD dwFlags, // CMF_xxx Flags
  348. [in] DWORD dwFlagsRemove, // MSG_xxx Flags to remove from copied/moved messages
  349. [in] IProgressNotify *pProgress); // Store progress callback (client implements)
  350. HRESULT RegisterNotification(
  351. [in] DWORD dwReserved, // Reserved for future use
  352. [in] HWND hwnd); // Handle to window to send notifications
  353. HRESULT UnregisterNotification(
  354. [in] DWORD dwReserved, // Reserved for future use
  355. [in] HWND hwnd); // Handle to window to un-register for notifications
  356. HRESULT CompactAll( // Compacts all folders in the store
  357. [in] DWORD dwReserved); // Reserved for future use
  358. HRESULT GetFirstSubFolder( // Enumerate sub folders
  359. [in] STOREFOLDERID dwFolderId, // Pass FOLDERID_ROOT to enum root folders
  360. [in,out] LPFOLDERPROPS pProps, // If function succeeds, contents are valid
  361. [out] LPHENUMSTORE phEnum); // Use in call to GetNextSubFolder, and then GetSubFolderClose
  362. HRESULT GetNextSubFolder( // Get the next subfolder, returns S_FALSE if no more folders
  363. [in] HENUMSTORE hEnum, // Handle received from GetFirstSubFolder
  364. [in,out] LPFOLDERPROPS pProps); // If function returns S_OK, contains folder properties
  365. HRESULT GetSubFolderClose( // Closes the handle associated with a folder enumeration
  366. [in] HENUMSTORE hEnum); // Handle received from GetFirstSubFolder
  367. }
  368. cpp_quote("#endif")
  369. //+-------------------------------------------------------------------------
  370. //
  371. // Copyright (C) Microsoft Corporation, 1995-1998.
  372. //
  373. // Contents: IStoreFolder
  374. //
  375. // History: 11-Oct-1997 SteveBailey Created
  376. //
  377. //--------------------------------------------------------------------------
  378. cpp_quote("#ifndef __LPSTOREFOLDER_DEFINED")
  379. cpp_quote("#define __LPSTOREFOLDER_DEFINED")
  380. [
  381. object,
  382. uuid(E70C92AC-4BFD-11d1-8A95-00C04FB951F3),
  383. pointer_default(unique)
  384. ]
  385. interface IStoreFolder : IUnknown
  386. {
  387. typedef IStoreFolder *LPSTOREFOLDER;
  388. //+---------------------------------------------------------------------
  389. // Message State Flags used in MESSAGEINFO::dwState
  390. //----------------------------------------------------------------------
  391. cpp_quote("#define MSG_DELETED 0x0001 // The message has been deleted, compaction will remove it")
  392. cpp_quote("#define MSG_UNREAD 0x0002 // The message is marked as un-read")
  393. cpp_quote("#define MSG_SUBMITTED 0x0004 // For messages waiting to be sent: OUTBOX ONLY")
  394. cpp_quote("#define MSG_UNSENT 0x0008 // For msgs-in-progress saved to a folder")
  395. cpp_quote("#define MSG_RECEIVED 0x0010 // For messages that came from a server")
  396. cpp_quote("#define MSG_NEWSMSG 0x0020 // For news messages")
  397. cpp_quote("#define MSG_NOSECUI 0x0040 // For messages where the user wants to die")
  398. cpp_quote("#define MSG_VOICEMAIL 0x0080 // The message has the X-Voicemail header set...")
  399. cpp_quote("#define MSG_REPLIED 0x0100 // The message has been replied to")
  400. cpp_quote("#define MSG_FORWARDED 0x0200 // The message has been forwarded to")
  401. cpp_quote("#define MSG_RCPTSENT 0x0400 // S/MIME Receipt has been sent")
  402. cpp_quote("#define MSG_FLAGGED 0x0800 // The message is currently flags")
  403. cpp_quote("#define MSG_LAST 0x0200 // ** Keep this puppy updated!! **")
  404. cpp_quote("#define MSG_EXTERNAL_FLAGS 0x00fe")
  405. cpp_quote("#define MSG_FLAGS 0x000f")
  406. //+---------------------------------------------------------------------
  407. // MESSAGEPROPS
  408. //----------------------------------------------------------------------
  409. typedef struct tagMESSAGEPROPS {
  410. DWORD cbSize; // Size of this structure
  411. DWORD dwReserved; // Reserved don't use
  412. MESSAGEID dwMessageId; // Handle to this message
  413. DWORD dwLanguage; // Codepage of this message
  414. DWORD dwState; // MSG_xxx Flags
  415. // Things you don't get when MSGPROPS_FAST
  416. DWORD cbMessage; // Size of the message
  417. IMSGPRIORITY priority; // Message Priority
  418. FILETIME ftReceived; // When the message was received
  419. FILETIME ftSent; // When the message was sent
  420. LPSTR pszSubject; // The subject of the message
  421. LPSTR pszDisplayTo; // The display to line of the message
  422. LPSTR pszDisplayFrom; // The display from line of the message
  423. LPSTR pszNormalSubject; // The normalized subject of the message
  424. DWORD dwFlags; // IMF_xxx Flags defined in mimeole.idl
  425. IStream *pStmOffsetTable; // Use with IMimeMessage::LoadOffsetTable
  426. } MESSAGEPROPS, *LPMESSAGEPROPS;
  427. //+---------------------------------------------------------------------
  428. // HBATCHLOCK
  429. //----------------------------------------------------------------------
  430. DECLARE_HANDLE(HBATCHLOCK);
  431. typedef HBATCHLOCK *LPHBATCHLOCK;
  432. //+---------------------------------------------------------------------
  433. // Method
  434. //----------------------------------------------------------------------
  435. HRESULT GetFolderProps( // Get folder info for this folder
  436. [in] DWORD dwReserved, // Reserved for future use
  437. [in,out] LPFOLDERPROPS pProps); // in: set cbSize, out: contains folder information
  438. cpp_quote("#define MSGPROPS_FAST 0x00000001 // See MESSAGEPROPS structure, improved performance")
  439. HRESULT GetMessageProps(
  440. [in] MESSAGEID dwMessageId, // Message Identifier
  441. [in] DWORD dwFlags, // GETMSGINFO_xxx Flags
  442. [in,out] LPMESSAGEPROPS pProps); // Message Info - set cbSize before calling
  443. HRESULT FreeMessageProps( // Handles the case where pMsgInfo->dwMask has MIP_BYREF
  444. [in,out] LPMESSAGEPROPS pProps); // Pointer to MESSAGEINFO structure to free
  445. HRESULT DeleteMessages(
  446. [in] LPMESSAGEIDLIST pMsgIdList, // List of HMESSAGEs
  447. [in] DWORD dwReserved, // Reserved for future use
  448. [in] IProgressNotify *pProgress); // Progress information
  449. HRESULT SetLanguage(
  450. [in] DWORD dwLanguage, // MLANG Codepage ID of message
  451. [in] DWORD dwReserved, // Reserved for future use
  452. [in] LPMESSAGEIDLIST pMsgIdList); // List of HMESSAGEs to apply new language to
  453. HRESULT MarkMessagesAsRead(
  454. [in] BOOL fRead, // Mark as Read or Unread
  455. [in] DWORD dwReserved, // Reserved for future use
  456. [in] LPMESSAGEIDLIST pMsgIdList); // List of HMESSAGEs to mark as (un)read
  457. HRESULT SetFlags( // Modify the flags of a message
  458. [in] LPMESSAGEIDLIST pMsgIdList, // Array of messages to modify flags for
  459. [in] DWORD dwState, // MSG_xxx Flags to set on pMsgIdList
  460. [in] DWORD dwStatemask, // ?????
  461. [out] LPDWORD prgdwNewFlags); // Array of new message state flags that match pMsgIdList array
  462. HRESULT OpenMessage( // Open a message (get a stream or a message object)
  463. [in] MESSAGEID dwMessageId, // Handle to the message to open
  464. [in] REFIID riid, // IID_IStream or IID_IMimeMessage stream is readonly
  465. [out,iid_is(riid)] LPVOID *ppvObject); // The object, you must ->Release it
  466. HRESULT SaveMessage( // Add a new entry to a folder.
  467. [in] REFIID riid, // IID_IStream or IID_IMimeMessage
  468. [in,iid_is(riid)] LPVOID pvObject, // Pointer to a stream or mime message
  469. [in] DWORD dwMsgFlags, // MSG_xxx Flags
  470. [out] LPMESSAGEID pdwMessageId); // Handle to the new message
  471. HRESULT BatchLock( // Lock to prepare for a batch operation
  472. [in] DWORD dwReserved, // Reserved for future use
  473. [out] LPHBATCHLOCK phBatchLock); // Handle to newly created lock
  474. HRESULT BatchFlush( // Flush the current batch operation
  475. [in] DWORD dwReserved, // Reserved for future use
  476. [in] HBATCHLOCK hBatchLock); // Folder lock obtained from BatchLock
  477. HRESULT BatchUnlock( // Unlocks a batched operation
  478. [in] DWORD dwReserved, // Reserved for future use
  479. [in] HBATCHLOCK hBatchLock); // Handle to lock obtained from BatchLock
  480. HRESULT CreateStream( // Create a new stream in a folder
  481. [in] HBATCHLOCK hBatchLock, // Handle to a folder lock, optional if doing a one-of
  482. [in] DWORD dwReserved, // Reserved for future use
  483. [out] IStream **ppStream, // Pointer to new stream can be used for read/write
  484. [out] LPMESSAGEID pdwMessageId); // Handle to the new message
  485. cpp_quote("#define COMMITSTREAM_REVERT 0x00000001 // Don't add this stream/message to the folder")
  486. HRESULT CommitStream( // Commit/Revert a stream created with CreateStream
  487. [in] HBATCHLOCK hBatchLock, // Folder lock obtained from BatchLock
  488. [in] DWORD dwFlags, // COMMITSTREAM_xxx Flags
  489. [in] DWORD dwMsgFlags, // MSG_xxx Flags
  490. [in] IStream *pStream, // Stream obtained from CreateStream
  491. [in] MESSAGEID dwMessageId, // dwMessageId obtained from CreateStream
  492. [in] IMimeMessage *pMessage); // Message to commit, if not passed in, pStream will be pared.
  493. HRESULT RegisterNotification(
  494. [in] DWORD dwReserved, // Reserved for future use
  495. [in] HWND hwnd); // Handle to window to send notifications
  496. HRESULT UnregisterNotification(
  497. [in] DWORD dwReserved, // Reserved for future use
  498. [in] HWND hwnd); // Handle to window to un-register for notifications
  499. HRESULT Compact( // Compacts this folder
  500. [in] DWORD dwReserved); // Reserved for future use
  501. HRESULT GetFirstMessage( // Get the first message in a folder
  502. [in] DWORD dwFlags, // MSGPROPS_xxx Flags
  503. [in] DWORD dwMsgFlags, // MSG_xxx Flags to enumerate on, pass 0 for none
  504. [in] MESSAGEID dwMsgIdFirst, // MessageId to start enumerating at, Use MESSAGEID_FIRST
  505. [in,out] LPMESSAGEPROPS pProps, // When function returns S_OK, contains message properties
  506. [out] LPHENUMSTORE phEnum); // Upon successful return, contains handle to enumeration
  507. HRESULT GetNextMessage( // Get the next message in the enumeration
  508. [in] HENUMSTORE hEnum, // Handle to the enumeration received in GetFirstMessage
  509. [in] DWORD dwFlags, // MSGPROPS_xxx Flags
  510. [in,out] LPMESSAGEPROPS pProps); // When function returns S_OK, contains message properties
  511. HRESULT GetMessageClose(
  512. [in] HENUMSTORE hEnum); // Handle to the enumeration received in GetFirstMessage
  513. }
  514. cpp_quote("#endif")
  515. cpp_quote("#endif // OE5_BETA2")
  516. cpp_quote("//+-------------------------------------------------------------------------")
  517. cpp_quote("// Outlook Express Exported C API Functions")
  518. cpp_quote("//--------------------------------------------------------------------------")
  519. cpp_quote("#ifdef __cplusplus")
  520. cpp_quote("extern \"C\" {")
  521. cpp_quote("#endif")
  522. cpp_quote("")
  523. cpp_quote("//+-------------------------------------------------------------------------")
  524. cpp_quote("// API Name Decoration")
  525. cpp_quote("//--------------------------------------------------------------------------")
  526. cpp_quote("#if !defined(_MSOEAPI_)")
  527. cpp_quote("#define MSOEAPI DECLSPEC_IMPORT HRESULT WINAPI")
  528. cpp_quote("#define MSOEAPI_(_type_) DECLSPEC_IMPORT _type_ WINAPI")
  529. cpp_quote("#else")
  530. cpp_quote("#define MSOEAPI HRESULT WINAPI")
  531. cpp_quote("#define MSOEAPI_(_type_) _type_ WINAPI")
  532. cpp_quote("#endif")
  533. cpp_quote("")
  534. cpp_quote("//+-------------------------------------------------------------------------")
  535. cpp_quote("// Prototypes")
  536. cpp_quote("//--------------------------------------------------------------------------")
  537. cpp_quote("MSOEAPI CoStartOutlookExpress(")
  538. cpp_quote(" /* IN */ DWORD dwFlags,")
  539. cpp_quote(" /* IN */ LPWSTR pwszCmdLine,")
  540. cpp_quote(" /* IN */ INT nCmdShow);")
  541. cpp_quote("")
  542. cpp_quote("MSOEAPI CoCreateOutlookExpress(")
  543. cpp_quote(" /* IN */ IUnknown *pUnkOuter,")
  544. cpp_quote(" /* OUT */ IUnknown **ppUnknown);")
  545. cpp_quote("")
  546. cpp_quote("#ifdef __cplusplus")
  547. cpp_quote("}")
  548. cpp_quote("#endif")