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.

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