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.

612 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("STRCONSTA(STR_MSOEAPI_INSTANCECLASS, \"OutlookExpressHiddenWindow\");")
  104. cpp_quote("STRCONSTA(STR_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, LPCSTR pszCmdLine, 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. //+---------------------------------------------------------------------
  170. // MSOEAPI_START_APPLICATION
  171. //----------------------------------------------------------------------
  172. cpp_quote("#define MSOEAPI_START_APPLICATION \\")
  173. cpp_quote(" (MSOEAPI_START_SHOWSPLASH | \\")
  174. cpp_quote(" MSOEAPI_START_SHOWERRORS | \\")
  175. cpp_quote(" MSOEAPI_START_MESSAGEPUMP | \\")
  176. cpp_quote(" MSOEAPI_START_ALLOWCOMPACTION | \\")
  177. cpp_quote(" MSOEAPI_START_INSTANCEMUTEX | \\")
  178. cpp_quote(" MSOEAPI_START_APPWINDOW)")
  179. //+---------------------------------------------------------------------
  180. // MSOEAPI_START_COMOBJECT
  181. //----------------------------------------------------------------------
  182. cpp_quote("#define MSOEAPI_START_COMOBJECT \\")
  183. cpp_quote(" MSOEAPI_START_SHOWERRORS")
  184. //+---------------------------------------------------------------------
  185. // Methods
  186. //----------------------------------------------------------------------
  187. HRESULT Start(
  188. [in] DWORD dwFlags,
  189. [in] LPCSTR pszCmdLine,
  190. [in] INT nCmdShow);
  191. }
  192. cpp_quote("#endif")
  193. cpp_quote("#ifndef OE5_BETA2")
  194. //+-------------------------------------------------------------------------
  195. //
  196. // Copyright (C) Microsoft Corporation, 1995-1998.
  197. //
  198. // Contents: IStoreNamespace
  199. //
  200. // History: 11-Oct-1997 SteveBailey Created
  201. //
  202. //--------------------------------------------------------------------------
  203. cpp_quote("#ifndef __LPSTORENAMESPACE_DEFINED")
  204. cpp_quote("#define __LPSTORENAMESPACE_DEFINED")
  205. [
  206. object,
  207. uuid(E70C92AA-4BFD-11d1-8A95-00C04FB951F3),
  208. pointer_default(unique)
  209. ]
  210. interface IStoreNamespace : IUnknown
  211. {
  212. typedef IStoreNamespace *LPSTORENAMESPACE;
  213. //+---------------------------------------------------------------------
  214. // STOREFOLDERID - folderIds are persistable
  215. //----------------------------------------------------------------------
  216. typedef DWORD STOREFOLDERID;
  217. typedef STOREFOLDERID *LPSTOREFOLDERID;
  218. //+---------------------------------------------------------------------
  219. // Some Special FOLDER Values
  220. //----------------------------------------------------------------------
  221. const DWORD FOLDERID_ROOT = 0;
  222. const DWORD FOLDERID_INVALID = 0xffffffff;
  223. //+---------------------------------------------------------------------
  224. // MESSAGEID
  225. //----------------------------------------------------------------------
  226. typedef DWORD MESSAGEID;
  227. typedef MESSAGEID *LPMESSAGEID;
  228. //+---------------------------------------------------------------------
  229. // Some Special MESSAGEID values
  230. //----------------------------------------------------------------------
  231. const DWORD MESSAGEID_INVALID = 0xffffffff;
  232. const DWORD MESSAGEID_FIRST = 0xffffffff;
  233. //+---------------------------------------------------------------------
  234. // Consts
  235. //----------------------------------------------------------------------
  236. const DWORD CCHMAX_FOLDER_NAME = 256;
  237. //+---------------------------------------------------------------------
  238. // Notification Messages
  239. //----------------------------------------------------------------------
  240. cpp_quote("#define WM_FOLDERNOTIFY (WM_USER + 1600) // IStoreNamespace Notification - lparam=LPFOLDERNOTIFYEX, client must call CoTaskMemFree(lParam)")
  241. cpp_quote("#define WM_NEWMSGS (WM_USER + 1650) // IStoreFolder Notification: wParam=MESSAGEID, lParam=Reserved")
  242. cpp_quote("#define WM_DELETEMSGS (WM_USER + 1651) // IStoreFolder Notification: wParam=prgdwMsgId, lParam=cMsgs")
  243. cpp_quote("#define WM_DELETEFOLDER (WM_USER + 1652) // IStoreFolder Notification: wParam=STOREFOLDERID or HFOLDER")
  244. // If wParam is equal to 0xffffffff then that means that all messages in the folder
  245. // were either marked as read (WM_MARKEDASREAD) or unread (WM_MARKEDASUNREAD)
  246. cpp_quote("#define WM_MARKEDASREAD (WM_USER + 1653) // IStoreFolder Notification: wParamprgdwMsgId, lParam=cMsgs")
  247. cpp_quote("#define WM_MARKEDASUNREAD (WM_USER + 1654) // IStoreFolder Notification: wParamprgdwMsgId, lParam=cMsgs")
  248. //+---------------------------------------------------------------------
  249. // FOLDERNOTIFYTYPE
  250. //----------------------------------------------------------------------
  251. typedef enum tagFOLDERNOTIFYTYPE {
  252. NEW_FOLDER = 1,
  253. DELETE_FOLDER,
  254. RENAME_FOLDER,
  255. MOVE_FOLDER,
  256. UNREAD_CHANGE,
  257. IMAPFLAG_CHANGE,
  258. UPDATEFLAG_CHANGE,
  259. FOLDER_PROPS_CHANGED
  260. } FOLDERNOTIFYTYPE;
  261. //+---------------------------------------------------------------------
  262. // FOLDERNOTIFYEX
  263. //----------------------------------------------------------------------
  264. typedef struct tagFOLDERNOTIFYEX {
  265. FOLDERNOTIFYTYPE type;
  266. STOREFOLDERID idFolderOld; // not used for CREATEFOLDER and DELETEFOLDER
  267. STOREFOLDERID idFolderNew;
  268. } FOLDERNOTIFYEX, *LPFOLDERNOTIFYEX;
  269. //+---------------------------------------------------------------------
  270. // MESSAGEIDLIST - A list of message ids (DWORDs)
  271. //----------------------------------------------------------------------
  272. typedef struct tagMESSAGEIDLIST {
  273. DWORD cbSize; // Sizeof this structure
  274. DWORD cMsgs; // Number of elements in prghMessage
  275. LPMESSAGEID prgdwMsgId; // Array of handles to messages
  276. } MESSAGEIDLIST, *LPMESSAGEIDLIST;
  277. //+---------------------------------------------------------------------
  278. // SPECIALFOLDER - How to identify a special folder
  279. //----------------------------------------------------------------------
  280. typedef enum tagSPECIALFOLDER {
  281. FOLDER_NOTSPECIAL = -1, // Not a special folder
  282. FOLDER_INBOX, // Default receive folder
  283. FOLDER_OUTBOX, // Default send folder
  284. FOLDER_SENT, // Things that have been sent
  285. FOLDER_DELETED, // Things that have been deleted
  286. FOLDER_DRAFT, // Things that are in progress
  287. FOLDER_MAX // Don't use
  288. } SPECIALFOLDER;
  289. //+---------------------------------------------------------------------
  290. // FOLDERPROPS - Properties of a folder
  291. //----------------------------------------------------------------------
  292. typedef struct tagFOLDERPROPS {
  293. DWORD cbSize; // Size of this structure
  294. STOREFOLDERID dwFolderId; // Handle of this folder
  295. INT cSubFolders; // Number of sub-folders
  296. SPECIALFOLDER sfType; // Special folder type
  297. DWORD cUnread; // Number of un-read messages
  298. DWORD cMessage; // Total # of messages
  299. CHAR szName[CCHMAX_FOLDER_NAME]; // The Folder Name
  300. } FOLDERPROPS, *LPFOLDERPROPS;
  301. //+---------------------------------------------------------------------
  302. // Methods
  303. //----------------------------------------------------------------------
  304. HRESULT Initialize( // Initialize the object
  305. [in] HWND hwndOwner, // Window owner for things like compaction dialog
  306. [in] DWORD dwReserved); // Reserved for future use
  307. HRESULT GetDirectory( // Get the location of the store (filepath)
  308. [in,out,size_is(cchMaxPath)] LPSTR pszPath, // Buffer to put path of store into
  309. [in] DWORD cchMaxPath); // in: byte count size of pszPath, out: char count size of pszPath
  310. HRESULT OpenSpecialFolder(
  311. [in] SPECIALFOLDER sfType, // Special folder type
  312. [in] DWORD dwReserved, // Reserved for future use
  313. [out] IStoreFolder **ppFolder); // Pointer to an IStoreFolder
  314. HRESULT OpenFolder(
  315. [in] STOREFOLDERID dwFolderId, // Folder to open
  316. [in] DWORD dwReserved, // Reserved for future use
  317. [out] IStoreFolder **ppFolder); // Pointer to an IStoreFolder
  318. HRESULT CreateFolder(
  319. [in] STOREFOLDERID dwParentId, // Parent of the new folder, can use FOLDERID_ROOT
  320. [in] LPCSTR pszName, // Name of new folder, must be less than MAX_FOLDER_NAME
  321. [in] DWORD dwReserved, // Reserved for future use
  322. [out] LPSTOREFOLDERID pdwFolderId); // Handle to the new folder
  323. HRESULT RenameFolder(
  324. [in] STOREFOLDERID dwFolderId, // Folder to rename
  325. [in] DWORD dwReserved, // Reserved for future use
  326. [in] LPCSTR pszNewName); // New folder name, must be less than MAX_FOLDER_NAME
  327. HRESULT MoveFolder(
  328. [in] STOREFOLDERID dwFolderId, // Folder to move
  329. [in] STOREFOLDERID dwParentId, // FolderId of the new Parent
  330. [in] DWORD dwReserved); // Reserved for future use
  331. HRESULT DeleteFolder(
  332. [in] STOREFOLDERID dwFolderId, // Folder to delete
  333. [in] DWORD dwReserved); // Reserved for future use
  334. HRESULT GetFolderProps(
  335. [in] STOREFOLDERID dwFolderId, // FolderId to get info for
  336. [in] DWORD dwReserved, // Reserved for future use
  337. [in,out] LPFOLDERPROPS pProps); // in: set cbSize, out: Holds folder information
  338. cpp_quote("// CLocalStore::CopyMoveMessages flags - dwFlags == 0 is copy")
  339. cpp_quote("#define CMF_MOVE 0x0001 // msgs deleted from src fldr after copy")
  340. cpp_quote("#define CMF_DELETE 0x0002 // same as CMF_MOVE but uses delete string for status")
  341. HRESULT CopyMoveMessages(
  342. [in] IStoreFolder *pSource, // Source store folder
  343. [in] IStoreFolder *pDest, // Destination Store Folder
  344. [in] LPMESSAGEIDLIST pMsgIdList, // List of MESSAGEIDs to move/copy
  345. [in] DWORD dwFlags, // CMF_xxx Flags
  346. [in] DWORD dwFlagsRemove, // MSG_xxx Flags to remove from copied/moved messages
  347. [in] IProgressNotify *pProgress); // Store progress callback (client implements)
  348. HRESULT RegisterNotification(
  349. [in] DWORD dwReserved, // Reserved for future use
  350. [in] HWND hwnd); // Handle to window to send notifications
  351. HRESULT UnregisterNotification(
  352. [in] DWORD dwReserved, // Reserved for future use
  353. [in] HWND hwnd); // Handle to window to un-register for notifications
  354. HRESULT CompactAll( // Compacts all folders in the store
  355. [in] DWORD dwReserved); // Reserved for future use
  356. HRESULT GetFirstSubFolder( // Enumerate sub folders
  357. [in] STOREFOLDERID dwFolderId, // Pass FOLDERID_ROOT to enum root folders
  358. [in,out] LPFOLDERPROPS pProps, // If function succeeds, contents are valid
  359. [out] LPHENUMSTORE phEnum); // Use in call to GetNextSubFolder, and then GetSubFolderClose
  360. HRESULT GetNextSubFolder( // Get the next subfolder, returns S_FALSE if no more folders
  361. [in] HENUMSTORE hEnum, // Handle received from GetFirstSubFolder
  362. [in,out] LPFOLDERPROPS pProps); // If function returns S_OK, contains folder properties
  363. HRESULT GetSubFolderClose( // Closes the handle associated with a folder enumeration
  364. [in] HENUMSTORE hEnum); // Handle received from GetFirstSubFolder
  365. }
  366. cpp_quote("#endif")
  367. //+-------------------------------------------------------------------------
  368. //
  369. // Copyright (C) Microsoft Corporation, 1995-1998.
  370. //
  371. // Contents: IStoreFolder
  372. //
  373. // History: 11-Oct-1997 SteveBailey Created
  374. //
  375. //--------------------------------------------------------------------------
  376. cpp_quote("#ifndef __LPSTOREFOLDER_DEFINED")
  377. cpp_quote("#define __LPSTOREFOLDER_DEFINED")
  378. [
  379. object,
  380. uuid(E70C92AC-4BFD-11d1-8A95-00C04FB951F3),
  381. pointer_default(unique)
  382. ]
  383. interface IStoreFolder : IUnknown
  384. {
  385. typedef IStoreFolder *LPSTOREFOLDER;
  386. //+---------------------------------------------------------------------
  387. // Message State Flags used in MESSAGEINFO::dwState
  388. //----------------------------------------------------------------------
  389. cpp_quote("#define MSG_DELETED 0x0001 // The message has been deleted, compaction will remove it")
  390. cpp_quote("#define MSG_UNREAD 0x0002 // The message is marked as un-read")
  391. cpp_quote("#define MSG_SUBMITTED 0x0004 // For messages waiting to be sent: OUTBOX ONLY")
  392. cpp_quote("#define MSG_UNSENT 0x0008 // For msgs-in-progress saved to a folder")
  393. cpp_quote("#define MSG_RECEIVED 0x0010 // For messages that came from a server")
  394. cpp_quote("#define MSG_NEWSMSG 0x0020 // For news messages")
  395. cpp_quote("#define MSG_NOSECUI 0x0040 // For messages where the user wants to die")
  396. cpp_quote("#define MSG_VOICEMAIL 0x0080 // The message has the X-Voicemail header set...")
  397. cpp_quote("#define MSG_REPLIED 0x0100 // The message has been replied to")
  398. cpp_quote("#define MSG_FORWARDED 0x0200 // The message has been forwarded to")
  399. cpp_quote("#define MSG_RCPTSENT 0x0400 // S/MIME Receipt has been sent")
  400. cpp_quote("#define MSG_FLAGGED 0x0800 // The message is currently flags")
  401. cpp_quote("#define MSG_LAST 0x0200 // ** Keep this puppy updated!! **")
  402. cpp_quote("#define MSG_EXTERNAL_FLAGS 0x00fe")
  403. cpp_quote("#define MSG_FLAGS 0x000f")
  404. //+---------------------------------------------------------------------
  405. // MESSAGEPROPS
  406. //----------------------------------------------------------------------
  407. typedef struct tagMESSAGEPROPS {
  408. DWORD cbSize; // Size of this structure
  409. DWORD dwReserved; // Reserved don't use
  410. MESSAGEID dwMessageId; // Handle to this message
  411. DWORD dwLanguage; // Codepage of this message
  412. DWORD dwState; // MSG_xxx Flags
  413. // Things you don't get when MSGPROPS_FAST
  414. DWORD cbMessage; // Size of the message
  415. IMSGPRIORITY priority; // Message Priority
  416. FILETIME ftReceived; // When the message was received
  417. FILETIME ftSent; // When the message was sent
  418. LPSTR pszSubject; // The subject of the message
  419. LPSTR pszDisplayTo; // The display to line of the message
  420. LPSTR pszDisplayFrom; // The display from line of the message
  421. LPSTR pszNormalSubject; // The normalized subject of the message
  422. DWORD dwFlags; // IMF_xxx Flags defined in mimeole.idl
  423. IStream *pStmOffsetTable; // Use with IMimeMessage::LoadOffsetTable
  424. } MESSAGEPROPS, *LPMESSAGEPROPS;
  425. //+---------------------------------------------------------------------
  426. // HBATCHLOCK
  427. //----------------------------------------------------------------------
  428. DECLARE_HANDLE(HBATCHLOCK);
  429. typedef HBATCHLOCK *LPHBATCHLOCK;
  430. //+---------------------------------------------------------------------
  431. // Method
  432. //----------------------------------------------------------------------
  433. HRESULT GetFolderProps( // Get folder info for this folder
  434. [in] DWORD dwReserved, // Reserved for future use
  435. [in,out] LPFOLDERPROPS pProps); // in: set cbSize, out: contains folder information
  436. cpp_quote("#define MSGPROPS_FAST 0x00000001 // See MESSAGEPROPS structure, improved performance")
  437. HRESULT GetMessageProps(
  438. [in] MESSAGEID dwMessageId, // Message Identifier
  439. [in] DWORD dwFlags, // GETMSGINFO_xxx Flags
  440. [in,out] LPMESSAGEPROPS pProps); // Message Info - set cbSize before calling
  441. HRESULT FreeMessageProps( // Handles the case where pMsgInfo->dwMask has MIP_BYREF
  442. [in,out] LPMESSAGEPROPS pProps); // Pointer to MESSAGEINFO structure to free
  443. HRESULT DeleteMessages(
  444. [in] LPMESSAGEIDLIST pMsgIdList, // List of HMESSAGEs
  445. [in] DWORD dwReserved, // Reserved for future use
  446. [in] IProgressNotify *pProgress); // Progress information
  447. HRESULT SetLanguage(
  448. [in] DWORD dwLanguage, // MLANG Codepage ID of message
  449. [in] DWORD dwReserved, // Reserved for future use
  450. [in] LPMESSAGEIDLIST pMsgIdList); // List of HMESSAGEs to apply new language to
  451. HRESULT MarkMessagesAsRead(
  452. [in] BOOL fRead, // Mark as Read or Unread
  453. [in] DWORD dwReserved, // Reserved for future use
  454. [in] LPMESSAGEIDLIST pMsgIdList); // List of HMESSAGEs to mark as (un)read
  455. HRESULT SetFlags( // Modify the flags of a message
  456. [in] LPMESSAGEIDLIST pMsgIdList, // Array of messages to modify flags for
  457. [in] DWORD dwState, // MSG_xxx Flags to set on pMsgIdList
  458. [in] DWORD dwStatemask, // ?????
  459. [out] LPDWORD prgdwNewFlags); // Array of new message state flags that match pMsgIdList array
  460. HRESULT OpenMessage( // Open a message (get a stream or a message object)
  461. [in] MESSAGEID dwMessageId, // Handle to the message to open
  462. [in] REFIID riid, // IID_IStream or IID_IMimeMessage stream is readonly
  463. [out,iid_is(riid)] LPVOID *ppvObject); // The object, you must ->Release it
  464. HRESULT SaveMessage( // Add a new entry to a folder.
  465. [in] REFIID riid, // IID_IStream or IID_IMimeMessage
  466. [in,iid_is(riid)] LPVOID pvObject, // Pointer to a stream or mime message
  467. [in] DWORD dwMsgFlags, // MSG_xxx Flags
  468. [out] LPMESSAGEID pdwMessageId); // Handle to the new message
  469. HRESULT BatchLock( // Lock to prepare for a batch operation
  470. [in] DWORD dwReserved, // Reserved for future use
  471. [out] LPHBATCHLOCK phBatchLock); // Handle to newly created lock
  472. HRESULT BatchFlush( // Flush the current batch operation
  473. [in] DWORD dwReserved, // Reserved for future use
  474. [in] HBATCHLOCK hBatchLock); // Folder lock obtained from BatchLock
  475. HRESULT BatchUnlock( // Unlocks a batched operation
  476. [in] DWORD dwReserved, // Reserved for future use
  477. [in] HBATCHLOCK hBatchLock); // Handle to lock obtained from BatchLock
  478. HRESULT CreateStream( // Create a new stream in a folder
  479. [in] HBATCHLOCK hBatchLock, // Handle to a folder lock, optional if doing a one-of
  480. [in] DWORD dwReserved, // Reserved for future use
  481. [out] IStream **ppStream, // Pointer to new stream can be used for read/write
  482. [out] LPMESSAGEID pdwMessageId); // Handle to the new message
  483. cpp_quote("#define COMMITSTREAM_REVERT 0x00000001 // Don't add this stream/message to the folder")
  484. HRESULT CommitStream( // Commit/Revert a stream created with CreateStream
  485. [in] HBATCHLOCK hBatchLock, // Folder lock obtained from BatchLock
  486. [in] DWORD dwFlags, // COMMITSTREAM_xxx Flags
  487. [in] DWORD dwMsgFlags, // MSG_xxx Flags
  488. [in] IStream *pStream, // Stream obtained from CreateStream
  489. [in] MESSAGEID dwMessageId, // dwMessageId obtained from CreateStream
  490. [in] IMimeMessage *pMessage); // Message to commit, if not passed in, pStream will be pared.
  491. HRESULT RegisterNotification(
  492. [in] DWORD dwReserved, // Reserved for future use
  493. [in] HWND hwnd); // Handle to window to send notifications
  494. HRESULT UnregisterNotification(
  495. [in] DWORD dwReserved, // Reserved for future use
  496. [in] HWND hwnd); // Handle to window to un-register for notifications
  497. HRESULT Compact( // Compacts this folder
  498. [in] DWORD dwReserved); // Reserved for future use
  499. HRESULT GetFirstMessage( // Get the first message in a folder
  500. [in] DWORD dwFlags, // MSGPROPS_xxx Flags
  501. [in] DWORD dwMsgFlags, // MSG_xxx Flags to enumerate on, pass 0 for none
  502. [in] MESSAGEID dwMsgIdFirst, // MessageId to start enumerating at, Use MESSAGEID_FIRST
  503. [in,out] LPMESSAGEPROPS pProps, // When function returns S_OK, contains message properties
  504. [out] LPHENUMSTORE phEnum); // Upon successful return, contains handle to enumeration
  505. HRESULT GetNextMessage( // Get the next message in the enumeration
  506. [in] HENUMSTORE hEnum, // Handle to the enumeration received in GetFirstMessage
  507. [in] DWORD dwFlags, // MSGPROPS_xxx Flags
  508. [in,out] LPMESSAGEPROPS pProps); // When function returns S_OK, contains message properties
  509. HRESULT GetMessageClose(
  510. [in] HENUMSTORE hEnum); // Handle to the enumeration received in GetFirstMessage
  511. }
  512. cpp_quote("#endif")
  513. cpp_quote("#endif // OE5_BETA2")
  514. cpp_quote("//+-------------------------------------------------------------------------")
  515. cpp_quote("// Outlook Express Exported C API Functions")
  516. cpp_quote("//--------------------------------------------------------------------------")
  517. cpp_quote("#ifdef __cplusplus")
  518. cpp_quote("extern \"C\" {")
  519. cpp_quote("#endif")
  520. cpp_quote("")
  521. cpp_quote("//+-------------------------------------------------------------------------")
  522. cpp_quote("// API Name Decoration")
  523. cpp_quote("//--------------------------------------------------------------------------")
  524. cpp_quote("#if !defined(_MSOEAPI_)")
  525. cpp_quote("#define MSOEAPI DECLSPEC_IMPORT HRESULT WINAPI")
  526. cpp_quote("#define MSOEAPI_(_type_) DECLSPEC_IMPORT _type_ WINAPI")
  527. cpp_quote("#else")
  528. cpp_quote("#define MSOEAPI HRESULT WINAPI")
  529. cpp_quote("#define MSOEAPI_(_type_) _type_ WINAPI")
  530. cpp_quote("#endif")
  531. cpp_quote("")
  532. cpp_quote("//+-------------------------------------------------------------------------")
  533. cpp_quote("// Prototypes")
  534. cpp_quote("//--------------------------------------------------------------------------")
  535. cpp_quote("MSOEAPI CoStartOutlookExpress(")
  536. cpp_quote(" /* IN */ DWORD dwFlags,")
  537. cpp_quote(" /* IN */ LPCSTR pszCmdLine,")
  538. cpp_quote(" /* IN */ INT nCmdShow);")
  539. cpp_quote("")
  540. cpp_quote("MSOEAPI CoCreateOutlookExpress(")
  541. cpp_quote(" /* IN */ IUnknown *pUnkOuter,")
  542. cpp_quote(" /* OUT */ IUnknown **ppUnknown);")
  543. cpp_quote("")
  544. cpp_quote("#ifdef __cplusplus")
  545. cpp_quote("}")
  546. cpp_quote("#endif")