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.

3099 lines
159 KiB

  1. // --------------------------------------------------------------------------------
  2. // MIMEOLE.IDL
  3. // Copyright (c)1993-1998 Microsoft Corporation, All Rights Reserved
  4. // --------------------------------------------------------------------------------
  5. import "ocidl.idl";
  6. import "objidl.idl";
  7. #ifndef UNIX
  8. import "propidl.idl";
  9. #else
  10. import "urlmon.idl";
  11. #endif /* unix */
  12. #include "mimedisp.h"
  13. interface IMimePropertySet;
  14. interface IMimeMessage;
  15. interface IMimeBody;
  16. interface IMimeMessageTree;
  17. interface IMimeEnumHeaderRows;
  18. interface IMimeAddressTable;
  19. interface IMimeMessageParts;
  20. interface IMimeEnumMessageParts;
  21. interface IMimeEnumAddressTypes;
  22. interface IMimeInternational;
  23. interface IMimeEnumProperties;
  24. interface IMimeMessageCallback;
  25. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  26. interface IPersistMime;
  27. cpp_quote("#endif //_WIN32_OE")
  28. cpp_quote("//--------------------------------------------------------------------------------")
  29. cpp_quote("// MIMEOLE.H")
  30. cpp_quote("//--------------------------------------------------------------------------------")
  31. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.")
  32. cpp_quote("//")
  33. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  34. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  35. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  36. cpp_quote("// PARTICULAR PURPOSE.")
  37. cpp_quote("//--------------------------------------------------------------------------------")
  38. cpp_quote("")
  39. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  40. cpp_quote("")
  41. cpp_quote("// --------------------------------------------------------------------------------")
  42. cpp_quote("// GUIDS")
  43. cpp_quote("// --------------------------------------------------------------------------------")
  44. cpp_quote("// {E4B28371-83B0-11d0-8259-00C04FD85AB4}")
  45. cpp_quote("DEFINE_GUID(LIBID_MIMEOLE, 0xe4b28371, 0x83b0, 0x11d0, 0x82, 0x59, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  46. cpp_quote("")
  47. cpp_quote("// {05300401-BCBC-11d0-85E3-00C04FD85AB4}")
  48. cpp_quote("DEFINE_GUID(CLSID_IMimeHtmlProtocol, 0x5300401, 0xbcbc, 0x11d0, 0x85, 0xe3, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  49. cpp_quote("")
  50. cpp_quote("// {C5588354-7F86-11d0-8252-00C04FD85AB4}")
  51. cpp_quote("DEFINE_GUID(IID_IMimeEnumAddressTypes, 0xc5588354, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  52. cpp_quote("")
  53. cpp_quote("// {EE519F11-851A-11d0-825C-00C04FD85AB4}")
  54. cpp_quote("DEFINE_GUID(IID_IMimeWebDocument, 0xee519f11, 0x851a, 0x11d0, 0x82, 0x5c, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  55. cpp_quote("")
  56. cpp_quote("// {FD853CEF-7F86-11d0-8252-00C04FD85AB4}")
  57. cpp_quote("DEFINE_GUID(IID_IUnicodeStream, 0xfd853cef, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  58. cpp_quote("")
  59. cpp_quote("// {C558834A-7F86-11d0-8252-00C04FD85AB4}")
  60. cpp_quote("DEFINE_GUID(IID_IMimeAddressTable, 0xc558834a, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  61. cpp_quote("")
  62. cpp_quote("// {C558834B-7F86-11d0-8252-00C04FD85AB4}")
  63. cpp_quote("DEFINE_GUID(IID_IMimeAddressInfo, 0xc558834b, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  64. cpp_quote("")
  65. cpp_quote("// {C558834D-7F86-11d0-8252-00C04FD85AB4}")
  66. cpp_quote("DEFINE_GUID(IID_IMimeEnumHeaderRows, 0xc558834d, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  67. cpp_quote("")
  68. cpp_quote("// {C558834E-7F86-11d0-8252-00C04FD85AB4}")
  69. cpp_quote("DEFINE_GUID(IID_IMimeInlineSupport, 0xc558834e, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  70. cpp_quote("")
  71. cpp_quote("// {C5588350-7F86-11d0-8252-00C04FD85AB4}")
  72. cpp_quote("DEFINE_GUID(IID_IMimeEnumMessageParts, 0xc5588350, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  73. cpp_quote("")
  74. cpp_quote("// {FD853CD9-7F86-11d0-8252-00C04FD85AB4}")
  75. cpp_quote("DEFINE_GUID(CLSID_IMimeInternational, 0xfd853cd9, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  76. cpp_quote("// {C5588349-7F86-11d0-8252-00C04FD85AB4}")
  77. cpp_quote("DEFINE_GUID(IID_IMimeInternational, 0xc5588349, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  78. cpp_quote("")
  79. cpp_quote("// {FD853CDB-7F86-11d0-8252-00C04FD85AB4}")
  80. cpp_quote("DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  81. cpp_quote("// {C558834C-7F86-11d0-8252-00C04FD85AB4}")
  82. cpp_quote("DEFINE_GUID(IID_IMimeBody, 0xc558834c, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  83. cpp_quote("")
  84. cpp_quote("// {FD853CDC-7F86-11d0-8252-00C04FD85AB4}")
  85. cpp_quote("DEFINE_GUID(CLSID_IMimeMessageParts, 0xfd853cdc, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  86. cpp_quote("// {C558834F-7F86-11d0-8252-00C04FD85AB4}")
  87. cpp_quote("DEFINE_GUID(IID_IMimeMessageParts, 0xc558834f, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  88. cpp_quote("")
  89. cpp_quote("// {FD853CDD-7F86-11d0-8252-00C04FD85AB4}")
  90. cpp_quote("DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  91. cpp_quote("// {C5588351-7F86-11d0-8252-00C04FD85AB4}")
  92. cpp_quote("DEFINE_GUID(IID_IMimeAllocator, 0xc5588351, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  93. cpp_quote("")
  94. cpp_quote("// {FD853CDE-7F86-11d0-8252-00C04FD85AB4}")
  95. cpp_quote("DEFINE_GUID(CLSID_IMimeSecurity, 0xfd853cde, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  96. cpp_quote("// {C5588353-7F86-11d0-8252-00C04FD85AB4}")
  97. cpp_quote("DEFINE_GUID(IID_IMimeSecurity, 0xc5588353, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  98. cpp_quote("")
  99. cpp_quote("// {FD853CDF-7F86-11d0-8252-00C04FD85AB4}")
  100. cpp_quote("DEFINE_GUID(CLSID_IVirtualStream, 0xfd853cdf, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  101. cpp_quote("// {C5588359-7F86-11d0-8252-00C04FD85AB4}")
  102. cpp_quote("DEFINE_GUID(IID_IVirtualStream, 0xc5588359, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  103. cpp_quote("")
  104. cpp_quote("// {FD853CE0-7F86-11d0-8252-00C04FD85AB4}")
  105. cpp_quote("DEFINE_GUID(CLSID_IMimeHeaderTable, 0xfd853ce0, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  106. cpp_quote("// {FD853CD1-7F86-11d0-8252-00C04FD85AB4}")
  107. cpp_quote("DEFINE_GUID(IID_IMimeHeaderTable, 0xfd853cd1, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  108. cpp_quote("")
  109. cpp_quote("// {FD853CE1-7F86-11d0-8252-00C04FD85AB4}")
  110. cpp_quote("DEFINE_GUID(CLSID_IMimePropertySet, 0xfd853ce1, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  111. cpp_quote("// {FD853CD3-7F86-11d0-8252-00C04FD85AB4}")
  112. cpp_quote("DEFINE_GUID(IID_IMimePropertySet, 0xfd853cd3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  113. cpp_quote("")
  114. cpp_quote("// {FD853CE2-7F86-11d0-8252-00C04FD85AB4}")
  115. cpp_quote("DEFINE_GUID(CLSID_IMimeMessageTree, 0xfd853ce2, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  116. cpp_quote("// {FD853CD4-7F86-11d0-8252-00C04FD85AB4}")
  117. cpp_quote("DEFINE_GUID(IID_IMimeMessageTree, 0xfd853cd4, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  118. cpp_quote("")
  119. cpp_quote("// {FD853CE3-7F86-11d0-8252-00C04FD85AB4}")
  120. cpp_quote("DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  121. cpp_quote("// {FD853CD5-7F86-11d0-8252-00C04FD85AB4}")
  122. cpp_quote("DEFINE_GUID(IID_IMimeMessage, 0xfd853cd5, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  123. cpp_quote("")
  124. cpp_quote("// {FD853CED-7F86-11d0-8252-00C04FD85AB4}")
  125. cpp_quote("DEFINE_GUID(CLSID_IMimePropertySchema, 0xfd853ced, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  126. cpp_quote("// {FD853CEC-7F86-11d0-8252-00C04FD85AB4}")
  127. cpp_quote("DEFINE_GUID(IID_IMimePropertySchema, 0xfd853cec, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  128. cpp_quote("")
  129. cpp_quote("// {FD853CEE-7F86-11d0-8252-00C04FD85AB4}")
  130. cpp_quote("DEFINE_GUID(IID_IMimeEnumProperties, 0xfd853cee, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
  131. cpp_quote("")
  132. cpp_quote("// {DE4AD8DA-555F-11d1-8DD0-00C04FB951F9}")
  133. cpp_quote("DEFINE_GUID(IID_IPersistMime, 0xde4ad8da, 0x555f, 0x11d1, 0x8d, 0xd0, 0x00, 0xc0, 0x4f, 0xb9, 0x51, 0xf9);")
  134. cpp_quote("")
  135. cpp_quote("// {761AA641-7BDA-11d1-8AA9-00C04FB951F3}")
  136. cpp_quote("DEFINE_GUID(IID_IMimeMessageCallback, 0x761aa641, 0x7bda, 0x11d1, 0x8a, 0xa9, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf3);")
  137. cpp_quote("")
  138. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  139. cpp_quote("")
  140. cpp_quote("// {1C82EAD9-508E-11d1-8DCF-00C04FB951F9}")
  141. cpp_quote("DEFINE_GUID(CLSID_MimeEdit, 0x1c82ead9, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9);")
  142. cpp_quote("")
  143. cpp_quote("// {1C82EADA-508E-11d1-8DCF-00C04FB951F9}")
  144. cpp_quote("DEFINE_GUID(CMDSETID_MimeEdit, 0x1c82eada, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9);")
  145. cpp_quote("")
  146. cpp_quote("// {1C82EADB-508E-11d1-8DCF-00C04FB951F9}")
  147. cpp_quote("DEFINE_GUID(CMDSETID_MimeEditHost, 0x1c82eadb, 0x508e, 0x11d1, 0x8d, 0xcf, 0x0, 0xc0, 0x4f, 0xb9, 0x51, 0xf9);")
  148. cpp_quote("")
  149. cpp_quote("// {64577981-86D7-11d1-BDFC-00C04FA31009}")
  150. cpp_quote("DEFINE_GUID(IID_IHashTable, 0x64577981, 0x86d7, 0x11d1, 0xbd, 0xfc, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9);")
  151. cpp_quote("")
  152. cpp_quote("// {64577982-86D7-11d1-BDFC-00C04FA31009}")
  153. cpp_quote("DEFINE_GUID(CLSID_IHashTable, 0x64577982, 0x86d7, 0x11d1, 0xbd, 0xfc, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9);")
  154. cpp_quote("")
  155. cpp_quote("// {B0D17FC2-7BC4-11d1-BDFA-00C04FA31009}")
  156. cpp_quote("DEFINE_GUID(CLSID_IFontCache, 0xb0d17fc2, 0x7bc4, 0x11d1, 0xbd, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9);")
  157. cpp_quote("")
  158. cpp_quote("// {B0D17FC4-7BC4-11d1-BDFA-00C04FA31009}")
  159. cpp_quote("DEFINE_GUID(IID_IFontCache, 0xb0d17fc4, 0x7bc4, 0x11d1, 0xbd, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9);")
  160. cpp_quote("")
  161. cpp_quote("// {B0D17FC5-7BC4-11d1-BDFA-00C04FA31009}")
  162. cpp_quote("DEFINE_GUID(IID_IFontCacheNotify, 0xb0d17fc5, 0x7bc4, 0x11d1, 0xbd, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x10, 0x9);")
  163. cpp_quote("")
  164. cpp_quote("// {35461E30-C488-11d1-960E-00C04FBD7C09}")
  165. cpp_quote("DEFINE_GUID(CLSID_IMimeObjResolver, 0x35461e30, 0xc488, 0x11d1, 0x96, 0xe, 0x0, 0xc0, 0x4f, 0xbd, 0x7c, 0x9);")
  166. cpp_quote("")
  167. cpp_quote("// {FECEAFFD-C441-11d1-960E-00C04FBD7C09}")
  168. cpp_quote("DEFINE_GUID(IID_IMimeObjResolver, 0xfeceaffd, 0xc441, 0x11d1, 0x96, 0xe, 0x0, 0xc0, 0x4f, 0xbd, 0x7c, 0x9);")
  169. cpp_quote("")
  170. cpp_quote("// {70183210-7b36-11d2-8c12-00c04fa31009}")
  171. cpp_quote("DEFINE_GUID(IID_IMimeEditTag, 0x70183210, 0x7b36, 0x11d2, 0x8c, 0x12, 0x00, 0xc0, 0x4f, 0xa3, 0x10, 0x09);")
  172. cpp_quote("")
  173. cpp_quote("// {d09ee528-7b38-11d2-8c12-00c04fa31009}")
  174. cpp_quote("DEFINE_GUID(IID_IMimeEditTagCollection, 0xd09ee528, 0x7b38, 0x11d2, 0x8c, 0x12, 0x00, 0xc0, 0x4f, 0xa3, 0x10, 0x09);")
  175. cpp_quote("")
  176. cpp_quote("#endif //_WIN32_OE")
  177. cpp_quote("")
  178. cpp_quote("// --------------------------------------------------------------------------------")
  179. cpp_quote("// Errors")
  180. cpp_quote("// --------------------------------------------------------------------------------")
  181. //;begin_internal
  182. //
  183. // NOTE: All inetcomm error codes must reside between CC00 and CFFF (a 1k block).
  184. // This has been approved by Johann Posch (johannp)
  185. // We further subdevide this range as follows:
  186. // CC00-CCFF IMNXPORT results
  187. // CD00-CDFF IMNACCT results
  188. // CE00-CEFF MIMEOLE results
  189. // CF00-CFFF undefined, do not use
  190. // (t-erikne 03/24/97)
  191. //
  192. // NOTE: All MimeEdit error codes must reside between 0x1700 - 0x17FF
  193. //
  194. //
  195. //;end_internal
  196. cpp_quote("#ifndef FACILITY_INTERNET")
  197. cpp_quote("#define FACILITY_INTERNET 12")
  198. cpp_quote("#endif")
  199. cpp_quote("#ifndef HR_E")
  200. cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)")
  201. cpp_quote("#endif")
  202. cpp_quote("#ifndef HR_S")
  203. cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)")
  204. cpp_quote("#endif")
  205. cpp_quote("#ifndef HR_CODE")
  206. cpp_quote("#define HR_CODE(hr) (INT)(hr & 0xffff)")
  207. cpp_quote("#endif")
  208. cpp_quote("")
  209. cpp_quote("// --------------------------------------------------------------------------------")
  210. cpp_quote("// MIMEOLE Failure Return Values")
  211. cpp_quote("// --------------------------------------------------------------------------------")
  212. cpp_quote("#define MIME_E_REG_CREATE_KEY HR_E(0xCE01)")
  213. cpp_quote("#define MIME_E_REG_QUERY_INFO HR_E(0xCE02)")
  214. cpp_quote("#define MIME_E_INVALID_ENCTYPE HR_E(0xCE03)")
  215. cpp_quote("#define MIME_E_BOUNDARY_MISMATCH HR_E(0xCE04)")
  216. cpp_quote("#define MIME_E_NOT_FOUND HR_E(0xCE05)")
  217. cpp_quote("#define MIME_E_NO_DATA HR_E(0xCE05)")
  218. cpp_quote("#define MIME_E_BUFFER_TOO_SMALL HR_E(0xCE06)")
  219. cpp_quote("#define MIME_E_INVALID_ITEM_FLAGS HR_E(0xCE07)")
  220. cpp_quote("#define MIME_E_ONE_LINE_ITEM HR_E(0xCE08)")
  221. cpp_quote("#define MIME_E_INVALID_HANDLE HR_E(0xCE09)")
  222. cpp_quote("#define MIME_E_CHARSET_TRANSLATE HR_E(0xCE0A)")
  223. cpp_quote("#define MIME_E_NOT_INITIALIZED HR_E(0xCE0B)")
  224. cpp_quote("#define MIME_E_NO_MORE_ROWS HR_E(0xCE0C)")
  225. cpp_quote("#define MIME_E_ALREADY_BOUND HR_E(0xCE0D)")
  226. cpp_quote("#define MIME_E_CANT_RESET_ROOT HR_E(0xCE0E)")
  227. cpp_quote("#define MIME_E_INSERT_NOT_ALLOWED HR_E(0xCE0F)")
  228. cpp_quote("#define MIME_E_BAD_BODY_LOCATION HR_E(0xCE10)")
  229. cpp_quote("#define MIME_E_NOT_MULTIPART HR_E(0xCE11)")
  230. cpp_quote("#define MIME_E_NO_MULTIPART_BOUNDARY HR_E(0xCE12)")
  231. cpp_quote("#define MIME_E_CONVERT_NOT_NEEDED HR_E(0xCE13)")
  232. cpp_quote("#define MIME_E_CANT_MOVE_BODY HR_E(0xCE14)")
  233. cpp_quote("#define MIME_E_UNKNOWN_BODYTREE_VERSION HR_E(0xCE15)")
  234. cpp_quote("#define MIME_E_NOTHING_TO_SAVE HR_E(0xCE16)")
  235. cpp_quote("#define MIME_E_NEED_SAVE_MESSAGE HR_E(0xCE17)")
  236. cpp_quote("#define MIME_E_NOTHING_TO_REVERT HR_E(0xCE18)")
  237. cpp_quote("#define MIME_E_MSG_SIZE_DIFF HR_E(0xCE19)")
  238. cpp_quote("#define MIME_E_CANT_RESET_PARENT HR_E(0xCE1A)")
  239. cpp_quote("#define MIME_E_CORRUPT_CACHE_TREE HR_E(0xCE1B)")
  240. cpp_quote("#define MIME_E_BODYTREE_OUT_OF_SYNC HR_E(0xCE1C)")
  241. cpp_quote("#define MIME_E_INVALID_ENCODINGTYPE HR_E(0xCE1D)")
  242. cpp_quote("#define MIME_E_MULTIPART_NO_DATA HR_E(0xCE1E)")
  243. cpp_quote("#define MIME_E_INVALID_OPTION_VALUE HR_E(0xCE1F)")
  244. cpp_quote("#define MIME_E_INVALID_OPTION_ID HR_E(0xCE20)")
  245. cpp_quote("#define MIME_E_INVALID_HEADER_NAME HR_E(0xCE21)")
  246. cpp_quote("#define MIME_E_NOT_BOUND HR_E(0xCE22)")
  247. cpp_quote("#define MIME_E_MAX_SIZE_TOO_SMALL HR_E(0xCE23)")
  248. cpp_quote("#define MIME_E_MULTIPART_HAS_CHILDREN HR_E(0xCE25)")
  249. cpp_quote("#define MIME_E_INVALID_PROP_FLAGS HR_E(0xCE26)")
  250. cpp_quote("#define MIME_E_INVALID_ADDRESS_TYPE HR_E(0xCE27)")
  251. cpp_quote("#define MIME_E_INVALID_OBJECT_IID HR_E(0xCE28)")
  252. cpp_quote("#define MIME_E_MLANG_DLL_NOT_FOUND HR_E(0xCE29)")
  253. cpp_quote("#define MIME_E_ROOT_NOT_EMPTY HR_E(0xCE2A)")
  254. cpp_quote("#define MIME_E_MLANG_BAD_DLL HR_E(0xCE2B)")
  255. cpp_quote("#define MIME_E_REG_OPEN_KEY HR_E(0xCE2C)")
  256. cpp_quote("#define MIME_E_INVALID_INET_DATE HR_E(0xCE2D)")
  257. cpp_quote("#define MIME_E_INVALID_BODYTYPE HR_E(0xCE2E)")
  258. cpp_quote("#define MIME_E_INVALID_DELETE_TYPE HR_E(0xCE2F)")
  259. cpp_quote("#define MIME_E_OPTION_HAS_NO_VALUE HR_E(0xCE30)")
  260. cpp_quote("#define MIME_E_INVALID_CHARSET_TYPE HR_E(0xCE31)")
  261. cpp_quote("#define MIME_E_VARTYPE_NO_CONVERT HR_E(0xCE32)")
  262. cpp_quote("#define MIME_E_INVALID_VARTYPE HR_E(0xCE33)")
  263. cpp_quote("#define MIME_E_NO_MORE_ADDRESS_TYPES HR_E(0xCE34)")
  264. cpp_quote("#define MIME_E_INVALID_ENCODING_TYPE HR_E(0xCE35)")
  265. cpp_quote("#define MIME_S_ILLEGAL_LINES_FOUND HR_S(0xCE36)")
  266. cpp_quote("#define MIME_S_MIME_VERSION HR_S(0xCE37)")
  267. cpp_quote("#define MIME_E_INVALID_TEXT_TYPE HR_E(0xCE38)")
  268. cpp_quote("#define MIME_E_READ_ONLY HR_E(0xCE39)")
  269. cpp_quote("#define MIME_S_INVALID_MESSAGE HR_S(0xCE3A)")
  270. cpp_quote("#define MIME_S_CHARSET_CONFLICT HR_S(0xCE3B)")
  271. cpp_quote("#define MIME_E_UNSUPPORTED_VARTYPE HR_E(0xCE3C)")
  272. cpp_quote("#define MIME_S_NO_CHARSET_CONVERT HR_S(0xCE3D)")
  273. cpp_quote("#define MIME_E_URL_NOTFOUND HR_E(0xCE3E)")
  274. cpp_quote("#define MIME_E_BAD_TEXT_DATA HR_E(0xCE3F)")
  275. cpp_quote("#define MIME_E_NO_SIGNER HR_S(0xCE40)")
  276. cpp_quote("")
  277. cpp_quote("// ---------------------------------------------------------------------------")
  278. cpp_quote("// MIMEOLE Security Error Return Values")
  279. cpp_quote("// ---------------------------------------------------------------------------")
  280. //;begin_internal
  281. // MIMEOLE Security HRESULTS are further subdivided
  282. // NOTE: you should never progammatically rely on this ordering
  283. // it simply gives you a visual cue in the DOUTs
  284. // CEA0-CEAF Initialization/Global
  285. // CEB0-CCCF General
  286. // CED0-CEDF Certificate
  287. // CEE0-CEEF Signing
  288. // CEF0-CEFF Encryption
  289. //;end_internal
  290. cpp_quote("#define MIME_E_SECURITY_NOTINIT HR_E(0xCEA0)")
  291. cpp_quote("#define MIME_E_SECURITY_LOADCRYPT32 HR_E(0xCEA1)")
  292. cpp_quote("#define MIME_E_SECURITY_BADPROCADDR HR_E(0xCEA2)")
  293. cpp_quote("#define MIME_E_SECURITY_NODEFAULT HR_E(0xCEB0)")
  294. cpp_quote("#define MIME_E_SECURITY_NOOP HR_E(0xCEB1)")
  295. cpp_quote("#define MIME_S_SECURITY_NOOP HR_S(0xCEB1)")
  296. cpp_quote("#define MIME_S_SECURITY_NONE HR_S(0xCEB2)")
  297. cpp_quote("#define MIME_S_SECURITY_ERROROCCURED HR_S(0xCEB3)")
  298. cpp_quote("#define MIME_E_SECURITY_USERCHOICE HR_E(0xCEB4)")
  299. cpp_quote("#define MIME_E_SECURITY_UNKMSGTYPE HR_E(0xCEB5)")
  300. cpp_quote("#define MIME_E_SECURITY_BADMESSAGE HR_E(0xCEB6)")
  301. cpp_quote("#define MIME_E_SECURITY_BADCONTENT HR_E(0xCEB7)")
  302. cpp_quote("#define MIME_E_SECURITY_BADSECURETYPE HR_E(0xCEB8)")
  303. cpp_quote("#define MIME_E_SECURITY_CLASSNOTSUPPORTED HR_E(0xCEB9)")
  304. cpp_quote("#define MIME_S_SECURITY_RECURSEONLY HR_S(0xCEBA)")
  305. cpp_quote("#define MIME_E_SECURITY_BADSTORE HR_E(0xCED0)")
  306. cpp_quote("#define MIME_S_SECURITY_NOCERT HR_S(0xCED1)")
  307. cpp_quote("#define MIME_E_SECURITY_NOCERT HR_E(0xCED1)")
  308. cpp_quote("#define MIME_E_SECURITY_CERTERROR HR_E(0xCED2)")
  309. cpp_quote("#define MIME_S_SECURITY_CERTERROR HR_S(0xCED2)")
  310. cpp_quote("#define MIME_S_SECURITY_NODEFCERT HR_S(0xCED3)")
  311. cpp_quote("#define MIME_E_SECURITY_BADSIGNATURE HR_E(0xCEE0)")
  312. cpp_quote("#define MIME_E_SECURITY_MULTSIGNERS HR_E(0xCEE1)")
  313. cpp_quote("#define MIME_E_SECURITY_NOSIGNINGCERT HR_E(0xCEE2)")
  314. cpp_quote("#define MIME_E_SECURITY_CANTDECRYPT HR_E(0xCEF0)")
  315. cpp_quote("#define MIME_E_SECURITY_ENCRYPTNOSENDERCERT HR_E(0xCEF1)")
  316. cpp_quote("#define MIME_S_SECURITY_NOSENDERCERT HR_S(0xCEF2)")
  317. cpp_quote("")
  318. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  319. cpp_quote("// --------------------------------------------------------------------------------")
  320. cpp_quote("// MIMEEDIT Failure Return Values")
  321. cpp_quote("// --------------------------------------------------------------------------------")
  322. cpp_quote("#define MIMEEDIT_E_UNEXPECTED HR_E(0x1700)")
  323. cpp_quote("#define MIMEEDIT_E_DODEFAULT HR_E(0x1701)")
  324. cpp_quote("#define MIMEEDIT_E_LOADLIBRARYFAILURE HR_E(0x1702)")
  325. cpp_quote("#define MIMEEDIT_E_USERCANCEL HR_E(0x1703)")
  326. cpp_quote("#define MIMEEDIT_E_CHARSETNOTFOUND HR_E(0x1704)")
  327. cpp_quote("#define MIMEEDIT_E_ILLEGALBODYFORMAT HR_E(0x1705)")
  328. cpp_quote("#define MIMEEDIT_E_CANNOTSAVEUNTILPARSECOMPLETE HR_E(0x1706)")
  329. cpp_quote("#define MIMEEDIT_E_CANNOTSAVEWHILESOURCEEDITING HR_E(0x1707)")
  330. cpp_quote("")
  331. cpp_quote("// --------------------------------------------------------------------------------")
  332. cpp_quote("// MIMEEDIT Success Return Values")
  333. cpp_quote("// --------------------------------------------------------------------------------")
  334. cpp_quote("#define MIMEEDIT_S_OPENFILE HR_S(0x1750)")
  335. cpp_quote("#define MIMEEDIT_S_SAVEFILE HR_S(0x1751)")
  336. cpp_quote("")
  337. cpp_quote("// --------------------------------------------------------------------------------")
  338. cpp_quote("// MIMEEDIT Warning Return Values")
  339. cpp_quote("// --------------------------------------------------------------------------------")
  340. cpp_quote("#define MIMEEDIT_W_DOWNLOADNOTCOMPLETE HR_S(0x1760)")
  341. cpp_quote("#define MIMEEDIT_W_BADURLSNOTATTACHED HR_S(0x1761)")
  342. cpp_quote("")
  343. cpp_quote("#endif //_WIN32_OE")
  344. cpp_quote("")
  345. cpp_quote("// --------------------------------------------------------------------------------")
  346. cpp_quote("// String Definition Macros")
  347. cpp_quote("// --------------------------------------------------------------------------------")
  348. cpp_quote("#ifdef __cplusplus")
  349. cpp_quote("#define EXTERN_C extern \"C\"")
  350. cpp_quote("#else")
  351. cpp_quote("#define EXTERN_C extern")
  352. cpp_quote("#endif")
  353. cpp_quote("")
  354. cpp_quote("#ifndef STRCONSTA")
  355. cpp_quote("#ifdef DEFINE_STRCONST")
  356. cpp_quote("#define STRCONSTA(x,y) EXTERN_C const char x[] = y")
  357. cpp_quote("#define STRCONSTW(x,y) EXTERN_C const WCHAR x[] = L##y")
  358. cpp_quote("#else")
  359. cpp_quote("#define STRCONSTA(x,y) EXTERN_C const char x[]")
  360. cpp_quote("#define STRCONSTW(x,y) EXTERN_C const WCHAR x[]")
  361. cpp_quote("#endif")
  362. cpp_quote("#endif")
  363. cpp_quote("")
  364. cpp_quote("// --------------------------------------------------------------------------------")
  365. cpp_quote("// rfc822 Headers")
  366. cpp_quote("// --------------------------------------------------------------------------------")
  367. cpp_quote("STRCONSTA(STR_HDR_FROM, \"From\");")
  368. cpp_quote("STRCONSTA(STR_HDR_TO, \"To\");")
  369. cpp_quote("STRCONSTA(STR_HDR_CC, \"Cc\");")
  370. cpp_quote("STRCONSTA(STR_HDR_BCC, \"Bcc\");")
  371. cpp_quote("STRCONSTA(STR_HDR_SENDER, \"Sender\");")
  372. cpp_quote("STRCONSTA(STR_HDR_REPLYTO, \"Reply-To\");")
  373. cpp_quote("STRCONSTA(STR_HDR_RETURNPATH, \"Return-Path\");")
  374. cpp_quote("STRCONSTA(STR_HDR_RR, \"Rr\");")
  375. cpp_quote("STRCONSTA(STR_HDR_RETRCPTTO, \"Return-Receipt-To\");")
  376. cpp_quote("STRCONSTA(STR_HDR_APPARTO, \"Apparently-To\");")
  377. cpp_quote("STRCONSTA(STR_HDR_DATE, \"Date\");")
  378. cpp_quote("STRCONSTA(STR_HDR_RECEIVED, \"Received\");")
  379. cpp_quote("STRCONSTA(STR_HDR_MESSAGEID, \"Message-ID\");")
  380. cpp_quote("STRCONSTA(STR_HDR_XMAILER, \"X-Mailer\");")
  381. cpp_quote("STRCONSTA(STR_HDR_ENCODING, \"Encoding\");")
  382. cpp_quote("STRCONSTA(STR_HDR_ENCRYPTED, \"Encrypted\");")
  383. cpp_quote("STRCONSTA(STR_HDR_COMMENT, \"Comment\");")
  384. cpp_quote("STRCONSTA(STR_HDR_SUBJECT, \"Subject\");")
  385. cpp_quote("STRCONSTA(STR_HDR_MIMEVER, \"MIME-Version\");")
  386. cpp_quote("STRCONSTA(STR_HDR_CNTTYPE, \"Content-Type\");")
  387. cpp_quote("STRCONSTA(STR_HDR_CNTXFER, \"Content-Transfer-Encoding\");")
  388. cpp_quote("STRCONSTA(STR_HDR_CNTID, \"Content-ID\");")
  389. cpp_quote("STRCONSTA(STR_HDR_CNTDESC, \"Content-Description\");")
  390. cpp_quote("STRCONSTA(STR_HDR_CNTDISP, \"Content-Disposition\");")
  391. cpp_quote("STRCONSTA(STR_HDR_CNTBASE, \"Content-Base\");")
  392. cpp_quote("STRCONSTA(STR_HDR_CNTLOC, \"Content-Location\");")
  393. cpp_quote("STRCONSTA(STR_HDR_NEWSGROUPS, \"Newsgroups\");")
  394. cpp_quote("STRCONSTA(STR_HDR_PATH, \"Path\");")
  395. cpp_quote("STRCONSTA(STR_HDR_FOLLOWUPTO, \"Followup-To\");")
  396. cpp_quote("STRCONSTA(STR_HDR_EXPIRES, \"Expires\");")
  397. cpp_quote("STRCONSTA(STR_HDR_REFS, \"References\");")
  398. cpp_quote("STRCONSTA(STR_HDR_CONTROL, \"Control\");")
  399. cpp_quote("STRCONSTA(STR_HDR_DISTRIB, \"Distribution\");")
  400. cpp_quote("STRCONSTA(STR_HDR_KEYWORDS, \"Keywords\");")
  401. cpp_quote("STRCONSTA(STR_HDR_SUMMARY, \"Summary\");")
  402. cpp_quote("STRCONSTA(STR_HDR_APPROVED, \"Approved\");")
  403. cpp_quote("STRCONSTA(STR_HDR_LINES, \"Lines\");")
  404. cpp_quote("STRCONSTA(STR_HDR_XREF, \"Xref\");")
  405. cpp_quote("STRCONSTA(STR_HDR_ORG, \"Organization\");")
  406. cpp_quote("STRCONSTA(STR_HDR_XNEWSRDR, \"X-Newsreader\");")
  407. cpp_quote("STRCONSTA(STR_HDR_XPRI, \"X-Priority\");")
  408. cpp_quote("STRCONSTA(STR_HDR_XMSPRI, \"X-MSMail-Priority\");")
  409. cpp_quote("STRCONSTA(STR_HDR_OFFSETS, \"X-Offsets\");")
  410. cpp_quote("STRCONSTA(STR_HDR_XUNSENT, \"X-Unsent\");")
  411. cpp_quote("STRCONSTA(STR_HDR_ARTICLEID, \"X-ArticleId\");")
  412. cpp_quote("STRCONSTA(STR_HDR_NEWSGROUP, \"X-Newsgroup\");")
  413. cpp_quote("STRCONSTA(STR_HDR_XVOICEMAIL, \"X-VoiceMail\");")
  414. cpp_quote("")
  415. cpp_quote("// --------------------------------------------------------------------------------")
  416. cpp_quote("// Parameters Available through IMimePropertySet/IMimeBody")
  417. cpp_quote("// --------------------------------------------------------------------------------")
  418. cpp_quote("STRCONSTA(STR_PAR_CHARSET, \"par:content-type:charset\");")
  419. cpp_quote("STRCONSTA(STR_PAR_NUMBER, \"par:content-type:number\");")
  420. cpp_quote("STRCONSTA(STR_PAR_TOTAL, \"par:content-type:total\");")
  421. cpp_quote("STRCONSTA(STR_PAR_ID, \"par:content-type:id\");")
  422. cpp_quote("STRCONSTA(STR_PAR_BOUNDARY, \"par:content-type:boundary\");")
  423. cpp_quote("STRCONSTA(STR_PAR_NAME, \"par:content-type:name\");")
  424. cpp_quote("STRCONSTA(STR_PAR_PROTOCOL, \"par:content-type:protocol\");")
  425. cpp_quote("STRCONSTA(STR_PAR_MICALG, \"par:content-type:micalg\");")
  426. cpp_quote("STRCONSTA(STR_PAR_FILENAME, \"par:content-disposition:filename\");")
  427. cpp_quote("STRCONSTA(STR_PAR_TYPE, \"par:content-type:type\");")
  428. cpp_quote("STRCONSTA(STR_PAR_START, \"par:content-type:start\");")
  429. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  430. cpp_quote("STRCONSTA(STR_PAR_ACCESSTYPE, \"par:content-type:access-type\");")
  431. cpp_quote("STRCONSTA(STR_PAR_XURL, \"par:content-type:X-URL\");")
  432. cpp_quote("STRCONSTA(STR_PAR_SIZE, \"par:content-type:size\");")
  433. cpp_quote("STRCONSTA(STR_PAR_SMIMETYPE, \"par:content-type:smime-type\");")
  434. cpp_quote("#endif")
  435. cpp_quote("")
  436. cpp_quote("// --------------------------------------------------------------------------------")
  437. cpp_quote("// Attributes Available through IMimePropertySet/IMimeBody")
  438. cpp_quote("// --------------------------------------------------------------------------------")
  439. cpp_quote("STRCONSTA(STR_ATT_FILENAME, \"att:filename\");")
  440. cpp_quote("STRCONSTA(STR_ATT_GENFNAME, \"att:generated-filename\");")
  441. cpp_quote("STRCONSTA(STR_ATT_PRITYPE, \"att:pri-content-type\");")
  442. cpp_quote("STRCONSTA(STR_ATT_SUBTYPE, \"att:sub-content-type\");")
  443. cpp_quote("STRCONSTA(STR_ATT_NORMSUBJ, \"att:normalized-subject\");")
  444. cpp_quote("STRCONSTA(STR_ATT_ILLEGAL, \"att:illegal-lines\");")
  445. cpp_quote("STRCONSTA(STR_ATT_RENDERED, \"att:rendered\"); // VT_UI4 - TRUE or FALSE")
  446. cpp_quote("STRCONSTA(STR_ATT_AUTOINLINED, \"att:auto-inlined\"); // VT_UI4 - TRUE or FALSE")
  447. cpp_quote("STRCONSTA(STR_ATT_SENTTIME, \"att:sent-time\");")
  448. cpp_quote("STRCONSTA(STR_ATT_RECVTIME, \"att:received-time\");")
  449. cpp_quote("STRCONSTA(STR_ATT_PRIORITY, \"att:priority\");")
  450. cpp_quote("STRCONSTA(STR_ATT_SERVER, \"att:athena-server\"); // VT_LPSTR")
  451. cpp_quote("#ifdef OE5_BETA2")
  452. cpp_quote("STRCONSTA(STR_ATT_ACCOUNTNAME, \"att:athena-account-name\"); // VT_LPSTR")
  453. cpp_quote("#else")
  454. cpp_quote("STRCONSTA(STR_ATT_ACCOUNT, \"att:athena-account\"); // VT_LPSTR")
  455. cpp_quote("#endif")
  456. cpp_quote("STRCONSTA(STR_ATT_UIDL, \"att:athena-pop3-uidl\"); // VT_LPSTR")
  457. cpp_quote("STRCONSTA(STR_ATT_STOREMSGID, \"att:athena-store-msgid\"); // VT_UI4")
  458. cpp_quote("STRCONSTA(STR_ATT_USERNAME, \"att:athena-user-name\"); // VT_LPSTR")
  459. cpp_quote("STRCONSTA(STR_ATT_FORWARDTO, \"att:athena-forward-to\"); // VT_LPSTR")
  460. cpp_quote("STRCONSTA(STR_ATT_STOREFOLDERID, \"att:athena-store-fdrid\"); // VT_UI4")
  461. cpp_quote("STRCONSTA(STR_ATT_GHOSTED, \"att:athena-ghosted\"); // VT_I4")
  462. cpp_quote("STRCONSTA(STR_ATT_UNCACHEDSIZE, \"att:athena-uncachedsize\"); // VT_UI4")
  463. cpp_quote("STRCONSTA(STR_ATT_COMBINED, \"att:athena-combined\"); // VT_UI4")
  464. cpp_quote("#ifdef OE5_BETA2")
  465. cpp_quote("STRCONSTA(STR_ATT_ACCOUNTID, \"att:athena-account-id\"); // VT_LPSTR")
  466. cpp_quote("#endif")
  467. cpp_quote("")
  468. cpp_quote("// --------------------------------------------------------------------------------")
  469. cpp_quote("// MIME Content Types")
  470. cpp_quote("// --------------------------------------------------------------------------------")
  471. cpp_quote("STRCONSTA(STR_MIME_TEXT_PLAIN, \"text/plain\");")
  472. cpp_quote("STRCONSTA(STR_MIME_TEXT_HTML, \"text/html\");")
  473. cpp_quote("STRCONSTA(STR_MIME_APPL_STREAM, \"application/octet-stream\");")
  474. cpp_quote("STRCONSTA(STR_MIME_MPART_MIXED, \"multipart/mixed\");")
  475. cpp_quote("STRCONSTA(STR_MIME_MPART_ALT, \"multipart/alternative\");")
  476. cpp_quote("STRCONSTA(STR_MIME_MPART_RELATED, \"multipart/related\");")
  477. cpp_quote("STRCONSTA(STR_MIME_MSG_PART, \"message/partial\");")
  478. cpp_quote("STRCONSTA(STR_MIME_MSG_RFC822, \"message/rfc822\");")
  479. cpp_quote("STRCONSTA(STR_MIME_APPLY_MSTNEF, \"application/ms-tnef\");")
  480. cpp_quote("STRCONSTA(STR_MIME_APPL_PKCS7SIG, \"application/x-pkcs7-signature\");")
  481. cpp_quote("STRCONSTA(STR_MIME_APPL_PKCS7SIG_1, \"application/pkcs7-signature\");")
  482. cpp_quote("STRCONSTA(STR_MIME_TEXT_ENRCICHED, \"text/enriched\");")
  483. cpp_quote("")
  484. cpp_quote("// --------------------------------------------------------------------------------")
  485. cpp_quote("// MIME Primary Content Types")
  486. cpp_quote("// --------------------------------------------------------------------------------")
  487. cpp_quote("STRCONSTA(STR_CNT_TEXT, \"text\");")
  488. cpp_quote("STRCONSTA(STR_CNT_MULTIPART, \"multipart\");")
  489. cpp_quote("STRCONSTA(STR_CNT_MESSAGE, \"message\");")
  490. cpp_quote("STRCONSTA(STR_CNT_IMAGE, \"image\");")
  491. cpp_quote("STRCONSTA(STR_CNT_AUDIO, \"audio\");")
  492. cpp_quote("STRCONSTA(STR_CNT_VIDEO, \"video\");")
  493. cpp_quote("STRCONSTA(STR_CNT_APPLICATION, \"application\");")
  494. cpp_quote("")
  495. cpp_quote("// --------------------------------------------------------------------------------")
  496. cpp_quote("// MIME Secondary Content Types")
  497. cpp_quote("// --------------------------------------------------------------------------------")
  498. cpp_quote("STRCONSTA(STR_SUB_PLAIN, \"plain\");")
  499. cpp_quote("STRCONSTA(STR_SUB_HTML, \"html\");")
  500. cpp_quote("STRCONSTA(STR_SUB_ENRICHED, \"enriched\");")
  501. cpp_quote("STRCONSTA(STR_SUB_RTF, \"ms-rtf\");")
  502. cpp_quote("STRCONSTA(STR_SUB_MIXED, \"mixed\");")
  503. cpp_quote("STRCONSTA(STR_SUB_PARALLEL, \"parallel\");")
  504. cpp_quote("STRCONSTA(STR_SUB_DIGEST, \"digest\");")
  505. cpp_quote("STRCONSTA(STR_SUB_RELATED, \"related\");")
  506. cpp_quote("STRCONSTA(STR_SUB_ALTERNATIVE, \"alternative\");")
  507. cpp_quote("STRCONSTA(STR_SUB_RFC822, \"rfc822\");")
  508. cpp_quote("STRCONSTA(STR_SUB_PARTIAL, \"partial\");")
  509. cpp_quote("STRCONSTA(STR_SUB_EXTERNAL, \"external-body\");")
  510. cpp_quote("STRCONSTA(STR_SUB_OCTETSTREAM, \"octet-stream\");")
  511. cpp_quote("STRCONSTA(STR_SUB_POSTSCRIPT, \"postscript\");")
  512. cpp_quote("STRCONSTA(STR_SUB_GIF, \"gif\");")
  513. cpp_quote("STRCONSTA(STR_SUB_JPEG, \"jpeg\");")
  514. cpp_quote("STRCONSTA(STR_SUB_BASIC, \"basic\");")
  515. cpp_quote("STRCONSTA(STR_SUB_MPEG, \"mpeg\");")
  516. cpp_quote("STRCONSTA(STR_SUB_MSTNEF, \"ms-tnef\");")
  517. cpp_quote("STRCONSTA(STR_SUB_MSWORD, \"msword\");")
  518. cpp_quote("STRCONSTA(STR_SUB_WAV, \"wav\");")
  519. cpp_quote("STRCONSTA(STR_SUB_PKCS7MIME, \"pkcs7-mime\"); // non-standard")
  520. cpp_quote("STRCONSTA(STR_SUB_PKCS7SIG, \"pkcs7-signature\"); // non-standard")
  521. cpp_quote("STRCONSTA(STR_SUB_XPKCS7MIME, \"x-pkcs7-mime\");")
  522. cpp_quote("STRCONSTA(STR_SUB_XPKCS7SIG, \"x-pkcs7-signature\");")
  523. cpp_quote("STRCONSTA(STR_SUB_SIGNED, \"signed\");")
  524. cpp_quote("STRCONSTA(STR_SUB_BINHEX, \"mac-binhex40\");")
  525. cpp_quote("STRCONSTA(STR_SUB_VCARD, \"x-vcard\");")
  526. cpp_quote("")
  527. cpp_quote("// --------------------------------------------------------------------------------")
  528. cpp_quote("// MIME Content-Transfer-Encoding Types")
  529. cpp_quote("// --------------------------------------------------------------------------------")
  530. cpp_quote("STRCONSTA(STR_ENC_7BIT, \"7bit\");")
  531. cpp_quote("STRCONSTA(STR_ENC_QP, \"quoted-printable\");")
  532. cpp_quote("STRCONSTA(STR_ENC_BASE64, \"base64\");")
  533. cpp_quote("STRCONSTA(STR_ENC_8BIT, \"8bit\");")
  534. cpp_quote("STRCONSTA(STR_ENC_BINARY, \"binary\");")
  535. cpp_quote("STRCONSTA(STR_ENC_UUENCODE, \"uuencode\");")
  536. cpp_quote("STRCONSTA(STR_ENC_XUUENCODE, \"x-uuencode\");")
  537. cpp_quote("STRCONSTA(STR_ENC_XUUE, \"x-uue\");")
  538. cpp_quote("STRCONSTA(STR_ENC_BINHEX40, \"mac-binhex40\");")
  539. cpp_quote("")
  540. cpp_quote("// --------------------------------------------------------------------------------")
  541. cpp_quote("// MIME Content-Disposition Types")
  542. cpp_quote("// --------------------------------------------------------------------------------")
  543. cpp_quote("STRCONSTA(STR_DIS_INLINE, \"inline\");")
  544. cpp_quote("STRCONSTA(STR_DIS_ATTACHMENT, \"attachment\");")
  545. cpp_quote("")
  546. cpp_quote("// --------------------------------------------------------------------------------")
  547. cpp_quote("// MIME Protocol Types")
  548. cpp_quote("// --------------------------------------------------------------------------------")
  549. cpp_quote("STRCONSTA(STR_PRO_SHA1, \"sha1\");")
  550. cpp_quote("STRCONSTA(STR_PRO_MD5, \"rsa-md5\");")
  551. cpp_quote("")
  552. cpp_quote("// --------------------------------------------------------------------------------")
  553. cpp_quote("// Known Priority Strings")
  554. cpp_quote("// --------------------------------------------------------------------------------")
  555. cpp_quote("STRCONSTA(STR_PRI_MS_HIGH, \"High\");")
  556. cpp_quote("STRCONSTA(STR_PRI_MS_NORMAL, \"Normal\");")
  557. cpp_quote("STRCONSTA(STR_PRI_MS_LOW, \"Low\");")
  558. cpp_quote("STRCONSTA(STR_PRI_HIGH, \"1\");")
  559. cpp_quote("STRCONSTA(STR_PRI_NORMAL, \"3\");")
  560. cpp_quote("STRCONSTA(STR_PRI_LOW, \"5\");")
  561. cpp_quote("")
  562. cpp_quote("// --------------------------------------------------------------------------------")
  563. cpp_quote("// IMimeMessage IDataObject clipboard formats (also include CF_TEXT)")
  564. cpp_quote("// --------------------------------------------------------------------------------")
  565. cpp_quote("STRCONSTA(STR_CF_HTML, \"HTML Format\");")
  566. cpp_quote("STRCONSTA(STR_CF_INETMSG, \"Internet Message (rfc822/rfc1522)\");")
  567. cpp_quote("STRCONSTA(STR_CF_RFC822, \"message/rfc822\");")
  568. cpp_quote("")
  569. cpp_quote("// --------------------------------------------------------------------------------")
  570. cpp_quote("// PIDSTRING - Use in GetProp, SetProp, QueryProp, DeleteProp")
  571. cpp_quote("// --------------------------------------------------------------------------------")
  572. cpp_quote("#define PID_BASE 2")
  573. cpp_quote("#define PIDTOSTR(_dwPropId) ((LPCSTR)((DWORD_PTR)(_dwPropId)))")
  574. cpp_quote("#define STRTOPID(_pszName) ((DWORD)((DWORD_PTR)((LPCSTR)(_pszName))))")
  575. cpp_quote("#define ISPIDSTR(_pszName) ((HIWORD((DWORD_PTR)(_pszName)) == 0))")
  576. cpp_quote("#define ISKNOWNPID(_dwPropId) (_dwPropId >= PID_BASE && _dwPropId < PID_LAST)")
  577. cpp_quote("")
  578. cpp_quote("// --------------------------------------------------------------------------------")
  579. cpp_quote("// Mime Property Ids")
  580. cpp_quote("// --------------------------------------------------------------------------------")
  581. cpp_quote("typedef enum tagMIMEPROPID {")
  582. cpp_quote(" PID_HDR_NEWSGROUP = 2,")
  583. cpp_quote(" PID_HDR_NEWSGROUPS = 3,")
  584. cpp_quote(" PID_HDR_REFS = 4,")
  585. cpp_quote(" PID_HDR_SUBJECT = 5,")
  586. cpp_quote(" PID_HDR_FROM = 6,")
  587. cpp_quote(" PID_HDR_MESSAGEID = 7,")
  588. cpp_quote(" PID_HDR_RETURNPATH = 8,")
  589. cpp_quote(" PID_HDR_RR = 9,")
  590. cpp_quote(" PID_HDR_RETRCPTTO = 10,")
  591. cpp_quote(" PID_HDR_APPARTO = 11,")
  592. cpp_quote(" PID_HDR_DATE = 12,")
  593. cpp_quote(" PID_HDR_RECEIVED = 13,")
  594. cpp_quote(" PID_HDR_REPLYTO = 14,")
  595. cpp_quote(" PID_HDR_XMAILER = 15,")
  596. cpp_quote(" PID_HDR_BCC = 16,")
  597. cpp_quote(" PID_HDR_MIMEVER = 17,")
  598. cpp_quote(" PID_HDR_CNTTYPE = 18,")
  599. cpp_quote(" PID_HDR_CNTXFER = 19,")
  600. cpp_quote(" PID_HDR_CNTID = 20,")
  601. cpp_quote(" PID_HDR_CNTDESC = 21,")
  602. cpp_quote(" PID_HDR_CNTDISP = 22,")
  603. cpp_quote(" PID_HDR_CNTBASE = 23,")
  604. cpp_quote(" PID_HDR_CNTLOC = 24,")
  605. cpp_quote(" PID_HDR_TO = 25,")
  606. cpp_quote(" PID_HDR_PATH = 26,")
  607. cpp_quote(" PID_HDR_FOLLOWUPTO = 27,")
  608. cpp_quote(" PID_HDR_EXPIRES = 28,")
  609. cpp_quote(" PID_HDR_CC = 29,")
  610. cpp_quote(" PID_HDR_CONTROL = 30,")
  611. cpp_quote(" PID_HDR_DISTRIB = 31,")
  612. cpp_quote(" PID_HDR_KEYWORDS = 32,")
  613. cpp_quote(" PID_HDR_SUMMARY = 33,")
  614. cpp_quote(" PID_HDR_APPROVED = 34,")
  615. cpp_quote(" PID_HDR_LINES = 35,")
  616. cpp_quote(" PID_HDR_XREF = 36,")
  617. cpp_quote(" PID_HDR_ORG = 37,")
  618. cpp_quote(" PID_HDR_XNEWSRDR = 38,")
  619. cpp_quote(" PID_HDR_XPRI = 39,")
  620. cpp_quote(" PID_HDR_XMSPRI = 40,")
  621. cpp_quote(" PID_PAR_FILENAME = 41,")
  622. cpp_quote(" PID_PAR_BOUNDARY = 42,")
  623. cpp_quote(" PID_PAR_CHARSET = 43,")
  624. cpp_quote(" PID_PAR_NAME = 44,")
  625. cpp_quote(" PID_ATT_FILENAME = 45,")
  626. cpp_quote(" PID_ATT_GENFNAME = 46,")
  627. cpp_quote(" PID_ATT_PRITYPE = 47,")
  628. cpp_quote(" PID_ATT_SUBTYPE = 48,")
  629. cpp_quote(" PID_ATT_NORMSUBJ = 49,")
  630. cpp_quote(" PID_ATT_ILLEGAL = 50,")
  631. cpp_quote(" PID_ATT_RENDERED = 51,")
  632. cpp_quote(" PID_ATT_SENTTIME = 52,")
  633. cpp_quote(" PID_ATT_RECVTIME = 53,")
  634. cpp_quote(" PID_ATT_PRIORITY = 54,")
  635. cpp_quote(" PID_HDR_COMMENT = 55,")
  636. cpp_quote(" PID_HDR_ENCODING = 56,")
  637. cpp_quote(" PID_HDR_ENCRYPTED = 57,")
  638. cpp_quote(" PID_HDR_OFFSETS = 58,")
  639. cpp_quote(" PID_HDR_XUNSENT = 59,")
  640. cpp_quote(" PID_HDR_ARTICLEID = 60,")
  641. cpp_quote(" PID_HDR_SENDER = 61,")
  642. cpp_quote(" PID_ATT_SERVER = 62,")
  643. cpp_quote("#ifdef OE5_BETA2")
  644. cpp_quote(" PID_ATT_ACCOUNTID = 63,")
  645. cpp_quote("#else")
  646. cpp_quote(" PID_ATT_ACCOUNT = 63,")
  647. cpp_quote("#endif")
  648. cpp_quote(" PID_ATT_UIDL = 64,")
  649. cpp_quote(" PID_ATT_STOREMSGID = 65,")
  650. cpp_quote(" PID_ATT_USERNAME = 66,")
  651. cpp_quote(" PID_ATT_FORWARDTO = 67,")
  652. cpp_quote(" PID_ATT_STOREFOLDERID = 68,")
  653. cpp_quote(" PID_ATT_GHOSTED = 69,")
  654. cpp_quote(" PID_ATT_UNCACHEDSIZE = 70,")
  655. cpp_quote(" PID_ATT_COMBINED = 71,")
  656. cpp_quote(" PID_ATT_AUTOINLINED = 72,")
  657. cpp_quote(" PID_LAST = 73 ")
  658. cpp_quote("} MIMEPROPID;")
  659. cpp_quote("")
  660. cpp_quote("// --------------------------------------------------------------------------------")
  661. cpp_quote("// Variant Typed Identifiers")
  662. cpp_quote("// --------------------------------------------------------------------------------")
  663. cpp_quote("#define TYPEDID_MASK ((ULONG)0x0000FFFF)")
  664. cpp_quote("#define TYPEDID_TYPE(_typedid) (VARTYPE)(((ULONG)(_typedid)) & TYPEDID_MASK)")
  665. cpp_quote("#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16)")
  666. cpp_quote("#define TYPEDID(_vartype,_id) ((((TYPEDID)(_id))<<16)|((ULONG)(_vartype)))")
  667. cpp_quote("")
  668. cpp_quote("// --------------------------------------------------------------------------------")
  669. cpp_quote("// Options Ids")
  670. cpp_quote("// --------------------------------------------------------------------------------")
  671. cpp_quote("#define OID_ALLOW_8BIT_HEADER TYPEDID(VT_BOOL, 0x0001) // TRUE or FALSE")
  672. cpp_quote("#define OID_CBMAX_HEADER_LINE TYPEDID(VT_UI4, 0x0002) // Bytes")
  673. cpp_quote("#define OID_SAVE_FORMAT TYPEDID(VT_UI4, 0x0003) // SAVE_RFC822 or SAVE_RFC1521 (mime)")
  674. cpp_quote("#define OID_WRAP_BODY_TEXT TYPEDID(VT_BOOL, 0x0004) // TRUE or FALSE")
  675. cpp_quote("#define OID_CBMAX_BODY_LINE TYPEDID(VT_UI4, 0x0005) // Bytes")
  676. cpp_quote("#define OID_TRANSMIT_BODY_ENCODING TYPEDID(VT_UI4, 0x0006) // ENCODINGTYPE")
  677. cpp_quote("#define OID_TRANSMIT_TEXT_ENCODING TYPEDID(VT_UI4, 0x0007) // ENCODINGTYPE, IMimeMessageTree")
  678. cpp_quote("#define OID_GENERATE_MESSAGE_ID TYPEDID(VT_BOOL, 0x0008) // TRUE or FALSE")
  679. cpp_quote("#define OID_HIDE_TNEF_ATTACHMENTS TYPEDID(VT_BOOL, 0X000E) // TRUE or FALSE")
  680. cpp_quote("#define OID_CLEANUP_TREE_ON_SAVE TYPEDID(VT_BOOL, 0X000F) // TRUE or FALSE")
  681. cpp_quote("#define OID_BODY_REMOVE_NBSP TYPEDID(VT_BOOL, 0x0014) // TRUE or FALSE")
  682. cpp_quote("#define OID_DEFAULT_BODY_CHARSET TYPEDID(VT_UI4, 0x0015) // HCHARSET")
  683. cpp_quote("#define OID_DEFAULT_HEADER_CHARSET TYPEDID(VT_UI4, 0x0016) // HCHARSET")
  684. cpp_quote("#define OID_DBCS_ESCAPE_IS_8BIT TYPEDID(VT_BOOL, 0x0017) // TRUE or FALSE")
  685. cpp_quote("#define OID_SECURITY_TYPE TYPEDID(VT_UI4, 0x0018)")
  686. cpp_quote("#define OID_SECURITY_ALG_HASH TYPEDID(VT_BLOB, 0x0019)")
  687. cpp_quote("#define OID_SECURITY_ALG_BULK TYPEDID(VT_BLOB, 0x0020)")
  688. cpp_quote("#define OID_SECURITY_CERT_SIGNING TYPEDID(VT_UI4, 0x0021)")
  689. cpp_quote("#define OID_SECURITY_CERT_DECRYPTION TYPEDID(VT_UI4, 0x0022)")
  690. cpp_quote("#define OID_SECURITY_RG_CERT_ENCRYPT TYPEDID(VT_VECTOR | VT_UI4, 0x0023)")
  691. cpp_quote("#define OID_SECURITY_HCERTSTORE TYPEDID(VT_UI4, 0x0024)")
  692. cpp_quote("#define OID_SECURITY_RG_CERT_BAG TYPEDID(VT_VECTOR | VT_UI4, 0x0025)")
  693. cpp_quote("#define OID_SECURITY_CRL TYPEDID(VT_BLOB, 0x0026)")
  694. cpp_quote("#define OID_SECURITY_SEARCHSTORES TYPEDID(VT_VECTOR | VT_UI4, 0x0027)")
  695. cpp_quote("#define OID_SECURITY_RG_IASN TYPEDID(VT_VECTOR | VT_UI4, 0x0028)")
  696. cpp_quote("#define OID_SECURITY_SYMCAPS TYPEDID(VT_BLOB, 0x0029)")
  697. cpp_quote("#define OID_SECURITY_AUTHATTR TYPEDID(VT_BLOB, 0x002A)")
  698. cpp_quote("#define OID_SECURITY_UNAUTHATTR TYPEDID(VT_BLOB, 0x002B)")
  699. cpp_quote("#define OID_SECURITY_SIGNTIME TYPEDID(VT_FILETIME,0x002C)")
  700. cpp_quote("#define OID_SECURITY_USER_VALIDITY TYPEDID(VT_UI4, 0x002D)")
  701. cpp_quote("#define OID_SECURITY_RO_MSG_VALIDITY TYPEDID(VT_UI4, 0x002E) // read-only")
  702. cpp_quote("#define OID_SECURITY_HCRYPTPROV TYPEDID(VT_UI4, 0x002F)")
  703. cpp_quote("#define OID_SECURITY_ENCODE_FLAGS TYPEDID(VT_UI4, 0x0030)")
  704. cpp_quote("#define OID_SECURITY_CERT_INCLUDED TYPEDID(VT_BOOL, 0x0031) // read-only")
  705. cpp_quote("#define OID_SECURITY_HWND_OWNER TYPEDID(VT_UI4, 0x0032)")
  706. cpp_quote("#define OID_SECURITY_REQUESTED_CTE TYPEDID(VT_I4, 0x0033)")
  707. cpp_quote("#define OID_NO_DEFAULT_CNTTYPE TYPEDID(VT_BOOL, 0x0034)")
  708. cpp_quote("#define OID_XMIT_PLAIN_TEXT_ENCODING TYPEDID(VT_UI4, 0x0035) // ENCODINGTYPE, IMimeMessageTree")
  709. cpp_quote("#define OID_XMIT_HTML_TEXT_ENCODING TYPEDID(VT_UI4, 0x0036) // ENCODINGTYPE, IMimeMessageTree")
  710. cpp_quote("#define OID_HEADER_RELOAD_TYPE TYPEDID(VT_UI4, 0x0037) // RELOADTYPE IMimeMessageTree or IMimeBody or IMimePropertySet")
  711. cpp_quote("#define OID_CAN_INLINE_TEXT_BODIES TYPEDID(VT_BOOL, 0x0038) // TRUE or FALSE")
  712. cpp_quote("#define OID_SHOW_MACBINARY TYPEDID(VT_BOOL, 0x0039) // TRUE or FALSE")
  713. cpp_quote("#define OID_SAVEBODY_KEEPBOUNDARY TYPEDID(VT_BOOL, 0x0040) // TRUE or FALSE")
  714. // Version 5 Options
  715. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  716. // Old OIDs with new multiple value extensions
  717. cpp_quote("#define OID_SECURITY_ALG_HASH_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0019)")
  718. cpp_quote("#define OID_SECURITY_CERT_SIGNING_RG TYPEDID(VT_VECTOR | VT_UI4, 0x0021)")
  719. cpp_quote("#define OID_SECURITY_SYMCAPS_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0029)")
  720. cpp_quote("#define OID_SECURITY_AUTHATTR_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x002A)")
  721. cpp_quote("#define OID_SECURITY_UNAUTHATTR_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x002B)")
  722. cpp_quote("#define OID_SECURITY_SIGNTIME_RG TYPEDID(VT_VECTOR | VT_FILETIME, 0x002C)")
  723. cpp_quote("#define OID_SECURITY_USER_VALIDITY_RG TYPEDID(VT_VECTOR | VT_UI4, 0x002D)")
  724. cpp_quote("#define OID_SECURITY_RO_MSG_VALIDITY_RG TYPEDID(VT_VECTOR | VT_UI4, 0x002E) // read-only")
  725. // New OIDs
  726. cpp_quote("#define OID_SUPPORT_EXTERNAL_BODY TYPEDID(VT_BOOL, 0x0041) // TRUE or FALSE")
  727. cpp_quote("#define OID_LOAD_USE_BIND_FILE TYPEDID(VT_BOOL, 0x0042) // TRUE or FALSE")
  728. cpp_quote("#define OID_SECURITY_SIGNATURE_COUNT TYPEDID(VT_UI4, 0x0043) // Size of SECURITY LAYER arrays")
  729. cpp_quote("#define OID_HANDSOFF_ONSAVE TYPEDID(VT_BOOL, 0x0044) // TRUE or FALSE")
  730. cpp_quote("#define OID_SECURITY_RECEIPT TYPEDID(VT_BLOB, 0x0045) // Receipt body")
  731. cpp_quote("#define OID_NOSECURITY_ONSAVE TYPEDID(VT_BOOL, 0x0046) // TRUE or FALSE")
  732. cpp_quote("#define OID_DECODE_RFC1154 TYPEDID(VT_BOOL, 0x0047) // TRUE or FALSE")
  733. cpp_quote("#endif")
  734. cpp_quote("")
  735. cpp_quote("// --------------------------------------------------------------------------------")
  736. cpp_quote("// Default Option Values")
  737. cpp_quote("// --------------------------------------------------------------------------------")
  738. cpp_quote("#define DEF_ALLOW_8BIT_HEADER FALSE")
  739. cpp_quote("#define DEF_CBMAX_HEADER_LINE 1000")
  740. cpp_quote("#define DEF_SAVE_FORMAT SAVE_RFC1521")
  741. cpp_quote("#define DEF_WRAP_BODY_TEXT TRUE")
  742. cpp_quote("#define DEF_CBMAX_BODY_LINE 74")
  743. cpp_quote("#define DEF_GENERATE_MESSAGE_ID FALSE")
  744. cpp_quote("#define DEF_HASH_ALG_ID 0x8004 //SHA //N needed?")
  745. cpp_quote("#define DEF_ENCRYPTION_ALG_ID 0x6602 //RC2 //N needed?")
  746. cpp_quote("#define DEF_INCLUDE_SENDER_CERT FALSE")
  747. cpp_quote("#define DEF_HIDE_TNEF_ATTACHMENTS TRUE")
  748. cpp_quote("#define DEF_CLEANUP_TREE_ON_SAVE TRUE")
  749. cpp_quote("#define DEF_BODY_REMOVE_NBSP TRUE")
  750. cpp_quote("#define DEF_SECURITY_IGNOREMASK 0")
  751. cpp_quote("#define DEF_DBCS_ESCAPE_IS_8BIT FALSE")
  752. cpp_quote("#define DEF_TRANSMIT_BODY_ENCODING IET_UNKNOWN")
  753. cpp_quote("#define DEF_TRANSMIT_TEXT_ENCODING IET_UNKNOWN")
  754. cpp_quote("#define DEF_XMIT_PLAIN_TEXT_ENCODING IET_UNKNOWN")
  755. cpp_quote("#define DEF_XMIT_HTML_TEXT_ENCODING IET_UNKNOWN")
  756. cpp_quote("#define DEF_NO_DEFAULT_CNTTYPE FALSE")
  757. cpp_quote("#define DEF_HEADER_RELOAD_TYPE_TREE RELOAD_HEADER_RESET")
  758. cpp_quote("#define DEF_HEADER_RELOAD_TYPE_PROPSET RELOAD_HEADER_NONE")
  759. cpp_quote("#define DEF_CAN_INLINE_TEXT_BODIES FALSE")
  760. cpp_quote("#define DEF_SHOW_MACBINARY FALSE")
  761. cpp_quote("#define DEF_SAVEBODY_KEEPBOUNDARY FALSE")
  762. // Version 5 Options
  763. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  764. cpp_quote("#define DEF_SUPPORT_EXTERNAL_BODY FALSE")
  765. cpp_quote("#define DEF_LOAD_USE_BIND_FILE FALSE")
  766. cpp_quote("#define DEF_HANDSOFF_ONSAVE FALSE")
  767. cpp_quote("#define DEF_DECODE_RFC1154 FALSE")
  768. cpp_quote("#endif")
  769. cpp_quote("")
  770. cpp_quote("// --------------------------------------------------------------------------------")
  771. cpp_quote("// Min-Max Option Values")
  772. cpp_quote("// --------------------------------------------------------------------------------")
  773. cpp_quote("#define MAX_CBMAX_HEADER_LINE 0xffffffff")
  774. cpp_quote("#define MIN_CBMAX_HEADER_LINE 76")
  775. cpp_quote("#define MAX_CBMAX_BODY_LINE 0xffffffff")
  776. cpp_quote("#define MIN_CBMAX_BODY_LINE 30")
  777. cpp_quote("")
  778. cpp_quote("// --------------------------------------------------------------------------------")
  779. cpp_quote("// LIBID_MIMEOLE")
  780. cpp_quote("// --------------------------------------------------------------------------------")
  781. [
  782. uuid(E4B28371-83B0-11d0-8259-00C04FD85AB4),
  783. helpstring("Microsoft MIMEOLE Type Library 1.0"),
  784. version(1.0)
  785. ]
  786. library MIMEOLE
  787. {
  788. importlib("stdole2.tlb");
  789. #ifndef DECLARE_HANDLE
  790. #define DECLARE_HANDLE(name) \
  791. struct name##__ { DWORD unused; }; \
  792. typedef const struct name##__ _far* name
  793. #endif
  794. DECLARE_HANDLE(HCHARSET);
  795. typedef HCHARSET *LPHCHARSET;
  796. DECLARE_HANDLE(HBODY);
  797. typedef HBODY *LPHBODY;
  798. DECLARE_HANDLE(HHEADERROW);
  799. typedef HHEADERROW *LPHHEADERROW;
  800. typedef DWORD TYPEDID;
  801. typedef const PROPVARIANT *LPCPROPVARIANT;
  802. typedef const BLOB *LPCBLOB;
  803. typedef enum tagRELOADTYPE {
  804. RELOAD_HEADER_NONE,
  805. RELOAD_HEADER_RESET,
  806. RELOAD_HEADER_APPEND,
  807. RELOAD_HEADER_REPLACE
  808. } RELOADTYPE;
  809. typedef enum tagMIMESAVETYPE {
  810. SAVE_RFC822, // Non-mime - UUENCODE
  811. SAVE_RFC1521 // MIME
  812. } MIMESAVETYPE;
  813. typedef enum tagCSETAPPLYTYPE {
  814. CSET_APPLY_UNTAGGED, // Apply the hCharset to all un-tagged properties or use as default on send
  815. CSET_APPLY_ALL, // Apply the hCharset to all properties, including tagged properties
  816. CSET_APPLY_TAG_ALL // Apply the hCharset to all properties, including tagged properties, and mark things as tagged (IBT_CSETTAGGED)
  817. } CSETAPPLYTYPE;
  818. // -----------------------------------------------------------------------------------
  819. // ENCODINGTYPE | Internet Charset | Internet Encoding | Transmittable
  820. // -----------------------------------------------------------------------------------
  821. // IET_BINARY | No | No | No
  822. // IET_BASE64 | Yes | Yes | Yes
  823. // IET_UUENCODE | Yes | Yes | Yes
  824. // IET_QP | Yes | Yes | Yes
  825. // IET_7BIT | Yes | No (Dot Stuffed) | Yes
  826. // IET_8BIT | Yes | No (Dot Stuffed) | Yes
  827. // -----------------------------------------------------------------------------------
  828. typedef enum tagENCODINGTYPE {
  829. // -1 is reserved for an IMimeSecurity default
  830. IET_BINARY, // decoded (mime, uu, or stripped lead-dots)/windows charset
  831. IET_BASE64, // Base64 encoded/internet charset
  832. IET_UUENCODE, // Uu encoded/internet charset
  833. IET_QP, // Quoted-Printable encoded/internet charset
  834. IET_7BIT, // non-encoded (lead-dots stuffed)/internet charset 7bit data
  835. IET_8BIT, // non-encoded (lead-dots stuffed)/internet charset 8bit data
  836. IET_INETCSET, // Decoded, but in an Internet Character Set
  837. IET_UNICODE, // Decoded in unicode
  838. IET_RFC1522, // Header Encoding
  839. IET_ENCODED, // Used mostly for header properties (combines IET_INETCSET and IET_RFC1522)
  840. IET_CURRENT, // Use the current encoding of the body
  841. IET_UNKNOWN, // The encoding is unknown, can be treated as binary...
  842. IET_BINHEX40, // Apple Macintosh Binhex
  843. IET_LAST // Don't use
  844. } ENCODINGTYPE;
  845. // IET_DECODED means the same as IET_BINARY
  846. const SHORT IET_DECODED = IET_BINARY;
  847. // ---------------------------------------------------------------------------------------
  848. // String Constants
  849. // ---------------------------------------------------------------------------------------
  850. const SHORT CCHMAX_HEADER_LINE = 1000;
  851. // ---------------------------------------------------------------------------------------
  852. // IID_IMimeInternational
  853. // ---------------------------------------------------------------------------------------
  854. [
  855. uuid(C5588349-7F86-11d0-8252-00C04FD85AB4),
  856. helpstring("IMimeInternational"),
  857. ]
  858. interface IMimeInternational : IUnknown
  859. {
  860. typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL;
  861. typedef DWORD CODEPAGEID;
  862. const CODEPAGEID CP_USASCII = 1252;
  863. const CODEPAGEID CP_UNICODE = 1200;
  864. const CODEPAGEID CP_JAUTODETECT = 50932; // Japan auto detect
  865. const CODEPAGEID CP_KAUTODETECT = 50949; // Korean auto detect
  866. const CODEPAGEID CP_ISO2022JPESC = 50221; // codepage for ISO-2022-JP-ESC
  867. const CODEPAGEID CP_ISO2022JPSIO = 50222; // codepage for ISO-2022-JP-SIO
  868. const SHORT CCHMAX_CSET_NAME = 128;
  869. const SHORT CCHMAX_LANG_NAME = 128;
  870. const SHORT CCHMAX_FACE_NAME = 128;
  871. typedef struct tagINETCSETINFO {
  872. CHAR szName[CCHMAX_CSET_NAME]; // Character Set name
  873. HCHARSET hCharset; // Handle to this character set
  874. CODEPAGEID cpiWindows; // Windows CodePage
  875. CODEPAGEID cpiInternet; // Internet Code Page
  876. DWORD dwReserved1; // Reserved, don't use
  877. } INETCSETINFO, *LPINETCSETINFO;
  878. typedef enum tagINETLANGMASK {
  879. ILM_FAMILY = 0x00000001, // CODEPAGEINFO::dwFamily is valid
  880. ILM_NAME = 0x00000002, // CODEPAGEINFO::szName is valid
  881. ILM_BODYCSET = 0x00000004, // CODEPAGEINFO::szBodyCset is valid
  882. ILM_HEADERCSET = 0x00000008, // CODEPAGEINFO::szHeadCset is valid
  883. ILM_WEBCSET = 0x00000010, // CODEPAGEINFO::szWebCset is valid
  884. ILM_FIXEDFONT = 0x00000020, // CODEPAGEINFO::szFixedFont is valid
  885. ILM_VARIABLEFONT = 0x00000040 // CODEPAGEINFO::szVariableFont is valid
  886. } INETLANGMASK;
  887. typedef struct tagCODEPAGEINFO {
  888. DWORD dwMask; // Describes which fields are valid (INETLANGMASK)
  889. CODEPAGEID cpiCodePage; // Handle to this charset (code page number / mlangid)
  890. BOOL fIsValidCodePage; // Value of IsValidCodePage(idCodePage)
  891. ULONG ulMaxCharSize; // Maximum width of a character in this codepage
  892. BOOL fInternetCP; // Is this an Internet Code Page
  893. CODEPAGEID cpiFamily; // Windows Code page if fInternetCP == TRUE
  894. CHAR szName[CCHMAX_LANG_NAME]; // Language Name
  895. CHAR szBodyCset[CCHMAX_CSET_NAME]; // Charset to be used for the body
  896. CHAR szHeaderCset[CCHMAX_CSET_NAME]; // Charset to be used for the Header
  897. CHAR szWebCset[CCHMAX_CSET_NAME]; // Charset to be used for the body
  898. CHAR szFixedFont[CCHMAX_FACE_NAME]; // Fixed Width Font Face Name
  899. CHAR szVariableFont[CCHMAX_FACE_NAME];// Variable Width Font Face Name
  900. ENCODINGTYPE ietNewsDefault; // Default news mime encoding (FMT_BASE64 or FMT_QP)
  901. ENCODINGTYPE ietMailDefault; // Default mail mime encoding (FMT_BASE64 or FMT_QP)
  902. DWORD dwReserved1; // Reserved, don't use
  903. } CODEPAGEINFO, *LPCODEPAGEINFO;
  904. typedef struct tagRFC1522INFO {
  905. BOOL fRfc1522Allowed; // Can rfc 1522 be used to encode/decode the header
  906. BOOL fRfc1522Used; // Was rfc 1522 used to encode/decode the header
  907. BOOL fAllow8bit; // Is 8bit allowed in the encoded header...
  908. HCHARSET hRfc1522Cset; // The charset used in the rfc1522 encoded (DecodeHeader only)
  909. } RFC1522INFO, *LPRFC1522INFO;
  910. typedef enum tagCHARSETTYPE {
  911. CHARSET_BODY, // Corresponds to CODEPAGEINFO::szBodyCset
  912. CHARSET_HEADER, // Corresponds to CODEPAGEINFO::szHeaderCset
  913. CHARSET_WEB // Corresponds to CODEPAGEINFO::szWebCset
  914. } CHARSETTYPE;
  915. HRESULT SetDefaultCharset(
  916. [in] HCHARSET hCharset);
  917. HRESULT GetDefaultCharset(
  918. [out] LPHCHARSET phCharset);
  919. HRESULT GetCodePageCharset(
  920. [in] CODEPAGEID cpiCodePage,
  921. [in] CHARSETTYPE ctCsetType,
  922. [out] LPHCHARSET phCharset);
  923. HRESULT FindCharset(
  924. [in] LPCSTR pszCharset,
  925. [out] LPHCHARSET phCharset);
  926. HRESULT GetCharsetInfo(
  927. [in] HCHARSET hCharset,
  928. [in,out] LPINETCSETINFO pCsetInfo);
  929. HRESULT GetCodePageInfo(
  930. [in] CODEPAGEID cpiCodePage,
  931. [in,out] LPCODEPAGEINFO pCodePageInfo);
  932. HRESULT CanConvertCodePages(
  933. [in] CODEPAGEID cpiSource,
  934. [in] CODEPAGEID cpiDest);
  935. HRESULT DecodeHeader(
  936. [in] HCHARSET hCharset,
  937. [in] LPCSTR pszData,
  938. [in,out] LPPROPVARIANT pDecoded,
  939. [in,out] LPRFC1522INFO pRfc1522Info);
  940. HRESULT EncodeHeader(
  941. [in] HCHARSET hCharset,
  942. [in] LPPROPVARIANT pData,
  943. [out] LPSTR *ppszEncoded,
  944. [in,out] LPRFC1522INFO pRfc1522Info);
  945. HRESULT ConvertBuffer(
  946. [in] CODEPAGEID cpiSource,
  947. [in] CODEPAGEID cpiDest,
  948. [in] LPBLOB pIn,
  949. [in,out] LPBLOB pOut,
  950. [out] ULONG *pcbRead);
  951. HRESULT ConvertString(
  952. [in] CODEPAGEID cpiSource,
  953. [in] CODEPAGEID cpiDest,
  954. [in] LPPROPVARIANT pIn,
  955. [in,out] LPPROPVARIANT pOut);
  956. HRESULT MLANG_ConvertInetReset(void);
  957. HRESULT MLANG_ConvertInetString(
  958. [in] CODEPAGEID cpiSource,
  959. [in] CODEPAGEID cpiDest,
  960. [in] LPCSTR pSource,
  961. [in] int *pnSizeOfSource,
  962. [out] LPSTR pDestination,
  963. [in] int *pnDstSize);
  964. HRESULT Rfc1522Decode(
  965. [in] LPCSTR pszValue,
  966. [in,ref] LPSTR pszCharset,
  967. [in] ULONG cchmax,
  968. [out] LPSTR *ppszDecoded);
  969. HRESULT Rfc1522Encode(
  970. [in] LPCSTR pszValue,
  971. [in] HCHARSET hCharset,
  972. [out] LPSTR *ppszEncoded);
  973. }
  974. // ---------------------------------------------------------------------------------------
  975. // IID_IMimeSecurity
  976. // ---------------------------------------------------------------------------------------
  977. [
  978. uuid(C5588353-7F86-11d0-8252-00C04FD85AB4),
  979. helpstring("IMimeSecurity"),
  980. ]
  981. interface IMimeSecurity : IUnknown
  982. {
  983. typedef [unique] IMimeSecurity *LPMIMESECURITY;
  984. typedef [unique] const IMimeSecurity *LPCMIMESECURITY;
  985. typedef BLOB THUMBBLOB;
  986. typedef void *HCAPICERTSTORE;
  987. cpp_quote("#ifndef __WINCRYPT_H__")
  988. typedef const void *PCX509CERT;
  989. typedef void *HCERTSTORE;
  990. cpp_quote("#else")
  991. cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;")
  992. cpp_quote("#endif")
  993. cpp_quote("#ifndef IMS_ALGIDDEF")
  994. cpp_quote("#define IMS_ALGIDDEF")
  995. typedef unsigned int ALG_ID;
  996. cpp_quote("#endif")
  997. cpp_quote("// -------------------------------------------------------------------")
  998. cpp_quote("// ITT_* - thumbprint types")
  999. cpp_quote("// -------------------------------------------------------------------")
  1000. typedef DWORD ITHUMBPRINTTYPE;
  1001. cpp_quote("#define ITT_SIGNING 0x00000001")
  1002. cpp_quote("#define ITT_ENCRYPTION 0x00000002")
  1003. cpp_quote("// -------------------------------------------------------------------")
  1004. cpp_quote("// SEF_* - Secure Encoding Flags")
  1005. cpp_quote("// must not overlap the EBF flags")
  1006. cpp_quote("// -------------------------------------------------------------------")
  1007. cpp_quote("#define SEF_ENCRYPTWITHNOSENDERCERT 0x00000001")
  1008. cpp_quote("#define SEF_SENDERSCERTPROVIDED 0x00000002")
  1009. cpp_quote("#define SEF_MASK 0x0000ffff")
  1010. cpp_quote("// -------------------------------------------------------------------")
  1011. cpp_quote("// EBF_* - Enchanted Broccoli Forest, also Encode Body Flags")
  1012. cpp_quote("// must not overlap the SEF flags")
  1013. cpp_quote("// -------------------------------------------------------------------")
  1014. cpp_quote("#define EBF_RECURSE 0x00010000")
  1015. cpp_quote("#define EBF_COMMITIFDIRTY 0x00020000")
  1016. cpp_quote("#define EBF_MASK 0xffff0000")
  1017. cpp_quote("// -------------------------------------------------------------------")
  1018. cpp_quote("// MSV_* - MIME Security Validity")
  1019. cpp_quote("// -------------------------------------------------------------------")
  1020. cpp_quote("#define MSV_OK 0x00000000")
  1021. cpp_quote("#define MSV_BADSIGNATURE 0X00000001")
  1022. cpp_quote("#define MSV_UNVERIFIABLE 0X00000002")
  1023. cpp_quote("#define MSV_UNKHASH 0X00000004")
  1024. cpp_quote("#define MSV_MALFORMEDSIG 0X00000080")
  1025. cpp_quote("#define MSV_SIGNATURE_MASK 0X000000ff")
  1026. cpp_quote("#define MSV_EXPIRED_SIGNINGCERT 0X00000100")
  1027. cpp_quote("#define MSV_SIGNING_MASK 0X00000f00")
  1028. cpp_quote("#define MSV_CANTDECRYPT 0X00001000")
  1029. cpp_quote("#define MSV_ENC_FOR_EXPIREDCERT 0X00002000")
  1030. cpp_quote("#define MSV_ENCRYPT_MASK 0x000ff000")
  1031. cpp_quote("#define MSV_INVALID 0X01000000")
  1032. cpp_quote("#define MSV_MSG_MASK 0x0f000000")
  1033. cpp_quote("// -------------------------------------------------------------------")
  1034. cpp_quote("// MST_* - MIME Security Type")
  1035. cpp_quote("// -------------------------------------------------------------------")
  1036. cpp_quote("#define MST_NONE 0x00000000")
  1037. cpp_quote("#define MST_THIS_SIGN 0x00000001")
  1038. cpp_quote("#define MST_THIS_ENCRYPT 0x00000002")
  1039. cpp_quote("#define MST_THIS_BLOBSIGN 0x00000005 // MST_BLOB_FLAG|MST_THIS_SIGN")
  1040. cpp_quote("#define MST_CHILD_SIGN 0x00000100")
  1041. cpp_quote("#define MST_CHILD_ENCRYPT 0x00000200")
  1042. cpp_quote("#define MST_SUBMSG_SIGN 0x00001000")
  1043. cpp_quote("#define MST_SUBMSG_ENCRYPT 0x00002000")
  1044. cpp_quote("#define MST_THIS_MASK 0x000000ff")
  1045. cpp_quote("#define MST_CHILD_MASK 0x00000f00")
  1046. cpp_quote("#define MST_SUBMSG_MASK 0x0000f000")
  1047. cpp_quote("#define MST_DESCENDENT_MASK 0x0000ff00 //(MST_CHILD|MST_SUBMSG)")
  1048. cpp_quote("#define MST_SIGN_MASK 0x00001101")
  1049. cpp_quote("#define MST_ENCRYPT_MASK 0x00002202")
  1050. cpp_quote("#define MST_BLOB_FLAG 0x00000004")
  1051. cpp_quote("#define MST_TYPE_MASK 0x0000ffff")
  1052. cpp_quote("#define MST_RECEIPT_REQUEST 0x00010000")
  1053. cpp_quote("#define MST_CLASS_SMIME_V1 0x00000000")
  1054. cpp_quote("#define MST_CLASS_PGP 0x01000000")
  1055. cpp_quote("#define MST_CLASS_MASK 0xff000000")
  1056. // -------------------------------------------------------------------
  1057. // CERTSTATE
  1058. // -------------------------------------------------------------------
  1059. typedef enum tagCERTSTATE {
  1060. CERTIFICATE_OK, // Only non-error state
  1061. CERTIFICATE_NOT_PRESENT,
  1062. CERTIFICATE_EXPIRED, // Specific
  1063. CERTIFICATE_CHAIN_TOO_LONG, // |
  1064. CERTIFICATE_MISSING_ISSUER, // v
  1065. CERTIFICATE_CRL_LISTED, // General
  1066. CERTIFICATE_NOT_TRUSTED, // (Be as specific as possible)
  1067. CERTIFICATE_INVALID,
  1068. CERTIFICATE_ERROR, // Last resort
  1069. CERTIFICATE_NOPRINT, // no thumbprint provided
  1070. CERTIFICATE_UNKNOWN // Default
  1071. } CERTSTATE;
  1072. // -------------------------------------------------------------------
  1073. // CERTNAMETYPE:
  1074. // Equivalent of CAPI flags to CertNameToStr
  1075. // -------------------------------------------------------------------
  1076. typedef enum tagCERTNAMETYPE {
  1077. SIMPLE,
  1078. OID,
  1079. X500
  1080. } CERTNAMETYPE;
  1081. // -------------------------------------------------------------------
  1082. // CERTDATAID:
  1083. // used to identify request to GetCertData
  1084. // -------------------------------------------------------------------
  1085. typedef enum tagCERTDATAID {
  1086. CDID_EMAIL, // VT_LPSTR
  1087. CDID_MAX
  1088. } CERTDATAID;
  1089. // -------------------------------------------------------------------
  1090. // X509CERTRESULT:
  1091. //
  1092. // cEntries- count of the two arrays
  1093. // rgcs - array of results mapped to ops done on/with rgpCert
  1094. // rgpCert - array of certificates
  1095. //
  1096. // -------------------------------------------------------------------
  1097. typedef struct tagX509CERTRESULT {
  1098. DWORD cEntries;
  1099. CERTSTATE *rgcs;
  1100. PCX509CERT *rgpCert;
  1101. } X509CERTRESULT, *PX509CERTRESULT;
  1102. typedef const X509CERTRESULT *PCX509CERTRESULT;
  1103. HRESULT InitNew(void);
  1104. HRESULT CheckInit(void);
  1105. HRESULT EncodeMessage(
  1106. [in] IMimeMessageTree *const pTree,
  1107. [in] DWORD dwFlags);
  1108. HRESULT EncodeBody(
  1109. [in] IMimeMessageTree *const pTree,
  1110. [in] HBODY hEncodeRoot,
  1111. [in] DWORD dwFlags);
  1112. HRESULT DecodeMessage(
  1113. [in] IMimeMessageTree *const pTree,
  1114. [in] DWORD dwFlags);
  1115. HRESULT DecodeBody(
  1116. [in] IMimeMessageTree *const pTree,
  1117. [in] HBODY hDecodeRoot,
  1118. [in] DWORD dwFlags);
  1119. HRESULT EnumCertificates(
  1120. [in] HCAPICERTSTORE hc,
  1121. [in] DWORD dwUsage,
  1122. [in] PCX509CERT pPrev,
  1123. [out] PCX509CERT *ppCert);
  1124. HRESULT GetCertificateName(
  1125. [in] const PCX509CERT pX509Cert,
  1126. [in] const CERTNAMETYPE cn,
  1127. [out] LPSTR *ppszName);
  1128. HRESULT GetMessageType(
  1129. [in] const HWND hwndParent,
  1130. [in] IMimeBody *const pBody,
  1131. [out] DWORD *const pdwSecType);
  1132. HRESULT GetCertData(
  1133. [in] const PCX509CERT pX509Cert,
  1134. [in] const CERTDATAID dataid,
  1135. [out, ref] LPPROPVARIANT pValue);
  1136. }
  1137. // ---------------------------------------------------------------------------------------
  1138. // IID_IMimeHeaderTable
  1139. // ---------------------------------------------------------------------------------------
  1140. [
  1141. uuid(FD853CD1-7F86-11d0-8252-00C04FD85AB4),
  1142. helpstring("IMimeHeaderTable"),
  1143. ]
  1144. interface IMimeHeaderTable : IPersistStream
  1145. {
  1146. typedef struct tagFINDHEADER {
  1147. LPCSTR pszHeader; // Header Name to find
  1148. DWORD dwReserved; // Reserved, do use this
  1149. } FINDHEADER, *LPFINDHEADER;
  1150. typedef struct tagHEADERROWINFO {
  1151. DWORD dwRowNumber; // Position of the row within the header (1 - x)
  1152. ULONG cboffStart; // Index into pStream where Header Starts (From: xxxx)
  1153. ULONG cboffColon; // Index into pStream of the Header Colon
  1154. ULONG cboffEnd; // Index into pStream where the Header Ends
  1155. } HEADERROWINFO, *LPHEADERROWINFO;
  1156. typedef enum tagHEADERTABLEFLAGS {
  1157. HTF_NAMEINDATA = 0x00000001, // The header name is inlcuded in the data
  1158. HTF_ENUMHANDLESONLY = 0x00000002 // Enumerate Only Handles
  1159. } HEADERTABLEFLAGS;
  1160. HRESULT FindFirstRow(
  1161. [in] LPFINDHEADER pFindHeader,
  1162. [out] LPHHEADERROW phRow);
  1163. HRESULT FindNextRow(
  1164. [in] LPFINDHEADER pFindHeader,
  1165. [out] LPHHEADERROW phRow);
  1166. HRESULT CountRows(
  1167. [in] LPCSTR pszHeader,
  1168. [out] ULONG *pcRows);
  1169. HRESULT AppendRow(
  1170. [in] LPCSTR pszHeader,
  1171. [in] DWORD dwFlags,
  1172. [in] LPCSTR pszData,
  1173. [in] ULONG cchData,
  1174. [out] LPHHEADERROW phRow);
  1175. HRESULT DeleteRow(
  1176. [in] HHEADERROW hRow);
  1177. HRESULT GetRowData(
  1178. [in] HHEADERROW hRow,
  1179. [in] DWORD dwFlags,
  1180. [out] LPSTR *ppszData,
  1181. [out] ULONG *pcchData);
  1182. HRESULT SetRowData(
  1183. [in] HHEADERROW hRow,
  1184. [in] DWORD dwFlags,
  1185. [in] LPCSTR pszData,
  1186. [in] ULONG cchData);
  1187. HRESULT GetRowInfo(
  1188. [in] HHEADERROW hRow,
  1189. [in,out] LPHEADERROWINFO pInfo);
  1190. HRESULT SetRowNumber(
  1191. [in] HHEADERROW hRow,
  1192. [in] DWORD dwRowNumber);
  1193. HRESULT EnumRows(
  1194. [in] LPCSTR pszHeader,
  1195. [in] DWORD dwFlags,
  1196. [out] IMimeEnumHeaderRows **ppEnum);
  1197. HRESULT Clone(
  1198. [out] IMimeHeaderTable **ppTable);
  1199. HRESULT BindToObject(
  1200. [in] REFIID riid,
  1201. [out, iid_is(riid)] void **ppvObject);
  1202. }
  1203. // ---------------------------------------------------------------------------------------
  1204. // IID_IMimePropertySchema
  1205. // ---------------------------------------------------------------------------------------
  1206. [
  1207. uuid(FD853CEC-7F86-11d0-8252-00C04FD85AB4),
  1208. helpstring("IMimePropertySchema"),
  1209. ]
  1210. interface IMimePropertySchema : IUnknown
  1211. {
  1212. typedef [unique] IMimePropertySchema *LPMIMEPROPERTYSCHEMA;
  1213. typedef enum tagMIMEPROPFLAGS {
  1214. MPF_INETCSET = 0x00000001, // Property can be encoded in an internet character set
  1215. MPF_RFC1522 = 0x00000002, // Property can be encoded using rfc1522
  1216. MPF_ADDRESS = 0x00000004, // Property is in the form of an rfc822 addr-path field
  1217. MPF_HASPARAMS = 0x00000008, // Property contains parseable parameters (i.e. Content-Type)
  1218. MPF_MIME = 0x00000010, // Property is a MIME specific header
  1219. MPF_READONLY = 0x00000020 // Property is read-only and can not be set or appended
  1220. } MIMEPROPFLAGS;
  1221. HRESULT RegisterProperty(
  1222. [in] LPCSTR pszName,
  1223. [in] DWORD dwFlags,
  1224. [in] DWORD dwRowNumber,
  1225. [in] VARTYPE vtDefault,
  1226. [out] LPDWORD pdwPropId);
  1227. HRESULT ModifyProperty(
  1228. [in] LPCSTR pszName,
  1229. [in] DWORD dwFlags,
  1230. [in] DWORD dwRowNumber,
  1231. [in] VARTYPE vtDefault);
  1232. HRESULT GetPropertyId(
  1233. [in] LPCSTR pszName,
  1234. [out] LPDWORD pdwPropId);
  1235. HRESULT GetPropertyName(
  1236. [in] DWORD dwPropId,
  1237. [out] LPSTR *ppszName);
  1238. HRESULT RegisterAddressType(
  1239. [in] LPCSTR pszName,
  1240. [out] LPDWORD pdwAdrType);
  1241. }
  1242. // ---------------------------------------------------------------------------------------
  1243. // IID_IMimePropertySet
  1244. // ---------------------------------------------------------------------------------------
  1245. [
  1246. uuid(FD853CD3-7F86-11d0-8252-00C04FD85AB4),
  1247. helpstring("IMimePropertySet"),
  1248. ]
  1249. interface IMimePropertySet : IPersistStreamInit
  1250. {
  1251. typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET;
  1252. cpp_quote("#define PDF_ENCODED 0x00000001")
  1253. cpp_quote("#define PDF_NAMEINDATA 0x00000002")
  1254. cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)")
  1255. cpp_quote("#define PDF_NOCOMMENTS 0x00000008")
  1256. cpp_quote("#define PDF_SAVENOENCODE 0x00000010")
  1257. cpp_quote("#define PDF_VECTOR 0x00000020")
  1258. typedef struct tagMIMEPARAMINFO {
  1259. LPSTR pszName; // Parameter Name (i.e. charset)
  1260. LPSTR pszData; // Paramater data
  1261. } MIMEPARAMINFO, *LPMIMEPARAMINFO;
  1262. typedef enum tagPROPINFOMASK {
  1263. PIM_CHARSET = 0x00000001, // The MIMEPROPINFO::hCharset member is valid
  1264. PIM_ENCODINGTYPE = 0x00000002, // The MIMEPROPINFO::ietEncoding member is valid
  1265. PIM_ROWNUMBER = 0x00000004, // The MIMEPROPINFO::dwRowNumber member is valid
  1266. PIM_FLAGS = 0x00000008, // The MIMEPROPINFO::dwFlags member is valid
  1267. PIM_PROPID = 0x00000010, // The MIMEPROPINFO::dwPropId member is valid
  1268. PIM_VALUES = 0x00000020, // The MIMEPROPINFO::cValues member is valid
  1269. PIM_VTDEFAULT = 0x00000040, // The MIMEPROPINFO::vtDefault member is valid
  1270. PIM_VTCURRENT = 0x00000080 // The MIMEPROPINFO::vtCurrent member is valid
  1271. } PROPINFOMASK;
  1272. typedef struct tagMIMEPROPINFO {
  1273. DWORD dwMask; // What members in this structure are valid
  1274. HCHARSET hCharset; // Property Charset
  1275. ENCODINGTYPE ietEncoding; // Encoded in an internet character set
  1276. DWORD dwRowNumber; // Current header property row number
  1277. DWORD dwFlags; // (GetPropInfo only) Property Flags (MIMEPROPFLAGS)
  1278. DWORD dwPropId; // (GetPropInfo only) Property Id
  1279. DWORD cValues; // (GetPropInfo only) Number of appended values (i.e. multi-line headers)
  1280. VARTYPE vtDefault; // The Default Data Type for this property
  1281. VARTYPE vtCurrent; // The Current Data Type for this property
  1282. } MIMEPROPINFO, *LPMIMEPROPINFO;
  1283. typedef const MIMEPROPINFO *LPCMIMEPROPINFO;
  1284. HRESULT GetPropInfo(
  1285. [in] LPCSTR pszName,
  1286. [in,out] LPMIMEPROPINFO pInfo);
  1287. HRESULT SetPropInfo(
  1288. [in] LPCSTR pszName,
  1289. [in] LPCMIMEPROPINFO pInfo);
  1290. HRESULT GetProp(
  1291. [in] LPCSTR pszName,
  1292. [in] DWORD dwFlags,
  1293. [in,out] LPPROPVARIANT pValue);
  1294. HRESULT SetProp(
  1295. [in] LPCSTR pszName,
  1296. [in] DWORD dwFlags,
  1297. [in] LPCPROPVARIANT pValue);
  1298. HRESULT AppendProp(
  1299. [in] LPCSTR pszName,
  1300. [in] DWORD dwFlags,
  1301. [in] LPPROPVARIANT pValue);
  1302. HRESULT DeleteProp(
  1303. [in] LPCSTR pszName);
  1304. HRESULT CopyProps(
  1305. [in] ULONG cNames,
  1306. [in] LPCSTR *prgszName,
  1307. [in] IMimePropertySet *pPropertySet);
  1308. HRESULT MoveProps(
  1309. [in] ULONG cNames,
  1310. [in] LPCSTR *prgszName,
  1311. [in] IMimePropertySet *pPropertySet);
  1312. HRESULT DeleteExcept(
  1313. [in] ULONG cNames,
  1314. [in] LPCSTR *prgszName);
  1315. HRESULT QueryProp(
  1316. [in] LPCSTR pszName,
  1317. [in] LPCSTR pszCriteria,
  1318. [in] boolean fSubString,
  1319. [in] boolean fCaseSensitive);
  1320. HRESULT GetCharset(
  1321. [out] LPHCHARSET phCharset);
  1322. HRESULT SetCharset(
  1323. [in] HCHARSET hCharset,
  1324. [in] CSETAPPLYTYPE applytype);
  1325. HRESULT GetParameters(
  1326. [in] LPCSTR pszName,
  1327. [out] ULONG *pcParams,
  1328. [out] LPMIMEPARAMINFO *pprgParam);
  1329. HRESULT IsContentType(
  1330. [in] LPCSTR pszPriType,
  1331. [in] LPCSTR pszSubType);
  1332. HRESULT BindToObject(
  1333. [in] REFIID riid,
  1334. [out, iid_is(riid)] void **ppvObject);
  1335. HRESULT Clone(
  1336. [out] IMimePropertySet **ppPropertySet);
  1337. HRESULT SetOption(
  1338. [in] const TYPEDID oid,
  1339. [in] LPCPROPVARIANT pValue);
  1340. HRESULT GetOption(
  1341. [in] const TYPEDID oid,
  1342. [in,out] LPPROPVARIANT pValue);
  1343. cpp_quote("#define EPF_NONAME 0x00000001")
  1344. HRESULT EnumProps(
  1345. [in] DWORD dwFlags,
  1346. [out] IMimeEnumProperties **ppEnum);
  1347. }
  1348. // ---------------------------------------------------------------------------------------
  1349. // IID_IMimeAddressTable
  1350. // ---------------------------------------------------------------------------------------
  1351. [
  1352. uuid(C558834A-7F86-11d0-8252-00C04FD85AB4),
  1353. helpstring("IID_IMimeAddressTable "),
  1354. ]
  1355. interface IMimeAddressTable : IUnknown
  1356. {
  1357. typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE;
  1358. typedef DWORD IADDRESSTYPE;
  1359. DECLARE_HANDLE(HADDRESS);
  1360. typedef HADDRESS *LPHADDRESS;
  1361. cpp_quote("#define IAT_UNKNOWN 0x00000000")
  1362. cpp_quote("#define IAT_FROM 0x00000001")
  1363. cpp_quote("#define IAT_SENDER 0x00000002")
  1364. cpp_quote("#define IAT_TO 0x00000004")
  1365. cpp_quote("#define IAT_CC 0x00000008")
  1366. cpp_quote("#define IAT_BCC 0x00000010")
  1367. cpp_quote("#define IAT_REPLYTO 0x00000020")
  1368. cpp_quote("#define IAT_RETURNPATH 0x00000040")
  1369. cpp_quote("#define IAT_RETRCPTTO 0x00000080")
  1370. cpp_quote("#define IAT_RR 0x00000100")
  1371. cpp_quote("#define IAT_APPARTO 0x00000200")
  1372. cpp_quote("#define IAT_ALL 0xFFFFFFFF")
  1373. cpp_quote("#define IAT_KNOWN (IAT_FROM | IAT_TO | IAT_CC | IAT_BCC | IAT_REPLYTO | IAT_SENDER)")
  1374. cpp_quote("#define IAT_RECIPS (IAT_TO | IAT_CC | IAT_BCC)")
  1375. typedef enum tagADDRESSFORMAT {
  1376. AFT_DISPLAY_FRIENDLY, // Display with friendly names only
  1377. AFT_DISPLAY_EMAIL, // Display with friendly email addresses only
  1378. AFT_DISPLAY_BOTH, // Display with friendly name and eamil addresses
  1379. AFT_RFC822_DECODED, // RFC822 Format (decoded)
  1380. AFT_RFC822_ENCODED, // RFC822 Format (encoded)
  1381. AFT_RFC822_TRANSMIT // RFC822 Format (encoded) with CRLFs for folding
  1382. } ADDRESSFORMAT;
  1383. cpp_quote("#define IAP_CHARSET 0x00000001")
  1384. cpp_quote("#define IAP_HANDLE 0x00000002")
  1385. cpp_quote("#define IAP_ADRTYPE 0x00000004")
  1386. cpp_quote("#define IAP_FRIENDLY 0x00000008")
  1387. cpp_quote("#define IAP_EMAIL 0x00000020")
  1388. cpp_quote("#define IAP_CERTSTATE 0x00000100")
  1389. cpp_quote("#define IAP_SIGNING_PRINT 0x00000200")
  1390. cpp_quote("#define IAP_ENCRYPTION_PRINT 0x00000400")
  1391. cpp_quote("#define IAP_ENCODING 0x00000800")
  1392. cpp_quote("#define IAP_COOKIE 0x00001000")
  1393. cpp_quote("#define IAP_ALL 0xffffffff")
  1394. typedef struct tagADDRESSPROPS {
  1395. DWORD dwProps; // Mask of IAP_xxx flags for valid items in this structure
  1396. HADDRESS hAddress; // IAP_HANDLE: Handle of this address
  1397. ENCODINGTYPE ietFriendly; // IAP_ENCODING: Current encoding of pszFriendly
  1398. HCHARSET hCharset; // IAP_CHARSET: Charset used to encode pszFriendly
  1399. DWORD dwAdrType; // IAP_ADRTYPE: Single IAT_xxx Flag, address type
  1400. LPSTR pszFriendly; // IAP_FRIENDLY: Friendly Name (ANSI)
  1401. LPWSTR pwszReserved; // Reserved for future use, don't use, must be NULL
  1402. LPSTR pszEmail; // IAP_EMAIL: Email Address (ANSI)
  1403. CERTSTATE certstate; // IAP_CERTSTATE: Certificate State
  1404. THUMBBLOB tbSigning; // IAP_SIGNING_PRINT: Thumbprint to be used for signing
  1405. THUMBBLOB tbEncryption; // IAP_ENCRYPTION_PRINT: Thumbprint to be used for signing
  1406. DWORD dwCookie; // IAP_COOKIE: User-defined cookie
  1407. DWORD dwReserved1; // Reserved, dont use
  1408. DWORD dwReserved2; // Reserved, dont use
  1409. } ADDRESSPROPS, *LPADDRESSPROPS;
  1410. typedef struct tagADDRESSLIST {
  1411. ULONG cAdrs; // Number of items in prgAddress
  1412. LPADDRESSPROPS prgAdr; // Array of pointers to IMimeAddressInfo objects
  1413. } ADDRESSLIST, *LPADDRESSLIST;
  1414. HRESULT Append(
  1415. [in] DWORD dwAdrType,
  1416. [in] ENCODINGTYPE ietFriendly,
  1417. [in] LPCSTR pszFriendly,
  1418. [in] LPCSTR pszEmail,
  1419. [out] LPHADDRESS phAddress);
  1420. HRESULT Insert(
  1421. [in] LPADDRESSPROPS pAddress,
  1422. [out] LPHADDRESS phAddress);
  1423. HRESULT SetProps(
  1424. [in] HADDRESS hAddress,
  1425. [in] LPADDRESSPROPS pAddress);
  1426. HRESULT GetProps(
  1427. [in] HADDRESS hAddress,
  1428. [in] LPADDRESSPROPS pAddress);
  1429. HRESULT GetSender(
  1430. [in,out] LPADDRESSPROPS pAddress);
  1431. HRESULT CountTypes(
  1432. [in] DWORD dwAdrTypes,
  1433. [out] ULONG *pcAdrs);
  1434. HRESULT GetTypes(
  1435. [in] DWORD dwAdrTypes,
  1436. [in] DWORD dwProps,
  1437. [in,out] LPADDRESSLIST pList);
  1438. HRESULT EnumTypes(
  1439. [in] DWORD dwAdrTypes,
  1440. [in] DWORD dwProps,
  1441. [out] IMimeEnumAddressTypes **ppEnum);
  1442. HRESULT Delete(
  1443. [in] HADDRESS hAddress);
  1444. HRESULT DeleteTypes(
  1445. [in] DWORD dwAdrTypes);
  1446. HRESULT GetFormat(
  1447. [in] DWORD dwAdrType,
  1448. [in] ADDRESSFORMAT format,
  1449. [out] LPSTR *ppszFormat);
  1450. HRESULT AppendRfc822(
  1451. [in] DWORD dwAdrType,
  1452. [in] ENCODINGTYPE ietEncoding,
  1453. [in] LPCSTR pszRfc822Adr);
  1454. HRESULT ParseRfc822(
  1455. [in] DWORD dwAdrType,
  1456. [in] ENCODINGTYPE ietEncoding,
  1457. [in] LPCSTR pszRfc822Adr,
  1458. [in,out] LPADDRESSLIST pList);
  1459. HRESULT Clone(
  1460. [out] IMimeAddressTable **ppTable);
  1461. HRESULT BindToObject(
  1462. [in] REFIID riid,
  1463. [out, iid_is(riid)] void **ppvObject);
  1464. }
  1465. // ---------------------------------------------------------------------------------------
  1466. // IID_IMimeWebDocument
  1467. // ---------------------------------------------------------------------------------------
  1468. [
  1469. uuid(EE519F11-851A-11d0-825C-00C04FD85AB4),
  1470. helpstring("IMimeWebDocument"),
  1471. ]
  1472. interface IMimeWebDocument : IUnknown
  1473. {
  1474. HRESULT GetURL(
  1475. [out] LPSTR *ppszURL);
  1476. HRESULT BindToStorage(
  1477. [in] REFIID riid,
  1478. [out, iid_is(riid)] LPVOID *ppvObject);
  1479. }
  1480. // ---------------------------------------------------------------------------------------
  1481. // IID_IMimeBody
  1482. // ---------------------------------------------------------------------------------------
  1483. [
  1484. uuid(C558834C-7F86-11d0-8252-00C04FD85AB4),
  1485. helpstring("IMimeBody"),
  1486. ]
  1487. interface IMimeBody : IMimePropertySet
  1488. {
  1489. typedef [unique] IMimeBody *LPMIMEBODY;
  1490. typedef enum tagIMSGBODYTYPE {
  1491. IBT_SECURE, // Body has cryptographic enhancement(s)
  1492. IBT_ATTACHMENT, // Body is considered an attachment by mimeole
  1493. IBT_EMPTY, // Is the body empty
  1494. IBT_CSETTAGGED, // Is the body tagged with a character set?
  1495. IBT_AUTOATTACH // If OID_CAN_INLINE_TEXT_BODIES is TRUE and the body was marked as an attachment by mimeole
  1496. } IMSGBODYTYPE;
  1497. typedef struct tagBODYOFFSETS {
  1498. DWORD cbBoundaryStart; // Offset of starting boundary for the body
  1499. DWORD cbHeaderStart; // Header start offset
  1500. DWORD cbBodyStart; // Body start offset (same as end of header)
  1501. DWORD cbBodyEnd; // Body end offset
  1502. } BODYOFFSETS, *LPBODYOFFSETS;
  1503. typedef struct tagTRANSMITINFO {
  1504. ENCODINGTYPE ietCurrent; // Current encoding type of the data
  1505. ENCODINGTYPE ietXmitMime; // Recommended Transmit Encoding
  1506. ENCODINGTYPE ietXmit822; // Recommended Transmit Encoding
  1507. ULONG cbLongestLine; // Longest line seen, determines if wrapping is needed
  1508. ULONG cExtended; // Count of Extended Characters
  1509. ULONG ulPercentExt; // Percentage of extended characters in the body
  1510. ULONG cbSize; // Number of bytes in the decoded data (exact)
  1511. ULONG cLines; // Number of lines in the decoded data
  1512. } TRANSMITINFO, *LPTRANSMITINFO;
  1513. HRESULT IsType(
  1514. [in] IMSGBODYTYPE bodytype);
  1515. HRESULT SetDisplayName(
  1516. [in] LPCSTR pszDisplay);
  1517. HRESULT GetDisplayName(
  1518. [out] LPSTR *ppszDisplay);
  1519. HRESULT GetOffsets(
  1520. [out] LPBODYOFFSETS pOffsets);
  1521. HRESULT GetCurrentEncoding(
  1522. [out] ENCODINGTYPE *pietEncoding);
  1523. HRESULT SetCurrentEncoding(
  1524. [in] ENCODINGTYPE ietEncoding);
  1525. HRESULT GetEstimatedSize(
  1526. [in] ENCODINGTYPE ietEncoding,
  1527. [out] ULONG *pcbSize);
  1528. HRESULT GetDataHere(
  1529. [in] ENCODINGTYPE ietEncoding,
  1530. [in] IStream *pStream);
  1531. HRESULT GetData(
  1532. [in] ENCODINGTYPE ietEncoding,
  1533. [out] IStream **ppStream);
  1534. HRESULT SetData(
  1535. [in] ENCODINGTYPE ietEncoding,
  1536. [in] LPCSTR pszPriType,
  1537. [in] LPCSTR pszSubType,
  1538. [in] REFIID riid,
  1539. [in, iid_is(riid)] LPVOID pvObject);
  1540. HRESULT EmptyData(void);
  1541. HRESULT CopyTo(
  1542. [in] IMimeBody *pBody);
  1543. HRESULT GetTransmitInfo(
  1544. [in,out] LPTRANSMITINFO pTransmitInfo);
  1545. HRESULT SaveToFile(
  1546. [in] ENCODINGTYPE ietEncoding,
  1547. [in] LPCSTR pszFilePath);
  1548. HRESULT GetHandle(
  1549. [out] LPHBODY phBody);
  1550. }
  1551. // ---------------------------------------------------------------------------------------
  1552. // IID_IMimeMessageTree - Supports Aggregation
  1553. // ---------------------------------------------------------------------------------------
  1554. [
  1555. uuid(FD853CD4-7F86-11d0-8252-00C04FD85AB4),
  1556. helpstring("IMimeMessageTree"),
  1557. ]
  1558. interface IMimeMessageTree : IPersistStreamInit
  1559. {
  1560. typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE;
  1561. const HBODY HBODY_ROOT = (HBODY)-1;
  1562. typedef enum tagBODYLOCATION {
  1563. IBL_ROOT, // Get the root body of the message
  1564. IBL_PARENT, // Parent of pInRelation
  1565. IBL_FIRST, // First Child
  1566. IBL_LAST, // Last Child
  1567. IBL_NEXT, // Next Sibling
  1568. IBL_PREVIOUS // Previous Sibling
  1569. } BODYLOCATION;
  1570. typedef struct tagFINDBODY {
  1571. LPSTR pszPriType;
  1572. LPSTR pszSubType;
  1573. DWORD dwReserved;
  1574. } FINDBODY, *LPFINDBODY;
  1575. cpp_quote("#define COMMIT_ONLYIFDIRTY 0x00000001")
  1576. cpp_quote("#define COMMIT_REUSESTORAGE 0x00000002")
  1577. cpp_quote("#define COMMIT_SMIMETRANSFERENCODE 0x00000004")
  1578. HRESULT GetMessageSource(
  1579. [out] IStream **ppStream,
  1580. [in] DWORD dwFlags); // COMMIT_xxx Flags
  1581. HRESULT GetMessageSize(
  1582. [out] ULONG *pcbSize,
  1583. [in] DWORD dwFlags); // COMMIT_xxx Flags
  1584. HRESULT LoadOffsetTable(
  1585. [in] IStream *pStream);
  1586. HRESULT SaveOffsetTable(
  1587. [in] IStream *pStream,
  1588. [in] DWORD dwFlags); // COMMIT_xxx Flags
  1589. HRESULT GetFlags(
  1590. [out] DWORD *pdwFlags);
  1591. HRESULT Commit(
  1592. [in] DWORD dwFlags); // COMMIT_xxx Flags
  1593. HRESULT HandsOffStorage(void);
  1594. HRESULT BindToObject(
  1595. [in] const HBODY hBody,
  1596. [in] REFIID riid,
  1597. [out, iid_is(riid)] void **ppvObject);
  1598. // NOTE: High word of SAVEBODY_* is reserved for private internal flags
  1599. cpp_quote("#define SAVEBODY_KEEPBOUNDARY 0x00000001")
  1600. HRESULT SaveBody(
  1601. [in] HBODY hBody,
  1602. [in] DWORD dwFlags,
  1603. [in] IStream *pStream);
  1604. HRESULT InsertBody(
  1605. [in] BODYLOCATION location,
  1606. [in] HBODY hPivot,
  1607. [out] LPHBODY phBody);
  1608. HRESULT GetBody(
  1609. [in] BODYLOCATION location,
  1610. [in] HBODY hPivot,
  1611. [out] LPHBODY phBody);
  1612. cpp_quote("#define DELETE_PROMOTE_CHILDREN 0x00000001")
  1613. cpp_quote("#define DELETE_CHILDREN_ONLY 0x00000002")
  1614. HRESULT DeleteBody(
  1615. [in] HBODY hBody,
  1616. [in] DWORD dwFlags);
  1617. HRESULT MoveBody(
  1618. [in] HBODY hBody,
  1619. [in] BODYLOCATION location);
  1620. HRESULT CountBodies(
  1621. [in] HBODY hParent,
  1622. [in] boolean fRecurse,
  1623. [out] ULONG *pcBodies);
  1624. HRESULT FindFirst(
  1625. [in,out] LPFINDBODY pFindBody,
  1626. [out] LPHBODY phBody);
  1627. HRESULT FindNext(
  1628. [in,out] LPFINDBODY pFindBody,
  1629. [out] LPHBODY phBody);
  1630. HRESULT ResolveURL(
  1631. [in] HBODY hRelated,
  1632. [in] LPCSTR pszBase,
  1633. [in] LPCSTR pszURL,
  1634. [in] DWORD dwFlags,
  1635. [out] LPHBODY phBody);
  1636. HRESULT ToMultipart(
  1637. [in] HBODY hBody,
  1638. [in] LPCSTR pszSubType,
  1639. [out] LPHBODY phMultipart);
  1640. HRESULT GetBodyOffsets(
  1641. [in] HBODY hBody,
  1642. [in,out] LPBODYOFFSETS pOffsets);
  1643. HRESULT GetCharset(
  1644. [out] LPHCHARSET phCharset);
  1645. HRESULT SetCharset(
  1646. [in] HCHARSET hCharset,
  1647. [in] CSETAPPLYTYPE applytype);
  1648. HRESULT IsBodyType(
  1649. [in] HBODY hBody,
  1650. [in] IMSGBODYTYPE bodytype);
  1651. HRESULT IsContentType(
  1652. [in] HBODY hBody,
  1653. [in] LPCSTR pszPriType,
  1654. [in] LPCSTR pszSubType);
  1655. HRESULT QueryBodyProp(
  1656. [in] HBODY hBody,
  1657. [in] LPCSTR pszName,
  1658. [in] LPCSTR pszCriteria,
  1659. [in] boolean fSubString,
  1660. [in] boolean fCaseSensitive);
  1661. HRESULT GetBodyProp(
  1662. [in] HBODY hBody,
  1663. [in] LPCSTR pszName,
  1664. [in] DWORD dwFlags,
  1665. [in, out] LPPROPVARIANT pValue);
  1666. HRESULT SetBodyProp(
  1667. [in] HBODY hBody,
  1668. [in] LPCSTR pszName,
  1669. [in] DWORD dwFlags,
  1670. [in] LPCPROPVARIANT pValue);
  1671. HRESULT DeleteBodyProp(
  1672. [in] HBODY hBody,
  1673. [in] LPCSTR pszName);
  1674. HRESULT SetOption(
  1675. [in] const TYPEDID oid,
  1676. [in] LPCPROPVARIANT pValue);
  1677. HRESULT GetOption(
  1678. [in] const TYPEDID oid,
  1679. [in,out] LPPROPVARIANT pValue);
  1680. }
  1681. // ---------------------------------------------------------------------------------------
  1682. // IID_IMimeMessage - Supports Aggregation
  1683. // ---------------------------------------------------------------------------------------
  1684. [
  1685. uuid(FD853CD5-7F86-11d0-8252-00C04FD85AB4),
  1686. helpstring("IMimeMessage"),
  1687. ]
  1688. interface IMimeMessage : IMimeMessageTree
  1689. {
  1690. typedef [unique] IMimeMessage *LPMIMEMESSAGE;
  1691. typedef DWORD TEXTTYPE;
  1692. typedef enum tagIMSGFLAGS {
  1693. IMF_ATTACHMENTS = 0x00000001, // The message has attachments
  1694. IMF_MULTIPART = 0x00000002, // The message is a multipart message
  1695. IMF_SUBMULTIPART = 0x00000004, // The message has a nested multipart section
  1696. IMF_MIME = 0x00000008, // The message is in MIME format
  1697. IMF_HTML = 0x00000010, // The message has a text/html body
  1698. IMF_PLAIN = 0x00000020, // The message has a text/plain body
  1699. IMF_PARTIAL = 0x00000040, // The message has un-matching boundaries, or is a message/partial
  1700. IMF_SIGNED = 0x00000080, // The message is signed
  1701. IMF_ENCRYPTED = 0x00000100, // The message is secured
  1702. IMF_TNEF = 0x00000200, // The message has a Microsoft TNEF attachment
  1703. IMF_MHTML = 0x00000400, // The message has a MIME-HTML multipart/related section
  1704. IMF_SECURE = 0x00000800, // The message has a cryptographic enhancement
  1705. IMF_TEXT = 0x00001000, // The message contains text/xxx part(s)
  1706. IMF_CSETTAGGED = 0x00002000, // The message was tagged with a charset
  1707. IMF_NEWS = 0x00004000, // The message has nntp (news) headers (Newsgroup, Path, etc)
  1708. IMF_VOICEMAIL = 0x00008000, // The message has the X-Voicemail Header Set to something
  1709. IMF_HASVCARD = 0x00010000, // The message has a text/v-card attachment.
  1710. IMF_RFC1154 = 0x00020000 // The message was decoded using RFC1154.
  1711. } IMSGFLAGS;
  1712. typedef enum tagIMSGPRIORITY {
  1713. IMSG_PRI_LOW = 5,
  1714. IMSG_PRI_NORMAL = 3,
  1715. IMSG_PRI_HIGH = 1
  1716. } IMSGPRIORITY;
  1717. cpp_quote("#define WPF_HTML 0x00000001") // Full-fidelity HTML (if not set, mimeole will downgrade to plain-text)
  1718. cpp_quote("#define WPF_AUTOINLINE 0x00000002") // Inline images that are marked as attachment
  1719. cpp_quote("#define WPF_SLIDESHOW 0x00000004") // Show all inlined images in a slideshow
  1720. cpp_quote("#define WPF_ATTACHLINKS 0x00000008") // Put links to the attachments in the WebPage
  1721. cpp_quote("#define WPF_IMAGESONLY 0x00000010") // Only show inline images
  1722. cpp_quote("#define WPF_NOMETACHARSET 0x00000020") // Only show inline images
  1723. typedef struct tagWEBPAGEOPTIONS {
  1724. DWORD cbSize; // Size of this structure
  1725. DWORD dwFlags; // WPF_xxx Flags
  1726. DWORD dwDelay; // Delay time in milliseconds for auto-slide-show
  1727. WCHAR wchQuote; // Quote char to use for reply ticking
  1728. } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS;
  1729. cpp_quote("#define TXT_PLAIN 0x00000001")
  1730. cpp_quote("#define TXT_HTML 0x00000002")
  1731. cpp_quote("#define URL_ATTACH_INTO_MIXED 0x00000001")
  1732. cpp_quote("#define URL_ATTACH_GENERATE_CID 0x00000002")
  1733. cpp_quote("#define URL_ATTACH_SET_CNTTYPE 0x00000004")
  1734. cpp_quote("#define URL_RESOLVE_RENDERED 0x00000001")
  1735. cpp_quote("#define URL_RESULVE_NO_BASE 0x00000002")
  1736. HRESULT CreateWebPage(
  1737. [in] IStream *pRootStm,
  1738. [in] LPWEBPAGEOPTIONS pOptions,
  1739. [in] IMimeMessageCallback *pCallback,
  1740. [out] IMoniker **ppMoniker);
  1741. HRESULT GetProp(
  1742. [in] LPCSTR pszName,
  1743. [in] DWORD dwFlags,
  1744. [in,out] LPPROPVARIANT pValue);
  1745. HRESULT SetProp(
  1746. [in] LPCSTR pszName,
  1747. [in] DWORD dwFlags,
  1748. [in] LPCPROPVARIANT pValue);
  1749. HRESULT DeleteProp(
  1750. [in] LPCSTR pszName);
  1751. HRESULT QueryProp(
  1752. [in] LPCSTR pszName,
  1753. [in] LPCSTR pszCriteria,
  1754. [in] boolean fSubString,
  1755. [in] boolean fCaseSensitive);
  1756. HRESULT GetTextBody(
  1757. [in] DWORD dwTxtType,
  1758. [in] ENCODINGTYPE ietEncoding,
  1759. [out] IStream **ppStream,
  1760. [out] LPHBODY phBody);
  1761. HRESULT SetTextBody(
  1762. [in] DWORD dwTxtType,
  1763. [in] ENCODINGTYPE ietEncoding,
  1764. [in] HBODY hAlternative,
  1765. [in] IStream *pStream,
  1766. [out] LPHBODY phBody);
  1767. HRESULT AttachObject(
  1768. [in] REFIID riid,
  1769. [in, iid_is(riid)] void *pvObject,
  1770. [out] LPHBODY phBody);
  1771. HRESULT AttachFile(
  1772. [in] LPCSTR pszFilePath,
  1773. [in] IStream *pstmFile,
  1774. [out] LPHBODY phBody);
  1775. HRESULT AttachURL(
  1776. [in] LPCSTR pszBase,
  1777. [in] LPCSTR pszURL,
  1778. [in] DWORD dwFlags,
  1779. [in] IStream *pstmURL,
  1780. [out] LPSTR *ppszCIDURL,
  1781. [out] LPHBODY phBody);
  1782. HRESULT GetAttachments(
  1783. [out] ULONG *pcAttach,
  1784. [out] LPHBODY *pprghAttach);
  1785. HRESULT GetAddressTable(
  1786. [out] IMimeAddressTable **ppTable);
  1787. HRESULT GetSender(
  1788. [in,out] LPADDRESSPROPS pAddress);
  1789. HRESULT GetAddressTypes(
  1790. [in] DWORD dwAdrTypes,
  1791. [in] DWORD dwProps,
  1792. [in,out] LPADDRESSLIST pList);
  1793. HRESULT GetAddressFormat(
  1794. [in] DWORD dwAdrType,
  1795. [in] ADDRESSFORMAT format,
  1796. [out] LPSTR *ppszFormat);
  1797. HRESULT EnumAddressTypes(
  1798. [in] DWORD dwAdrTypes,
  1799. [in] DWORD dwProps,
  1800. [out] IMimeEnumAddressTypes **ppEnum);
  1801. HRESULT SplitMessage(
  1802. [in] ULONG cbMaxPart,
  1803. [out] IMimeMessageParts **ppParts);
  1804. HRESULT GetRootMoniker(
  1805. [out] IMoniker **ppMoniker);
  1806. }
  1807. // ---------------------------------------------------------------------------------------
  1808. // IID_IMimeWebPageCallback
  1809. // ---------------------------------------------------------------------------------------
  1810. [
  1811. uuid(761AA641-7BDA-11d1-8AA9-00C04FB951F3),
  1812. helpstring("IMimeMessageCallback"),
  1813. ]
  1814. interface IMimeMessageCallback : IUnknown
  1815. {
  1816. typedef IMimeMessageCallback *LPMIMEMESSAGECALLBACK;
  1817. // Returns S_OK if wrote something into pStream
  1818. HRESULT OnWebPageSplitter([in] DWORD cInlined, [in] IStream *ppStream);
  1819. }
  1820. // ---------------------------------------------------------------------------------------
  1821. // IID_IPersistMime
  1822. // ---------------------------------------------------------------------------------------
  1823. [
  1824. uuid(DE4AD8DA-555F-11d1-8DD0-00C04FB951F9),
  1825. helpstring("IPersistMime"),
  1826. ]
  1827. interface IPersistMime : IPersist
  1828. {
  1829. typedef IPersistMime *LPPERSISTMIME;
  1830. cpp_quote("#define PMS_HTML 0x00000001")
  1831. cpp_quote("#define PMS_TEXT 0x00000002")
  1832. HRESULT Load([in] IMimeMessage *pMsg);
  1833. HRESULT Save([in] IMimeMessage *pMsg, [in] DWORD dwFlags);
  1834. }
  1835. // ---------------------------------------------------------------------------------------
  1836. // IID_IMimeMessageParts - Used for splitting and re-combining partial messages
  1837. // ---------------------------------------------------------------------------------------
  1838. [
  1839. uuid(C558834F-7F86-11d0-8252-00C04FD85AB4),
  1840. helpstring("IMimeMessageParts"),
  1841. ]
  1842. interface IMimeMessageParts : IUnknown
  1843. {
  1844. typedef [unique] IMimeMessageParts *LPMIMEMESSAGEPARTS;
  1845. HRESULT CombineParts(
  1846. [out] IMimeMessage **ppMessage);
  1847. HRESULT AddPart(
  1848. [in] IMimeMessage *pMessage);
  1849. HRESULT SetMaxParts(
  1850. [in] ULONG cParts);
  1851. HRESULT CountParts(
  1852. [out] ULONG *pcParts);
  1853. HRESULT EnumParts(
  1854. [out] IMimeEnumMessageParts **ppEnum);
  1855. }
  1856. // ---------------------------------------------------------------------------------------
  1857. // IID_IMimeEnumHeaderRows
  1858. // ---------------------------------------------------------------------------------------
  1859. [
  1860. uuid(C558834D-7F86-11d0-8252-00C04FD85AB4),
  1861. helpstring("IMimeEnumHeaderRows"),
  1862. ]
  1863. interface IMimeEnumHeaderRows : IUnknown
  1864. {
  1865. typedef [unique] IMimeEnumHeaderRows *LPMIMEENUMHEADERROWS;
  1866. typedef struct tagENUMHEADERROW {
  1867. HHEADERROW hRow;
  1868. LPSTR pszHeader;
  1869. LPSTR pszData;
  1870. ULONG cchData;
  1871. DWORD dwReserved;
  1872. } ENUMHEADERROW, *LPENUMHEADERROW;
  1873. HRESULT Next(
  1874. [in] ULONG cFetch,
  1875. [in,out] LPENUMHEADERROW prgRow,
  1876. [out] ULONG *pcFetched);
  1877. HRESULT Skip(
  1878. [in] ULONG cItems);
  1879. HRESULT Reset(void);
  1880. HRESULT Clone(
  1881. [out] IMimeEnumHeaderRows **ppEnum);
  1882. HRESULT Count(
  1883. [out] ULONG *pcItems);
  1884. }
  1885. // ---------------------------------------------------------------------------------------
  1886. // IID_IMimeEnumProperties
  1887. // ---------------------------------------------------------------------------------------
  1888. [
  1889. uuid(FD853CEE-7F86-11d0-8252-00C04FD85AB4),
  1890. helpstring("IMimeEnumProperties"),
  1891. ]
  1892. interface IMimeEnumProperties : IUnknown
  1893. {
  1894. typedef [unique] IMimeEnumProperties *LPMIMEENUMPROPERTIES;
  1895. typedef struct tagENUMPROPERTY {
  1896. LPSTR pszName;
  1897. HHEADERROW hRow;
  1898. DWORD dwPropId;
  1899. } ENUMPROPERTY, *LPENUMPROPERTY;
  1900. HRESULT Next(
  1901. [in] ULONG cFetch,
  1902. [in,out] LPENUMPROPERTY prgProp,
  1903. [out] ULONG *pcFetched);
  1904. HRESULT Skip(
  1905. [in] ULONG cItems);
  1906. HRESULT Reset(void);
  1907. HRESULT Clone(
  1908. [out] IMimeEnumProperties **ppEnum);
  1909. HRESULT Count(
  1910. [out] ULONG *pcItems);
  1911. }
  1912. // ---------------------------------------------------------------------------------------
  1913. // IID_IMimeEnumAddressTypes
  1914. // ---------------------------------------------------------------------------------------
  1915. [
  1916. uuid(C5588354-7F86-11d0-8252-00C04FD85AB4),
  1917. helpstring("IMimeEnumAddressTypes"),
  1918. ]
  1919. interface IMimeEnumAddressTypes : IUnknown
  1920. {
  1921. typedef [unique] IMimeEnumAddressTypes *LPMIMEENUMADDRESSTYPES;
  1922. HRESULT Next(
  1923. [in] ULONG cFetch,
  1924. [in,out] LPADDRESSPROPS prgAdr,
  1925. [out] ULONG *pcFetched);
  1926. HRESULT Skip(
  1927. [in] ULONG cItems);
  1928. HRESULT Reset(void);
  1929. HRESULT Clone(
  1930. [out] IMimeEnumAddressTypes **ppEnum);
  1931. HRESULT Count(
  1932. [out] ULONG *pcItems);
  1933. }
  1934. // ---------------------------------------------------------------------------------------
  1935. // IID_IMimeEnumMessageParts - Used to enumerate IMimeMessageParts container
  1936. // ---------------------------------------------------------------------------------------
  1937. [
  1938. uuid(C5588350-7F86-11d0-8252-00C04FD85AB4),
  1939. helpstring("IMimeEnumMessageParts"),
  1940. ]
  1941. interface IMimeEnumMessageParts : IUnknown
  1942. {
  1943. typedef [unique] IMimeEnumMessageParts *LPMIMEENUMMESSAGEPARTS;
  1944. HRESULT Next(
  1945. [in] ULONG cFetch,
  1946. [in,out] IMimeMessage **prgpMessage,
  1947. [out] ULONG *pcFetched);
  1948. HRESULT Skip(
  1949. [in] ULONG cItems);
  1950. HRESULT Reset(void);
  1951. HRESULT Clone(
  1952. [out] IMimeEnumMessageParts **ppEnum);
  1953. HRESULT Count(
  1954. [out] ULONG *pcItems);
  1955. }
  1956. // ---------------------------------------------------------------------------------------
  1957. // IID_IHashTable
  1958. // ---------------------------------------------------------------------------------------
  1959. [
  1960. uuid(64577981-86D7-11d1-BDFC-00C04FA31009),
  1961. helpstring("IHashTable"),
  1962. ]
  1963. interface IHashTable : IUnknown
  1964. {
  1965. typedef [unique] IHashTable *LPHASHTABLE;
  1966. // For use with IHashTable::Insert
  1967. const DWORD HF_NO_DUPLICATES = 0x00000001; // If duplicate entry exists, replace old data with new data
  1968. HRESULT Init(
  1969. [in] DWORD dwSize,
  1970. [in] BOOL fDupeKeys);
  1971. HRESULT Insert(
  1972. [in] LPSTR psz,
  1973. [in] LPVOID pv,
  1974. [in] DWORD dwFlags);
  1975. HRESULT Replace(
  1976. [in] LPSTR psz,
  1977. [in] LPVOID pv);
  1978. HRESULT Find(
  1979. [in] LPSTR psz,
  1980. [in] BOOL fRemove,
  1981. [out] LPVOID *ppv);
  1982. // enumeration. can walk the entries in the hash table
  1983. // use Reset to rest the enumerator and Next to walk the
  1984. // entries
  1985. HRESULT Reset(void);
  1986. HRESULT Next(
  1987. [in] ULONG cFetch,
  1988. [in,out] LPVOID **prgpv,
  1989. [out] ULONG *pcFetched);
  1990. }
  1991. // ---------------------------------------------------------------------------------------
  1992. // IID_IMimeAllocator
  1993. // ---------------------------------------------------------------------------------------
  1994. [
  1995. uuid(C5588351-7F86-11d0-8252-00C04FD85AB4),
  1996. helpstring("IMimeAllocator"),
  1997. ]
  1998. interface IMimeAllocator : IMalloc
  1999. {
  2000. typedef [unique] IMimeAllocator *LPMIMEALLOCATOR;
  2001. HRESULT FreeParamInfoArray(
  2002. [in] ULONG cParams,
  2003. [in] LPMIMEPARAMINFO prgParam,
  2004. [in] boolean fFreeArray);
  2005. HRESULT FreeAddressList(
  2006. [in,out] LPADDRESSLIST pList);
  2007. HRESULT FreeAddressProps(
  2008. [in,out] LPADDRESSPROPS pAddress);
  2009. HRESULT ReleaseObjects(
  2010. [in] ULONG cObjects,
  2011. [in] IUnknown **prgpUnknown,
  2012. [in] boolean fFreeArray);
  2013. HRESULT FreeEnumHeaderRowArray(
  2014. [in] ULONG cRows,
  2015. [in] LPENUMHEADERROW prgRow,
  2016. [in] boolean fFreeArray);
  2017. HRESULT FreeEnumPropertyArray(
  2018. [in] ULONG cProps,
  2019. [in] LPENUMPROPERTY prgProp,
  2020. [in] boolean fFreeArray);
  2021. HRESULT FreeThumbprint(
  2022. [in] THUMBBLOB *pthumbprint);
  2023. HRESULT PropVariantClear(
  2024. [in] LPPROPVARIANT pProp);
  2025. }
  2026. // ---------------------------------------------------------------------------------------
  2027. // IID_IMimeObjResolver
  2028. // ---------------------------------------------------------------------------------------
  2029. [
  2030. uuid(FECEAFFD-C441-11d1-960E-00C04FBD7C09),
  2031. helpstring("IMimeObjResolver"),
  2032. ]
  2033. interface IMimeObjResolver : IUnknown
  2034. {
  2035. typedef [unique] IMimeObjResolver *LPMIMEOBJRESOLVER;
  2036. HRESULT MimeOleObjectFromMoniker(
  2037. [in] BINDF bindf,
  2038. [in] IMoniker *pmkOriginal,
  2039. [in] IBindCtx *pBindCtx,
  2040. [in] REFIID riid,
  2041. [out] LPVOID *ppvObject,
  2042. [out] IMoniker **ppmkNew);
  2043. }
  2044. }
  2045. typedef enum tagFNTSYSTYPE {
  2046. FNT_SYS_ICON = 0,
  2047. FNT_SYS_ICON_BOLD,
  2048. FNT_SYS_MENU,
  2049. FNT_SYS_ICON_STRIKEOUT,
  2050. FNT_SYS_LAST
  2051. } FNTSYSTYPE;
  2052. typedef struct _charformat CHARFORMAT;
  2053. // ---------------------------------------------------------------------------------------
  2054. // IID_IFontCache
  2055. // ---------------------------------------------------------------------------------------
  2056. [
  2057. uuid(B0D17FC2-7BC4-11d1-BDFA-00C04FA31009),
  2058. helpstring("IFontCache"),
  2059. ]
  2060. interface IFontCache : IUnknown
  2061. {
  2062. typedef [unique] IFontCache *LPFONTCACHE;
  2063. [local]
  2064. HRESULT Init(
  2065. [in] HKEY hkey,
  2066. [in] LPCSTR pszIntlKey,
  2067. [in] DWORD dwFlags);
  2068. HRESULT GetFont(
  2069. [in] FNTSYSTYPE fntType,
  2070. [in] HCHARSET hCharset,
  2071. [out] HFONT *phFont);
  2072. HRESULT OnOptionChange(void);
  2073. HRESULT GetJP_ISOControl(
  2074. [out] BOOL *pfUseSIO);
  2075. }
  2076. // ---------------------------------------------------------------------------------------
  2077. // IID_IFontCacheNotify
  2078. // ---------------------------------------------------------------------------------------
  2079. [
  2080. uuid(B0D17FC5-7BC4-11d1-BDFA-00C04FA31009),
  2081. helpstring("IFontCacheNotify"),
  2082. ]
  2083. interface IFontCacheNotify : IUnknown
  2084. {
  2085. typedef [unique] IFontCacheNotify *LPFONTCACHENOTIFY;
  2086. HRESULT OnPreFontChange(void);
  2087. HRESULT OnPostFontChange(void);
  2088. }
  2089. // ---------------------------------------------------------------------------------------
  2090. // IID_IMimeEditTag
  2091. // ---------------------------------------------------------------------------------------
  2092. [
  2093. uuid(70183210-7b36-11d2-8c12-00c04fa31009),
  2094. helpstring("IID_IMimeEditTag"),
  2095. ]
  2096. interface IMimeEditTag : IUnknown
  2097. {
  2098. typedef [unique] IMimeEditTag *PMIMEEDITTAG;
  2099. // get and set the source-attributes on a tag. This is tag-specific and is where the data is coming from
  2100. // implementors should adjust the html source accordingly
  2101. HRESULT GetSrc(
  2102. [out] BSTR *pbstr);
  2103. HRESULT SetSrc(
  2104. [in] BSTR bstr);
  2105. // destination is set by the MHTML packager. It is the location that the tag will end up after
  2106. // being archived into the Mime-Message. Might be a CID: or the original URL location. Implementors
  2107. // should just hold onto and return this member data
  2108. HRESULT GetDest(
  2109. [out] BSTR *pbstr);
  2110. HRESULT SetDest(
  2111. [in] BSTR bstr);
  2112. // called by the packer before the document is persisted. The tag should remove any temporary state
  2113. // and change it's data parameters to point the the destination (if set)
  2114. HRESULT OnPreSave();
  2115. // called after the packer has saved the document. The tag should restore it's temporary state and
  2116. // revert back to the original source url
  2117. HRESULT OnPostSave();
  2118. // called by the packer to make sure that this tag should be packaged.
  2119. HRESULT CanPackage();
  2120. // called by the packer to validate a mime-type
  2121. HRESULT IsValidMimeType(
  2122. [in] LPWSTR pszTypeW);
  2123. };
  2124. // ---------------------------------------------------------------------------------------
  2125. // IID_IMimeEditTagCollection
  2126. // ---------------------------------------------------------------------------------------
  2127. [
  2128. uuid(d09ee528-7b38-11d2-8c12-00c04fa31009),
  2129. helpstring("IID_IMimeEditTagCollection"),
  2130. ]
  2131. interface IMimeEditTagCollection : IUnknown
  2132. {
  2133. typedef [unique] IMimeEditTagCollection *PMIMEEDITTAGCOLLECTION;
  2134. HRESULT Init(
  2135. [in] IUnknown *pHtmlDoc);
  2136. HRESULT Next(
  2137. [in] ULONG cFetch,
  2138. [out] IMimeEditTag **ppTag,
  2139. [out] ULONG *pcFetched);
  2140. HRESULT Reset();
  2141. HRESULT Count(
  2142. [out] ULONG *pcItems);
  2143. };
  2144. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  2145. cpp_quote("// --------------------------------------------------------------------------------")
  2146. cpp_quote("// CMDSETID_MimeEdit commands")
  2147. cpp_quote("// --------------------------------------------------------------------------------")
  2148. cpp_quote("#define MECMDID_DIRTY 1")
  2149. cpp_quote("#define MECMDID_EMPTY 2")
  2150. cpp_quote("#define MECMDID_STYLE 3")
  2151. cpp_quote("#define MECMDID_EDITHTML 4")
  2152. cpp_quote("#define MECMDID_DOWNGRADEPLAINTEXT 5")
  2153. cpp_quote("#define MECMDID_SETTEXT 6")
  2154. cpp_quote("#define MECMDID_ROT13 7")
  2155. cpp_quote("#define MECMDID_INSERTTEXTFILE 8")
  2156. cpp_quote("#define MECMDID_VIEWSOURCE 9")
  2157. cpp_quote("#define MECMDID_FORMATFONT 10")
  2158. cpp_quote("#define MECMDID_PREVIEWFORMAT 11")
  2159. cpp_quote("#define MECMDID_EDITMODE 12")
  2160. cpp_quote("#define MECMDID_CHARSET 13")
  2161. cpp_quote("#define MECMDID_SAVEASSTATIONERY 14")
  2162. cpp_quote("#define MECMDID_BACKGROUNDIMAGE 15")
  2163. cpp_quote("#define MECMDID_INSERTTEXT 16")
  2164. cpp_quote("#define MECMDID_INSERTHTML 17")
  2165. cpp_quote("#define MECMDID_BACKGROUNDCOLOR 18")
  2166. cpp_quote("#define MECMDID_APPLYDOCUMENT 19")
  2167. cpp_quote("#define MECMDID_SAVEATTACHMENTS 20")
  2168. cpp_quote("#define MECMDID_BACKGROUNDSOUND 21")
  2169. cpp_quote("#define MECMDID_INSERTBGSOUND 22")
  2170. cpp_quote("#define MECMDID_SHOWSOURCETABS 23")
  2171. cpp_quote("#define MECMDID_SETSOURCETAB 24")
  2172. cpp_quote("#define MECMDID_TABLINKS 25")
  2173. cpp_quote("#define MECMDID_FORMATPARAGRAPH 26")
  2174. cpp_quote("")
  2175. cpp_quote("// --------------------------------------------------------------------------------")
  2176. cpp_quote("// MEO_FLAGS") //used by MEHOSTCMDID_FLAGS
  2177. cpp_quote("// --------------------------------------------------------------------------------")
  2178. cpp_quote("#define MEO_FLAGS_INCLUDEMSG 0x0001") // include message when loading
  2179. cpp_quote("#define MEO_FLAGS_HTML 0x0002") // status of HTML mode
  2180. cpp_quote("#define MEO_FLAGS_AUTOINLINE 0x0004") // want autoinlined attachments
  2181. cpp_quote("#define MEO_FLAGS_SLIDESHOW 0x0008") // show autoinline images as slideshow
  2182. cpp_quote("#define MEO_FLAGS_AUTOTEXT 0x0010") // autotext or not
  2183. cpp_quote("#define MEO_FLAGS_BLOCKQUOTE 0x0020") // blockquote indentation on reply
  2184. cpp_quote("#define MEO_FLAGS_SENDIMAGES 0x0040") // MHTML on or off
  2185. cpp_quote("#define MEO_FLAGS_DONTSPELLCHECKQUOTED 0x0080") // don't spell check quoted text
  2186. cpp_quote("#define MEO_FLAGS_SENDEXTERNALIMGSRC 0x0100") // send external image on reply/fwd
  2187. cpp_quote("")
  2188. cpp_quote("// --------------------------------------------------------------------------------")
  2189. cpp_quote("// MECMDID_VIEWSOURCE options")
  2190. cpp_quote("// --------------------------------------------------------------------------------")
  2191. cpp_quote("#define MECMD_VS_HTML 0x0001") // view HTML source
  2192. cpp_quote("#define MECMD_VS_MESSAGE 0x0002") // view message source
  2193. cpp_quote("")
  2194. cpp_quote("")
  2195. cpp_quote("// --------------------------------------------------------------------------------")
  2196. cpp_quote("// MEST_") //used by MECMDID_SETSOURCETAB
  2197. cpp_quote("// --------------------------------------------------------------------------------")
  2198. cpp_quote("#define MEST_EDIT 0") // goto the edit tab
  2199. cpp_quote("#define MEST_SOURCE 1") // goto the source tab
  2200. cpp_quote("#define MEST_PREVIEW 2") // goto the preview tab
  2201. cpp_quote("#define MEST_NEXT 3") // goto the next tab
  2202. cpp_quote("#define MEST_PREVIOUS 4") // goto the previous tab
  2203. cpp_quote("")
  2204. cpp_quote("// --------------------------------------------------------------------------------")
  2205. cpp_quote("// MECMDID_STYLE options")
  2206. cpp_quote("// --------------------------------------------------------------------------------")
  2207. cpp_quote("#define MESTYLE_NOHEADER 0") // no header at all
  2208. cpp_quote("#define MESTYLE_PREVIEW 1") // preview header
  2209. cpp_quote("#define MESTYLE_FORMATBAR 2") // formatting bar
  2210. cpp_quote("#define MESTYLE_MINIHEADER 3") // mini header for focus changes
  2211. cpp_quote("")
  2212. cpp_quote("// --------------------------------------------------------------------------------")
  2213. cpp_quote("// MECMDID_HEADER_TYLE options")
  2214. cpp_quote("// --------------------------------------------------------------------------------")
  2215. cpp_quote("#define MEHEADER_NONE 0x00")
  2216. cpp_quote("#define MEHEADER_NEWS 0x01")
  2217. cpp_quote("#define MEHEADER_MAIL 0x02")
  2218. cpp_quote("#define MEHEADER_FORCE_ENGLISH 0x04")
  2219. cpp_quote("")
  2220. cpp_quote("// --------------------------------------------------------------------------------")
  2221. cpp_quote("// MECMDID_SIGNATURE_ENABLED options")
  2222. cpp_quote("// --------------------------------------------------------------------------------")
  2223. cpp_quote("#define MESIG_AUTO 0x0001")
  2224. cpp_quote("#define MESIG_MANUAL 0x0002")
  2225. cpp_quote("")
  2226. cpp_quote("// --------------------------------------------------------------------------------")
  2227. cpp_quote("// MECMDID_SIGNATURE_OPTIONS options")
  2228. cpp_quote("// --------------------------------------------------------------------------------")
  2229. cpp_quote("#define MESIGOPT_PLAIN 0x0001")
  2230. cpp_quote("#define MESIGOPT_TOP 0x0002")
  2231. cpp_quote("#define MESIGOPT_PREFIX 0x0004")
  2232. cpp_quote("#define MESIGOPT_BOTTOM 0x0008")
  2233. cpp_quote("#define MESIGOPT_HTML 0x0010")
  2234. cpp_quote("")
  2235. cpp_quote("// --------------------------------------------------------------------------------")
  2236. cpp_quote("// MEHOSTCMDID_BORDERFLAGS options")
  2237. cpp_quote("// --------------------------------------------------------------------------------")
  2238. cpp_quote("#define MEBF_OUTERCLIENTEDGE 0x0001")
  2239. cpp_quote("#define MEBF_INNERCLIENTEDGE 0x0002")
  2240. cpp_quote("#define MEBF_FORMATBARSEP 0x0004")
  2241. cpp_quote("#define MEBF_NOSCROLL 0x0008")
  2242. cpp_quote("")
  2243. cpp_quote("// --------------------------------------------------------------------------------")
  2244. cpp_quote("// MEHOSTCMDID_SPELL_OPTIONS options")
  2245. cpp_quote("// --------------------------------------------------------------------------------")
  2246. cpp_quote("#define MESPELLOPT_IGNORENUMBER 0x0001")
  2247. cpp_quote("#define MESPELLOPT_IGNOREUPPER 0x0002")
  2248. cpp_quote("#define MESPELLOPT_IGNOREDBCS 0x0004")
  2249. cpp_quote("#define MESPELLOPT_IGNOREPROTECT 0x0008")
  2250. cpp_quote("#define MESPELLOPT_IGNOREURL 0x0010")
  2251. cpp_quote("#define MESPELLOPT_ALWAYSSUGGEST 0x0020")
  2252. cpp_quote("#define MESPELLOPT_CHECKONSEND 0x0040")
  2253. cpp_quote("#define MESPELLOPT_CHECKONTYPE 0x0080")
  2254. cpp_quote("")
  2255. cpp_quote("")
  2256. cpp_quote("// --------------------------------------------------------------------------------")
  2257. cpp_quote("// MEHOSTCMDID_SOURCEEDIT_FLAGS options")
  2258. cpp_quote("// --------------------------------------------------------------------------------")
  2259. cpp_quote("#define MESRCFLAGS_COLOR 0x0001")
  2260. cpp_quote("")
  2261. cpp_quote("")
  2262. cpp_quote("// --------------------------------------------------------------------------------")
  2263. cpp_quote("// CMDSETID_MimeEditHost commands")
  2264. cpp_quote("// --------------------------------------------------------------------------------")
  2265. cpp_quote("#define MEHOSTCMDID_SIGNATURE_ENABLED 1")
  2266. cpp_quote("#define MEHOSTCMDID_SIGNATURE_OPTIONS 2")
  2267. cpp_quote("#define MEHOSTCMDID_SIGNATURE 3")
  2268. cpp_quote("#define MEHOSTCMDID_HEADER_TYPE 4")
  2269. cpp_quote("#define MEHOSTCMDID_ONPARSECOMPLETE 5")
  2270. cpp_quote("#define MEHOSTCMDID_FLAGS 6")
  2271. cpp_quote("#define MEHOSTCMDID_QUOTE_CHAR 7")
  2272. cpp_quote("#define MEHOSTCMDID_REPLY_TICK_COLOR 8")
  2273. cpp_quote("#define MEHOSTCMDID_COMPOSE_FONT 9")
  2274. cpp_quote("#define MEHOSTCMDID_ADD_TO_ADDRESSBOOK 10")
  2275. cpp_quote("#define MEHOSTCMDID_ADD_TO_FAVORITES 11")
  2276. cpp_quote("#define MEHOSTCMDID_SLIDESHOW_DELAY 12")
  2277. cpp_quote("#define MEHOSTCMDID_FONTCACHE 13")
  2278. cpp_quote("#define MEHOSTCMDID_BORDERFLAGS 14")
  2279. cpp_quote("#define MEHOSTCMDID_SECURITY_ZONE 15")
  2280. cpp_quote("#define MEHOSTCMDID_SPELL_OPTIONS 16")
  2281. cpp_quote("#define MEHOSTCMDID_SAVEATTACH_PATH 17")
  2282. cpp_quote("#define MEHOSTCMDID_SOURCEEDIT_FLAGS 18")
  2283. cpp_quote("#define MEHOSTCMDID_SPELL_LANGUAGE 19")
  2284. cpp_quote("#define MEHOSTCMDID_IS_READ_IN_TEXT_ONLY 22")
  2285. cpp_quote("")
  2286. cpp_quote("#endif //_WIN32_OE")
  2287. cpp_quote("")
  2288. cpp_quote("// --------------------------------------------------------------------------------")
  2289. cpp_quote("// MimeOLE Exported C API Functions")
  2290. cpp_quote("// --------------------------------------------------------------------------------")
  2291. cpp_quote("#ifdef __cplusplus")
  2292. cpp_quote("extern \"C\" {")
  2293. cpp_quote("#endif")
  2294. cpp_quote("")
  2295. cpp_quote("// --------------------------------------------------------------------------------")
  2296. cpp_quote("// Depends")
  2297. cpp_quote("// --------------------------------------------------------------------------------")
  2298. cpp_quote("#include <urlmon.h>")
  2299. cpp_quote("")
  2300. cpp_quote("// --------------------------------------------------------------------------------")
  2301. cpp_quote("// API Name Decoration")
  2302. cpp_quote("// --------------------------------------------------------------------------------")
  2303. cpp_quote("#if !defined(_MIMEOLE_)")
  2304. cpp_quote("#define MIMEOLEAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI")
  2305. cpp_quote("#define MIMEOLEAPI_(_type_) EXTERN_C DECLSPEC_IMPORT _type_ WINAPI")
  2306. cpp_quote("#else")
  2307. cpp_quote("#define MIMEOLEAPI EXTERN_C HRESULT WINAPI")
  2308. cpp_quote("#define MIMEOLEAPI_(_type_) EXTERN_C _type_ WINAPI")
  2309. cpp_quote("#endif")
  2310. cpp_quote("")
  2311. cpp_quote("// --------------------------------------------------------------------------------")
  2312. cpp_quote("// Constants")
  2313. cpp_quote("// --------------------------------------------------------------------------------")
  2314. cpp_quote("#define NOFLAGS 0")
  2315. cpp_quote("#define CCHMAX_CID 255")
  2316. cpp_quote("#define CCHMAX_MID 255")
  2317. cpp_quote("#define CCHMAX_INTERNET_DATE 50")
  2318. cpp_quote("")
  2319. cpp_quote("#define MECD_HTML 0x0001")
  2320. cpp_quote("#define MECD_PLAINTEXT 0x0002")
  2321. cpp_quote("#define MECD_ENCODEIMAGES 0x0004")
  2322. cpp_quote("#define MECD_ENCODEFILEURLSONLY 0x0008")
  2323. cpp_quote("#define MECD_ENCODESOUNDS 0x0010")
  2324. cpp_quote("#define MECD_ENCODEVIDEO 0x0020")
  2325. cpp_quote("#define MECD_ENCODEPLUGINS 0x0040")
  2326. cpp_quote("")
  2327. cpp_quote("// --------------------------------------------------------------------------------")
  2328. cpp_quote("// Macros")
  2329. cpp_quote("// --------------------------------------------------------------------------------")
  2330. cpp_quote("#define MimeOleVariantInit(_pProp) \\")
  2331. cpp_quote(" ZeroMemory(_pProp, sizeof(PROPVARIANT))")
  2332. cpp_quote("")
  2333. cpp_quote("// --------------------------------------------------------------------------------")
  2334. cpp_quote("// MimeOLE API Prototypes")
  2335. cpp_quote("// --------------------------------------------------------------------------------")
  2336. cpp_quote("")
  2337. cpp_quote("#define MIMEOLE_COMPAT_OE5 0x00000001")
  2338. cpp_quote("#define MIMEOLE_COMPAT_MLANG2 0x00000002")
  2339. cpp_quote("MIMEOLEAPI MimeOleSetCompatMode(")
  2340. cpp_quote(" /* in */ DWORD dwMode);")
  2341. cpp_quote("")
  2342. cpp_quote("MIMEOLEAPI MimeOleContentTypeFromUrl(")
  2343. cpp_quote(" /* in */ LPCSTR pszBase,")
  2344. cpp_quote(" /* in */ LPCSTR pszUrl,")
  2345. cpp_quote(" /* out */ LPSTR *ppszCntType);")
  2346. cpp_quote("")
  2347. cpp_quote("MIMEOLEAPI MimeOleParseMhtmlUrl(")
  2348. cpp_quote(" /* in */ LPSTR pszUrl,")
  2349. cpp_quote(" /* out */ LPSTR *ppszRootUrl,")
  2350. cpp_quote(" /* out */ LPSTR *ppszBodyUrl);")
  2351. cpp_quote("")
  2352. cpp_quote("#ifndef MAC")
  2353. cpp_quote("MIMEOLEAPI MimeOleObjectFromUrl(")
  2354. cpp_quote(" /* in */ LPCSTR pszUrl,")
  2355. cpp_quote(" /* in */ BOOL fCreate,")
  2356. cpp_quote(" /* in */ REFIID riid, ")
  2357. cpp_quote(" /* out */ LPVOID *ppvObject, ")
  2358. cpp_quote(" /* out */ IUnknown **ppUnkKeepAlive);")
  2359. cpp_quote("")
  2360. cpp_quote("MIMEOLEAPI MimeOleObjectFromMoniker(")
  2361. cpp_quote(" /* in */ BINDF bindf,")
  2362. cpp_quote(" /* in */ IMoniker *pmkOriginal,")
  2363. cpp_quote(" /* in */ IBindCtx *pBindCtx,")
  2364. cpp_quote(" /* in */ REFIID riid, ")
  2365. cpp_quote(" /* out */ LPVOID *ppvObject,")
  2366. cpp_quote(" /* out */ IMoniker **ppmkNew);")
  2367. cpp_quote("#endif // !MAC")
  2368. cpp_quote("")
  2369. cpp_quote("MIMEOLEAPI MimeOleCombineURL(")
  2370. cpp_quote(" /* in */ LPCSTR pszBase,")
  2371. cpp_quote(" /* in */ ULONG cchBase,")
  2372. cpp_quote(" /* in */ LPCSTR pszURL,")
  2373. cpp_quote(" /* in */ ULONG cchURL,")
  2374. cpp_quote(" /* in */ BOOL fUnEscape,")
  2375. cpp_quote(" /* out */ LPSTR *ppszAbsolute);")
  2376. cpp_quote("")
  2377. cpp_quote("MIMEOLEAPI MimeOleGetSubjectFileName(")
  2378. cpp_quote(" /* in */ IMimePropertySet *pPropertySet,")
  2379. cpp_quote(" /* out */ ULONG *pulPart,")
  2380. cpp_quote(" /* out */ ULONG *pulTotal,")
  2381. cpp_quote(" /* in,out */ LPSTR pszFileName,")
  2382. cpp_quote(" /* in */ ULONG cchMax);")
  2383. cpp_quote("")
  2384. cpp_quote("MIMEOLEAPI MimeOleCreateWebDocument(")
  2385. cpp_quote(" /* in */ LPCSTR pszBase,")
  2386. cpp_quote(" /* in */ LPCSTR pszURL,")
  2387. cpp_quote(" /* out */ IMimeWebDocument **ppDocument);")
  2388. cpp_quote(" ")
  2389. cpp_quote("MIMEOLEAPI MimeOleGetRelatedSection(")
  2390. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2391. cpp_quote(" /* in */ boolean fCreate,")
  2392. cpp_quote(" /* out */ LPHBODY phRelated,")
  2393. cpp_quote(" /* out */ boolean *pfMultiple);")
  2394. cpp_quote("")
  2395. cpp_quote("MIMEOLEAPI MimeOleGetMixedSection(")
  2396. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2397. cpp_quote(" /* in */ boolean fCreate,")
  2398. cpp_quote(" /* out */ LPHBODY phMixed,")
  2399. cpp_quote(" /* out */ boolean *pfMultiple);")
  2400. cpp_quote("")
  2401. cpp_quote("MIMEOLEAPI MimeOleGetAlternativeSection(")
  2402. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2403. cpp_quote(" /* out */ LPHBODY phAlternative,")
  2404. cpp_quote(" /* out */ boolean *pfMultiple);")
  2405. cpp_quote("")
  2406. cpp_quote("MIMEOLEAPI MimeOleGenerateCID(")
  2407. cpp_quote(" /* in,out */ LPSTR pszCID,")
  2408. cpp_quote(" /* in */ ULONG cchMax,")
  2409. cpp_quote(" /* in */ boolean fAbsolute);")
  2410. cpp_quote("")
  2411. cpp_quote("MIMEOLEAPI MimeOleGenerateMID(")
  2412. cpp_quote(" /* in,out */ LPSTR pszMID,")
  2413. cpp_quote(" /* in */ ULONG cchMax,")
  2414. cpp_quote(" /* in */ boolean fAbsolute);")
  2415. cpp_quote("")
  2416. cpp_quote("MIMEOLEAPI MimeOleCreateByteStream(")
  2417. cpp_quote(" /* out */ IStream **ppStream);")
  2418. cpp_quote("")
  2419. cpp_quote("MIMEOLEAPI MimeOleGetPropertySchema(")
  2420. cpp_quote(" /* out */ IMimePropertySchema **ppSchema);")
  2421. cpp_quote("")
  2422. cpp_quote("MIMEOLEAPI MimeOleQueryString(")
  2423. cpp_quote(" /* in */ LPCSTR pszSearchMe,")
  2424. cpp_quote(" /* in */ LPCSTR pszCriteria,")
  2425. cpp_quote(" /* in */ boolean fSubString,")
  2426. cpp_quote(" /* in */ boolean fCaseSensitive);")
  2427. cpp_quote("")
  2428. cpp_quote("MIMEOLEAPI MimeOleGetPropA(")
  2429. cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
  2430. cpp_quote(" /* in */ LPCSTR pszName,")
  2431. cpp_quote(" /* in */ DWORD dwFlags,")
  2432. cpp_quote(" /* out */ LPSTR *ppszData);")
  2433. cpp_quote("")
  2434. cpp_quote("MIMEOLEAPI MimeOleSetPropA(")
  2435. cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
  2436. cpp_quote(" /* in */ LPCSTR pszName,")
  2437. cpp_quote(" /* in */ DWORD dwFlags,")
  2438. cpp_quote(" /* in */ LPCSTR pszData);")
  2439. cpp_quote("")
  2440. cpp_quote("MIMEOLEAPI MimeOleGetPropW(")
  2441. cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
  2442. cpp_quote(" /* in */ LPCSTR pszName,")
  2443. cpp_quote(" /* in */ DWORD dwFlags,")
  2444. cpp_quote(" /* out */ LPWSTR *ppszData);")
  2445. cpp_quote("")
  2446. cpp_quote("MIMEOLEAPI MimeOleSetPropW(")
  2447. cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
  2448. cpp_quote(" /* in */ LPCSTR pszName,")
  2449. cpp_quote(" /* in */ DWORD dwFlags,")
  2450. cpp_quote(" /* in */ LPWSTR pszData);")
  2451. cpp_quote("")
  2452. cpp_quote("MIMEOLEAPI MimeOleGetBodyPropA(")
  2453. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2454. cpp_quote(" /* in */ HBODY hBody,")
  2455. cpp_quote(" /* in */ LPCSTR pszName,")
  2456. cpp_quote(" /* in */ DWORD dwFlags,")
  2457. cpp_quote(" /* out */ LPSTR *ppszData);")
  2458. cpp_quote("")
  2459. cpp_quote("MIMEOLEAPI MimeOleSetBodyPropA(")
  2460. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2461. cpp_quote(" /* in */ HBODY hBody,")
  2462. cpp_quote(" /* in */ LPCSTR pszName,")
  2463. cpp_quote(" /* in */ DWORD dwFlags,")
  2464. cpp_quote(" /* in */ LPCSTR pszData);")
  2465. cpp_quote("")
  2466. cpp_quote("MIMEOLEAPI MimeOleGetBodyPropW(")
  2467. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2468. cpp_quote(" /* in */ HBODY hBody,")
  2469. cpp_quote(" /* in */ LPCSTR pszName,")
  2470. cpp_quote(" /* in */ DWORD dwFlags,")
  2471. cpp_quote(" /* out */ LPWSTR *ppszData);")
  2472. cpp_quote("")
  2473. cpp_quote("MIMEOLEAPI MimeOleSetBodyPropW(")
  2474. cpp_quote(" /* in */ IMimeMessageTree *pTree,")
  2475. cpp_quote(" /* in */ HBODY hBody,")
  2476. cpp_quote(" /* in */ LPCSTR pszName,")
  2477. cpp_quote(" /* in */ DWORD dwFlags,")
  2478. cpp_quote(" /* in */ LPCWSTR pszData);")
  2479. cpp_quote("")
  2480. cpp_quote("MIMEOLEAPI MimeOleCreateHeaderTable(")
  2481. cpp_quote(" /* out */ IMimeHeaderTable **ppTable);")
  2482. cpp_quote("")
  2483. cpp_quote("MIMEOLEAPI MimeOleVariantFree(")
  2484. cpp_quote(" /* in,out */ LPPROPVARIANT pProp);")
  2485. cpp_quote("")
  2486. cpp_quote("MIMEOLEAPI MimeOleVariantCopy(")
  2487. cpp_quote(" /* out */ LPPROPVARIANT pDest, ")
  2488. cpp_quote(" /* in */ LPPROPVARIANT pSource);")
  2489. cpp_quote("")
  2490. cpp_quote("MIMEOLEAPI MimeOleGetExtClassId(")
  2491. cpp_quote(" /* in */ LPCSTR pszExtension, ")
  2492. cpp_quote(" /* out */ LPCLSID pclsid);")
  2493. cpp_quote("")
  2494. cpp_quote("MIMEOLEAPI MimeOleEncodeHeader(")
  2495. cpp_quote(" /* in */ HCHARSET hCharset, ")
  2496. cpp_quote(" /* in */ LPPROPVARIANT pData, ")
  2497. cpp_quote(" /* out */ LPSTR *ppszEncoded, ")
  2498. cpp_quote(" /* in,out */ LPRFC1522INFO pRfc1522Info);")
  2499. cpp_quote("")
  2500. cpp_quote("MIMEOLEAPI MimeOleDecodeHeader(")
  2501. cpp_quote(" /* in */ HCHARSET hCharset, ")
  2502. cpp_quote(" /* in */ LPCSTR pszData, ")
  2503. cpp_quote(" /* out */ LPPROPVARIANT pDecoded, ")
  2504. cpp_quote(" /* in,out */ LPRFC1522INFO pRfc1522Info);")
  2505. cpp_quote("")
  2506. cpp_quote("MIMEOLEAPI MimeOleRfc1522Decode(")
  2507. cpp_quote(" /* in */ LPCSTR pszValue,")
  2508. cpp_quote(" /* in */ LPSTR pszCharset, ")
  2509. cpp_quote(" /* in */ ULONG cchmax, ")
  2510. cpp_quote(" /* out */ LPSTR *ppszDecoded);")
  2511. cpp_quote("")
  2512. cpp_quote("MIMEOLEAPI MimeOleRfc1522Encode(")
  2513. cpp_quote(" /* in */ LPCSTR pszValue, ")
  2514. cpp_quote(" /* in */ HCHARSET hCharset, ")
  2515. cpp_quote(" /* out */ LPSTR *ppszEncoded);")
  2516. cpp_quote("")
  2517. cpp_quote("MIMEOLEAPI MimeOleGetInternat(")
  2518. cpp_quote(" /* out */ IMimeInternational **ppInternat);")
  2519. cpp_quote("")
  2520. cpp_quote("MIMEOLEAPI MimeOleFindCharset(")
  2521. cpp_quote(" /* in */ LPCSTR pszCharset, ")
  2522. cpp_quote(" /* out */ LPHCHARSET phCharset);")
  2523. cpp_quote("")
  2524. cpp_quote("MIMEOLEAPI MimeOleGetCharsetInfo(")
  2525. cpp_quote(" /* in */ HCHARSET hCharset, ")
  2526. cpp_quote(" /* out */ LPINETCSETINFO pCsetInfo);")
  2527. cpp_quote("")
  2528. cpp_quote("MIMEOLEAPI MimeOleGetCodePageInfo(")
  2529. cpp_quote(" /* in */ CODEPAGEID cpiCodePage, ")
  2530. cpp_quote(" /* out */ LPCODEPAGEINFO pCodePageInfo);")
  2531. cpp_quote("")
  2532. cpp_quote("MIMEOLEAPI MimeOleGetDefaultCharset(")
  2533. cpp_quote(" /* out */ LPHCHARSET phCharset);")
  2534. cpp_quote("")
  2535. cpp_quote("MIMEOLEAPI MimeOleSetDefaultCharset(")
  2536. cpp_quote(" /* in */ HCHARSET hCharset);")
  2537. cpp_quote("")
  2538. cpp_quote("MIMEOLEAPI MimeOleGetCodePageCharset(")
  2539. cpp_quote(" /* in */ CODEPAGEID cpiCodePage, ")
  2540. cpp_quote(" /* in */ CHARSETTYPE ctCsetType, ")
  2541. cpp_quote(" /* out */ LPHCHARSET phCharset);")
  2542. cpp_quote("")
  2543. cpp_quote("MIMEOLEAPI MimeOleCreateVirtualStream(")
  2544. cpp_quote(" /* out */ IStream **ppStream);")
  2545. cpp_quote("")
  2546. cpp_quote("MIMEOLEAPI MimeOleOpenFileStream(")
  2547. cpp_quote(" /* in */ LPCSTR pszFilePath, ")
  2548. cpp_quote(" /* in */ DWORD dwCreationDistribution, ")
  2549. cpp_quote(" /* in */ DWORD dwAccess, ")
  2550. cpp_quote(" /* out */ IStream **ppstmFile);")
  2551. cpp_quote("")
  2552. cpp_quote("MIMEOLEAPI MimeOleIsTnefStream(")
  2553. cpp_quote(" /* in */ IStream *pStream);")
  2554. cpp_quote("")
  2555. cpp_quote("MIMEOLEAPI MimeOleGenerateFileName(")
  2556. cpp_quote(" /* in */ LPCSTR pszContentType, ")
  2557. cpp_quote(" /* in */ LPCSTR pszSuggest, ")
  2558. cpp_quote(" /* in */ LPCSTR pszDefaultExt, ")
  2559. cpp_quote(" /* in,out */ LPSTR *ppszFileName);")
  2560. cpp_quote("")
  2561. cpp_quote("MIMEOLEAPI MimeOleGetFileExtension(")
  2562. cpp_quote(" /* in */ LPCSTR pszFilePath, ")
  2563. cpp_quote(" /* in,out */ LPSTR pszExt, ")
  2564. cpp_quote(" /* in */ ULONG cchMax);")
  2565. cpp_quote("")
  2566. cpp_quote("MIMEOLEAPI MimeOleCreateSecurity(")
  2567. cpp_quote(" /* out */ IMimeSecurity **ppSecurity);")
  2568. cpp_quote("")
  2569. cpp_quote("MIMEOLEAPI MimeOleInetDateToFileTime(")
  2570. cpp_quote(" /* in */ LPCSTR pszDate, ")
  2571. cpp_quote(" /* out */ LPFILETIME pft);")
  2572. cpp_quote("")
  2573. cpp_quote("MIMEOLEAPI MimeOleFileTimeToInetDate(")
  2574. cpp_quote(" /* in */ LPFILETIME pft, ")
  2575. cpp_quote(" /* in,out */ LPSTR pszDate, ")
  2576. cpp_quote(" /* in */ ULONG cchMax);")
  2577. cpp_quote("")
  2578. cpp_quote("MIMEOLEAPI MimeOleCreateMessageParts(")
  2579. cpp_quote(" /* out */ IMimeMessageParts **ppParts);")
  2580. cpp_quote("")
  2581. cpp_quote("MIMEOLEAPI MimeOleGetAllocator(")
  2582. cpp_quote(" /* out */ IMimeAllocator **ppAllocator);")
  2583. cpp_quote("")
  2584. cpp_quote("MIMEOLEAPI MimeOleParseRfc822Address(")
  2585. cpp_quote(" /* in */ DWORD dwAdrType,")
  2586. cpp_quote(" /* in */ ENCODINGTYPE ietEncoding,")
  2587. cpp_quote(" /* in */ LPCSTR pszRfc822Adr, ")
  2588. cpp_quote(" /* out */ LPADDRESSLIST pList);")
  2589. cpp_quote("")
  2590. cpp_quote("MIMEOLEAPI MimeOleCreateMessage(")
  2591. cpp_quote(" /* in */ IUnknown *pUnkOuter,")
  2592. cpp_quote(" /* out */ IMimeMessage **ppMessage);")
  2593. cpp_quote("")
  2594. cpp_quote("MIMEOLEAPI MimeOleMergePartialHeaders(")
  2595. cpp_quote(" /* in */ IStream *pstmIn, ")
  2596. cpp_quote(" /* in */ IStream *pstmOut);")
  2597. cpp_quote("")
  2598. cpp_quote("MIMEOLEAPI MimeOleEscapeString(")
  2599. cpp_quote(" /* in */ CODEPAGEID cpiCodePage, ")
  2600. cpp_quote(" /* in */ LPCSTR pszIn, ")
  2601. cpp_quote(" /* out */ LPSTR *ppszOut);")
  2602. cpp_quote("")
  2603. cpp_quote("MIMEOLEAPI MimeOleGetExtContentType(")
  2604. cpp_quote(" /* in */ LPCSTR pszExtension,")
  2605. cpp_quote(" /* out */ LPSTR *ppszContentType);")
  2606. cpp_quote("")
  2607. cpp_quote("MIMEOLEAPI MimeOleGetContentTypeExt(")
  2608. cpp_quote(" /* in */ LPCSTR pszContentType, ")
  2609. cpp_quote(" /* out */ LPSTR *ppszExtension);")
  2610. cpp_quote("")
  2611. cpp_quote("MIMEOLEAPI MimeOleGetFileInfo(")
  2612. cpp_quote(" /* in */ LPSTR pszFilePath, ")
  2613. cpp_quote(" /* out */ LPSTR *ppszCntType,")
  2614. cpp_quote(" /* out */ LPSTR *ppszSubType,")
  2615. cpp_quote(" /* out */ LPSTR *ppszCntDesc,")
  2616. cpp_quote(" /* out */ LPSTR *ppszFileName,")
  2617. cpp_quote(" /* out */ LPSTR *ppszExtension);")
  2618. cpp_quote("")
  2619. cpp_quote("MIMEOLEAPI MimeOleCreateBody(")
  2620. cpp_quote(" /* out */ IMimeBody **ppBody);")
  2621. cpp_quote("")
  2622. cpp_quote("MIMEOLEAPI MimeOleCreatePropertySet(")
  2623. cpp_quote(" /* in */ IUnknown *pUnkOuter, ")
  2624. cpp_quote(" /* out */ IMimePropertySet **ppPropertySet);")
  2625. cpp_quote("")
  2626. cpp_quote("MIMEOLEAPI MimeOleCreateMessageTree(")
  2627. cpp_quote(" /* in */ IUnknown *pUnkOuter, ")
  2628. cpp_quote(" /* out */ IMimeMessageTree **ppMessageTree);")
  2629. cpp_quote("")
  2630. cpp_quote("MIMEOLEAPI MimeOleGetCertsFromThumbprints(")
  2631. cpp_quote(" /* in */ THUMBBLOB *const rgThumbprint,")
  2632. cpp_quote(" /* in,out */ X509CERTRESULT *const pResults,")
  2633. cpp_quote(" /* in */ const HCERTSTORE *const rghCertStore,")
  2634. cpp_quote(" /* in */ const DWORD cCertStore);")
  2635. cpp_quote("")
  2636. cpp_quote("MIMEOLEAPI MimeOleSplitMessage(")
  2637. cpp_quote(" /* in */ IMimeMessage *pMessage,")
  2638. cpp_quote(" /* in */ ULONG cbMaxPart,")
  2639. cpp_quote(" /* out */ IMimeMessageParts **ppParts);")
  2640. cpp_quote("")
  2641. cpp_quote("MIMEOLEAPI MimeOleClearDirtyTree(")
  2642. cpp_quote(" /* in */ IMimeMessageTree *pTree);")
  2643. cpp_quote("")
  2644. cpp_quote("MIMEOLEAPI MimeOleConvertEnrichedToHTML(")
  2645. cpp_quote(" /* in */ CODEPAGEID codepage,")
  2646. cpp_quote(" /* in */ IStream *pIn,")
  2647. cpp_quote(" /* in */ IStream *pOut);")
  2648. cpp_quote("")
  2649. cpp_quote("MIMEOLEAPI MimeOleIsEnrichedStream(")
  2650. cpp_quote(" /* in */ IStream *pStream);")
  2651. cpp_quote("")
  2652. cpp_quote("MIMEOLEAPI MimeOleSMimeCapsToDlg(")
  2653. cpp_quote(" /* in */ LPBYTE pbSMimeCaps,")
  2654. cpp_quote(" /* in */ DWORD cbSMimeCaps,")
  2655. cpp_quote(" /* in */ DWORD cCerts,")
  2656. cpp_quote(" /* in */ PCX509CERT * rgCerts,")
  2657. cpp_quote(" /* in */ HWND hwndDlg,")
  2658. cpp_quote(" /* in */ DWORD idEncAlgs,")
  2659. cpp_quote(" /* in */ DWORD idSignAlgs,")
  2660. cpp_quote(" /* in */ DWORD idBlob);")
  2661. cpp_quote("")
  2662. cpp_quote("MIMEOLEAPI MimeOleSMimeCapsFromDlg(")
  2663. cpp_quote(" /* in */ HWND hwnd,")
  2664. cpp_quote(" /* in */ DWORD idEncAlgs,")
  2665. cpp_quote(" /* in */ DWORD idSignAlgs,")
  2666. cpp_quote(" /* in */ DWORD idBlob,")
  2667. cpp_quote(" /* in/out */ LPBYTE pbSMimeCaps,")
  2668. cpp_quote(" /* in/out */ DWORD * pcbSmimeCaps);")
  2669. cpp_quote("")
  2670. cpp_quote("MIMEOLEAPI MimeOleSMimeCapInit(")
  2671. cpp_quote(" /* in */ LPBYTE pbSMimeCap,")
  2672. cpp_quote(" /* in */ DWORD cbSMimeCap,")
  2673. cpp_quote(" /* out */ LPVOID * ppv);")
  2674. cpp_quote("")
  2675. cpp_quote("MIMEOLEAPI MimeOleSMimeCapAddSMimeCap(")
  2676. cpp_quote(" /* in */ LPBYTE pbSMimeCap,")
  2677. cpp_quote(" /* in */ DWORD cbSMimeCap,")
  2678. cpp_quote(" /* in/out */ LPVOID pv);")
  2679. cpp_quote("")
  2680. cpp_quote("MIMEOLEAPI MimeOleSMimeCapAddCert(")
  2681. cpp_quote(" /* in */ LPBYTE pbCert,")
  2682. cpp_quote(" /* in */ DWORD cbCert,")
  2683. cpp_quote(" /* in */ BOOL fParanoid,")
  2684. cpp_quote(" /* in/out */ LPVOID pv);")
  2685. cpp_quote("")
  2686. cpp_quote("MIMEOLEAPI MimeOleSMimeCapGetEncAlg(")
  2687. cpp_quote(" /* in */ LPVOID pv,")
  2688. cpp_quote(" /* in/out */ LPBYTE pbEncode,")
  2689. cpp_quote(" /* in/out */ DWORD * pcbEncode,")
  2690. cpp_quote(" /* in/out */ DWORD * pdwBits);")
  2691. cpp_quote("")
  2692. cpp_quote("MIMEOLEAPI MimeOleSMimeCapGetHashAlg(")
  2693. cpp_quote(" /* in */ LPVOID pv,")
  2694. cpp_quote(" /* in/out */ LPBYTE pbEncode,")
  2695. cpp_quote(" /* in/out */ DWORD * pcbEncode,")
  2696. cpp_quote(" /* in/out */ DWORD * pfBlobSign);")
  2697. cpp_quote("")
  2698. cpp_quote("MIMEOLEAPI MimeOleSMimeCapRelease(")
  2699. cpp_quote(" /* in */ LPVOID pv);")
  2700. cpp_quote("")
  2701. cpp_quote("MIMEOLEAPI MimeOleAlgNameFromSMimeCap(")
  2702. cpp_quote(" /* in */ LPBYTE pb,")
  2703. cpp_quote(" /* in */ DWORD cb,")
  2704. cpp_quote(" /* out */ LPCSTR * ppzProtocol);")
  2705. cpp_quote("")
  2706. cpp_quote("MIMEOLEAPI MimeOleAlgStrengthFromSMimeCap(")
  2707. cpp_quote(" /* in */ LPBYTE pb,")
  2708. cpp_quote(" /* in */ DWORD cb,")
  2709. cpp_quote(" /* in */ BOOL fEncryption,")
  2710. cpp_quote(" /* out */ DWORD * pdwStrength);")
  2711. cpp_quote("")
  2712. cpp_quote("MIMEOLEAPI MimeOleSMimeCapsFull(")
  2713. cpp_quote(" /* in */ LPVOID pv,")
  2714. cpp_quote(" /* in */ BOOL fFullEncryption,")
  2715. cpp_quote(" /* in */ BOOL fFullSigning,")
  2716. cpp_quote(" /* in/out */ LPBYTE pbSymCaps,")
  2717. cpp_quote(" /* in/out */ DWORD * pcbSymCaps);")
  2718. cpp_quote("")
  2719. cpp_quote("")
  2720. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  2721. cpp_quote("")
  2722. cpp_quote("MIMEOLEAPI MimeOleCreateHashTable(")
  2723. cpp_quote(" /* in */ DWORD dwSize,")
  2724. cpp_quote(" /* in */ BOOL fDupeKeys,")
  2725. cpp_quote(" /* out */ IHashTable **ppHashTable);")
  2726. cpp_quote("")
  2727. cpp_quote("MIMEOLEAPI MimeOleStripHeaders(")
  2728. cpp_quote(" /* in */ IMimeMessage *pMessage,")
  2729. cpp_quote(" /* in */ HBODY hBody,")
  2730. cpp_quote(" /* in */ LPCSTR pszNameDelete,")
  2731. cpp_quote(" /* in */ LPCSTR pszHeaderAdd,")
  2732. cpp_quote(" /* in */ IStream **ppStream);")
  2733. cpp_quote("")
  2734. cpp_quote("#endif //_WIN32_OE")
  2735. cpp_quote("")
  2736. cpp_quote("#if (_WIN32_OE >= 0x0500)")
  2737. cpp_quote("// --------------------------------------------------------------------------------")
  2738. cpp_quote("// MimeEdit API Prototypes")
  2739. cpp_quote("// --------------------------------------------------------------------------------")
  2740. cpp_quote("MIMEOLEAPI MimeEditViewSource(")
  2741. cpp_quote(" /* in */ HWND hwndParent,")
  2742. cpp_quote(" /* in */ IMimeMessage *pMsg);")
  2743. cpp_quote("")
  2744. cpp_quote("")
  2745. cpp_quote("MIMEOLEAPI MimeEditIsSafeToRun(")
  2746. cpp_quote(" /* in */ HWND hwndParent,")
  2747. cpp_quote(" /* in */ LPCSTR lpszFileName);")
  2748. cpp_quote("")
  2749. cpp_quote("")
  2750. cpp_quote("MIMEOLEAPI MimeEditVerifyTrust(")
  2751. cpp_quote(" /* in */ HWND hwndParent,")
  2752. cpp_quote(" /* in */ LPCSTR lpszFileName,")
  2753. cpp_quote(" /* in */ LPCSTR lpszPathName);")
  2754. cpp_quote("")
  2755. cpp_quote("")
  2756. cpp_quote("MIMEOLEAPI MimeEditCreateMimeDocument(")
  2757. cpp_quote(" /* in */ IUnknown *pDoc,")
  2758. cpp_quote(" /* in */ IMimeMessage *pMsgSrc,")
  2759. cpp_quote(" /* in */ DWORD dwFlags,")
  2760. cpp_quote(" /* out */ IMimeMessage **ppMsg);")
  2761. cpp_quote("")
  2762. cpp_quote("")
  2763. cpp_quote("MIMEOLEAPI MimeEditGetBackgroundImageUrl(")
  2764. cpp_quote(" /* in */ IUnknown *pDoc,")
  2765. cpp_quote(" /* out */ BSTR *pbstr);")
  2766. cpp_quote("")
  2767. cpp_quote("MIMEOLEAPI MimeEditDocumentFromStream(")
  2768. cpp_quote(" /* in */ IStream *pstm,")
  2769. cpp_quote(" /* in */ REFIID riid,")
  2770. cpp_quote(" /* out */ void **ppDoc);")
  2771. cpp_quote("")
  2772. cpp_quote("")
  2773. cpp_quote("#ifdef __WINCRYPT_H__")
  2774. cpp_quote("//+-------------------------------------------------------------------------")
  2775. cpp_quote("// RecipientID")
  2776. cpp_quote("//")
  2777. cpp_quote("// The value of dwRecepintType MUST be 0.")
  2778. cpp_quote("//--------------------------------------------------------------------------")
  2779. cpp_quote("#define szOID_Microsoft_Encryption_Cert \"1.3.6.1.4.1.311.16.4\"")
  2780. cpp_quote("typedef struct _CRYPT_RECIPIENT_ID {")
  2781. cpp_quote(" DWORD dwRecipientType;")
  2782. cpp_quote(" CERT_NAME_BLOB Issuer;")
  2783. cpp_quote(" CRYPT_INTEGER_BLOB SerialNumber;")
  2784. cpp_quote("} CRYPT_RECIPIENT_ID, * PCRYPT_RECIPIENT_ID;")
  2785. cpp_quote("#endif // __WINCRYPT_H__")
  2786. cpp_quote("")
  2787. cpp_quote("#endif //_WIN32_OE")
  2788. cpp_quote("#ifdef __cplusplus")
  2789. cpp_quote("}")
  2790. cpp_quote("#endif")