2025-04-27 07:49:33 -04:00

2537 lines
125 KiB
Plaintext

// --------------------------------------------------------------------------------
// MIMEOLE.IDL
// Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
// --------------------------------------------------------------------------------
import "ocidl.idl";
import "objidl.idl";
interface IMimePropertySet;
interface IMimeMessage;
interface IMimeBody;
interface IMimeMessageTree;
interface IMimeEnumHeaderRows;
interface IMimeAddressTable;
interface IMimeMessageParts;
interface IMimeEnumMessageParts;
interface IMimeEnumAddressTypes;
interface IMimeInternational;
interface IMimeAddressInfo;
interface IMimeEnumProperties;
cpp_quote("//--------------------------------------------------------------------------------")
cpp_quote("// MIMEOLE.H")
cpp_quote("//--------------------------------------------------------------------------------")
cpp_quote("// (C) Copyright 1995-1997 Microsoft Corporation. All Rights Reserved.")
cpp_quote("//")
cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
cpp_quote("// PARTICULAR PURPOSE.")
cpp_quote("//--------------------------------------------------------------------------------")
cpp_quote("")
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// GUIDS")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// {E4B28371-83B0-11d0-8259-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(LIBID_MIMEOLE, 0xe4b28371, 0x83b0, 0x11d0, 0x82, 0x59, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {05300401-BCBC-11d0-85E3-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeHtmlProtocol, 0x5300401, 0xbcbc, 0x11d0, 0x85, 0xe3, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C5588354-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeEnumAddressTypes, 0xc5588354, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {EE519F11-851A-11d0-825C-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeWebDocument, 0xee519f11, 0x851a, 0x11d0, 0x82, 0x5c, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CEF-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IUnicodeStream, 0xfd853cef, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C558834A-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeAddressTable, 0xc558834a, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C558834B-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeAddressInfo, 0xc558834b, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C558834D-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeEnumHeaderRows, 0xc558834d, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C558834E-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeInlineSupport, 0xc558834e, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C5588350-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeEnumMessageParts, 0xc5588350, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C5588355-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeSecurityInfo, 0xc5588355, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {C5588356-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeSecurityOptions, 0xc5588356, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CD9-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeInternational, 0xfd853cd9, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {C5588349-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeInternational, 0xc5588349, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CDB-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {C558834C-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeBody, 0xc558834c, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CDC-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeMessageParts, 0xfd853cdc, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {C558834F-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeMessageParts, 0xc558834f, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CDD-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {C5588351-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeAllocator, 0xc5588351, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CDE-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeSecurity, 0xfd853cde, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {C5588353-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeSecurity, 0xc5588353, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CDF-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IVirtualStream, 0xfd853cdf, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {C5588359-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IVirtualStream, 0xc5588359, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CE0-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeHeaderTable, 0xfd853ce0, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {FD853CD1-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeHeaderTable, 0xfd853cd1, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CE1-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimePropertySet, 0xfd853ce1, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {FD853CD3-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimePropertySet, 0xfd853cd3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CE2-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeMessageTree, 0xfd853ce2, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {FD853CD4-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeMessageTree, 0xfd853cd4, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CE3-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {FD853CD5-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeMessage, 0xfd853cd5, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CED-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimePropertySchema, 0xfd853ced, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("// {FD853CEC-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimePropertySchema, 0xfd853cec, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CEE-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(IID_IMimeEnumProperties, 0xfd853cee, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// {FD853CF0-7F86-11d0-8252-00C04FD85AB4}")
cpp_quote("DEFINE_GUID(CLSID_IMimeBindHost,0xfd853cf0, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Errors")
cpp_quote("// --------------------------------------------------------------------------------")
//;begin_internal
//
// NOTE: All inetcomm error codes must reside between CC00 and CFFF (a 1k block).
// This has been approved by Johann Posch (johannp)
// We further subdevide this range as follows:
// CC00-CCFF IMNXPORT results
// CD00-CDFF IMNACCT results
// CE00-CEFF MIMEOLE results
// CF00-CFFF undefined, do not use
// (t-erikne 03/24/97)
//
//;end_internal
cpp_quote("#ifndef FACILITY_INTERNET")
cpp_quote("#define FACILITY_INTERNET 12")
cpp_quote("#endif")
cpp_quote("#ifndef HR_E")
cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)")
cpp_quote("#endif")
cpp_quote("#ifndef HR_S")
cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)")
cpp_quote("#endif")
cpp_quote("#ifndef HR_CODE")
cpp_quote("#define HR_CODE(hr) (INT)(hr & 0xffff)")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIMEOLE Failure Return Values")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define MIME_E_REG_CREATE_KEY HR_E(0xCE01)")
cpp_quote("#define MIME_E_REG_QUERY_INFO HR_E(0xCE02)")
cpp_quote("#define MIME_E_INVALID_ENCTYPE HR_E(0xCE03)")
cpp_quote("#define MIME_E_BOUNDARY_MISMATCH HR_E(0xCE04)")
cpp_quote("#define MIME_E_NOT_FOUND HR_E(0xCE05)")
cpp_quote("#define MIME_E_NO_DATA HR_E(0xCE05)")
cpp_quote("#define MIME_E_BUFFER_TOO_SMALL HR_E(0xCE06)")
cpp_quote("#define MIME_E_INVALID_ITEM_FLAGS HR_E(0xCE07)")
cpp_quote("#define MIME_E_ONE_LINE_ITEM HR_E(0xCE08)")
cpp_quote("#define MIME_E_INVALID_HANDLE HR_E(0xCE09)")
cpp_quote("#define MIME_E_CHARSET_TRANSLATE HR_E(0xCE0A)")
cpp_quote("#define MIME_E_NOT_INITIALIZED HR_E(0xCE0B)")
cpp_quote("#define MIME_E_NO_MORE_ROWS HR_E(0xCE0C)")
cpp_quote("#define MIME_E_ALREADY_BOUND HR_E(0xCE0D)")
cpp_quote("#define MIME_E_CANT_RESET_ROOT HR_E(0xCE0E)")
cpp_quote("#define MIME_E_INSERT_NOT_ALLOWED HR_E(0xCE0F)")
cpp_quote("#define MIME_E_BAD_BODY_LOCATION HR_E(0xCE10)")
cpp_quote("#define MIME_E_NOT_MULTIPART HR_E(0xCE11)")
cpp_quote("#define MIME_E_NO_MULTIPART_BOUNDARY HR_E(0xCE12)")
cpp_quote("#define MIME_E_CONVERT_NOT_NEEDED HR_E(0xCE13)")
cpp_quote("#define MIME_E_CANT_MOVE_BODY HR_E(0xCE14)")
cpp_quote("#define MIME_E_UNKNOWN_BODYTREE_VERSION HR_E(0xCE15)")
cpp_quote("#define MIME_E_NOTHING_TO_SAVE HR_E(0xCE16)")
cpp_quote("#define MIME_E_NEED_SAVE_MESSAGE HR_E(0xCE17)")
cpp_quote("#define MIME_E_NOTHING_TO_REVERT HR_E(0xCE18)")
cpp_quote("#define MIME_E_MSG_SIZE_DIFF HR_E(0xCE19)")
cpp_quote("#define MIME_E_CANT_RESET_PARENT HR_E(0xCE1A)")
cpp_quote("#define MIME_E_CORRUPT_CACHE_TREE HR_E(0xCE1B)")
cpp_quote("#define MIME_E_BODYTREE_OUT_OF_SYNC HR_E(0xCE1C)")
cpp_quote("#define MIME_E_INVALID_ENCODINGTYPE HR_E(0xCE1D)")
cpp_quote("#define MIME_E_MULTIPART_NO_DATA HR_E(0xCE1E)")
cpp_quote("#define MIME_E_INVALID_OPTION_VALUE HR_E(0xCE1F)")
cpp_quote("#define MIME_E_INVALID_OPTION_ID HR_E(0xCE20)")
cpp_quote("#define MIME_E_INVALID_HEADER_NAME HR_E(0xCE21)")
cpp_quote("#define MIME_E_NOT_BOUND HR_E(0xCE22)")
cpp_quote("#define MIME_E_MAX_SIZE_TOO_SMALL HR_E(0xCE23)")
cpp_quote("#define MIME_E_MULTIPART_HAS_CHILDREN HR_E(0xCE25)")
cpp_quote("#define MIME_E_INVALID_PROP_FLAGS HR_E(0xCE26)")
cpp_quote("#define MIME_E_INVALID_ADDRESS_TYPE HR_E(0xCE27)")
cpp_quote("#define MIME_E_INVALID_OBJECT_IID HR_E(0xCE28)")
cpp_quote("#define MIME_E_MLANG_DLL_NOT_FOUND HR_E(0xCE29)")
cpp_quote("#define MIME_E_ROOT_NOT_EMPTY HR_E(0xCE2A)")
cpp_quote("#define MIME_E_MLANG_BAD_DLL HR_E(0xCE2B)")
cpp_quote("#define MIME_E_REG_OPEN_KEY HR_E(0xCE2C)")
cpp_quote("#define MIME_E_INVALID_INET_DATE HR_E(0xCE2D)")
cpp_quote("#define MIME_E_INVALID_BODYTYPE HR_E(0xCE2E)")
cpp_quote("#define MIME_E_INVALID_DELETE_TYPE HR_E(0xCE2F)")
cpp_quote("#define MIME_E_OPTION_HAS_NO_VALUE HR_E(0xCE30)")
cpp_quote("#define MIME_E_INVALID_CHARSET_TYPE HR_E(0xCE31)")
cpp_quote("#define MIME_E_VARTYPE_NO_CONVERT HR_E(0xCE32)")
cpp_quote("#define MIME_E_INVALID_VARTYPE HR_E(0xCE33)")
cpp_quote("#define MIME_E_NO_MORE_ADDRESS_TYPES HR_E(0xCE34)")
cpp_quote("#define MIME_E_INVALID_ENCODING_TYPE HR_E(0xCE35)")
cpp_quote("#define MIME_S_ILLEGAL_LINES_FOUND HR_S(0xCE36)")
cpp_quote("#define MIME_S_MIME_VERSION HR_S(0xCE37)")
cpp_quote("#define MIME_E_INVALID_TEXT_TYPE HR_E(0xCE38)")
cpp_quote("#define MIME_E_READ_ONLY HR_E(0xCE39)")
cpp_quote("#define MIME_S_INVALID_MESSAGE HR_S(0xCE3A)")
cpp_quote("")
cpp_quote("// ---------------------------------------------------------------------------")
cpp_quote("// MIMEOLE Security Error Return Values")
cpp_quote("// ---------------------------------------------------------------------------")
//;begin_internal
// MIMEOLE Security HRESULTS are further subdivided
// NOTE: you should never progammatically rely on this ordering
// it simply gives you a visual cue in the DOUTs
// CEA0-CEAF Initialization/Global
// CEB0-CCCF General
// CED0-CEDF Certificate
// CEE0-CEEF Signing
// CEF0-CEFF Encryption
//;end_internal
cpp_quote("#define MIME_E_SECURITY_NOTINIT HR_E(0xCEA0)")
cpp_quote("#define MIME_E_SECURITY_LOADCRYPT32 HR_E(0xCEA1)")
cpp_quote("#define MIME_E_SECURITY_BADPROCADDR HR_E(0xCEA2)")
cpp_quote("#define MIME_E_SECURITY_NODEFAULT HR_E(0xCEB0)")
cpp_quote("#define MIME_E_SECURITY_NOOP HR_E(0xCEB1)")
cpp_quote("#define MIME_S_SECURITY_NOOP HR_S(0xCEB1)")
cpp_quote("#define MIME_S_SECURITY_NONE HR_S(0xCEB2)")
cpp_quote("#define MIME_S_SECURITY_ERROROCCURED HR_S(0xCEB3)")
cpp_quote("#define MIME_E_SECURITY_USERCHOICE HR_E(0xCEB4)")
cpp_quote("#define MIME_E_SECURITY_UNKMSGTYPE HR_E(0xCEB5)")
cpp_quote("#define MIME_E_SECURITY_BADMESSAGE HR_E(0xCEB6)")
cpp_quote("#define MIME_E_SECURITY_BADCONTENT HR_E(0xCEB7)")
cpp_quote("#define MIME_E_SECURITY_BADSECURETYPE HR_E(0xCEB8)")
cpp_quote("#define MIME_E_SECURITY_BADSTORE HR_E(0xCED0)")
cpp_quote("#define MIME_S_SECURITY_NOCERT HR_S(0xCED1)")
cpp_quote("#define MIME_E_SECURITY_CERTERROR HR_E(0xCED2)")
cpp_quote("#define MIME_S_SECURITY_NODEFCERT HR_S(0xCED3)")
cpp_quote("#define MIME_E_SECURITY_NOCERT HR_E(0xCED4)")
cpp_quote("#define MIME_E_SECURITY_BADSIGNATURE HR_E(0xCEE0)")
cpp_quote("#define MIME_E_SECURITY_MULTSIGNERS HR_E(0xCEE1)")
cpp_quote("#define MIME_E_SECURITY_NOSIGNINGCERT HR_E(0xCEE2)")
cpp_quote("#define MIME_E_SECURITY_CANTDECRYPT HR_E(0xCEF0)")
cpp_quote("#define MIME_E_SECURITY_ENCRYPTNOSENDERCERT HR_E(0xCEF1)")
cpp_quote("")
cpp_quote("// ---------------------------------------------------------------------------")
cpp_quote("// MIMEOLE Security Ignore Masks")
cpp_quote("// Pass these to the enocode/decode functions to admit \"acceptible\"")
cpp_quote("// errors. Acceptible defined to be the bits set on this mask.")
cpp_quote("// ---------------------------------------------------------------------------")
cpp_quote("#define MIME_SECURITY_IGNORE_ENCRYPTNOSENDERCERT 0x0001")
cpp_quote("#define MIME_SECURITY_IGNORE_ALL 0xffff")
cpp_quote("")
cpp_quote("#define MIME_SECURITY_VALID_BADSIGNATURE 0x00000001")
cpp_quote("#define MIME_SECURITY_VALID_UNKSIGNATURE 0x00000002")
cpp_quote("#define MIME_SECURITY_VALID_SIGMASK 0x00000003")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// String Definition Macros")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#ifdef __cplusplus")
cpp_quote("#define EXTERN_C extern \"C\"")
cpp_quote("#else")
cpp_quote("#define EXTERN_C extern")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("#ifdef DEFINE_STRCONST")
cpp_quote("#define STRCONSTA(x,y) EXTERN_C const char x[] = y")
cpp_quote("#define STRCONSTW(x,y) EXTERN_C const WCHAR x[] = L##y")
cpp_quote("#else")
cpp_quote("#define STRCONSTA(x,y) EXTERN_C const char x[]")
cpp_quote("#define STRCONSTW(x,y) EXTERN_C const WCHAR x[]")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// rfc822 Headers")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_HDR_FROM, \"From\");")
cpp_quote("STRCONSTA(STR_HDR_TO, \"To\");")
cpp_quote("STRCONSTA(STR_HDR_CC, \"Cc\");")
cpp_quote("STRCONSTA(STR_HDR_BCC, \"Bcc\");")
cpp_quote("STRCONSTA(STR_HDR_SENDER, \"Sender\");")
cpp_quote("STRCONSTA(STR_HDR_REPLYTO, \"Reply-To\");")
cpp_quote("STRCONSTA(STR_HDR_RETURNPATH, \"Return-Path\");")
cpp_quote("STRCONSTA(STR_HDR_RR, \"Rr\");")
cpp_quote("STRCONSTA(STR_HDR_RETRCPTTO, \"Return-Receipt-To\");")
cpp_quote("STRCONSTA(STR_HDR_APPARTO, \"Apparently-To\");")
cpp_quote("STRCONSTA(STR_HDR_DATE, \"Date\");")
cpp_quote("STRCONSTA(STR_HDR_RECEIVED, \"Received\");")
cpp_quote("STRCONSTA(STR_HDR_MESSAGEID, \"Message-ID\");")
cpp_quote("STRCONSTA(STR_HDR_XMAILER, \"X-Mailer\");")
cpp_quote("STRCONSTA(STR_HDR_ENCODING, \"Encoding\");")
cpp_quote("STRCONSTA(STR_HDR_ENCRYPTED, \"Encrypted\");")
cpp_quote("STRCONSTA(STR_HDR_COMMENT, \"Comment\");")
cpp_quote("STRCONSTA(STR_HDR_SUBJECT, \"Subject\");")
cpp_quote("STRCONSTA(STR_HDR_MIMEVER, \"MIME-Version\");")
cpp_quote("STRCONSTA(STR_HDR_CNTTYPE, \"Content-Type\");")
cpp_quote("STRCONSTA(STR_HDR_CNTXFER, \"Content-Transfer-Encoding\");")
cpp_quote("STRCONSTA(STR_HDR_CNTID, \"Content-ID\");")
cpp_quote("STRCONSTA(STR_HDR_CNTDESC, \"Content-Description\");")
cpp_quote("STRCONSTA(STR_HDR_CNTDISP, \"Content-Disposition\");")
cpp_quote("STRCONSTA(STR_HDR_CNTBASE, \"Content-Base\");")
cpp_quote("STRCONSTA(STR_HDR_CNTLOC, \"Content-Location\");")
cpp_quote("STRCONSTA(STR_HDR_NEWSGROUPS, \"Newsgroups\");")
cpp_quote("STRCONSTA(STR_HDR_PATH, \"Path\");")
cpp_quote("STRCONSTA(STR_HDR_FOLLOWUPTO, \"Followup-To\");")
cpp_quote("STRCONSTA(STR_HDR_EXPIRES, \"Expires\");")
cpp_quote("STRCONSTA(STR_HDR_REFS, \"References\");")
cpp_quote("STRCONSTA(STR_HDR_CONTROL, \"Control\");")
cpp_quote("STRCONSTA(STR_HDR_DISTRIB, \"Distribution\");")
cpp_quote("STRCONSTA(STR_HDR_KEYWORDS, \"Keywords\");")
cpp_quote("STRCONSTA(STR_HDR_SUMMARY, \"Summary\");")
cpp_quote("STRCONSTA(STR_HDR_APPROVED, \"Approved\");")
cpp_quote("STRCONSTA(STR_HDR_LINES, \"Lines\");")
cpp_quote("STRCONSTA(STR_HDR_XREF, \"Xref\");")
cpp_quote("STRCONSTA(STR_HDR_ORG, \"Organization\");")
cpp_quote("STRCONSTA(STR_HDR_XNEWSRDR, \"X-Newsreader\");")
cpp_quote("STRCONSTA(STR_HDR_XPRI, \"X-Priority\");")
cpp_quote("STRCONSTA(STR_HDR_XMSPRI, \"X-MSMail-Priority\");")
cpp_quote("STRCONSTA(STR_HDR_OFFSETS, \"X-Offsets\");")
cpp_quote("STRCONSTA(STR_HDR_XUNSENT, \"X-Unsent\");")
cpp_quote("STRCONSTA(STR_HDR_ARTICLEID, \"X-ArticleId\");")
cpp_quote("STRCONSTA(STR_HDR_NEWSGROUP, \"X-Newsgroup\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Parameters Available through IMimePropertySet/IMimeBody")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_PAR_CHARSET, \"par:content-type:charset\");")
cpp_quote("STRCONSTA(STR_PAR_NUMBER, \"par:content-type:number\");")
cpp_quote("STRCONSTA(STR_PAR_TOTAL, \"par:content-type:total\");")
cpp_quote("STRCONSTA(STR_PAR_ID, \"par:content-type:id\");")
cpp_quote("STRCONSTA(STR_PAR_BOUNDARY, \"par:content-type:boundary\");")
cpp_quote("STRCONSTA(STR_PAR_NAME, \"par:content-type:name\");")
cpp_quote("STRCONSTA(STR_PAR_PROTOCOL, \"par:content-type:protocol\");")
cpp_quote("STRCONSTA(STR_PAR_MICALG, \"par:content-type:micalg\");")
cpp_quote("STRCONSTA(STR_PAR_FILENAME, \"par:content-disposition:filename\");")
cpp_quote("STRCONSTA(STR_PAR_TYPE, \"par:content-type:type\");")
cpp_quote("STRCONSTA(STR_PAR_START, \"par:content-type:start\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Attributes Available through IMimePropertySet/IMimeBody")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_ATT_FILENAME, \"att:filename\");")
cpp_quote("STRCONSTA(STR_ATT_GENFNAME, \"att:generated-filename\");")
cpp_quote("STRCONSTA(STR_ATT_PRITYPE, \"att:pri-content-type\");")
cpp_quote("STRCONSTA(STR_ATT_SUBTYPE, \"att:sub-content-type\");")
cpp_quote("STRCONSTA(STR_ATT_NORMSUBJ, \"att:normalized-subject\");")
cpp_quote("STRCONSTA(STR_ATT_ILLEGAL, \"att:illegal-lines\");")
cpp_quote("STRCONSTA(STR_ATT_RESOURL, \"att:resolved-url\");")
cpp_quote("STRCONSTA(STR_ATT_SENTTIME, \"att:sent-time\");")
cpp_quote("STRCONSTA(STR_ATT_RECVTIME, \"att:received-time\");")
cpp_quote("STRCONSTA(STR_ATT_PRIORITY, \"att:priority\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIME Content Types")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_MIME_TEXT_PLAIN, \"text/plain\");")
cpp_quote("STRCONSTA(STR_MIME_TEXT_HTML, \"text/html\");")
cpp_quote("STRCONSTA(STR_MIME_APPL_STREAM, \"application/octet-stream\");")
cpp_quote("STRCONSTA(STR_MIME_MPART_MIXED, \"multipart/mixed\");")
cpp_quote("STRCONSTA(STR_MIME_MPART_ALT, \"multipart/alternative\");")
cpp_quote("STRCONSTA(STR_MIME_MPART_RELATED, \"multipart/related\");")
cpp_quote("STRCONSTA(STR_MIME_MSG_PART, \"message/partial\");")
cpp_quote("STRCONSTA(STR_MIME_MSG_RFC822, \"message/rfc822\");")
cpp_quote("STRCONSTA(STR_MIME_APPLY_MSTNEF, \"application/ms-tnef\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIME Primary Content Types")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_CNT_TEXT, \"text\");")
cpp_quote("STRCONSTA(STR_CNT_MULTIPART, \"multipart\");")
cpp_quote("STRCONSTA(STR_CNT_MESSAGE, \"message\");")
cpp_quote("STRCONSTA(STR_CNT_IMAGE, \"image\");")
cpp_quote("STRCONSTA(STR_CNT_AUDIO, \"audio\");")
cpp_quote("STRCONSTA(STR_CNT_VIDEO, \"video\");")
cpp_quote("STRCONSTA(STR_CNT_APPLICATION, \"application\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIME Secondary Content Types")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_SUB_PLAIN, \"plain\");")
cpp_quote("STRCONSTA(STR_SUB_HTML, \"html\");")
cpp_quote("STRCONSTA(STR_SUB_RTF, \"ms-rtf\");")
cpp_quote("STRCONSTA(STR_SUB_MIXED, \"mixed\");")
cpp_quote("STRCONSTA(STR_SUB_PARALLEL, \"parallel\");")
cpp_quote("STRCONSTA(STR_SUB_DIGEST, \"digest\");")
cpp_quote("STRCONSTA(STR_SUB_RELATED, \"related\");")
cpp_quote("STRCONSTA(STR_SUB_ALTERNATIVE, \"alternative\");")
cpp_quote("STRCONSTA(STR_SUB_RFC822, \"rfc822\");")
cpp_quote("STRCONSTA(STR_SUB_PARTIAL, \"partial\");")
cpp_quote("STRCONSTA(STR_SUB_EXTERNAL, \"external-body\");")
cpp_quote("STRCONSTA(STR_SUB_OCTETSTREAM, \"octet-stream\");")
cpp_quote("STRCONSTA(STR_SUB_POSTSCRIPT, \"postscript\");")
cpp_quote("STRCONSTA(STR_SUB_GIF, \"gif\");")
cpp_quote("STRCONSTA(STR_SUB_JPEG, \"jpeg\");")
cpp_quote("STRCONSTA(STR_SUB_BASIC, \"basic\");")
cpp_quote("STRCONSTA(STR_SUB_MPEG, \"mpeg\");")
cpp_quote("STRCONSTA(STR_SUB_MSTNEF, \"ms-tnef\");")
cpp_quote("STRCONSTA(STR_SUB_MSWORD, \"msword\");")
cpp_quote("STRCONSTA(STR_SUB_WAV, \"wav\");")
cpp_quote("STRCONSTA(STR_SUB_PKCS7MIME, \"x-pkcs7-mime\");")
cpp_quote("STRCONSTA(STR_SUB_PKCS7SIG, \"x-pkcs7-signature\");")
cpp_quote("STRCONSTA(STR_SUB_SIGNED, \"signed\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIME Content-Transfer-Encoding Types")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_ENC_7BIT, \"7bit\");")
cpp_quote("STRCONSTA(STR_ENC_QP, \"quoted-printable\");")
cpp_quote("STRCONSTA(STR_ENC_BASE64, \"base64\");")
cpp_quote("STRCONSTA(STR_ENC_8BIT, \"8bit\");")
cpp_quote("STRCONSTA(STR_ENC_BINARY, \"binary\");")
cpp_quote("STRCONSTA(STR_ENC_UUENCODE, \"uuencode\");")
cpp_quote("STRCONSTA(STR_ENC_XUUENCODE, \"x-uuencode\");")
cpp_quote("STRCONSTA(STR_ENC_XUUE, \"x-uue\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIME Content-Disposition Types")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_DIS_INLINE, \"inline\");")
cpp_quote("STRCONSTA(STR_DIS_ATTACHMENT, \"attachment\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MIME Protocol Types")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_PRO_SHA1, \"sha1\");")
cpp_quote("STRCONSTA(STR_PRO_MD5, \"rsa-md5\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Known Priority Strings")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_PRI_MS_HIGH, \"High\");")
cpp_quote("STRCONSTA(STR_PRI_MS_NORMAL, \"Normal\");")
cpp_quote("STRCONSTA(STR_PRI_MS_LOW, \"Low\");")
cpp_quote("STRCONSTA(STR_PRI_HIGH, \"1\");")
cpp_quote("STRCONSTA(STR_PRI_NORMAL, \"3\");")
cpp_quote("STRCONSTA(STR_PRI_LOW, \"5\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// IMimeMessage IDataObject clipboard formats (also include CF_TEXT)")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("STRCONSTA(STR_CF_HTML, \"HTML Format\");")
cpp_quote("STRCONSTA(STR_CF_INETMSG, \"Internet Message (rfc822/rfc1522)\");")
cpp_quote("STRCONSTA(STR_CF_RFC822, \"message/rfc822\");")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// PIDSTRING - Use in GetProp, SetProp, QueryProp, DeleteProp")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define PID_BASE 2")
cpp_quote("#define PIDTOSTR(_dwPropId) ((LPCSTR)((DWORD)(_dwPropId)))")
cpp_quote("#define STRTOPID(_pszName) ((DWORD)((LPCSTR)(_pszName)))")
cpp_quote("#define ISPIDSTR(_pszName) ((HIWORD((DWORD)(_pszName)) == 0))")
cpp_quote("#define ISKNOWNPID(_dwPropId) (_dwPropId >= PID_BASE && _dwPropId < PID_LAST)")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Mime Property Ids")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("typedef enum tagMIMEPROPID {")
cpp_quote(" PID_HDR_NEWSGROUP = 2,")
cpp_quote(" PID_HDR_NEWSGROUPS = 3,")
cpp_quote(" PID_HDR_REFS = 4,")
cpp_quote(" PID_HDR_SUBJECT = 5,")
cpp_quote(" PID_HDR_FROM = 6,")
cpp_quote(" PID_HDR_MESSAGEID = 7,")
cpp_quote(" PID_HDR_RETURNPATH = 8,")
cpp_quote(" PID_HDR_RR = 9,")
cpp_quote(" PID_HDR_RETRCPTTO = 10,")
cpp_quote(" PID_HDR_APPARTO = 11,")
cpp_quote(" PID_HDR_DATE = 12,")
cpp_quote(" PID_HDR_RECEIVED = 13,")
cpp_quote(" PID_HDR_REPLYTO = 14,")
cpp_quote(" PID_HDR_XMAILER = 15,")
cpp_quote(" PID_HDR_BCC = 16,")
cpp_quote(" PID_HDR_MIMEVER = 17,")
cpp_quote(" PID_HDR_CNTTYPE = 18,")
cpp_quote(" PID_HDR_CNTXFER = 19,")
cpp_quote(" PID_HDR_CNTID = 20,")
cpp_quote(" PID_HDR_CNTDESC = 21,")
cpp_quote(" PID_HDR_CNTDISP = 22,")
cpp_quote(" PID_HDR_CNTBASE = 23,")
cpp_quote(" PID_HDR_CNTLOC = 24,")
cpp_quote(" PID_HDR_TO = 25,")
cpp_quote(" PID_HDR_PATH = 26,")
cpp_quote(" PID_HDR_FOLLOWUPTO = 27,")
cpp_quote(" PID_HDR_EXPIRES = 28,")
cpp_quote(" PID_HDR_CC = 29,")
cpp_quote(" PID_HDR_CONTROL = 30,")
cpp_quote(" PID_HDR_DISTRIB = 31,")
cpp_quote(" PID_HDR_KEYWORDS = 32,")
cpp_quote(" PID_HDR_SUMMARY = 33,")
cpp_quote(" PID_HDR_APPROVED = 34,")
cpp_quote(" PID_HDR_LINES = 35,")
cpp_quote(" PID_HDR_XREF = 36,")
cpp_quote(" PID_HDR_ORG = 37,")
cpp_quote(" PID_HDR_XNEWSRDR = 38,")
cpp_quote(" PID_HDR_XPRI = 39,")
cpp_quote(" PID_HDR_XMSPRI = 40,")
cpp_quote(" PID_PAR_FILENAME = 41,")
cpp_quote(" PID_PAR_BOUNDARY = 42,")
cpp_quote(" PID_PAR_CHARSET = 43,")
cpp_quote(" PID_PAR_NAME = 44,")
cpp_quote(" PID_ATT_FILENAME = 45,")
cpp_quote(" PID_ATT_GENFNAME = 46,")
cpp_quote(" PID_ATT_PRITYPE = 47,")
cpp_quote(" PID_ATT_SUBTYPE = 48,")
cpp_quote(" PID_ATT_NORMSUBJ = 49,")
cpp_quote(" PID_ATT_ILLEGAL = 50,")
cpp_quote(" PID_ATT_RESOURL = 51,")
cpp_quote(" PID_ATT_SENTTIME = 52,")
cpp_quote(" PID_ATT_RECVTIME = 53,")
cpp_quote(" PID_ATT_PRIORITY = 54,")
cpp_quote(" PID_HDR_COMMENT = 55,")
cpp_quote(" PID_HDR_ENCODING = 56,")
cpp_quote(" PID_HDR_ENCRYPTED = 57,")
cpp_quote(" PID_HDR_OFFSETS = 58,")
cpp_quote(" PID_HDR_XUNSENT = 59,")
cpp_quote(" PID_HDR_ARTICLEID = 60,")
cpp_quote(" PID_HDR_SENDER = 61,")
cpp_quote(" PID_LAST = 62 ")
cpp_quote("};")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Variant Typed Identifiers")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define TYPEDID_MASK ((ULONG)0x0000FFFF)")
cpp_quote("#define TYPEDID_TYPE(_typedid) (VARTYPE)(((ULONG)(_typedid)) & TYPEDID_MASK)")
cpp_quote("#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16)")
cpp_quote("#define TYPEDID(_vartype,_id) ((((TYPEDID)(_id))<<16)|((ULONG)(_vartype)))")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Options Ids")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define OID_ALLOW_8BIT_HEADER TYPEDID(VT_BOOL, 0x0001) // TRUE or FALSE")
cpp_quote("#define OID_CBMAX_HEADER_LINE TYPEDID(VT_UI4, 0x0002) // Bytes")
cpp_quote("#define OID_SAVE_FORMAT TYPEDID(VT_UI4, 0x0003) // SAVE_RFC822 or SAVE_RFC1521 (mime)")
cpp_quote("#define OID_WRAP_BODY_TEXT TYPEDID(VT_BOOL, 0x0004) // TRUE or FALSE")
cpp_quote("#define OID_CBMAX_BODY_LINE TYPEDID(VT_UI4, 0x0005) // Bytes")
cpp_quote("#define OID_TRANSMIT_BODY_ENCODING TYPEDID(VT_UI4, 0x0006) // ENCODINGTYPE")
cpp_quote("#define OID_TRANSMIT_TEXT_ENCODING TYPEDID(VT_UI4, 0x0007) // ENCODINGTYPE")
cpp_quote("#define OID_GENERATE_MESSAGE_ID TYPEDID(VT_BOOL, 0x0008) // TRUE or FALSE")
cpp_quote("#define OID_HASH_ALG_ID TYPEDID(VT_UI4, 0x0009)")
cpp_quote("#define OID_ENCRYPTION_ALG_ID TYPEDID(VT_UI4, 0x000A)")
cpp_quote("#define OID_MESSAGE_SECURE_TYPE TYPEDID(VT_UI2, 0x000B)")
cpp_quote("#define OID_SENDER_SIGNATURE_THUMBPRINT TYPEDID(VT_BLOB, 0X000C)")
cpp_quote("#define OID_INCLUDE_SENDER_CERT TYPEDID(VT_BOOL, 0X000D) // TRUE or FALSE")
cpp_quote("#define OID_HIDE_TNEF_ATTACHMENTS TYPEDID(VT_BOOL, 0X000E) // TRUE or FALSE")
cpp_quote("#define OID_CLEANUP_TREE_ON_SAVE TYPEDID(VT_BOOL, 0X000F) // TRUE or FALSE")
cpp_quote("#define OID_SENDER_ENCRYPTION_THUMBPRINT TYPEDID(VT_BLOB, 0X0010)")
cpp_quote("#define OID_ENCODE_SIDE_OPTIONSET TYPEDID(VT_BOOL, 0X0011) // TRUE or FALSE")
cpp_quote("#define OID_SENDER_CERTIFICATE TYPEDID(VT_BOOL, 0x0012) // TRUE or FALSE")
cpp_quote("#define OID_SECURITY_IGNOREMASK TYPEDID(VT_UI4, 0x0013) // MIME_SECURITY_IGNORE_*")
cpp_quote("#define OID_BODY_REMOVE_NBSP TYPEDID(VT_BOOL, 0x0014) // TRUE or FALSE")
cpp_quote("#define OID_DEFAULT_BODY_CHARSET TYPEDID(VT_UI4, 0x0015) // HCHARSET")
cpp_quote("#define OID_DEFAULT_HEADER_CHARSET TYPEDID(VT_UI4, 0x0016) // HCHARSET")
cpp_quote("#define OID_DBCS_ESCAPE_IS_8BIT TYPEDID(VT_BOOL, 0x0017) // TRUE or FALSE")
cpp_quote("#define OID_CERTIFICATE_TRUST TYPEDID(VT_UI4, 0x0018)")
cpp_quote("#define OID_CERTIFICATE_VALIDITY TYPEDID(VT_UI4, 0x0019)")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Default Option Values")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define DEF_ALLOW_8BIT_HEADER FALSE")
cpp_quote("#define DEF_CBMAX_HEADER_LINE 1000")
cpp_quote("#define DEF_SAVE_FORMAT SAVE_RFC1521")
cpp_quote("#define DEF_WRAP_BODY_TEXT TRUE")
cpp_quote("#define DEF_CBMAX_BODY_LINE 74")
cpp_quote("#define DEF_GENERATE_MESSAGE_ID FALSE")
cpp_quote("#define DEF_HASH_ALG_ID 0x8004 //SHA //N needed?")
cpp_quote("#define DEF_ENCRYPTION_ALG_ID 0x6602 //RC2 //N needed?")
cpp_quote("#define DEF_INCLUDE_SENDER_CERT FALSE")
cpp_quote("#define DEF_HIDE_TNEF_ATTACHMENTS TRUE")
cpp_quote("#define DEF_CLEANUP_TREE_ON_SAVE TRUE")
cpp_quote("#define DEF_BODY_REMOVE_NBSP TRUE")
cpp_quote("#define DEF_SECURITY_IGNOREMASK 0")
cpp_quote("#define DEF_DBCS_ESCAPE_IS_8BIT FALSE")
cpp_quote("#define DEF_TRANSMIT_BODY_ENCODING IET_UNKNOWN")
cpp_quote("#define DEF_TRANSMIT_TEXT_ENCODING IET_7BIT")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Min-Max Option Values")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define MAX_CBMAX_HEADER_LINE 0xffffffff")
cpp_quote("#define MIN_CBMAX_HEADER_LINE 76")
cpp_quote("#define MAX_CBMAX_BODY_LINE 0xffffffff")
cpp_quote("#define MIN_CBMAX_BODY_LINE 30")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// LIBID_MIMEOLE")
cpp_quote("// --------------------------------------------------------------------------------")
[
uuid(E4B28371-83B0-11d0-8259-00C04FD85AB4),
helpstring("Microsoft MIMEOLE Type Library 1.0"),
version(1.0)
]
library MIMEOLE
{
importlib("stdole2.tlb");
#ifndef DECLARE_HANDLE
#define DECLARE_HANDLE(name) \
struct name##__ { DWORD unused; }; \
typedef const struct name##__ _far* name
#endif
DECLARE_HANDLE(HCHARSET);
typedef HCHARSET *LPHCHARSET;
DECLARE_HANDLE(HBODY);
typedef HBODY *LPHBODY;
DECLARE_HANDLE(HHEADERROW);
typedef HHEADERROW *LPHHEADERROW;
typedef DWORD TYPEDID;
typedef enum tagMIMESAVETYPE {
SAVE_RFC822, // Non-mime - UUENCODE
SAVE_RFC1521 // MIME
} MIMESAVETYPE;
typedef enum tagCSETAPPLYTYPE {
CSET_APPLY_UNTAGGED, // Apply the hCharset to all un-tagged properties or use as default on send
CSET_APPLY_ALL // Apply the hCharset to all properties, including tagged properties
} CSETAPPLYTYPE;
// -----------------------------------------------------------------------------------
// ENCODINGTYPE | Internet Charset | Internet Encoding | Transmittable
// -----------------------------------------------------------------------------------
// IET_BINARY | No | No | No
// IET_BASE64 | Yes | Yes | Yes
// IET_UUENCODE | Yes | Yes | Yes
// IET_QP | Yes | Yes | Yes
// IET_7BIT | Yes | No (Dot Stuffed) | Yes
// IET_8BIT | Yes | No (Dot Stuffed) | Yes
// -----------------------------------------------------------------------------------
typedef enum tagENCODINGTYPE {
IET_BINARY, // decoded (mime, uu, or stripped lead-dots)/windows charset
IET_BASE64, // Base64 encoded/internet charset
IET_UUENCODE, // Uu encoded/internet charset
IET_QP, // Quoted-Printable encoded/internet charset
IET_7BIT, // non-encoded (lead-dots stuffed)/internet charset 7bit data
IET_8BIT, // non-encoded (lead-dots stuffed)/internet charset 8bit data
IET_INETCSET, // Decoded, but in an Internet Character Set
IET_UNICODE, // Decoded in unicode
IET_RFC1522, // Header Encoding
IET_ENCODED, // Used mostly for header properties (combines IET_INETCSET and IET_RFC1522)
IET_CURRENT, // Use the current encoding of the body
IET_UNKNOWN // The encoding is unknown, can be treated as binary...
} ENCODINGTYPE;
// IET_DECODED means the same as IET_BINARY
const SHORT IET_DECODED = IET_BINARY;
// ---------------------------------------------------------------------------------------
// String Constants
// ---------------------------------------------------------------------------------------
const SHORT CCHMAX_HEADER_LINE = 1000;
// ---------------------------------------------------------------------------------------
// IID_IMimeInternational
// ---------------------------------------------------------------------------------------
[
uuid(C5588349-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeInternational"),
]
interface IMimeInternational : IUnknown
{
typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL;
typedef DWORD CODEPAGEID;
const CODEPAGEID CP_USASCII = 1252;
const CODEPAGEID CP_UNICODE = 1200;
const CODEPAGEID CP_JAUTODETECT = 50932;
const SHORT CCHMAX_CSET_NAME = 128;
const SHORT CCHMAX_LANG_NAME = 128;
const SHORT CCHMAX_FACE_NAME = 128;
typedef struct tagINETCSETINFO {
CHAR szName[CCHMAX_CSET_NAME]; // Character Set name
HCHARSET hCharset; // Handle to this character set
CODEPAGEID cpiWindows; // Windows CodePage
CODEPAGEID cpiInternet; // Internet Code Page
DWORD dwReserved1; // Reserved, don't use
} INETCSETINFO, *LPINETCSETINFO;
typedef enum tagINETLANGMASK {
ILM_FAMILY = 0x00000001, // CODEPAGEINFO::dwFamily is valid
ILM_NAME = 0x00000002, // CODEPAGEINFO::szName is valid
ILM_BODYCSET = 0x00000004, // CODEPAGEINFO::szBodyCset is valid
ILM_HEADERCSET = 0x00000008, // CODEPAGEINFO::szHeadCset is valid
ILM_WEBCSET = 0x00000010, // CODEPAGEINFO::szWebCset is valid
ILM_FIXEDFONT = 0x00000020, // CODEPAGEINFO::szFixedFont is valid
ILM_VARIABLEFONT = 0x00000040 // CODEPAGEINFO::szVariableFont is valid
} INETLANGMASK;
typedef struct tagCODEPAGEINFO {
DWORD dwMask; // Describes which fields are valid (INETLANGMASK)
CODEPAGEID cpiCodePage; // Handle to this charset (code page number / mlangid)
BOOL fIsValidCodePage; // Value of IsValidCodePage(idCodePage)
ULONG ulMaxCharSize; // Maximum width of a character in this codepage
BOOL fInternetCP; // Is this an Internet Code Page
CODEPAGEID cpiFamily; // Windows Code page if fInternetCP == TRUE
CHAR szName[CCHMAX_LANG_NAME]; // Language Name
CHAR szBodyCset[CCHMAX_CSET_NAME]; // Charset to be used for the body
CHAR szHeaderCset[CCHMAX_CSET_NAME]; // Charset to be used for the Header
CHAR szWebCset[CCHMAX_CSET_NAME]; // Charset to be used for the body
CHAR szFixedFont[CCHMAX_FACE_NAME]; // Fixed Width Font Face Name
CHAR szVariableFont[CCHMAX_FACE_NAME];// Variable Width Font Face Name
ENCODINGTYPE ietNewsDefault; // Default news mime encoding (FMT_BASE64 or FMT_QP)
ENCODINGTYPE ietMailDefault; // Default mail mime encoding (FMT_BASE64 or FMT_QP)
DWORD dwReserved1; // Reserved, don't use
} CODEPAGEINFO, *LPCODEPAGEINFO;
typedef struct tagRFC1522INFO {
BOOL fRfc1522Allowed; // Can rfc 1522 be used to encode/decode the header
BOOL fRfc1522Used; // Was rfc 1522 used to encode/decode the header
BOOL fAllow8bit; // Is 8bit allowed in the encoded header...
HCHARSET hRfc1522Cset; // The charset used in the rfc1522 encoded (DecodeHeader only)
} RFC1522INFO, *LPRFC1522INFO;
typedef enum tagCHARSETTYPE {
CHARSET_BODY, // Corresponds to CODEPAGEINFO::szBodyCset
CHARSET_HEADER, // Corresponds to CODEPAGEINFO::szHeaderCset
CHARSET_WEB // Corresponds to CODEPAGEINFO::szWebCset
} CHARSETTYPE;
HRESULT SetDefaultCharset(
[in] HCHARSET hCharset);
HRESULT GetDefaultCharset(
[out] LPHCHARSET phCharset);
HRESULT GetCodePageCharset(
[in] CODEPAGEID cpiCodePage,
[in] CHARSETTYPE ctCsetType,
[out] LPHCHARSET phCharset);
HRESULT FindCharset(
[in] LPCSTR pszCharset,
[out] LPHCHARSET phCharset);
HRESULT GetCharsetInfo(
[in] HCHARSET hCharset,
[in,out] LPINETCSETINFO pCsetInfo);
HRESULT GetCodePageInfo(
[in] CODEPAGEID cpiCodePage,
[in,out] LPCODEPAGEINFO pCodePageInfo);
HRESULT CanConvertCodePages(
[in] CODEPAGEID cpiSource,
[in] CODEPAGEID cpiDest);
HRESULT DecodeHeader(
[in] HCHARSET hCharset,
[in] LPCSTR pszData,
[in,out] LPPROPVARIANT pDecoded,
[in,out] LPRFC1522INFO pRfc1522Info);
HRESULT EncodeHeader(
[in] HCHARSET hCharset,
[in] LPPROPVARIANT pData,
[out] LPSTR *ppszEncoded,
[in,out] LPRFC1522INFO pRfc1522Info);
HRESULT ConvertBuffer(
[in] CODEPAGEID cpiSource,
[in] CODEPAGEID cpiDest,
[in] LPBLOB pIn,
[in,out] LPBLOB pOut,
[out] ULONG *pcbRead);
HRESULT ConvertString(
[in] CODEPAGEID cpiSource,
[in] CODEPAGEID cpiDest,
[in] LPPROPVARIANT pIn,
[in,out] LPPROPVARIANT pOut);
HRESULT MLANG_ConvertInetReset(void);
HRESULT MLANG_ConvertInetString(
[in] CODEPAGEID cpiSource,
[in] CODEPAGEID cpiDest,
[in] LPCSTR pSource,
[in] int *pnSizeOfSource,
[out] LPSTR pDestination,
[in] int *pnDstSize);
HRESULT Rfc1522Decode(
[in] LPCSTR pszValue,
[in,ref] LPSTR pszCharset,
[in] ULONG cchmax,
[out] LPSTR *ppszDecoded);
HRESULT Rfc1522Encode(
[in] LPCSTR pszValue,
[in] HCHARSET hCharset,
[out] LPSTR *ppszEncoded);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeSecurity
// ---------------------------------------------------------------------------------------
[
uuid(C5588353-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeSecurity"),
]
interface IMimeSecurity : IUnknown
{
typedef [unique] IMimeSecurity *LPMIMESECURITY;
typedef [unique] const IMimeSecurity *LPCMIMESECURITY;
typedef BLOB THUMBBLOB;
typedef const void *PCX509CERT;
typedef void *HCAPICERTSTORE;
cpp_quote("#ifndef IMS_ALGIDDEF")
cpp_quote("#define IMS_ALGIDDEF")
typedef unsigned int ALG_ID;
cpp_quote("#endif")
// -------------------------------------------------------------------
// CERTSTATE
// -------------------------------------------------------------------
typedef enum tagCERTSTATE {
CERTIFICATE_OK, // Only non-error state
CERTIFICATE_NOT_PRESENT,
CERTIFICATE_EXPIRED, // Specific
CERTIFICATE_CHAIN_TOO_LONG, // |
CERTIFICATE_TIMES_DONT_NEST, // v
CERTIFICATE_MISSING_ISSUER, // General
CERTIFICATE_CRL_LISTED, // (Be as specific as possible)
CERTIFICATE_NOT_TRUSTED,
CERTIFICATE_INVALID,
CERTIFICATE_ERROR, // Last resort
CERTIFICATE_NOPRINT, // no thumbprint provided
CERTIFICATE_UNKNOWN // Default
} CERTSTATE;
// -------------------------------------------------------------------
// CERTNAMETYPE:
// Equivalent of CAPI flags to CertNameToStr
// -------------------------------------------------------------------
typedef enum tagCERTNAMETYPE {
SIMPLE,
OID,
X500
} CERTNAMETYPE;
// -------------------------------------------------------------------
// SECURESTATE:
// used to show or set the state of a particular
// cryptographic enhancement
// -------------------------------------------------------------------
typedef enum tagSECURESTATE {
SECURITY_TOGGLE = -1,
SECURITY_DISABLED,
SECURITY_ENABLED,
SECURITY_BAD,
SECURITY_UNTRUSTED,
SECURITY_UNKNOWN,
SECURITY_STATE_MAX
} SECURESTATE;
// -------------------------------------------------------------------
// CERTDATAID:
// used to identify request to GetCertData
// -------------------------------------------------------------------
typedef enum tagCERTDATAID {
CDID_EMAIL, // VT_LPSTR
CDID_MAX
} CERTDATAID;
// -------------------------------------------------------------------
// SECURETYPE:
// bit mask of the possible cryptographic enhancements
// on a message
// -------------------------------------------------------------------
typedef enum tagSECURETYPE {
SECURITY_NONE = 0x0000,
SMIME_ENCRYPT = 0x0001,
SMIME_SIGN = 0x0002,
SMIME_CLEARSIGN = 0x0004,
SMIME_SIGNANDENCRYPT = SMIME_ENCRYPT|SMIME_SIGN
} SECURETYPE;
typedef enum tagSECURECLASS {
ISC_NULL = 0x0000,
ISC_SIGNED = SMIME_SIGN|SMIME_CLEARSIGN,
ISC_ENCRYPTED = SMIME_ENCRYPT,
ISC_ALL = 0xffff
} SECURECLASS;
// -------------------------------------------------------------------
// SMIMESECURITY:
// state information about either a signature or
// an encryption
//
// stState - [inout] on, off, bad. how this enhancement is doing
// oidAlg - [inout] OID of the algorithm to use/in use
// cCert - count of certs in rgpCert
// rgpCert - depends on use
//
// -------------------------------------------------------------------
typedef struct tagSMIMESECURITY {
SECURESTATE stState;
LPSTR oidAlg;
ULONG cCert;
PCX509CERT *rgpCert;
} SMIMESECURITY, *PSMIMESECURITY;
typedef const SMIMESECURITY *PCSMIMESECURITY;
// -------------------------------------------------------------------
// SMIMEINFO:
// bidirectional communication struct for passing parameter
// info to/from the en/decode functions
//
// stMsgEnhancement- SMIME_SIGN, etc. What the message has/needs
// (this is a sign of which SMIMESECURITY structs
// to look at)
// ssSign - state for S/MIME signatures
// ssEncrypt - state for S/MIME encryptions
// pSendersCert - [in for send/out for receive]
// pointer to certificate to use/in use
// fTrustedCert - [out] if this cert passed inspection
// fCertWithMsg - [out] if this cert came straight from the msg
// dwIgnoreFlags - [in] MIME_SECURITY_IGNORE_*
// hMsgCertStore - ...
//
// -------------------------------------------------------------------
typedef struct tagSMIMEINFO {
SECURETYPE stMsgEnhancement;
SMIMESECURITY ssSign;
SMIMESECURITY ssEncrypt;
PCX509CERT pSendersCert;
BOOL fTrustedCert;
BOOL fCertWithMsg;
ULONG ulValidity;
HCAPICERTSTORE hMsgCertStore;
} SMIMEINFO, *PSMIMEINFO;
typedef const SMIMEINFO *PCSMIMEINFO;
// -------------------------------------------------------------------
// X509CERTRESULT:
//
// cEntries- count of the two arrays
// rgcs - array of results mapped to ops done on/with rgpCert
// rgpCert - array of certificates
//
// -------------------------------------------------------------------
typedef struct tagX509CERTRESULT {
DWORD cEntries;
CERTSTATE *rgcs;
PCX509CERT *rgpCert;
} X509CERTRESULT, *PX509CERTRESULT;
typedef const X509CERTRESULT *PCX509CERTRESULT;
HRESULT EncodeMessage(
[in] IMimeMessageTree *const pTree,
[in] DWORD dwFlags);
// dwFlags must be 0
HRESULT DecodeMessage(
[in] IMimeMessageTree *const pTree,
[in] DWORD dwFlags);
HRESULT EncodeStream(
[in,out] SMIMEINFO *const psi,
[in] const LPSTREAM lpstmIn,
[in] LPSTREAM lpstmOut);
HRESULT DecodeStream(
[in,out] SMIMEINFO *const psi,
[in] const LPSTREAM lpstmIn,
[in] LPSTREAM lpstmOut);
HRESULT EncodeBlob(
[in,out] SMIMEINFO *const psi,
[in] const LPBLOB pIn,
[out] LPBLOB pOut);
HRESULT DecodeBlob(
[in,out] SMIMEINFO *const psi,
[in] const LPBLOB pIn,
[out] LPBLOB pOut);
HRESULT DecodeDetachedStream(
[in,out] SMIMEINFO *const psi,
[in] const LPSTREAM lpstmIn,
[in] const LPSTREAM lpstmSig,
[in] LPSTREAM lpstmOut);
HRESULT DecodeDetachedBlob(
[in,out] SMIMEINFO *const psi,
[in] const LPBLOB pData,
[in] const LPBLOB pSig,
[out] LPBLOB pOut);
HRESULT InitNew(void);
HRESULT CheckInit(void);
HRESULT AddCertificateToStore(
[in] HCAPICERTSTORE hc,
[in] PCX509CERT pCert,
[in] const BOOL fReplace,
[in] const BOOL fAllowDups);
HRESULT OpenSystemStore(
[in] LPCSTR pszProtocol,
[out, ref] HCAPICERTSTORE *pc);
HRESULT CloseCertificateStore(
[in] HCAPICERTSTORE hc);
HRESULT GetCertsFromThumbprints(
[in] THUMBBLOB *const rgThumbprint,
[in,out] X509CERTRESULT *const pResults);
HRESULT EnumCertificates(
[in] HCAPICERTSTORE hc,
[in] DWORD dwUsage,
[in] PCX509CERT pPrev,
[out, retval] PCX509CERT *ppCert);
HRESULT GetCertificateName(
[in] const PCX509CERT pX509Cert,
[in] const CERTNAMETYPE cn,
[out, retval] LPSTR *ppszName);
HRESULT GetCertificateThumbprint(
[in] const PCX509CERT pX509Cert,
[out, retval] THUMBBLOB *const pPrint);
HRESULT DuplicateCertificate(
[in] const PCX509CERT pX509Cert,
[out, retval] PCX509CERT *ppDupCert);
HRESULT FreeCertificate(
[in, unique] const PCX509CERT pc);
HRESULT GetMessageType(
[in, unique] const LPSTREAM lpstmIn,
[out, retval] SECURETYPE *pst);
HRESULT VerifyTimeValidity(
[in] const PCX509CERT pX509Cert);
HRESULT GetCertData(
[in] const PCX509CERT pX509Cert,
[in] const CERTDATAID dataid,
[out, ref] LPPROPVARIANT pValue);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeSecurityOptions
// this interface is implemented by clients of IMimeSecurityInfo. It is
// used to provide instance-specific options to the information block of
// the body. Thus the body does not need to know about internal options.
// ---------------------------------------------------------------------------------------
[
uuid(C5588356-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeSecurityOptions"),
pointer_default(ref)
]
interface IMimeSecurityOptions : IUnknown
{
typedef [unique] IMimeSecurityOptions *LPMIMESECURITYOPTIONS;
typedef [unique] const IMimeSecurityOptions *LPCMIMESECURITYOPTIONS;
// -------------------------------------------------------------------
// Encoded-only Query Functions
// if the implementor returns S_OK to IsDecodedMessage() it may
// return E_NOTIMPL for the following
// -------------------------------------------------------------------
HRESULT AddChainForSenderOnCertificateInclusion(void);
HRESULT IncludeRecipientCertificates(void);
HRESULT AddChainForRecipientsOnCertificateInclusion(void);
HRESULT IsDecodedMessage(void);
HRESULT IncludeSendersCertificate(void);
HRESULT GetSecurity(
[out] SECURETYPE **rgtype, //N seems like this would suck for RPC
[out] SECURESTATE **rgstate,
[out] ULONG *pcTypes);
HRESULT GetHashAlgId(
[out, retval] ALG_ID *aid);
HRESULT GetEncryptionAlgId(
[out, retval] ALG_ID *aid);
HRESULT GetSendersThumbprints(
[out] THUMBBLOB **prgPrints,
[out] DWORD *pCount);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeSecurityInfo
// ---------------------------------------------------------------------------------------
[
uuid(C5588355-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeSecurityInfo"),
pointer_default(unique)
]
interface IMimeSecurityInfo : IUnknown
{
typedef [unique] IMimeSecurityInfo *LPMIMESECURITYINFO;
typedef [unique] const IMimeSecurityInfo *LPCMIMESECURITYINFO;
typedef struct tagSECUREINFO {
SECURETYPE stMsgEnhancement;
SECURESTATE ssSign;
SECURESTATE ssEncrypt;
ALG_ID aidHash;
ALG_ID aidEncryption;
PCX509CERT pSendersCert;
BOOL fCertWithMsg;
ULONG ulMsgValidity;
ULONG ulCertValidity;
ULONG ulSignTrust;
} SECUREINFO, *PSECUREINFO;
typedef const SECUREINFO *PCSECUREINFO;
HRESULT InitNew(void);
HRESULT SetDefaults(
[in] IMimeSecurityOptions *pOptSet);
HRESULT SetDefaultsFromSI(
[in] const SMIMEINFO *const psi);
HRESULT IsNew(void);
HRESULT DefaultsBeenSet(void);
HRESULT SetOption(
[in] const ULONG ulOptionId,
[in] LPPROPVARIANT pValue);
HRESULT GetOption(
[in] const ULONG ulOptionId,
[out, ref] LPPROPVARIANT pValue);
HRESULT SetSecurityType(
[in] const SECURETYPE flag,
[in] const SECURESTATE state);
HRESULT GetSecurityState(
[in] const SECURECLASS type,
[out] SECURESTATE *pState);
HRESULT GetDecodedInfo(
[out, ref] SECUREINFO *const pInfo);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeHeaderTable
// ---------------------------------------------------------------------------------------
[
uuid(FD853CD1-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeHeaderTable"),
]
interface IMimeHeaderTable : IPersistStream
{
typedef struct tagFINDHEADER {
LPCSTR pszHeader; // Header Name to find
DWORD dwReserved; // Reserved, do use this
} FINDHEADER, *LPFINDHEADER;
typedef struct tagHEADERROWINFO {
DWORD dwRowNumber; // Position of the row within the header (1 - x)
ULONG cboffStart; // Index into pStream where Header Starts (From: xxxx)
ULONG cboffColon; // Index into pStream of the Header Colon
ULONG cboffEnd; // Index into pStream where the Header Ends
} HEADERROWINFO, *LPHEADERROWINFO;
typedef enum tagHEADERTABLEFLAGS {
HTF_NAMEINDATA = 0x00000001, // The header name is inlcuded in the data
HTF_ENUMHANDLESONLY = 0x00000002 // Enumerate Only Handles
} HEADERTABLEFLAGS;
HRESULT FindFirstRow(
[in] LPFINDHEADER pFindHeader,
[out] LPHHEADERROW phRow);
HRESULT FindNextRow(
[in] LPFINDHEADER pFindHeader,
[out] LPHHEADERROW phRow);
HRESULT CountRows(
[in] LPCSTR pszHeader,
[out] ULONG *pcRows);
HRESULT AppendRow(
[in] LPCSTR pszHeader,
[in] DWORD dwFlags,
[in] LPCSTR pszData,
[in] ULONG cchData,
[out] LPHHEADERROW phRow);
HRESULT DeleteRow(
[in] HHEADERROW hRow);
HRESULT GetRowData(
[in] HHEADERROW hRow,
[in] DWORD dwFlags,
[out] LPSTR *ppszData,
[out] ULONG *pcchData);
HRESULT SetRowData(
[in] HHEADERROW hRow,
[in] DWORD dwFlags,
[in] LPCSTR pszData,
[in] ULONG cchData);
HRESULT GetRowInfo(
[in] HHEADERROW hRow,
[in,out] LPHEADERROWINFO pInfo);
HRESULT SetRowNumber(
[in] HHEADERROW hRow,
[in] DWORD dwRowNumber);
HRESULT EnumRows(
[in] LPCSTR pszHeader,
[in] DWORD dwFlags,
[out] IMimeEnumHeaderRows **ppEnum);
HRESULT Clone(
[out] IMimeHeaderTable **ppTable);
HRESULT BindToObject(
[in] REFIID riid,
[out, iid_is(riid)] void **ppvObject);
}
// ---------------------------------------------------------------------------------------
// IID_IMimePropertySchema
// ---------------------------------------------------------------------------------------
[
uuid(FD853CEC-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimePropertySchema"),
]
interface IMimePropertySchema : IUnknown
{
typedef [unique] IMimePropertySchema *LPMIMEPROPERTYSCHEMA;
typedef enum tagMIMEPROPFLAGS {
MPF_INETCSET = 0x00000001, // Property can be encoded in an internet character set
MPF_RFC1522 = 0x00000002, // Property can be encoded using rfc1522
MPF_ADDRESS = 0x00000004, // Property is in the form of an rfc822 addr-path field
MPF_HASPARAMS = 0x00000008, // Property contains parseable parameters (i.e. Content-Type)
MPF_MIME = 0x00000010, // Property is a MIME specific header
MPF_READONLY = 0x00000020 // Property is read-only and can not be set or appended
} MIMEPROPFLAGS;
HRESULT RegisterProperty(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in] DWORD dwRowNumber,
[out] LPDWORD pdwPropId);
HRESULT ModifyProperty(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in] DWORD dwRowNumber);
HRESULT GetPropertyId(
[in] LPCSTR pszName,
[out] LPDWORD pdwPropId);
HRESULT GetPropertyName(
[in] DWORD dwPropId,
[out] LPSTR *ppszName);
HRESULT RegisterAddressType(
[in] LPCSTR pszName,
[out] LPDWORD pdwAdrType);
}
// ---------------------------------------------------------------------------------------
// IID_IMimePropertySet
// ---------------------------------------------------------------------------------------
[
uuid(FD853CD3-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimePropertySet"),
]
interface IMimePropertySet : IPersistStreamInit
{
typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET;
cpp_quote("#define PDF_ENCODED 0x00000001")
cpp_quote("#define PDF_NAMEINDATA 0x00000002")
cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)")
cpp_quote("#define PDF_NOCOMMENTS 0x00000008")
typedef struct tagMIMEPARAMINFO {
LPSTR pszName; // Parameter Name (i.e. charset)
LPSTR pszData; // Paramater data
} MIMEPARAMINFO, *LPMIMEPARAMINFO;
typedef enum tagPROPINFOMASK {
PIM_CHARSET = 0x00000001, // The MIMEPROPINFO::hCharset member is valid
PIM_ENCODINGTYPE = 0x00000002, // The MIMEPROPINFO::ietEncoding member is valid
PIM_ROWNUMBER = 0x00000004, // The MIMEPROPINFO::dwRowNumber member is valid
PIM_FLAGS = 0x00000008, // The MIMEPROPINFO::dwFlags member is valid
PIM_PROPID = 0x00000010, // The MIMEPROPINFO::dwPropId member is valid
PIM_VALUES = 0x00000020 // The MIMEPROPINFO::cValues member is valid
} PROPINFOMASK;
typedef struct tagMIMEPROPINFO {
DWORD dwMask; // What members in this structure are valid
HCHARSET hCharset; // Property Charset
ENCODINGTYPE ietEncoding; // Encoded in an internet character set
DWORD dwRowNumber; // Current header property row number
DWORD dwFlags; // (GetPropInfo only) Property Flags (MIMEPROPFLAGS)
DWORD dwPropId; // (GetPropInfo only) Property Id
DWORD cValues; // (GetPropInfo only) Number of appended values (i.e. multi-line headers)
} MIMEPROPINFO, *LPMIMEPROPINFO;
HRESULT GetPropInfo(
[in] LPCSTR pszName,
[in,out] LPMIMEPROPINFO pInfo);
HRESULT SetPropInfo(
[in] LPCSTR pszName,
[in] LPMIMEPROPINFO pInfo);
HRESULT GetProp(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in,out] LPPROPVARIANT pValue);
HRESULT SetProp(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in] LPPROPVARIANT pValue);
HRESULT AppendProp(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in] LPPROPVARIANT pValue);
HRESULT DeleteProp(
[in] LPCSTR pszName);
HRESULT CopyProps(
[in] ULONG cNames,
[in] LPCSTR *prgszName,
[in] IMimePropertySet *pPropertySet);
HRESULT MoveProps(
[in] ULONG cNames,
[in] LPCSTR *prgszName,
[in] IMimePropertySet *pPropertySet);
HRESULT DeleteExcept(
[in] ULONG cNames,
[in] LPCSTR *prgszName);
HRESULT QueryProp(
[in] LPCSTR pszName,
[in] LPCSTR pszCriteria,
[in] boolean fSubString,
[in] boolean fCaseSensitive);
HRESULT GetCharset(
[out] LPHCHARSET phCharset);
HRESULT SetCharset(
[in] HCHARSET hCharset,
[in] CSETAPPLYTYPE applytype);
HRESULT GetParameters(
[in] LPCSTR pszName,
[out] ULONG *pcParams,
[out] LPMIMEPARAMINFO *pprgParam);
HRESULT IsContentType(
[in] LPCSTR pszPriType,
[in] LPCSTR pszSubType);
HRESULT BindToObject(
[in] REFIID riid,
[out, iid_is(riid)] void **ppvObject);
HRESULT Clone(
[out] IMimePropertySet **ppPropertySet);
HRESULT SetOption(
[in] TYPEDID oid,
[in] LPPROPVARIANT pValue);
HRESULT GetOption(
[in] TYPEDID oid,
[in,out] LPPROPVARIANT pValue);
cpp_quote("#define EPF_NONAME 0x00000001")
HRESULT EnumProps(
[in] DWORD dwFlags,
[out] IMimeEnumProperties **ppEnum);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeAddressInfo
// ---------------------------------------------------------------------------------------
[
uuid(C558834B-7F86-11d0-8252-00C04FD85AB4),
helpstring("IID_IMimeAddressInfo"),
]
interface IMimeAddressInfo : IUnknown
{
typedef [unique] IMimeAddressInfo *LPMIMEADDRESSINFO;
typedef DWORD IADDRESSTYPE;
const DWORD IAT_UNKNOWN = 0x00000000;
const DWORD IAT_FROM = 0x00000001;
const DWORD IAT_SENDER = 0x00000002;
const DWORD IAT_TO = 0x00000004;
const DWORD IAT_CC = 0x00000008;
const DWORD IAT_BCC = 0x00000010;
const DWORD IAT_REPLYTO = 0x00000020;
const DWORD IAT_RETURNPATH = 0x00000040;
const DWORD IAT_RETRCPTTO = 0x00000080;
const DWORD IAT_RR = 0x00000100;
const DWORD IAT_APPARTO = 0x00000200;
HRESULT GetId(
[out] LPDWORD pdwId);
HRESULT GetType(
[out] LPDWORD pdwAdrType);
HRESULT SetType(
[in] DWORD dwAdrType);
HRESULT SetAddress(
[in] ENCODINGTYPE ietEncoding,
[in] LPCSTR pszFriendly,
[in] LPCSTR pszEmail);
HRESULT GetAddress(
[out] LPSTR *pszFriendly,
[out] LPSTR *ppszEmail);
HRESULT GetCertState(
[out] CERTSTATE *pcertstate);
HRESULT SetCertState(
[in] CERTSTATE certstate);
HRESULT SetThumbprint(
[in] LPBLOB pThumbPrint,
[in] DWORD dwType);
HRESULT GetThumbprint(
[in,out,unique] LPBLOB pThumbPrint,
[in] DWORD dwType);
HRESULT CopyTo(
[in] IMimeAddressInfo *pAddress,
[in] boolean fIncludeType);
HRESULT SetCharset(
[in] HCHARSET hCharset,
[in] CSETAPPLYTYPE applytype);
HRESULT GetCharset(
[out] LPHCHARSET phCharset);
HRESULT Delete(void);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeAddressTable
// ---------------------------------------------------------------------------------------
[
uuid(C558834A-7F86-11d0-8252-00C04FD85AB4),
helpstring("IID_IMimeAddressTable "),
]
interface IMimeAddressTable : IUnknown
{
typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE;
const DWORD IAT_ALL = (DWORD)(0xffffffff);
const DWORD IAT_KNOWN = (DWORD)(IAT_FROM | IAT_TO | IAT_CC | IAT_BCC | IAT_REPLYTO | IAT_SENDER);
const DWORD IAT_RECIPS = (DWORD)(IAT_TO | IAT_CC | IAT_BCC);
typedef enum tagADDRESSFORMAT {
AFT_DISPLAY_FRIENDLY, // Display with friendly names only
AFT_DISPLAY_EMAIL, // Display with friendly email addresses only
AFT_DISPLAY_BOTH, // Display with friendly name and eamil addresses
AFT_RFC822_DECODED, // RFC822 Format (decoded)
AFT_RFC822_ENCODED, // RFC822 Format (encoded)
AFT_RFC822_TRANSMIT // RFC822 Format (encoded) with CRLFs for folding
} ADDRESSFORMAT;
typedef struct tagADDRESSLIST {
ULONG cAddresses; // Number of items in prgAddress
IMimeAddressInfo **prgpAddress; // Array of pointers to IMimeAddressInfo objects
} ADDRESSLIST, *LPADDRESSLIST;
HRESULT GetSender(
[out] IMimeAddressInfo **ppAddress);
HRESULT CountTypes(
[in] DWORD dwAdrTypes,
[out] ULONG *pcAddresses);
HRESULT EnumTypes(
[in] DWORD dwAdrTypes,
[out] IMimeEnumAddressTypes **ppEnum);
HRESULT GetTypes(
[in] DWORD dwAdrTypes,
[in,out] LPADDRESSLIST pList);
HRESULT DeleteTypes(
[in] DWORD dwAdrTypes);
HRESULT DeleteAll(void);
HRESULT AppendBasic(
[in] DWORD dwAdrType,
[in] ENCODINGTYPE ietEncoding,
[in] LPCSTR pszFriendly,
[in] LPCSTR pszEmail);
HRESULT AppendNew(
[in] DWORD dwAdrType,
[out] IMimeAddressInfo **ppAddress);
HRESULT AppendAs(
[in] DWORD dwAdrType,
[in] IMimeAddressInfo *pAddress);
HRESULT AppendList(
[in] LPADDRESSLIST pList);
HRESULT AppendRfc822(
[in] DWORD dwAdrType,
[in] ENCODINGTYPE ietEncoding,
[in] LPCSTR pszRfc822Adr);
HRESULT GetFormat(
[in] DWORD dwAdrType,
[in] ADDRESSFORMAT format,
[out] LPSTR *ppszAddress);
HRESULT ParseRfc822(
[in] DWORD dwAdrType,
[in] ENCODINGTYPE ietEncoding,
[in] LPCSTR pszRfc822Adr,
[in,out] LPADDRESSLIST pList);
HRESULT Clone(
[out] IMimeAddressTable **ppTable);
HRESULT BindToObject(
[in] REFIID riid,
[out, iid_is(riid)] void **ppvObject);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeWebDocument
// ---------------------------------------------------------------------------------------
[
uuid(EE519F11-851A-11d0-825C-00C04FD85AB4),
helpstring("IMimeWebDocument"),
]
interface IMimeWebDocument : IUnknown
{
HRESULT GetURL(
[out] LPSTR *ppszURL);
HRESULT BindToStorage(
[in] REFIID riid,
[out, iid_is(riid)] LPVOID *ppvObject);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeBody
// ---------------------------------------------------------------------------------------
[
uuid(C558834C-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeBody"),
]
interface IMimeBody : IMimePropertySet
{
typedef [unique] IMimeBody *LPMIMEBODY;
typedef enum tagIMSGBODYTYPE {
IBT_SECURE, // Body has cryptographic enhancement(s)
IBT_ATTACHMENT, // Body is considered an attachment by mimeole
IBT_EMPTY // Is the body empty
} IMSGBODYTYPE;
typedef struct tagBODYOFFSETS {
DWORD cbBoundaryStart; // Offset of starting boundary for the body
DWORD cbHeaderStart; // Header start offset
DWORD cbBodyStart; // Body start offset (same as end of header)
DWORD cbBodyEnd; // Body end offset
} BODYOFFSETS, *LPBODYOFFSETS;
typedef struct tagTRANSMITINFO {
ENCODINGTYPE ietCurrent; // Current encoding type of the data
ENCODINGTYPE ietOption; // Current setting of OID_TRANSMIT_BODY_ENCODING
ENCODINGTYPE ietXmitMime; // Recommended Transmit Encoding
ENCODINGTYPE ietXmit822; // Recommended Transmit Encoding
ULONG cbLongestLine; // Longest line seen, determines if wrapping is needed
ULONG cExtended; // Count of Extended Characters
ULONG ulPercentExt; // Percentage of extended characters in the body
ULONG cbSize; // Number of bytes in the decoded data (exact)
ULONG cLines; // Number of lines in the decoded data
} TRANSMITINFO, *LPTRANSMITINFO;
HRESULT IsType(
[in] IMSGBODYTYPE bodytype);
HRESULT SetDisplayName(
[in] LPCSTR pszDisplay);
HRESULT GetDisplayName(
[out] LPSTR *ppszDisplay);
HRESULT GetOffsets(
[out] LPBODYOFFSETS pOffsets);
HRESULT GetCurrentEncoding(
[out] ENCODINGTYPE *pietEncoding);
HRESULT SetCurrentEncoding(
[in] ENCODINGTYPE ietEncoding);
HRESULT GetEstimatedSize(
[in] ENCODINGTYPE ietEncoding,
[out] ULONG *pcbSize);
HRESULT GetDataHere(
[in] ENCODINGTYPE ietEncoding,
[in] IStream *pStream);
HRESULT GetData(
[in] ENCODINGTYPE ietEncoding,
[out] IStream **ppStream);
HRESULT SetData(
[in] ENCODINGTYPE ietEncoding,
[in] LPCSTR pszPriType,
[in] LPCSTR pszSubType,
[in] REFIID riid,
[in, iid_is(riid)] LPVOID pvObject);
HRESULT EmptyData(void);
HRESULT CopyTo(
[in] IMimeBody *pBody);
HRESULT GetTransmitInfo(
[in,out] LPTRANSMITINFO pTransmitInfo);
HRESULT SaveToFile(
[in] ENCODINGTYPE ietEncoding,
[in] LPCSTR pszFilePath);
HRESULT GetHandle(
[out] LPHBODY phBody);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeMessageTree - Supports Aggregation
// ---------------------------------------------------------------------------------------
[
uuid(FD853CD4-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeMessageTree"),
]
interface IMimeMessageTree : IPersistStreamInit
{
typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE;
const HBODY HBODY_ROOT = (HBODY)0xffffffff;
typedef enum tagBODYLOCATION {
IBL_ROOT, // Get the root body of the message
IBL_PARENT, // Parent of pInRelation
IBL_FIRST, // First Child
IBL_LAST, // Last Child
IBL_NEXT, // Next Sibling
IBL_PREVIOUS // Previous Sibling
} BODYLOCATION;
typedef struct tagFINDBODY {
LPSTR pszPriType;
LPSTR pszSubType;
DWORD dwReserved;
} FINDBODY, *LPFINDBODY;
cpp_quote("#define DELETE_PROMOTE_CHILDREN 0x00000001")
HRESULT CreateRootMoniker(
[in] IStream *pStream,
[out] IMoniker **ppMoniker);
HRESULT GetMessageSource(
[out] IStream **ppStream,
[in] boolean fCommitIfDirty);
HRESULT GetMessageSize(
[out] ULONG *pcbSize,
[in] boolean fCommitIfDirty);
HRESULT LoadOffsetTable(
[in] IStream *pStream);
HRESULT SaveOffsetTable(
[in] IStream *pStream,
[in] boolean fCommitIfDirty);
HRESULT GetFlags(
[out] DWORD *pdwFlags);
HRESULT Commit(void);
HRESULT HandsOffStorage(void);
HRESULT BindToObject(
[in] HBODY hBody,
[in] REFIID riid,
[out, iid_is(riid)] void **ppvObject);
HRESULT InsertBody(
[in] BODYLOCATION location,
[in] HBODY hPivot,
[out] LPHBODY phBody);
HRESULT GetBody(
[in] BODYLOCATION location,
[in] HBODY hPivot,
[out] LPHBODY phBody);
HRESULT DeleteBody(
[in] HBODY hBody,
[in] DWORD dwFlags);
HRESULT MoveBody(
[in] HBODY hBody,
[in] BODYLOCATION location);
HRESULT CountBodies(
[in] HBODY hParent,
[in] boolean fRecurse,
[out] ULONG *pcBodies);
HRESULT FindFirst(
[in,out] LPFINDBODY pFindBody,
[out] LPHBODY phBody);
HRESULT FindNext(
[in,out] LPFINDBODY pFindBody,
[out] LPHBODY phBody);
HRESULT ResolveURL(
[in] HBODY hRelated,
[in] LPCSTR pszBase,
[in] LPCSTR pszURL,
[in] DWORD dwFlags,
[out] LPHBODY phBody);
HRESULT ToMultipart(
[in] HBODY hBody,
[in] LPCSTR pszSubType,
[out] LPHBODY phMultipart);
HRESULT GetBodyOffsets(
[in] HBODY hBody,
[in,out] LPBODYOFFSETS pOffsets);
HRESULT GetCharset(
[out] LPHCHARSET phCharset);
HRESULT SetCharset(
[in] HCHARSET hCharset,
[in] CSETAPPLYTYPE applytype);
HRESULT IsBodyType(
[in] HBODY hBody,
[in] IMSGBODYTYPE bodytype);
HRESULT IsContentType(
[in] HBODY hBody,
[in] LPCSTR pszPriType,
[in] LPCSTR pszSubType);
HRESULT QueryBodyProp(
[in] HBODY hBody,
[in] LPCSTR pszName,
[in] LPCSTR pszCriteria,
[in] boolean fSubString,
[in] boolean fCaseSensitive);
HRESULT GetBodyProp(
[in] HBODY hBody,
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in, out] LPPROPVARIANT pValue);
HRESULT SetBodyProp(
[in] HBODY hBody,
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in] LPPROPVARIANT pValue);
HRESULT DeleteBodyProp(
[in] HBODY hBody,
[in] LPCSTR pszName);
HRESULT SetOption(
[in] TYPEDID oid,
[in] LPPROPVARIANT pValue);
HRESULT GetOption(
[in] TYPEDID oid,
[in,out] LPPROPVARIANT pValue);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeMessage - Supports Aggregation
// ---------------------------------------------------------------------------------------
[
uuid(FD853CD5-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeMessage"),
]
interface IMimeMessage : IMimeMessageTree
{
typedef [unique] IMimeMessage *LPMIMEMESSAGE;
typedef DWORD TEXTTYPE;
typedef enum tagIMSGFLAGS {
IMF_ATTACHMENTS = 0x00000001, // The message has attachments
IMF_MULTIPART = 0x00000002, // The message is a multipart message
IMF_SUBMULTIPART = 0x00000004, // The message has a nested multipart section
IMF_MIME = 0x00000008, // The message is in MIME format
IMF_HTML = 0x00000010, // The message has a text/html body
IMF_PLAIN = 0x00000020, // The message has a text/plain body
IMF_PARTIAL = 0x00000040, // The message has un-matching boundaries, or is a message/partial
IMF_SIGNED = 0x00000080, // The message is signed
IMF_ENCRYPTED = 0x00000100, // The message is secured
IMF_TNEF = 0x00000200, // The message has a Microsoft TNEF attachment
IMF_MHTML = 0x00000400, // The message has a MIME-HTML multipart/related section
IMF_SECURE = 0x00000800, // The message has a cryptographic enhancement
IMF_TEXT = 0x00001000 // The message contains text/xxx part(s)
} IMSGFLAGS;
typedef enum tagIMSGPRIORITY {
IMSG_PRI_LOW = 5,
IMSG_PRI_NORMAL = 3,
IMSG_PRI_HIGH = 1
} IMSGPRIORITY;
cpp_quote("#define TXT_PLAIN 0x00000001")
cpp_quote("#define TXT_HTML 0x00000002")
cpp_quote("#define URL_ATTACH_INTO_MIXED 0x00000001")
cpp_quote("#define URL_ATTACH_GENERATE_CID 0x00000002")
cpp_quote("#define URL_RESOLVE_MARK 0x00000001")
HRESULT GetProp(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in,out] LPPROPVARIANT pValue);
HRESULT SetProp(
[in] LPCSTR pszName,
[in] DWORD dwFlags,
[in] LPPROPVARIANT pValue);
HRESULT DeleteProp(
[in] LPCSTR pszName);
HRESULT QueryProp(
[in] LPCSTR pszName,
[in] LPCSTR pszCriteria,
[in] boolean fSubString,
[in] boolean fCaseSensitive);
HRESULT GetTextBody(
[in] DWORD dwTxtType,
[in] ENCODINGTYPE ietEncoding,
[out] IStream **ppStream,
[out] LPHBODY phBody);
HRESULT SetTextBody(
[in] DWORD dwTxtType,
[in] ENCODINGTYPE ietEncoding,
[in] HBODY hAlternative,
[in] IStream *pStream,
[out] LPHBODY phBody);
HRESULT AttachObject(
[in] REFIID riid,
[in, iid_is(riid)] void *pvObject,
[out] LPHBODY phBody);
HRESULT AttachFile(
[in] LPCSTR pszFilePath,
[in] IStream *pstmFile,
[out] LPHBODY phBody);
HRESULT AttachURL(
[in] LPCSTR pszBase,
[in] LPCSTR pszURL,
[in] DWORD dwFlags,
[in] IStream *pstmURL,
[out] LPSTR *ppszCID,
[out] LPHBODY phBody);
HRESULT GetAttachments(
[out] ULONG *pcAttach,
[out] LPHBODY *pprghAttach);
HRESULT GetSender(
[out] IMimeAddressInfo **ppAddress);
HRESULT GetAddressTable(
[out] IMimeAddressTable **ppTable);
HRESULT GetAddressTypes(
[in] DWORD dwAdrTypes,
[in,out] LPADDRESSLIST pList);
HRESULT GetAddressFormat(
[in] DWORD dwAdrType,
[in] ADDRESSFORMAT format,
[out] LPSTR *ppszAddress);
HRESULT SplitMessage(
[in] ULONG cbMaxPart,
[out] IMimeMessageParts **ppParts);
HRESULT GetRootMoniker(
[out] LPMONIKER *ppmk);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeMessageParts - Used for splitting and re-combining partial messages
// ---------------------------------------------------------------------------------------
[
uuid(C558834F-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeMessageParts"),
]
interface IMimeMessageParts : IUnknown
{
typedef [unique] IMimeMessageParts *LPMIMEMESSAGEPARTS;
HRESULT CombineParts(
[out] IMimeMessage **ppMessage);
HRESULT AddPart(
[in] IMimeMessage *pMessage);
HRESULT SetMaxParts(
[in] ULONG cParts);
HRESULT CountParts(
[out] ULONG *pcParts);
HRESULT EnumParts(
[out] IMimeEnumMessageParts **ppEnum);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeEnumHeaderRows
// ---------------------------------------------------------------------------------------
[
uuid(C558834D-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeEnumHeaderRows"),
]
interface IMimeEnumHeaderRows : IUnknown
{
typedef [unique] IMimeEnumHeaderRows *LPMIMEENUMHEADERROWS;
typedef struct tagENUMHEADERROW {
HHEADERROW hRow;
LPSTR pszHeader;
LPSTR pszData;
ULONG cchData;
DWORD dwReserved;
} ENUMHEADERROW, *LPENUMHEADERROW;
HRESULT Next(
[in] ULONG cFetch,
[in,out] LPENUMHEADERROW prgRow,
[out] ULONG *pcFetched);
HRESULT Skip(
[in] ULONG cItems);
HRESULT Reset(void);
HRESULT Clone(
[out] IMimeEnumHeaderRows **ppEnum);
HRESULT Count(
[out] ULONG *pcItems);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeEnumProperties
// ---------------------------------------------------------------------------------------
[
uuid(FD853CEE-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeEnumProperties"),
]
interface IMimeEnumProperties : IUnknown
{
typedef [unique] IMimeEnumProperties *LPMIMEENUMPROPERTIES;
typedef struct tagENUMPROPERTY {
LPSTR pszName;
HHEADERROW hRow;
DWORD dwPropId;
} ENUMPROPERTY, *LPENUMPROPERTY;
HRESULT Next(
[in] ULONG cFetch,
[in,out] LPENUMPROPERTY prgProp,
[out] ULONG *pcFetched);
HRESULT Skip(
[in] ULONG cItems);
HRESULT Reset(void);
HRESULT Clone(
[out] IMimeEnumProperties **ppEnum);
HRESULT Count(
[out] ULONG *pcItems);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeEnumAddressTypes
// ---------------------------------------------------------------------------------------
[
uuid(C5588354-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeEnumAddressTypes"),
]
interface IMimeEnumAddressTypes : IUnknown
{
typedef [unique] IMimeEnumAddressTypes *LPMIMEENUMADDRESSTYPES;
HRESULT Next(
[in] ULONG cFetch,
[in,out] IMimeAddressInfo **prgpAddress,
[out] ULONG *pcFetched);
HRESULT Skip(
[in] ULONG cItems);
HRESULT Reset(void);
HRESULT Clone(
[out] IMimeEnumAddressTypes **ppEnum);
HRESULT Count(
[out] ULONG *pcItems);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeEnumMessageParts - Used to enumerate IMimeMessageParts container
// ---------------------------------------------------------------------------------------
[
uuid(C5588350-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeEnumMessageParts"),
]
interface IMimeEnumMessageParts : IUnknown
{
typedef [unique] IMimeEnumMessageParts *LPMIMEENUMMESSAGEPARTS;
HRESULT Next(
[in] ULONG cFetch,
[in,out] IMimeMessage **prgpMessage,
[out] ULONG *pcFetched);
HRESULT Skip(
[in] ULONG cItems);
HRESULT Reset(void);
HRESULT Clone(
[out] IMimeEnumMessageParts **ppEnum);
HRESULT Count(
[out] ULONG *pcItems);
}
// ---------------------------------------------------------------------------------------
// IID_IMimeAllocator
// ---------------------------------------------------------------------------------------
[
uuid(C5588351-7F86-11d0-8252-00C04FD85AB4),
helpstring("IMimeAllocator"),
]
interface IMimeAllocator : IMalloc
{
typedef [unique] IMimeAllocator *LPMIMEALLOCATOR;
HRESULT FreeParamInfoArray(
[in] ULONG cParams,
[in] LPMIMEPARAMINFO prgParam,
[in] boolean fFreeArray);
HRESULT FreeAddressList(
[in,out] LPADDRESSLIST pList);
HRESULT ReleaseObjects(
[in] ULONG cObjects,
[in] IUnknown **prgpUnknown,
[in] boolean fFreeArray);
HRESULT FreeEnumHeaderRowArray(
[in] ULONG cRows,
[in] LPENUMHEADERROW prgRow,
[in] boolean fFreeArray);
HRESULT FreeEnumPropertyArray(
[in] ULONG cProps,
[in] LPENUMPROPERTY prgProp,
[in] boolean fFreeArray);
HRESULT FreeThumbprint(
[in] THUMBBLOB *pthumbprint);
HRESULT FreeSMIMEINFO(
[in] SMIMEINFO *psi);
HRESULT PropVariantClear(
[in] LPPROPVARIANT pProp);
}
}
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MimeOLE Exported C API Functions")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#ifdef __cplusplus")
cpp_quote("extern \"C\" {")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Depends")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#include <urlmon.h>")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// API Name Decoration")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#if !defined(_MIMEOLE_)")
cpp_quote("#define MIMEOLEAPI DECLSPEC_IMPORT HRESULT WINAPI")
cpp_quote("#define MIMEOLEAPI_(_type_) DECLSPEC_IMPORT _type_ WINAPI")
cpp_quote("#else")
cpp_quote("#define MIMEOLEAPI HRESULT WINAPI")
cpp_quote("#define MIMEOLEAPI_(_type_) _type_ WINAPI")
cpp_quote("#endif")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Constants")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define NOFLAGS 0")
cpp_quote("#define CCHMAX_CID 255")
cpp_quote("#define CCHMAX_MID 255")
cpp_quote("#define CCHMAX_INTERNET_DATE 50")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// Macros")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("#define MimeOleVariantInit(_pProp) \\")
cpp_quote(" ZeroMemory(_pProp, sizeof(PROPVARIANT))")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// WRAPTEXTINFO - Use with the text wrapping functions")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("typedef struct tagWRAPTEXTINFO {")
cpp_quote(" ULONG cbBreakAfter; // Max num chars allowable from last space to max line length")
cpp_quote(" ULONG cbFirstLineIndent; // Amount of first line indent (in bytes)")
cpp_quote(" ULONG cbMaxLine; // Max Line Length (in bytes)")
cpp_quote(" BOOL fIsHtml; // Is the text HTML")
cpp_quote(" BOOL fStuffLeadDots; // Stuff Leading Dots")
cpp_quote(" BOOL fFolding; // Used for wrapping headers (pre-pends \r to everyline...)")
cpp_quote(" CODEPAGEID cpiCodePage; // Specifies the code page of the text")
cpp_quote(" ULONG cLines; // Lines Wrote")
cpp_quote(" BOOL fLastBreakSpace; // Last ComputeLineBreak was on a space character...")
cpp_quote("} WRAPTEXTINFO, *LPWRAPTEXTINFO;")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// MimeOLE API Prototypes")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("MIMEOLEAPI MimeOleParseMhtmlUrl(")
cpp_quote(" /* in */ LPSTR pszUrl,")
cpp_quote(" /* out */ LPSTR *ppszRootUrl,")
cpp_quote(" /* out */ LPSTR *ppszBodyUrl);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleObjectFromUrl(")
cpp_quote(" /* in */ LPCSTR pszUrl,")
cpp_quote(" /* in */ BOOL fCreate,")
cpp_quote(" /* in */ REFIID riid, ")
cpp_quote(" /* out */ LPVOID *ppvObject);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleObjectFromMoniker(")
cpp_quote(" /* in */ BINDF bindf,")
cpp_quote(" /* in */ IMoniker *pmkOriginal,")
cpp_quote(" /* in */ IBindCtx *pBindCtx,")
cpp_quote(" /* in */ REFIID riid, ")
cpp_quote(" /* out */ LPVOID *ppvObject,")
cpp_quote(" /* out */ IMoniker **ppmkNew);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetTextBody(")
cpp_quote(" /* in */ IMimeMessageTree *pTree, ")
cpp_quote(" /* in */ DWORD dwTxtType, ")
cpp_quote(" /* in */ ENCODINGTYPE ietEncoding, ")
cpp_quote(" /* out */ IStream **ppStream, ")
cpp_quote(" /* out */ LPHBODY phBody);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCombineURL(")
cpp_quote(" /* in */ LPCSTR pszBase,")
cpp_quote(" /* in */ ULONG cchBase,")
cpp_quote(" /* in */ LPCSTR pszURL,")
cpp_quote(" /* in */ ULONG cchURL,")
cpp_quote(" /* out */ LPSTR *ppszAbsolute);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetSubjectFileName(")
cpp_quote(" /* in */ IMimePropertySet *pPropertySet, ")
cpp_quote(" /* out */ ULONG *pulPart, ")
cpp_quote(" /* out */ ULONG *pulTotal, ")
cpp_quote(" /* in,out */ LPSTR pszFileName, ")
cpp_quote(" /* in */ ULONG cchMax);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateWebDocument(")
cpp_quote(" /* in */ LPCSTR pszBase,")
cpp_quote(" /* in */ LPCSTR pszURL,")
cpp_quote(" /* in */ LPCSTR pszPriType,")
cpp_quote(" /* in */ LPCSTR pszSubType,")
cpp_quote(" /* out */ IMimeWebDocument **ppDocument);")
cpp_quote(" ")
cpp_quote("MIMEOLEAPI MimeOleGetRelatedSection(")
cpp_quote(" /* in */ IMimeMessageTree *pTree, ")
cpp_quote(" /* in */ boolean fCreate,")
cpp_quote(" /* out */ LPHBODY phRelated,")
cpp_quote(" /* out */ boolean *pfMultiple);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetMixedSection(")
cpp_quote(" /* in */ IMimeMessageTree *pTree, ")
cpp_quote(" /* in */ boolean fCreate,")
cpp_quote(" /* out */ LPHBODY phMixed,")
cpp_quote(" /* out */ boolean *pfMultiple);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetAlternativeSection(")
cpp_quote(" /* in */ IMimeMessageTree *pTree, ")
cpp_quote(" /* out */ LPHBODY phAlternative,")
cpp_quote(" /* out */ boolean *pfMultiple);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGenerateCID(")
cpp_quote(" /* in,out */ LPSTR pszCID, ")
cpp_quote(" /* in */ ULONG cchMax, ")
cpp_quote(" /* in */ boolean fAbsolute);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGenerateMID(")
cpp_quote(" /* in,out */ LPSTR pszMID, ")
cpp_quote(" /* in */ ULONG cchMax, ")
cpp_quote(" /* in */ boolean fAbsolute);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateByteStream(")
cpp_quote(" /* out */ IStream **ppStream);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetPropertySchema(")
cpp_quote(" /* out */ IMimePropertySchema **ppSchema);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleQueryString(")
cpp_quote(" /* in */ LPCSTR pszSearchMe, ")
cpp_quote(" /* in */ LPCSTR pszCriteria, ")
cpp_quote(" /* in */ boolean fSubString, ")
cpp_quote(" /* in */ boolean fCaseSensitive);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetPropA(")
cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* out */ LPSTR *ppszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleSetPropA(")
cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* in */ LPCSTR pszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetPropW(")
cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* out */ LPWSTR *ppszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleSetPropW(")
cpp_quote(" /* in */ IMimePropertySet *pPropertyset,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* in */ LPWSTR pszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetBodyPropA(")
cpp_quote(" /* in */ IMimeMessageTree *pTree,")
cpp_quote(" /* in */ HBODY hBody,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* out */ LPSTR *ppszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleSetBodyPropA(")
cpp_quote(" /* in */ IMimeMessageTree *pTree,")
cpp_quote(" /* in */ HBODY hBody,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* in */ LPCSTR pszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetBodyPropW(")
cpp_quote(" /* in */ IMimeMessageTree *pTree,")
cpp_quote(" /* in */ HBODY hBody,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* out */ LPWSTR *ppszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleSetBodyPropW(")
cpp_quote(" /* in */ IMimeMessageTree *pTree,")
cpp_quote(" /* in */ HBODY hBody,")
cpp_quote(" /* in */ LPCSTR pszName,")
cpp_quote(" /* in */ DWORD dwFlags,")
cpp_quote(" /* in */ LPCWSTR pszData);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateHeaderTable(")
cpp_quote(" /* out */ IMimeHeaderTable **ppTable);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleVariantFree(")
cpp_quote(" /* in,out */ LPPROPVARIANT pProp);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleVariantCopy(")
cpp_quote(" /* out */ LPPROPVARIANT pDest, ")
cpp_quote(" /* in */ LPPROPVARIANT pSource);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetExtClassId(")
cpp_quote(" /* in */ LPCSTR pszExtension, ")
cpp_quote(" /* out */ LPCLSID pclsid);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleEncodeHeader(")
cpp_quote(" /* in */ HCHARSET hCharset, ")
cpp_quote(" /* in */ LPPROPVARIANT pData, ")
cpp_quote(" /* out */ LPSTR *ppszEncoded, ")
cpp_quote(" /* in,out */ LPRFC1522INFO pRfc1522Info);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleDecodeHeader(")
cpp_quote(" /* in */ HCHARSET hCharset, ")
cpp_quote(" /* in */ LPCSTR pszData, ")
cpp_quote(" /* out */ LPPROPVARIANT pDecoded, ")
cpp_quote(" /* in,out */ LPRFC1522INFO pRfc1522Info);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleRfc1522Decode(")
cpp_quote(" /* in */ LPCSTR pszValue,")
cpp_quote(" /* in */ LPSTR pszCharset, ")
cpp_quote(" /* in */ ULONG cchmax, ")
cpp_quote(" /* out */ LPSTR *ppszDecoded);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleRfc1522Encode(")
cpp_quote(" /* in */ LPCSTR pszValue, ")
cpp_quote(" /* in */ HCHARSET hCharset, ")
cpp_quote(" /* out */ LPSTR *ppszEncoded);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetInternat(")
cpp_quote(" /* out */ IMimeInternational **ppInternat);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleFindCharset(")
cpp_quote(" /* in */ LPCSTR pszCharset, ")
cpp_quote(" /* out */ LPHCHARSET phCharset);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetCharsetInfo(")
cpp_quote(" /* in */ HCHARSET hCharset, ")
cpp_quote(" /* out */ LPINETCSETINFO pCsetInfo);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetCodePageInfo(")
cpp_quote(" /* in */ CODEPAGEID cpiCodePage, ")
cpp_quote(" /* out */ LPCODEPAGEINFO pCodePageInfo);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetDefaultCharset(")
cpp_quote(" /* out */ LPHCHARSET phCharset);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleSetDefaultCharset(")
cpp_quote(" /* in */ HCHARSET hCharset);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetCodePageCharset(")
cpp_quote(" /* in */ CODEPAGEID cpiCodePage, ")
cpp_quote(" /* in */ CHARSETTYPE ctCsetType, ")
cpp_quote(" /* out */ LPHCHARSET phCharset);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateVirtualStream(")
cpp_quote(" /* out */ IStream **ppStream);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleOpenFileStream(")
cpp_quote(" /* in */ LPCSTR pszFilePath, ")
cpp_quote(" /* in */ DWORD dwCreationDistribution, ")
cpp_quote(" /* in */ DWORD dwAccess, ")
cpp_quote(" /* out */ IStream **ppstmFile);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleIsTnefStream(")
cpp_quote(" /* in */ IStream *pStream);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGenerateFileName(")
cpp_quote(" /* in */ LPCSTR pszContentType, ")
cpp_quote(" /* in */ LPCSTR pszSuggest, ")
cpp_quote(" /* in */ LPCSTR pszDefaultExt, ")
cpp_quote(" /* in,out */ LPSTR *ppszFileName);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetFileExtension(")
cpp_quote(" /* in */ LPCSTR pszFilePath, ")
cpp_quote(" /* in,out */ LPSTR pszExt, ")
cpp_quote(" /* in */ ULONG cchMax);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateSecurity(")
cpp_quote(" /* out */ IMimeSecurity **ppSecurity);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleInetDateToFileTime(")
cpp_quote(" /* in */ LPCSTR pszDate, ")
cpp_quote(" /* out */ LPFILETIME pft);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleFileTimeToInetDate(")
cpp_quote(" /* in */ LPFILETIME pft, ")
cpp_quote(" /* in,out */ LPSTR pszDate, ")
cpp_quote(" /* in */ ULONG cchMax);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateMessageParts(")
cpp_quote(" /* out */ IMimeMessageParts **ppParts);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetAllocator(")
cpp_quote(" /* out */ IMimeAllocator **ppAllocator);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleParseRfc822Address(")
cpp_quote(" /* in */ DWORD dwAdrType,")
cpp_quote(" /* in */ ENCODINGTYPE ietEncoding,")
cpp_quote(" /* in */ LPCSTR pszRfc822Adr, ")
cpp_quote(" /* out */ LPADDRESSLIST pList);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateMessage(")
cpp_quote(" /* in */ IUnknown *pUnkOuter,")
cpp_quote(" /* out */ IMimeMessage **ppMessage);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleMergePartialHeaders(")
cpp_quote(" /* in */ IStream *pstmIn, ")
cpp_quote(" /* in */ IStream *pstmOut);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleEscapeString(")
cpp_quote(" /* in */ CODEPAGEID cpiCodePage, ")
cpp_quote(" /* in */ LPCSTR pszIn, ")
cpp_quote(" /* out */ LPSTR *ppszOut);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetExtContentType(")
cpp_quote(" /* in */ LPCSTR pszExtension,")
cpp_quote(" /* out */ LPSTR *ppszContentType);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetContentTypeExt(")
cpp_quote(" /* in */ LPCSTR pszContentType, ")
cpp_quote(" /* out */ LPSTR *ppszExtension);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleGetFileInfo(")
cpp_quote(" /* in */ LPSTR pszFilePath, ")
cpp_quote(" /* out */ LPSTR *ppszCntType,")
cpp_quote(" /* out */ LPSTR *ppszSubType,")
cpp_quote(" /* out */ LPSTR *ppszCntDesc,")
cpp_quote(" /* out */ LPSTR *ppszFileName,")
cpp_quote(" /* out */ LPSTR *ppszExtension);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateBody(")
cpp_quote(" /* out */ IMimeBody **ppBody);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreatePropertySet(")
cpp_quote(" /* in */ IUnknown *pUnkOuter, ")
cpp_quote(" /* out */ IMimePropertySet **ppPropertySet);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateMessageTree(")
cpp_quote(" /* in */ IUnknown *pUnkOuter, ")
cpp_quote(" /* out */ IMimeMessageTree **ppMessageTree);")
cpp_quote("")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleCreateBindHost(")
cpp_quote(" /* out */ IBindHost **ppBindHost);")
cpp_quote("")
cpp_quote("MIMEOLEAPI_(ULONG) ComputeLineBreakA(")
cpp_quote(" /* in */ LPWRAPTEXTINFO pWrapInfo, ")
cpp_quote(" /* in */ LPBYTE pbText,")
cpp_quote(" /* in */ ULONG cbText, ")
cpp_quote(" /* in */ ULONG iText);")
cpp_quote("")
cpp_quote("MIMEOLEAPI_(ULONG) ComputeLineBreakW(")
cpp_quote(" /* in */ LPWRAPTEXTINFO pWrapInfo, ")
cpp_quote(" /* in */ LPBYTE pbText,")
cpp_quote(" /* in */ ULONG cbText, ")
cpp_quote(" /* in */ ULONG iText);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleWrapTextStream(")
cpp_quote(" /* in */ LPWRAPTEXTINFO pWrapInfo, ")
cpp_quote(" /* in */ IStream *pstmIn, ")
cpp_quote(" /* in */ IStream *pstmOut);")
cpp_quote("")
cpp_quote("MIMEOLEAPI MimeOleWrapText(")
cpp_quote(" /* in */ LPWRAPTEXTINFO pWrapInfo, ")
cpp_quote(" /* in */ LPBYTE pbText, ")
cpp_quote(" /* in */ ULONG cbText, ")
cpp_quote(" /* in */ IStream *pstmDest);")
cpp_quote("")
cpp_quote("#ifdef __cplusplus")
cpp_quote("}")
cpp_quote("#endif")