' ########################################################################################
' Microsoft Windows
' File: mimeole.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' ########################################################################################
' Library name: MIMEOLE
' Version: 1.0, Locale ID = 0
' Documentation string: Microsoft MIMEOLE Type Library 1.0
' Library GUID: {E4B28371-83B0-11D0-8259-00C04FD85AB4}
' ########################################################################################
' ########################################################################################
' Deprecated. Do not use.
' Outlook Express and Windows Mail have been replaced with Windows Live.
' ########################################################################################
'//--------------------------------------------------------------------------------
'// MIMEOLE.H
'//--------------------------------------------------------------------------------
'// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.
'//
'// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
'// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'// PARTICULAR PURPOSE.
'//--------------------------------------------------------------------------------
#IF NOT %DEF(PBX_mimeole_PBI)
#DEFINE PBX_mimeole_PBI
%EQUATE `MIMEOLE_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/Platform/WinCrypt.inc"
#INCLUDE ONCE "Legacy/System/PropIdl.inc"
'// --------------------------------------------------------------------------------
'// GUIDS
'// --------------------------------------------------------------------------------
$LIBID_MIMEOLE = GUID$("{E4B28371-83B0-11D0-8259-00C04FD85AB4}")
$CLSID_IMimeHtmlProtocol = GUID$("{05300401-BCBC-11D0-85E3-00C04FD85AB4}")
$IID_IMimeEnumAddressTypes = GUID$("{C5588354-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeWebDocument = GUID$("{EE519F11-851A-11D0-825C-00C04FD85AB4}")
$IID_IUnicodeStream = GUID$("{FD853CEF-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeAddressTable = GUID$("{C558834A-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeAddressTableW = GUID$("{11C8D742-0FB4-11D3-A01E-00A0C90C9BB6}")
$IID_IMimeAddressInfo = GUID$("{C558834B-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeEnumHeaderRows = GUID$("{C558834D-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeInlineSupport = GUID$("{C558834E-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeEnumMessageParts = GUID$("{C5588350-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeInternational = GUID$("{FD853CD9-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeInternational = GUID$("{C5588349-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeBody = GUID$("{FD853CDB-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeBody = GUID$("{C558834C-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeBodyW = GUID$("{2F38042A-D02F-11d2-A004-00A0C90C9BB6}")
$IID_IMimeBodyW = GUID$("{2F38042B-D02F-11D2-A004-00A0C90C9BB6}")
$CLSID_IMimeMessageParts = GUID$("{FD853CDC-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeMessageParts = GUID$("{C558834F-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeAllocator = GUID$("{FD853CDD-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeAllocator = GUID$("{C5588351-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeSecurity = GUID$("{FD853CDE-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeSecurity = GUID$("{C5588353-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IVirtualStream = GUID$("{FD853CDF-7F86-11D0-8252-00C04FD85AB4}")
$IID_IVirtualStream = GUID$("{C5588359-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeHeaderTable = GUID$("{FD853CE0-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeHeaderTable = GUID$("{FD853CD1-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimePropertySet = GUID$("{FD853CE1-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimePropertySet = GUID$("{FD853CD3-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeMessageTree = GUID$("{FD853CE2-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeMessageTree = GUID$("{FD853CD4-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeMessage = GUID$("{FD853CE3-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeMessage = GUID$("{FD853CD5-7F86-11D0-8252-00C04FD85AB4}")
$CLSID_IMimeMessageW = GUID$("{F90ADFEE-D01F-11d2-A004-00A0C90C9BB6}")
$IID_IMimeMessageW = GUID$("{F90ADFEF-D01F-11D2-A004-00A0C90C9BB6}")
$CLSID_IMimePropertySchema = GUID$("{FD853CED-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimePropertySchema = GUID$("{FD853CEC-7F86-11D0-8252-00C04FD85AB4}")
$IID_IMimeEnumProperties = GUID$("{FD853CEE-7F86-11D0-8252-00C04FD85AB4}")
$IID_IPersistMime = GUID$("{DE4AD8DA-555F-11D1-8DD0-00C04FB951F9}")
$IID_IMimeMessageCallback = GUID$("{761AA641-7BDA-11D1-8AA9-00C04FB951F3}")
'#if (_WIN32_OE >= 0x0500)
$CLSID_MimeEdit = GUID$("{1C82EAD9-508E-11D1-8DCF-00C04FB951F9}")
$CMDSETID_MimeEdit = GUID$("{1C82EADA-508E-11D1-8DCF-00C04FB951F9}")
$CMDSETID_MimeEditHost = GUID$("{1C82EADB-508E-11D1-8DCF-00C04FB951F9}")
$IID_IHashTable = GUID$("{64577981-86D7-11D1-BDFC-00C04FA31009}")
$CLSID_IHashTable = GUID$("{64577982-86D7-11D1-BDFC-00C04FA31009}")
$CLSID_IFontCache = GUID$("{B0D17FC2-7BC4-11D1-BDFA-00C04FA31009}")
$IID_IFontCache = GUID$("{B0D17FC4-7BC4-11D1-BDFA-00C04FA31009}")
$IID_IFontCacheNotify = GUID$("{B0D17FC5-7BC4-11D1-BDFA-00C04FA31009}")
$CLSID_IMimeObjResolver = GUID$("{35461E30-C488-11D1-960E-00C04FBD7C09}")
$IID_IMimeObjResolver = GUID$("{FECEAFFD-C441-11D1-960E-00C04FBD7C09}")
$IID_IMimeEditTag = GUID$("{70183210-7B36-11D2-8C12-00C04FA31009}")
$IID_IMimeEditTagCollection = GUID$("{D09EE528-7B38-11D2-8C12-00C04FA31009}")
$IID_IMimeSecurityCallback = GUID$("{ba715ae0-a740-11d2-8b22-0080c76b34c6}")
$CLSID_INewsgroupHelp = GUID$("{7A0CC021-2939-4379-AA82-12AECC3538F6}")
$IID_INewsgroupHelp = GUID$("{0887C54F-4F42-4937-81DA-BC9C97494627}")
$IID_IHashTableW = GUID$("{71d6b38c-7a15-42c6-af84-b2a5dc242ceb}")
$CLSID_IHashTableW = GUID$("{71d6b38d-7a15-42c6-af84-b2a5dc242ceb}")
$IID_IMimeEditTagCollection = GUID$("{d09ee528-7b38-11d2-8c12-00c04fa31009}")
$CLSID_PreviewEmail = GUID$("{b9815375-5d7f-4ce2-9245-c9d4da436930}")
$CLSID_PreviewHtml = GUID$("{f8b8412b-dea3-4130-b36c-5e8be73106ac}")
$CLSID_PreviewMime = GUID$("{92dbad9f-5025-49b0-9078-2d78f935e341}")
$CLSID_PreviewUrl = GUID$("{BFD468D2-D0A0-4bdc-878C-E69C2F5B435D}")
'#endif //_WIN32_OE
'// --------------------------------------------------------------------------------
'// Errors
'// Also defined in msoeapi.inc
'// --------------------------------------------------------------------------------
#IF NOT %DEF(%FACILITY_INTERNET)
%EQUATE `FACILITY_INTERNET = 12
#ENDIF
#IF NOT %DEF(%HR_E_DEFINED)
%EQUATE `HR_E_DEFINED = 1
MACRO HR_E(n) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_INTERNET, n)
#ENDIF
#IF NOT %DEF(%HR_S_DEFINED)
%EQUATE `HR_S_DEFINED = 1
MACRO HR_S(n) = MAKE_SCODE(%SEVERITY_ERROR, %FACILITY_INTERNET, n)
#ENDIF
#IF NOT %DEF(%HR_CODE_DEFINED)
%EQUATE `HR_CODE_DEFINED = 1
MACRO HR_CODE(hr) = (hr AND &Hffff)
#ENDIF
'// --------------------------------------------------------------------------------
'// MIMEOLE Failure Return Values
'// --------------------------------------------------------------------------------
%EQUATE `MIME_E_REG_CREATE_KEY = &HFFFFCE01& ' HR_E(0xCE01)
%EQUATE `MIME_E_REG_QUERY_INFO = &HFFFFCE02& ' HR_E(0xCE02)
%EQUATE `MIME_E_INVALID_ENCTYPE = &HFFFFCE03& ' HR_E(0xCE03)
%EQUATE `MIME_E_BOUNDARY_MISMATCH = &HFFFFCE04& ' HR_E(0xCE04)
%EQUATE `MIME_E_NOT_FOUND = &HFFFFCE05& ' HR_E(0xCE05)
%EQUATE `MIME_E_NO_DATA = &HFFFFCE05& ' HR_E(0xCE05)
%EQUATE `MIME_E_BUFFER_TOO_SMALL = &HFFFFCE06& ' HR_E(0xCE06)
%EQUATE `MIME_E_INVALID_ITEM_FLAGS = &HFFFFCE07& ' HR_E(0xCE07)
%EQUATE `MIME_E_ONE_LINE_ITEM = &HFFFFCE08& ' HR_E(0xCE08)
%EQUATE `MIME_E_INVALID_HANDLE = &HFFFFCE09& ' HR_E(0xCE09)
%EQUATE `MIME_E_CHARSET_TRANSLATE = &HFFFFCE0A& ' HR_E(0xCE0A)
%EQUATE `MIME_E_NOT_INITIALIZED = &HFFFFCE0B& ' HR_E(0xCE0B)
%EQUATE `MIME_E_NO_MORE_ROWS = &HFFFFCE0C& ' HR_E(0xCE0C)
%EQUATE `MIME_E_ALREADY_BOUND = &HFFFFCE0D& ' HR_E(0xCE0D)
%EQUATE `MIME_E_CANT_RESET_ROOT = &HFFFFCE0E& ' HR_E(0xCE0E)
%EQUATE `MIME_E_INSERT_NOT_ALLOWED = &HFFFFCE0F& ' HR_E(0xCE0F)
%EQUATE `MIME_E_BAD_BODY_LOCATION = &HFFFFCE10& ' HR_E(0xCE10)
%EQUATE `MIME_E_NOT_MULTIPART = &HFFFFCE11& ' HR_E(0xCE11)
%EQUATE `MIME_E_NO_MULTIPART_BOUNDARY = &HFFFFCE12& ' HR_E(0xCE12)
%EQUATE `MIME_E_CONVERT_NOT_NEEDED = &HFFFFCE13& ' HR_E(0xCE13)
%EQUATE `MIME_E_CANT_MOVE_BODY = &HFFFFCE14& ' HR_E(0xCE14)
%EQUATE `MIME_E_UNKNOWN_BODYTREE_VERSION = &HFFFFCE15& ' HR_E(0xCE15)
%EQUATE `MIME_E_NOTHING_TO_SAVE = &HFFFFCE16& ' HR_E(0xCE16)
%EQUATE `MIME_E_NEED_SAVE_MESSAGE = &HFFFFCE17& ' HR_E(0xCE17)
%EQUATE `MIME_E_NOTHING_TO_REVERT = &HFFFFCE18& ' HR_E(0xCE18)
%EQUATE `MIME_E_MSG_SIZE_DIFF = &HFFFFCE19& ' HR_E(0xCE19)
%EQUATE `MIME_E_CANT_RESET_PARENT = &HFFFFCE1A& ' HR_E(0xCE1A)
%EQUATE `MIME_E_CORRUPT_CACHE_TREE = &HFFFFCE1B& ' HR_E(0xCE1B)
%EQUATE `MIME_E_BODYTREE_OUT_OF_SYNC = &HFFFFCE1C& ' HR_E(0xCE1C)
%EQUATE `MIME_E_INVALID_ENCODINGTYPE = &HFFFFCE1D& ' HR_E(0xCE1D)
%EQUATE `MIME_E_MULTIPART_NO_DATA = &HFFFFCE1E& ' HR_E(0xCE1E)
%EQUATE `MIME_E_INVALID_OPTION_VALUE = &HFFFFCE1F& ' HR_E(0xCE1F)
%EQUATE `MIME_E_INVALID_OPTION_ID = &HFFFFCE20& ' HR_E(0xCE20)
%EQUATE `MIME_E_INVALID_HEADER_NAME = &HFFFFCE21& ' HR_E(0xCE21)
%EQUATE `MIME_E_NOT_BOUND = &HFFFFCE22& ' HR_E(0xCE22)
%EQUATE `MIME_E_MAX_SIZE_TOO_SMALL = &HFFFFCE23& ' HR_E(0xCE23)
%EQUATE `MIME_E_MULTIPART_HAS_CHILDREN = &HFFFFCE25& ' HR_E(0xCE25)
%EQUATE `MIME_E_INVALID_PROP_FLAGS = &HFFFFCE26& ' HR_E(0xCE26)
%EQUATE `MIME_E_INVALID_ADDRESS_TYPE = &HFFFFCE27& ' HR_E(0xCE27)
%EQUATE `MIME_E_INVALID_OBJECT_IID = &HFFFFCE28& ' HR_E(0xCE28)
%EQUATE `MIME_E_MLANG_DLL_NOT_FOUND = &HFFFFCE29& ' HR_E(0xCE29)
%EQUATE `MIME_E_ROOT_NOT_EMPTY = &HFFFFCE2A& ' HR_E(0xCE2A)
%EQUATE `MIME_E_MLANG_BAD_DLL = &HFFFFCE2B& ' HR_E(0xCE2B)
%EQUATE `MIME_E_REG_OPEN_KEY = &HFFFFCE2C& ' HR_E(0xCE2C)
%EQUATE `MIME_E_INVALID_INET_DATE = &HFFFFCE2D& ' HR_E(0xCE2D)
%EQUATE `MIME_E_INVALID_BODYTYPE = &HFFFFCE2E& ' HR_E(0xCE2E)
%EQUATE `MIME_E_INVALID_DELETE_TYPE = &HFFFFCE2F& ' HR_E(0xCE2F)
%EQUATE `MIME_E_OPTION_HAS_NO_VALUE = &HFFFFCE30& ' HR_E(0xCE30)
%EQUATE `MIME_E_INVALID_CHARSET_TYPE = &HFFFFCE31& ' HR_E(0xCE31)
%EQUATE `MIME_E_VARTYPE_NO_CONVERT = &HFFFFCE32& ' HR_E(0xCE32)
%EQUATE `MIME_E_INVALID_VARTYPE = &HFFFFCE33& ' HR_E(0xCE33)
%EQUATE `MIME_E_NO_MORE_ADDRESS_TYPES = &HFFFFCE34& ' HR_E(0xCE34)
%EQUATE `MIME_E_INVALID_ENCODING_TYPE = &HFFFFCE35& ' HR_E(0xCE35)
%EQUATE `MIME_S_ILLEGAL_LINES_FOUND = &HFFFFCE36& ' HR_S(0xCE36)
%EQUATE `MIME_S_MIME_VERSION = &HFFFFCE37& ' HR_S(0xCE37)
%EQUATE `MIME_E_INVALID_TEXT_TYPE = &HFFFFCE38& ' HR_E(0xCE38)
%EQUATE `MIME_E_READ_ONLY = &HFFFFCE39& ' HR_E(0xCE39)
%EQUATE `MIME_S_INVALID_MESSAGE = &HFFFFCE3A& ' HR_S(0xCE3A)
%EQUATE `MIME_S_CHARSET_CONFLICT = &HFFFFCE3B& ' HR_S(0xCE3B)
%EQUATE `MIME_E_UNSUPPORTED_VARTYPE = &HFFFFCE3C& ' HR_E(0xCE3C)
%EQUATE `MIME_S_NO_CHARSET_CONVERT = &HFFFFCE3D& ' HR_S(0xCE3D)
%EQUATE `MIME_E_URL_NOTFOUND = &HFFFFCE3E& ' HR_E(0xCE3E)
%EQUATE `MIME_E_BAD_TEXT_DATA = &HFFFFCE3F& ' HR_E(0xCE3F)
%EQUATE `MIME_E_NO_SIGNER = &HFFFFCE40& ' HR_S(0xCE40)
'// ---------------------------------------------------------------------------
'// MIMEOLE Security Error Return Values
'// ---------------------------------------------------------------------------
%EQUATE `MIME_E_SECURITY_NOTINIT = &HFFFFCEA0& ' HR_E(0xCEA0)
%EQUATE `MIME_E_SECURITY_LOADCRYPT32 = &HFFFFCEA1& ' HR_E(0xCEA1)
%EQUATE `MIME_E_SECURITY_BADPROCADDR = &HFFFFCEA2& ' HR_E(0xCEA2)
%EQUATE `MIME_E_SECURITY_NODEFAULT = &HFFFFCEB0& ' HR_E(0xCEB0)
%EQUATE `MIME_E_SECURITY_NOOP = &HFFFFCEB1& ' HR_E(0xCEB1)
%EQUATE `MIME_S_SECURITY_NOOP = &HFFFFCEB1& ' HR_S(0xCEB1)
%EQUATE `MIME_S_SECURITY_NONE = &HFFFFCEB2& ' HR_S(0xCEB2)
%EQUATE `MIME_S_SECURITY_ERROROCCURED = &HFFFFCEB3& ' HR_S(0xCEB3)
%EQUATE `MIME_E_SECURITY_USERCHOICE = &HFFFFCEB4& ' HR_E(0xCEB4)
%EQUATE `MIME_E_SECURITY_UNKMSGTYPE = &HFFFFCEB5& ' HR_E(0xCEB5)
%EQUATE `MIME_E_SECURITY_BADMESSAGE = &HFFFFCEB6& ' HR_E(0xCEB6)
%EQUATE `MIME_E_SECURITY_BADCONTENT = &HFFFFCEB7& ' HR_E(0xCEB7)
%EQUATE `MIME_E_SECURITY_BADSECURETYPE = &HFFFFCEB8& ' HR_E(0xCEB8)
%EQUATE `MIME_E_SECURITY_CLASSNOTSUPPORTED = &HFFFFCEB9& ' HR_E(0xCEB9)
%EQUATE `MIME_S_SECURITY_RECURSEONLY = &HFFFFCEBA& ' HR_S(0xCEBA)
%EQUATE `MIME_E_SECURITY_BADSTORE = &HFFFFCED0& ' HR_E(0xCED0)
%EQUATE `MIME_S_SECURITY_NOCERT = &HFFFFCED1& ' HR_S(0xCED1)
%EQUATE `MIME_E_SECURITY_NOCERT = &HFFFFCED1& ' HR_E(0xCED1)
%EQUATE `MIME_E_SECURITY_CERTERROR = &HFFFFCED2& ' HR_E(0xCED2)
%EQUATE `MIME_S_SECURITY_CERTERROR = &HFFFFCED2& ' HR_S(0xCED2)
%EQUATE `MIME_S_SECURITY_NODEFCERT = &HFFFFCED3& ' HR_S(0xCED3)
%EQUATE `MIME_E_SECURITY_BADSIGNATURE = &HFFFFCEE0& ' HR_E(0xCEE0)
%EQUATE `MIME_E_SECURITY_MULTSIGNERS = &HFFFFCEE1& ' HR_E(0xCEE1)
%EQUATE `MIME_E_SECURITY_NOSIGNINGCERT = &HFFFFCEE2& ' HR_E(0xCEE2)
%EQUATE `MIME_E_SECURITY_CANTDECRYPT = &HFFFFCEF0& ' HR_E(0xCEF0)
%EQUATE `MIME_E_SECURITY_ENCRYPTNOSENDERCERT = &HFFFFCEF1& ' HR_E(0xCEF1)
%EQUATE `MIME_S_SECURITY_NOSENDERCERT = &HFFFFCEF2& ' HR_S(0xCEF2)
%EQUATE `MIME_E_SECURITY_LABELACCESSDENIED = &HFFFFCEF3& ' HR_E(0xCEF3)
%EQUATE `MIME_E_SECURITY_LABELACCESSCANCELLED = &HFFFFCEF4& ' HR_E(0xCEF4)
%EQUATE `MIME_E_SECURITY_LABELCORRUPT = &HFFFFCEF5& ' HR_E(0xCEF5)
%EQUATE `MIME_E_SECURITY_UIREQUIRED = &HFFFFCEF6& ' HR_E(0xCEF6)
%EQUATE `MIME_E_SECURITY_RECEIPT_NOMATCHINGRECEIPTBODY = &HFFFFCEF7& ' HR_E(0xCEF7)
%EQUATE `MIME_E_SECURITY_RECEIPT_MSGHASHMISMATCH = &HFFFFCEF8& ' HR_E(0xCEF8)
%EQUATE `MIME_E_SECURITY_RECEIPT_CANTDECODE = &HFFFFCEF9& ' HR_E(0xCEF9)
%EQUATE `MIME_E_SECURITY_RECEIPT_CANTFINDSENTITEM = &HFFFFCEFA& ' HR_E(0xCEFA)
%EQUATE `MIME_E_SECURITY_RECEIPT_CANTFINDORGMSG = &HFFFFCEFB& ' HR_E(0xCEFB)
%EQUATE `MIME_E_SECURITY_LABELUIREQUIRED = &HFFFFCEFC& ' HR_E(0xCEFC)
%EQUATE `MIME_S_RECEIPT_FROMMYSELF = &HFFFFCEFC& ' HR_S(0xCEFC)
%EQUATE `MIME_E_SECURITY_NOTIMPLEMENTED = &HFFFFCEFD& ' HR_E(0xCEFD)
'#if (_WIN32_OE >= 0x0500)
'// --------------------------------------------------------------------------------
'// MIMEEDIT Failure Return Values
'// --------------------------------------------------------------------------------
%EQUATE `MIMEEDIT_E_UNEXPECTED = &H800C1700& ' HR_E(0x1700)
%EQUATE `MIMEEDIT_E_DODEFAULT = &H800C1701& ' HR_E(0x1701)
%EQUATE `MIMEEDIT_E_LOADLIBRARYFAILURE = &H800C1702& ' HR_E(0x1702)
%EQUATE `MIMEEDIT_E_USERCANCEL = &H800C1703& ' HR_E(0x1703)
%EQUATE `MIMEEDIT_E_CHARSETNOTFOUND = &H800C1704& ' HR_E(0x1704)
%EQUATE `MIMEEDIT_E_ILLEGALBODYFORMAT = &H800C1705& ' HR_E(0x1705)
%EQUATE `MIMEEDIT_E_CANNOTSAVEUNTILPARSECOMPLETE = &H800C1706& ' HR_E(0x1706)
%EQUATE `MIMEEDIT_E_CANNOTSAVEWHILESOURCEEDITING = &H800C1707& ' HR_E(0x1707)
'// --------------------------------------------------------------------------------
'// MIMEEDIT Success Return Values
'// --------------------------------------------------------------------------------
%EQUATE `MIMEEDIT_S_OPENFILE = &H000C1750& ' HR_S(0x1750)
%EQUATE `MIMEEDIT_S_SAVEFILE = &H000C1751& ' HR_S(0x1751)
'// --------------------------------------------------------------------------------
'// MIMEEDIT Warning Return Values
'// --------------------------------------------------------------------------------
%EQUATE `MIMEEDIT_W_DOWNLOADNOTCOMPLETE = &H000C1760& ' HR_S(0x1760)
%EQUATE `MIMEEDIT_W_BADURLSNOTATTACHED = &H000C1761& ' HR_S(0x1761)
'#endif //_WIN32_OE
'// --------------------------------------------------------------------------------
'// String Definition Macros
'// --------------------------------------------------------------------------------
'#ifndef STRCONSTA
'#ifdef DEFINE_STRCONST
'#define STRCONSTA(x,y) EXTERN_C const char x[] = y
'#define STRCONSTW(x,y) EXTERN_C const WCHAR x[] = L##y
'#else
'#define STRCONSTA(x,y) EXTERN_C const char x[]
'#define STRCONSTW(x,y) EXTERN_C const WCHAR x[]
'#endif
'#endif
'// --------------------------------------------------------------------------------
'// rfc822 Headers
'// --------------------------------------------------------------------------------
$STR_HDR_FROM = "From" ' STRCONSTA(STR_HDR_FROM, "From");
$STR_HDR_TO = "To" ' STRCONSTA(STR_HDR_TO, "To");
$STR_HDR_CC = "Cc" ' STRCONSTA(STR_HDR_CC, "Cc");
$STR_HDR_BCC = "Bcc" ' STRCONSTA(STR_HDR_BCC, "Bcc");
$STR_HDR_SENDER = "Sender" ' STRCONSTA(STR_HDR_SENDER, "Sender");
$STR_HDR_REPLYTO = "Reply-To" ' STRCONSTA(STR_HDR_REPLYTO, "Reply-To");
$STR_HDR_RETURNPATH = "Return-Path" ' STRCONSTA(STR_HDR_RETURNPATH, "Return-Path");
$STR_HDR_RR = "Rr" ' STRCONSTA(STR_HDR_RR, "Rr");
$STR_HDR_RETRCPTTO = "Return-Receipt-To" ' STRCONSTA(STR_HDR_RETRCPTTO, "Return-Receipt-To");
$STR_HDR_APPARTO = "Apparently-To" ' STRCONSTA(STR_HDR_APPARTO, "Apparently-To");
$STR_HDR_DATE = "Date" ' STRCONSTA(STR_HDR_DATE, "Date");
$STR_HDR_RECEIVED = "Received" ' STRCONSTA(STR_HDR_RECEIVED, "Received");
$STR_HDR_MESSAGEID = "Message-ID" ' STRCONSTA(STR_HDR_MESSAGEID, "Message-ID");
$STR_HDR_XMAILER = "X-Mailer" ' STRCONSTA(STR_HDR_XMAILER, "X-Mailer");
$STR_HDR_ENCODING = "Encoding" ' STRCONSTA(STR_HDR_ENCODING, "Encoding");
$STR_HDR_ENCRYPTED = "Encrypted" ' STRCONSTA(STR_HDR_ENCRYPTED, "Encrypted");
$STR_HDR_COMMENT = "Comment" ' STRCONSTA(STR_HDR_COMMENT, "Comment");
$STR_HDR_SUBJECT = "Subject" ' STRCONSTA(STR_HDR_SUBJECT, "Subject");
$STR_HDR_MIMEVER = "MIME-Version" ' STRCONSTA(STR_HDR_MIMEVER, "MIME-Version");
$STR_HDR_CNTTYPE = "Content-Type" ' STRCONSTA(STR_HDR_CNTTYPE, "Content-Type");
$STR_HDR_CNTXFER = "Content-Transfer-Encoding" ' STRCONSTA(STR_HDR_CNTXFER, "Content-Transfer-Encoding");
$STR_HDR_CNTID = "Content-ID" ' STRCONSTA(STR_HDR_CNTID, "Content-ID");
$STR_HDR_CNTDESC = "Content-Description" ' STRCONSTA(STR_HDR_CNTDESC, "Content-Description");
$STR_HDR_CNTDISP = "Content-Disposition" ' STRCONSTA(STR_HDR_CNTDISP, "Content-Disposition");
$STR_HDR_CNTBASE = "Content-Base" ' STRCONSTA(STR_HDR_CNTBASE, "Content-Base");
$STR_HDR_CNTLOC = "Content-Location" ' STRCONSTA(STR_HDR_CNTLOC, "Content-Location");
$STR_HDR_NEWSGROUPS = "Newsgroups" ' STRCONSTA(STR_HDR_NEWSGROUPS, "Newsgroups");
$STR_HDR_PATH = "Path" ' STRCONSTA(STR_HDR_PATH, "Path");
$STR_HDR_FOLLOWUPTO = "Followup-To" ' STRCONSTA(STR_HDR_FOLLOWUPTO, "Followup-To");
$STR_HDR_EXPIRES = "Expires" ' STRCONSTA(STR_HDR_EXPIRES, "Expires");
$STR_HDR_REFS = "References" ' STRCONSTA(STR_HDR_REFS, "References");
'#if _WIN32_WINNT >= 0x0600
$STR_HDR_INREPLYTO = "In-Reply-To" ' STRCONSTA(STR_HDR_INREPLYTO, "In-Reply-To");
$STR_HDR_CONTROL = "Control" ' STRCONSTA(STR_HDR_CONTROL, "Control");
'#endif // _WIN32_WINNT >= 0x0600
$STR_HDR_DISTRIB = "Distribution" ' STRCONSTA(STR_HDR_DISTRIB, "Distribution");
$STR_HDR_KEYWORDS = "Keywords" ' STRCONSTA(STR_HDR_KEYWORDS, "Keywords");
$STR_HDR_SUMMARY = "Summary" ' STRCONSTA(STR_HDR_SUMMARY, "Summary");
$STR_HDR_APPROVED = "Approved" ' STRCONSTA(STR_HDR_APPROVED, "Approved");
$STR_HDR_LINES = "Lines" ' STRCONSTA(STR_HDR_LINES, "Lines");
$STR_HDR_XREF = "Xref" ' STRCONSTA(STR_HDR_XREF, "Xref");
$STR_HDR_ORG = "Organization" ' STRCONSTA(STR_HDR_ORG, "Organization");
$STR_HDR_XNEWSRDR = "X-Newsreader" ' STRCONSTA(STR_HDR_XNEWSRDR, "X-Newsreader");
$STR_HDR_XPRI = "X-Priority" ' STRCONSTA(STR_HDR_XPRI, "X-Priority");
$STR_HDR_XMSPRI = "X-MSMail-Priority" ' STRCONSTA(STR_HDR_XMSPRI, "X-MSMail-Priority");
$STR_HDR_OFFSETS = "X-Offsets" ' STRCONSTA(STR_HDR_OFFSETS, "X-Offsets");
$STR_HDR_XUNSENT = "X-Unsent" ' STRCONSTA(STR_HDR_XUNSENT, "X-Unsent");
$STR_HDR_ARTICLEID = "X-ArticleId" ' STRCONSTA(STR_HDR_ARTICLEID, "X-ArticleId");
$STR_HDR_NEWSGROUP = "X-Newsgroup" ' STRCONSTA(STR_HDR_NEWSGROUP, "X-Newsgroup");
$STR_HDR_XVOICEMAIL = "X-VoiceMail" ' STRCONSTA(STR_HDR_XVOICEMAIL, "X-VoiceMail");
$STR_HDR_XMSOESREC = "X-MSOESRec" ' STRCONSTA(STR_HDR_XMSOESREC, "X-MSOESRec")
'// --------------------------------------------------------------------------------
'// rfc2646 Headers
'// --------------------------------------------------------------------------------
$STR_HDR_XRFC2646 = "X-RFC2646" ' STRCONSTA(STR_HDR_XRFC2646, "X-RFC2646")
$STR_HDR_XRFC2646_FLOWED = "Format=Flowed" ' STRCONSTA(STR_HDR_XRFC2646_FLOWED, "Format=Flowed")
$STR_HDR_XRFC2646_RESPONSE = "Response" ' STRCONSTA(STR_HDR_XRFC2646_RESPONSE, "Response")
$STR_HDR_XRFC2646_NEW = "Original" ' STRCONSTA(STR_HDR_XRFC2646_NEW, "Original")
'// --------------------------------------------------------------------------------
'// Communities Headers
'// --------------------------------------------------------------------------------
$STR_HDR_POSTID = "X-MS-CommunityGroup-PostID" ' STRCONSTA(STR_HDR_POSTID, "X-MS-CommunityGroup-PostID")
$STR_HDR_MESSAGECATEGORY = "X-MS-CommunityGroup-MessageCategory" ' STRCONSTA(STR_HDR_MESSAGECATEGORY, "X-MS-CommunityGroup-MessageCategory")
$STR_HDR_THREADID = "X-MS-CommunityGroup-ThreadID" ' STRCONSTA(STR_HDR_THREADID, "X-MS-CommunityGroup-ThreadID")
$STR_HDR_PARENTID = "X-MS-CommunityGroup-ParentID" ' STRCONSTA(STR_HDR_PARENTID, "X-MS-CommunityGroup-ParentID")
'// --------------------------------------------------------------------------------
'// Parameters Available through IMimePropertySet/IMimeBody
'// --------------------------------------------------------------------------------
$STR_PAR_CHARSET = "par:content-type:charset" ' STRCONSTA(STR_PAR_CHARSET, "par:content-type:charset");
$STR_PAR_NUMBER = "par:content-type:number" ' STRCONSTA(STR_PAR_NUMBER, "par:content-type:number");
$STR_PAR_TOTAL = "par:content-type:total" ' STRCONSTA(STR_PAR_TOTAL, "par:content-type:total");
$STR_PAR_ID = "par:content-type:id" ' STRCONSTA(STR_PAR_ID, "par:content-type:id");
$STR_PAR_BOUNDARY = "par:content-type:boundary" ' STRCONSTA(STR_PAR_BOUNDARY, "par:content-type:boundary");
$STR_PAR_NAME = "par:content-type:name" ' STRCONSTA(STR_PAR_NAME, "par:content-type:name");
$STR_PAR_PROTOCOL = "par:content-type:protocol" ' STRCONSTA(STR_PAR_PROTOCOL, "par:content-type:protocol");
$STR_PAR_MICALG = "par:content-type:micalg" ' STRCONSTA(STR_PAR_MICALG, "par:content-type:micalg");
$STR_PAR_FILENAME = "par:content-disposition:filename" ' STRCONSTA(STR_PAR_FILENAME, "par:content-disposition:filename");
$STR_PAR_TYPE = "par:content-type:type" ' STRCONSTA(STR_PAR_TYPE, "par:content-type:type");
$STR_PAR_START = "par:content-type:start" ' STRCONSTA(STR_PAR_START, "par:content-type:start");
'#if (_WIN32_OE >= 0x0500)
$STR_PAR_ACCESSTYPE = "par:content-type:access-type" ' STRCONSTA(STR_PAR_ACCESSTYPE, "par:content-type:access-type");
$STR_PAR_XURL = "par:content-type:X-URL" ' STRCONSTA(STR_PAR_XURL, "par:content-type:X-URL");
$STR_PAR_SIZE = "par:content-type:size" ' STRCONSTA(STR_PAR_SIZE, "par:content-type:size");
$STR_PAR_SMIMETYPE = "par:content-type:smime-type" ' STRCONSTA(STR_PAR_SMIMETYPE, "par:content-type:smime-type");
$STR_PAR_REPORTTYPE = "par:Content-Type:report-type" ' STRCONSTA(STR_PAR_REPORTTYPE, "par:Content-Type:report-type")
$STR_PAR_FORMAT = "par:Content-Type:format" ' STRCONSTA(STR_PAR_FORMAT, "par:Content-Type:format")
$STR_PAR_REPLYTYPE = "par:Content-Type:reply-type" ' STRCONSTA(STR_PAR_REPLYTYPE, "par:Content-Type:reply-type")
'#endif
'// --------------------------------------------------------------------------------
'// Attributes Available through IMimePropertySet/IMimeBody
'// --------------------------------------------------------------------------------
$STR_ATT_FILENAME = "att:filename" ' STRCONSTA(STR_ATT_FILENAME, "att:filename");
$STR_ATT_GENFNAME = "att:generated-filename" ' STRCONSTA(STR_ATT_GENFNAME, "att:generated-filename");
$STR_ATT_PRITYPE = "att:pri-content-type" ' STRCONSTA(STR_ATT_PRITYPE, "att:pri-content-type");
$STR_ATT_SUBTYPE = "att:sub-content-type" ' STRCONSTA(STR_ATT_SUBTYPE, "att:sub-content-type");
$STR_ATT_NORMSUBJ = "att:normalized-subject" ' STRCONSTA(STR_ATT_NORMSUBJ, "att:normalized-subject");
$STR_ATT_ILLEGAL = "att:illegal-lines" ' STRCONSTA(STR_ATT_ILLEGAL, "att:illegal-lines");
$STR_ATT_RENDERED = "att:rendered" ' STRCONSTA(STR_ATT_RENDERED, "att:rendered"); // VT_UI4 - TRUE or FALSE
$STR_ATT_AUTOINLINED = "att:auto-inlined" ' STRCONSTA(STR_ATT_AUTOINLINED, "att:auto-inlined"); // VT_UI4 - TRUE or FALSE
$STR_ATT_SENTTIME = "att:sent-time" ' STRCONSTA(STR_ATT_SENTTIME, "att:sent-time");
$STR_ATT_RECVTIME = "att:received-time" ' STRCONSTA(STR_ATT_RECVTIME, "att:received-time");
$STR_ATT_PRIORITY = "att:priority" ' STRCONSTA(STR_ATT_PRIORITY, "att:priority");
$STR_ATT_SERVER = "att:athena-server" ' STRCONSTA(STR_ATT_SERVER, "att:athena-server"); // VT_LPSTR
$STR_ATT_FORMAT = "att:format" ' STRCONSTA(STR_ATT_FORMAT, "att:format") // VT_LPSTR
$STR_ATT_ACCOUNTNAME = "att:athena-account-name" ' STRCONSTA(STR_ATT_ACCOUNTNAME, "att:athena-account-name"); // VT_LPSTR
$STR_ATT_UIDL = "att:athena-pop3-uidl" ' STRCONSTA(STR_ATT_UIDL, "att:athena-pop3-uidl"); // VT_LPSTR
$STR_ATT_STOREMSGID = "att:athena-store-msgid" ' STRCONSTA(STR_ATT_STOREMSGID, "att:athena-store-msgid"); // VT_UI4
$STR_ATT_USERNAME = "att:athena-user-name" ' STRCONSTA(STR_ATT_USERNAME, "att:athena-user-name"); // VT_LPSTR
$STR_ATT_FORWARDTO = "att:athena-forward-to" ' STRCONSTA(STR_ATT_FORWARDTO, "att:athena-forward-to"); // VT_LPSTR
$STR_ATT_STOREFOLDERID = "att:athena-store-fdrid" ' STRCONSTA(STR_ATT_STOREFOLDERID, "att:athena-store-fdrid"); // VT_UI4
$STR_ATT_GHOSTED = "att:athena-ghosted" ' STRCONSTA(STR_ATT_GHOSTED, "att:athena-ghosted"); // VT_I4
$STR_ATT_UNCACHEDSIZE = "att:athena-uncachedsize" ' STRCONSTA(STR_ATT_UNCACHEDSIZE, "att:athena-uncachedsize"); // VT_UI4
$STR_ATT_COMBINED = "att:athena-combined" ' STRCONSTA(STR_ATT_COMBINED, "att:athena-combined"); // VT_UI4
$STR_ATT_ACCOUNTID = "att:athena-account-id" ' STRCONSTA(STR_ATT_ACCOUNTID, "att:athena-account-id"); // VT_LPSTR
'// --------------------------------------------------------------------------------
'// MIME Content Types
'// --------------------------------------------------------------------------------
$STR_MIME_TEXT_PLAIN = "text/plain" ' STRCONSTA(STR_MIME_TEXT_PLAIN, "text/plain");
$STR_MIME_TEXT_HTML = "text/html" ' STRCONSTA(STR_MIME_TEXT_HTML, "text/html");
$STR_MIME_APPL_STREAM = "application/octet-stream" ' STRCONSTA(STR_MIME_APPL_STREAM, "application/octet-stream");
$STR_MIME_MPART_MIXED = "multipart/mixed" ' STRCONSTA(STR_MIME_MPART_MIXED, "multipart/mixed");
$STR_MIME_MPART_ALT = "multipart/alternative" ' STRCONSTA(STR_MIME_MPART_ALT, "multipart/alternative");
$STR_MIME_MPART_RELATED = "multipart/related" ' STRCONSTA(STR_MIME_MPART_RELATED, "multipart/related");
$STR_MIME_MSG_PART = "message/partial" ' STRCONSTA(STR_MIME_MSG_PART, "message/partial");
$STR_MIME_MSG_RFC822 = "message/rfc822" ' STRCONSTA(STR_MIME_MSG_RFC822, "message/rfc822");
$STR_MIME_APPLY_MSTNEF = "application/ms-tnef" ' STRCONSTA(STR_MIME_APPLY_MSTNEF, "application/ms-tnef");
$STR_MIME_APPL_PKCS7SIG = "application/x-pkcs7-signature" ' STRCONSTA(STR_MIME_APPL_PKCS7SIG, "application/x-pkcs7-signature");
$STR_MIME_APPL_PKCS7SIG_1 = "application/pkcs7-signature" ' STRCONSTA(STR_MIME_APPL_PKCS7SIG_1, "application/pkcs7-signature");
$STR_MIME_TEXT_ENRCICHED = "text/enriched" ' STRCONSTA(STR_MIME_TEXT_ENRCICHED, "text/enriched");
'// --------------------------------------------------------------------------------
'// MIME Primary Content Types
'// --------------------------------------------------------------------------------
$STR_CNT_TEXT = "text" ' STRCONSTA(STR_CNT_TEXT, "text");
$STR_CNT_MULTIPART = "multipart" ' STRCONSTA(STR_CNT_MULTIPART, "multipart");
$STR_CNT_MESSAGE = "message" ' STRCONSTA(STR_CNT_MESSAGE, "message");
$STR_CNT_IMAGE = "image" ' STRCONSTA(STR_CNT_IMAGE, "image");
$STR_CNT_AUDIO = "audio" ' STRCONSTA(STR_CNT_AUDIO, "audio");
$STR_CNT_VIDEO = "video" ' STRCONSTA(STR_CNT_VIDEO, "video");
$STR_CNT_APPLICATION = "application" ' STRCONSTA(STR_CNT_APPLICATION, "application");
'$STR_CNT_APPLICATIONW = "application" ' STRCONSTW(STR_CNT_APPLICATIONW, "application")
'// --------------------------------------------------------------------------------
'// MIME Secondary Content Types
'// --------------------------------------------------------------------------------
$STR_SUB_PLAIN = "plain" ' STRCONSTA(STR_SUB_PLAIN, "plain");
$STR_SUB_HTML = "html" ' STRCONSTA(STR_SUB_HTML, "html");
$STR_SUB_ENRICHED = "enriched" ' STRCONSTA(STR_SUB_ENRICHED, "enriched");
$STR_SUB_RTF = "ms-rtf" ' STRCONSTA(STR_SUB_RTF, "ms-rtf");
$STR_SUB_MIXED = "mixed" ' STRCONSTA(STR_SUB_MIXED, "mixed");
$STR_SUB_PARALLEL = "parallel" ' STRCONSTA(STR_SUB_PARALLEL, "parallel");
$STR_SUB_DIGEST = "digest" ' STRCONSTA(STR_SUB_DIGEST, "digest");
$STR_SUB_RELATED = "related" ' STRCONSTA(STR_SUB_RELATED, "related");
$STR_SUB_ALTERNATIVE = "alternative" ' STRCONSTA(STR_SUB_ALTERNATIVE, "alternative");
$STR_SUB_RFC822 = "rfc822" ' STRCONSTA(STR_SUB_RFC822, "rfc822");
$STR_SUB_PARTIAL = "partial" ' STRCONSTA(STR_SUB_PARTIAL, "partial");
$STR_SUB_EXTERNAL = "external-body" ' STRCONSTA(STR_SUB_EXTERNAL, "external-body");
$STR_SUB_OCTETSTREAM = "octet-stream" ' STRCONSTA(STR_SUB_OCTETSTREAM, "octet-stream");
'$STR_SUB_OCTETSTREAMW = "octet-stream" ' STRCONSTW(STR_SUB_OCTETSTREAM, "octet-stream");
$STR_SUB_POSTSCRIPT = "postscript" ' STRCONSTA(STR_SUB_POSTSCRIPT, "postscript");
$STR_SUB_GIF = "gif" ' STRCONSTA(STR_SUB_GIF, "gif");
$STR_SUB_JPEG = "jpeg" ' STRCONSTA(STR_SUB_JPEG, "jpeg");
$STR_SUB_BASIC = "basic" ' STRCONSTA(STR_SUB_BASIC, "basic");
$STR_SUB_MPEG = "mpeg" ' STRCONSTA(STR_SUB_MPEG, "mpeg");
$STR_SUB_MSTNEF = "ms-tnef" ' STRCONSTA(STR_SUB_MSTNEF, "ms-tnef");
$STR_SUB_MSWORD = "msword" ' STRCONSTA(STR_SUB_MSWORD, "msword");
$STR_SUB_WAV = "wav" ' STRCONSTA(STR_SUB_WAV, "wav");
$STR_SUB_PKCS7MIME = "pkcs7-mime" ' STRCONSTA(STR_SUB_PKCS7MIME, "pkcs7-mime"); // non-standard
$STR_SUB_PKCS7SIG = "pkcs7-signature" ' STRCONSTA(STR_SUB_PKCS7SIG, "pkcs7-signature"); // non-standard
$STR_SUB_XPKCS7MIME = "x-pkcs7-mime" ' STRCONSTA(STR_SUB_XPKCS7MIME, "x-pkcs7-mime");
$STR_SUB_XPKCS7SIG = "x-pkcs7-signature" ' STRCONSTA(STR_SUB_XPKCS7SIG, "x-pkcs7-signature");
$STR_SUB_SIGNED = "signed" ' STRCONSTA(STR_SUB_SIGNED, "signed");
$STR_SUB_BINHEX = "mac-binhex40" ' STRCONSTA(STR_SUB_BINHEX, "mac-binhex40");
$STR_SUB_VCARD = "x-vcard" ' STRCONSTA(STR_SUB_VCARD, "x-vcard");
'// --------------------------------------------------------------------------------
'// MIME Content-Transfer-Encoding Types
'// --------------------------------------------------------------------------------
$STR_ENC_7BIT = "7bit" ' STRCONSTA(STR_ENC_7BIT, "7bit");
$STR_ENC_QP = "quoted-printable" ' STRCONSTA(STR_ENC_QP, "quoted-printable");
$STR_ENC_BASE64 = "base64" ' STRCONSTA(STR_ENC_BASE64, "base64");
$STR_ENC_8BIT = "8bit" ' STRCONSTA(STR_ENC_8BIT, "8bit");
$STR_ENC_BINARY = "binary" ' STRCONSTA(STR_ENC_BINARY, "binary");
$STR_ENC_UUENCODE = "uuencode" ' STRCONSTA(STR_ENC_UUENCODE, "uuencode");
$STR_ENC_XUUENCODE = "x-uuencode" ' STRCONSTA(STR_ENC_XUUENCODE, "x-uuencode");
$STR_ENC_XUUE = "x-uue" ' STRCONSTA(STR_ENC_XUUE, "x-uue");
$STR_ENC_BINHEX40 = "mac-binhex40" ' STRCONSTA(STR_ENC_BINHEX40, "mac-binhex40");
'// --------------------------------------------------------------------------------
'// MIME Content-Type Format and ReplyType Values
'// --------------------------------------------------------------------------------
$STR_FORMAT_FLOWED = "flowed" ' STRCONSTA(STR_FORMAT_FLOWED, "flowed")
$STR_REPLYTYPE_ORIGINAL = "original" ' STRCONSTA(STR_REPLYTYPE_ORIGINAL, "original")
$STR_REPLYTYPE_RESPONSE = "response" ' STRCONSTA(STR_REPLYTYPE_RESPONSE, "response")
'// --------------------------------------------------------------------------------
'// MIME Content-Disposition Types
'// --------------------------------------------------------------------------------
$STR_DIS_INLINE = "inline" ' STRCONSTA(STR_DIS_INLINE, "inline");
$STR_DIS_ATTACHMENT = "attachment" ' STRCONSTA(STR_DIS_ATTACHMENT, "attachment");
$STR_DIS_ATTACHMENTW = "attachment" ' STRCONSTW(STR_DIS_ATTACHMENTW, "attachment")
'// --------------------------------------------------------------------------------
'// MIME Protocol Types
'// --------------------------------------------------------------------------------
$STR_PRO_SHA1 = "sha1" ' STRCONSTA(STR_PRO_SHA1, "sha1");
$STR_PRO_MD5 = "rsa-md5" ' STRCONSTA(STR_PRO_MD5, "rsa-md5");
'// --------------------------------------------------------------------------------
'// Known Priority Strings
'// --------------------------------------------------------------------------------
$STR_PRI_MS_HIGH = "High" ' STRCONSTA(STR_PRI_MS_HIGH, "High");
$STR_PRI_MS_NORMAL = "Normal" ' STRCONSTA(STR_PRI_MS_NORMAL, "Normal");
$STR_PRI_MS_LOW = "Low" ' STRCONSTA(STR_PRI_MS_LOW, "Low");
$STR_PRI_HIGH = "1" ' STRCONSTA(STR_PRI_HIGH, "1");
$STR_PRI_NORMAL = "3" ' STRCONSTA(STR_PRI_NORMAL, "3");
$STR_PRI_LOW = "5" ' STRCONSTA(STR_PRI_LOW, "5");
$STR_HDR_ORIG_RECIPIENT = "Original-Recipient" ' STRCONSTA(STR_HDR_ORIG_RECIPIENT, "Original-Recipient")
$STR_HDR_DISP_NOTIFICATION_TO = "Disposition-Notification-To" ' STRCONSTA(STR_HDR_DISP_NOTIFICATION_TO, "Disposition-Notification-To")
'// --------------------------------------------------------------------------------
'// IMimeMessage IDataObject clipboard formats (also include CF_TEXT)
'// --------------------------------------------------------------------------------
$STR_CF_HTML = "HTML Format" ' STRCONSTA(STR_CF_HTML, "HTML Format");
$STR_CF_INETMSG = "Internet Message (rfc822/rfc1522)" ' STRCONSTA(STR_CF_INETMSG, "Internet Message (rfc822/rfc1522)");
$STR_CF_RFC822 = "message/rfc822" ' STRCONSTA(STR_CF_RFC822, "message/rfc822");
'// --------------------------------------------------------------------------------
'// SMime-Type strings
'// --------------------------------------------------------------------------------
$STR_SMT_SIGNEDDATA = "signed-data" ' STRCONSTA(STR_SMT_SIGNEDDATA, "signed-data")
$STR_SMT_ENVELOPEDDATA = "enveloped-data" ' STRCONSTA(STR_SMT_ENVELOPEDDATA, "enveloped-data")
$STR_SMT_SIGNEDRECEIPT = "signed-receipt" ' STRCONSTA(STR_SMT_SIGNEDRECEIPT, "signed-receipt")
'// --------------------------------------------------------------------------------
'// PIDSTRING - Use in GetProp, SetProp, QueryProp, DeleteProp
'// --------------------------------------------------------------------------------
'#define PID_BASE 2
'#define PIDTOSTR(_dwPropId) ((LPCSTR)((DWORD_PTR)(_dwPropId)))
'#define STRTOPID(_pszName) ((DWORD)((DWORD_PTR)((LPCSTR)(_pszName))))
'#define ISPIDSTR(_pszName) ((HIWORD((DWORD_PTR)(_pszName)) == 0))
'#define ISKNOWNPID(_dwPropId) (_dwPropId >= PID_BASE && _dwPropId < PID_LAST)
%EQUATE `PID_BASE = 2
'// --------------------------------------------------------------------------------
'// Mime Property Ids
'// --------------------------------------------------------------------------------
' MIMEPROPID enum
%EQUATE `PID_HDR_NEWSGROUP = 2
%EQUATE `PID_HDR_NEWSGROUPS = 3
%EQUATE `PID_HDR_REFS = 4
%EQUATE `PID_HDR_SUBJECT = 5
%EQUATE `PID_HDR_FROM = 6
%EQUATE `PID_HDR_MESSAGEID = 7
%EQUATE `PID_HDR_RETURNPATH = 8
%EQUATE `PID_HDR_RR = 9
%EQUATE `PID_HDR_RETRCPTTO = 10
%EQUATE `PID_HDR_APPARTO = 11
%EQUATE `PID_HDR_DATE = 12
%EQUATE `PID_HDR_RECEIVED = 13
%EQUATE `PID_HDR_REPLYTO = 14
%EQUATE `PID_HDR_XMAILER = 15
%EQUATE `PID_HDR_BCC = 16
%EQUATE `PID_HDR_MIMEVER = 17
%EQUATE `PID_HDR_CNTTYPE = 18
%EQUATE `PID_HDR_CNTXFER = 19
%EQUATE `PID_HDR_CNTID = 20
%EQUATE `PID_HDR_CNTDESC = 21
%EQUATE `PID_HDR_CNTDISP = 22
%EQUATE `PID_HDR_CNTBASE = 23
%EQUATE `PID_HDR_CNTLOC = 24
%EQUATE `PID_HDR_TO = 25
%EQUATE `PID_HDR_PATH = 26
%EQUATE `PID_HDR_FOLLOWUPTO = 27
%EQUATE `PID_HDR_EXPIRES = 28
%EQUATE `PID_HDR_CC = 29
%EQUATE `PID_HDR_CONTROL = 30
%EQUATE `PID_HDR_DISTRIB = 31
%EQUATE `PID_HDR_KEYWORDS = 32
%EQUATE `PID_HDR_SUMMARY = 33
%EQUATE `PID_HDR_APPROVED = 34
%EQUATE `PID_HDR_LINES = 35
%EQUATE `PID_HDR_XREF = 36
%EQUATE `PID_HDR_ORG = 37
%EQUATE `PID_HDR_XNEWSRDR = 38
%EQUATE `PID_HDR_XPRI = 39
%EQUATE `PID_HDR_XMSPRI = 40
%EQUATE `PID_PAR_FILENAME = 41
%EQUATE `PID_PAR_BOUNDARY = 42
%EQUATE `PID_PAR_CHARSET = 43
%EQUATE `PID_PAR_NAME = 44
%EQUATE `PID_ATT_FILENAME = 45
%EQUATE `PID_ATT_GENFNAME = 46
%EQUATE `PID_ATT_PRITYPE = 47
%EQUATE `PID_ATT_SUBTYPE = 48
%EQUATE `PID_ATT_NORMSUBJ = 49
%EQUATE `PID_ATT_ILLEGAL = 50
%EQUATE `PID_ATT_RENDERED = 51
%EQUATE `PID_ATT_SENTTIME = 52
%EQUATE `PID_ATT_RECVTIME = 53
%EQUATE `PID_ATT_PRIORITY = 54
%EQUATE `PID_HDR_COMMENT = 55
%EQUATE `PID_HDR_ENCODING = 56
%EQUATE `PID_HDR_ENCRYPTED = 57
%EQUATE `PID_HDR_OFFSETS = 58
%EQUATE `PID_HDR_XUNSENT = 59
%EQUATE `PID_HDR_ARTICLEID = 60
%EQUATE `PID_HDR_SENDER = 61
%EQUATE `PID_ATT_SERVER = 62
%EQUATE `PID_ATT_ACCOUNT = 63
%EQUATE `PID_ATT_UIDL = 64
%EQUATE `PID_ATT_STOREMSGID = 65
%EQUATE `PID_ATT_USERNAME = 66
%EQUATE `PID_ATT_FORWARDTO = 67
%EQUATE `PID_ATT_STOREFOLDERID = 68
%EQUATE `PID_ATT_GHOSTED = 69
%EQUATE `PID_ATT_UNCACHEDSIZE = 70
%EQUATE `PID_ATT_COMBINED = 71
%EQUATE `PID_ATT_AUTOINLINED = 72
%EQUATE `PID_HDR_DISP_NOTIFICATION_TO = 73
%EQUATE `PID_PAR_REPLYTYPE = 74
%EQUATE `PID_PAR_FORMAT = 75
%EQUATE `PID_ATT_FORMAT = 76
#IF %WINVER >= &H0600
%EQUATE `PID_HDR_INREPLYTO = 77
%EQUATE `PID_ATT_ACCOUNTNAME = 78
%EQUATE `PID_LAST = 79
#ELSE
%EQUATE `PID_LAST = 77
#ENDIF ' // _WIN32_WINNT >= 0x0600
'// --------------------------------------------------------------------------------
'// Variant Typed Identifiers
'// --------------------------------------------------------------------------------
'#define TYPEDID_MASK ((ULONG)0x0000FFFF)
'#define TYPEDID_TYPE(_typedid) (VARTYPE)(((ULONG)(_typedid)) & TYPEDID_MASK)
'#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16)
'#define TYPEDID(_vartype,_id) ((((TYPEDID)(_id))<<16)|((ULONG)(_vartype)))
%EQUATE `TYPEDID_MASK = &H0000FFFF
MACRO TYPEDID_TYPE(typedid_) = (typedid_ AND %TYPEDID_MASK)
'#define TYPEDID_ID(_typedid) (((ULONG)(_typedid))>>16)
FUNCTION TYPEDID_ID (BYVAL typedid_ AS DWORD) AS DWORD
 SHIFT RIGHT typedid_, 16
 FUNCTION = typedid_
END FUNCTION
FUNCTION TYPEDID (BYVAL vartype AS DWORD, BYVAL id AS DWORD) AS DWORD
 SHIFT LEFT id, 16
 FUNCTION = id OR vartype
END FUNCTION
'// --------------------------------------------------------------------------------
'// Options Ids
'// --------------------------------------------------------------------------------
%EQUATE `OID_ALLOW_8BIT_HEADER = &H0001000B ' #define OID_ALLOW_8BIT_HEADER TYPEDID(VT_BOOL, 0x0001) // TRUE or FALSE
%EQUATE `OID_CBMAX_HEADER_LINE = &H00020013 ' #define OID_CBMAX_HEADER_LINE TYPEDID(VT_UI4, 0x0002) // Bytes
%EQUATE `OID_SAVE_FORMAT = &H00030013 ' #define OID_SAVE_FORMAT TYPEDID(VT_UI4, 0x0003) // SAVE_RFC822 or SAVE_RFC1521 (mime)
%EQUATE `OID_WRAP_BODY_TEXT = &H0004000B ' #define OID_WRAP_BODY_TEXT TYPEDID(VT_BOOL, 0x0004) // TRUE or FALSE
%EQUATE `OID_CBMAX_BODY_LINE = &H00050013 ' #define OID_CBMAX_BODY_LINE TYPEDID(VT_UI4, 0x0005) // Bytes
%EQUATE `OID_TRANSMIT_BODY_ENCODING = &H00060013 ' #define OID_TRANSMIT_BODY_ENCODING TYPEDID(VT_UI4, 0x0006) // ENCODINGTYPE
%EQUATE `OID_TRANSMIT_TEXT_ENCODING = &H00070013 ' #define OID_TRANSMIT_TEXT_ENCODING TYPEDID(VT_UI4, 0x0007) // ENCODINGTYPE, IMimeMessageTree
%EQUATE `OID_GENERATE_MESSAGE_ID = &H0008000B ' #define OID_GENERATE_MESSAGE_ID TYPEDID(VT_BOOL, 0x0008) // TRUE or FALSE
%EQUATE `OID_HIDE_TNEF_ATTACHMENTS = &H000E000B ' #define OID_HIDE_TNEF_ATTACHMENTS TYPEDID(VT_BOOL, 0X000E) // TRUE or FALSE
%EQUATE `OID_CLEANUP_TREE_ON_SAVE = &H000F000B ' #define OID_CLEANUP_TREE_ON_SAVE TYPEDID(VT_BOOL, 0X000F) // TRUE or FALSE
%EQUATE `OID_BODY_REMOVE_NBSP = &H0014000B ' #define OID_BODY_REMOVE_NBSP TYPEDID(VT_BOOL, 0x0014) // TRUE or FALSE
%EQUATE `OID_DEFAULT_BODY_CHARSET = &H00150013 ' #define OID_DEFAULT_BODY_CHARSET TYPEDID(VT_UI4, 0x0015) // HCHARSET
%EQUATE `OID_DEFAULT_HEADER_CHARSET = &H00160013 ' #define OID_DEFAULT_HEADER_CHARSET TYPEDID(VT_UI4, 0x0016) // HCHARSET
%EQUATE `OID_DBCS_ESCAPE_IS_8BIT = &H0017000B ' #define OID_DBCS_ESCAPE_IS_8BIT TYPEDID(VT_BOOL, 0x0017) // TRUE or FALSE
%EQUATE `OID_SECURITY_TYPE = &H00180013 ' #define OID_SECURITY_TYPE TYPEDID(VT_UI4, 0x0018)
%EQUATE `OID_SECURITY_ALG_HASH = &H0019000B ' #define OID_SECURITY_ALG_HASH TYPEDID(VT_BLOB, 0x0019)
%EQUATE `OID_SECURITY_ALG_BULK = &H0020000B ' #define OID_SECURITY_ALG_BULK TYPEDID(VT_BLOB, 0x0020)
'#ifndef _WIN64
%EQUATE `OID_SECURITY_CERT_SIGNING = &H00210013 ' #define OID_SECURITY_CERT_SIGNING TYPEDID(VT_UI4, 0x0021)
%EQUATE `OID_SECURITY_CERT_DECRYPTION = &H00220013 ' #define OID_SECURITY_CERT_DECRYPTION TYPEDID(VT_UI4, 0x0022)
%EQUATE `OID_SECURITY_RG_CERT_ENCRYPT = &H00231013 ' #define OID_SECURITY_RG_CERT_ENCRYPT TYPEDID(VT_VECTOR | VT_UI4, 0x0023)
%EQUATE `OID_SECURITY_HCERTSTORE = &H00240013 ' #define OID_SECURITY_HCERTSTORE TYPEDID(VT_UI4, 0x0024)
%EQUATE `OID_SECURITY_RG_CERT_BAG = &H00251013 ' #define OID_SECURITY_RG_CERT_BAG TYPEDID(VT_VECTOR | VT_UI4, 0x0025)
%EQUATE `OID_SECURITY_HCRYPTPROV = &H00260013 ' #define OID_SECURITY_HCRYPTPROV TYPEDID(VT_UI4, 0x0026)
%EQUATE `OID_SECURITY_SEARCHSTORES = &H00271013 ' #define OID_SECURITY_SEARCHSTORES TYPEDID(VT_VECTOR | VT_UI4, 0x0027)
%EQUATE `OID_SECURITY_RG_IASN = &H00281013 ' #define OID_SECURITY_RG_IASN TYPEDID(VT_VECTOR | VT_UI4, 0x0028)
'#else // _WIN64
%EQUATE `OID_SECURITY_CERT_SIGNING_64 = &H00210015 ' #define OID_SECURITY_CERT_SIGNING_64 TYPEDID(VT_UI8, 0x0021)
%EQUATE `OID_SECURITY_CERT_DECRYPTION_64 = &H00220015 ' #define OID_SECURITY_CERT_DECRYPTION_64 TYPEDID(VT_UI8, 0x0022)
%EQUATE `OID_SECURITY_RG_CERT_ENCRYPT_64 = &H00231015 ' #define OID_SECURITY_RG_CERT_ENCRYPT_64 TYPEDID(VT_VECTOR | VT_UI8, 0x0023)
%EQUATE `OID_SECURITY_HCERTSTORE_64 = &H00240015 ' #define OID_SECURITY_HCERTSTORE_64 TYPEDID(VT_UI8, 0x0024)
%EQUATE `OID_SECURITY_RG_CERT_BAG_64 = &H00251015 ' #define OID_SECURITY_RG_CERT_BAG_64 TYPEDID(VT_VECTOR | VT_UI8, 0x0025)
%EQUATE `OID_SECURITY_HCRYPTPROV_64 = &H00260015 ' #define OID_SECURITY_HCRYPTPROV_64 TYPEDID(VT_UI8, 0x0026)
%EQUATE `OID_SECURITY_SEARCHSTORES_64 = &H00271013 ' #define OID_SECURITY_SEARCHSTORES_64 TYPEDID(VT_VECTOR | VT_UI4, 0x0027)
%EQUATE `OID_SECURITY_RG_IASN_64 = &H00281013 ' #define OID_SECURITY_RG_IASN_64 TYPEDID(VT_VECTOR | VT_UI4, 0x0028)
'#endif // _WIN64
%EQUATE `OID_SECURITY_SYMCAPS = &H00290041 ' #define OID_SECURITY_SYMCAPS TYPEDID(VT_BLOB, 0x0029)
%EQUATE `OID_SECURITY_AUTHATTR = &H002A0041 ' #define OID_SECURITY_AUTHATTR TYPEDID(VT_BLOB, 0x002A)
%EQUATE `OID_SECURITY_UNAUTHATTR = &H002B0041 ' #define OID_SECURITY_UNAUTHATTR TYPEDID(VT_BLOB, 0x002B)
%EQUATE `OID_SECURITY_SIGNTIME = &H002C0040 ' #define OID_SECURITY_SIGNTIME TYPEDID(VT_FILETIME,0x002C)
%EQUATE `OID_SECURITY_USER_VALIDITY = &H002D0013 ' #define OID_SECURITY_USER_VALIDITY TYPEDID(VT_UI4, 0x002D)
%EQUATE `OID_SECURITY_RO_MSG_VALIDITY = &H002E0013 ' #define OID_SECURITY_RO_MSG_VALIDITY TYPEDID(VT_UI4, 0x002E) // read-only
%EQUATE `OID_SECURITY_CRL = &H00260041 ' #define OID_SECURITY_CRL TYPEDID(VT_BLOB, 0x002F)
%EQUATE `OID_SECURITY_ENCODE_FLAGS = &H00300013 ' #define OID_SECURITY_ENCODE_FLAGS TYPEDID(VT_UI4, 0x0030)
%EQUATE `OID_SECURITY_CERT_INCLUDED = &H0031000B ' #define OID_SECURITY_CERT_INCLUDED TYPEDID(VT_BOOL, 0x0031) // read-only
'#ifndef _WIN64
%EQUATE `OID_SECURITY_HWND_OWNER = &H00320013 ' #define OID_SECURITY_HWND_OWNER TYPEDID(VT_UI4, 0x0032)
'#endif // _WIN64
%EQUATE `OID_SECURITY_REQUESTED_CTE = &H00330003 ' #define OID_SECURITY_REQUESTED_CTE TYPEDID(VT_I4, 0x0033)
%EQUATE `OID_NO_DEFAULT_CNTTYPE = &H0034000B ' #define OID_NO_DEFAULT_CNTTYPE TYPEDID(VT_BOOL, 0x0034)
%EQUATE `OID_XMIT_PLAIN_TEXT_ENCODING = &H00350013 ' #define OID_XMIT_PLAIN_TEXT_ENCODING TYPEDID(VT_UI4, 0x0035) // ENCODINGTYPE, IMimeMessageTree
%EQUATE `OID_XMIT_HTML_TEXT_ENCODING = &H00360013 ' #define OID_XMIT_HTML_TEXT_ENCODING TYPEDID(VT_UI4, 0x0036) // ENCODINGTYPE, IMimeMessageTree
%EQUATE `OID_HEADER_RELOAD_TYPE = &H00370013 ' #define OID_HEADER_RELOAD_TYPE TYPEDID(VT_UI4, 0x0037) // RELOADTYPE IMimeMessageTree or IMimeBody or IMimePropertySet
%EQUATE `OID_CAN_INLINE_TEXT_BODIES = &H0038000B ' #define OID_CAN_INLINE_TEXT_BODIES TYPEDID(VT_BOOL, 0x0038) // TRUE or FALSE
%EQUATE `OID_SHOW_MACBINARY = &H0039000B ' #define OID_SHOW_MACBINARY TYPEDID(VT_BOOL, 0x0039) // TRUE or FALSE
%EQUATE `OID_SAVEBODY_KEEPBOUNDARY = &H0040000B ' #define OID_SAVEBODY_KEEPBOUNDARY TYPEDID(VT_BOOL, 0x0040) // TRUE or FALSE
'#if (_WIN32_OE >= 0x0500)
%EQUATE `OID_SECURITY_ALG_HASH_RG = &H0019100C ' #define OID_SECURITY_ALG_HASH_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0019)
'#ifndef _WIN64
%EQUATE `OID_SECURITY_CERT_SIGNING_RG = &H00211013 ' #define OID_SECURITY_CERT_SIGNING_RG TYPEDID(VT_VECTOR | VT_UI4, 0x0021)
'#else
%EQUATE `ID_SECURITY_CERT_SIGNING_RG_64 = &H00211015 ' #define OID_SECURITY_CERT_SIGNING_RG_64 TYPEDID(VT_VECTOR | VT_UI8, 0x0021)
'#endif //_WIN64
%EQUATE `OID_SECURITY_SYMCAPS_RG = &H0029100C ' #define OID_SECURITY_SYMCAPS_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0029)
%EQUATE `OID_SECURITY_AUTHATTR_RG = &H002A100C ' #define OID_SECURITY_AUTHATTR_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x002A)
%EQUATE `OID_SECURITY_UNAUTHATTR_RG = &H002B100C ' #define OID_SECURITY_UNAUTHATTR_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x002B)
%EQUATE `OID_SECURITY_SIGNTIME_RG = &H002C1040 ' #define OID_SECURITY_SIGNTIME_RG TYPEDID(VT_VECTOR | VT_FILETIME, 0x002C)
%EQUATE `OID_SECURITY_USER_VALIDITY_RG = &H002D1013 ' #define OID_SECURITY_USER_VALIDITY_RG TYPEDID(VT_VECTOR | VT_UI4, 0x002D)
%EQUATE `OID_SECURITY_RO_MSG_VALIDITY_RG = &H002E1013 ' #define OID_SECURITY_RO_MSG_VALIDITY_RG TYPEDID(VT_VECTOR | VT_UI4, 0x002E) // read-only
%EQUATE `OID_SUPPORT_EXTERNAL_BODY = &H0041000B ' #define OID_SUPPORT_EXTERNAL_BODY TYPEDID(VT_BOOL, 0x0041) // TRUE or FALSE
%EQUATE `OID_LOAD_USE_BIND_FILE = &H0042000B ' #define OID_LOAD_USE_BIND_FILE TYPEDID(VT_BOOL, 0x0042) // TRUE or FALSE
%EQUATE `OID_SECURITY_SIGNATURE_COUNT = &H00430013 ' #define OID_SECURITY_SIGNATURE_COUNT TYPEDID(VT_UI4, 0x0043) // Size of SECURITY LAYER arrays
%EQUATE `OID_HANDSOFF_ONSAVE = &H00440041 ' #define OID_HANDSOFF_ONSAVE TYPEDID(VT_BOOL, 0x0044) // TRUE or FALSE
'%OID_SECURITY_RECEIPT = &H00450041 ' #define OID_SECURITY_RECEIPT TYPEDID(VT_BLOB, 0x0045) // Receipt body
%EQUATE `OID_SECURITY_RECEIPT_RG = &H0045100C ' #define OID_SECURITY_RECEIPT_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x0045) // Receipt body
%EQUATE `OID_NOSECURITY_ONSAVE = &H0046000B ' #define OID_NOSECURITY_ONSAVE TYPEDID(VT_BOOL, 0x0046) // TRUE or FALSE
%EQUATE `OID_DECODE_RFC1154 = &H0047000B ' #define OID_DECODE_RFC1154 TYPEDID(VT_BOOL, 0x0047) // TRUE or FALSE
'#endif
%EQUATE `OID_SECURITY_MESSAGE_HASH_RG = &H004A100C ' #define OID_SECURITY_MESSAGE_HASH_RG TYPEDID(VT_VECTOR | VT_VARIANT, 0x004A) // Message Hash
%EQUATE `OID_SECURITY_KEY_PROMPT = &H004B001F ' #define OID_SECURITY_KEY_PROMPT TYPEDID(VT_LPWSTR, 0x004B) // Key Prompt
'#ifndef _WIN64
%EQUATE `OID_SECURITY_ENCRYPT_CERT_BAG = &H004C0013 ' #define OID_SECURITY_ENCRYPT_CERT_BAG TYPEDID(VT_UI4, 0x004C) // HCERTSTORE
'#else //_WIN64
%EQUATE `OID_SECURITY_ENCRYPT_CERT_BAG_64 = &H004C0015 ' #define OID_SECURITY_ENCRYPT_CERT_BAG_64 TYPEDID(VT_UI8, 0x004C) // HCERTSTORE
'#endif // WIN64
'#endif // _WIN32_OE
'#ifdef _WIN64
%EQUATE `OID_SECURITY_HWND_OWNER_64 = &H00570015 ' #define OID_SECURITY_HWND_OWNER_64 TYPEDID(VT_UI8, 0x0057)
'#endif // WIN64
'#ifndef _WIN64
%EQUATE `OID_SECURITY_2KEY_CERT_BAG = &H00591013 ' #define OID_SECURITY_2KEY_CERT_BAG TYPEDID(VT_VECTOR | VT_UI4, 0x0059)
'#else //_WIN64
%EQUATE `OID_SECURITY_2KEY_CERT_BAG_64 = &H00591015 ' #define OID_SECURITY_2KEY_CERT_BAG_64 TYPEDID(VT_VECTOR | VT_UI8, 0x0059)
'#endif // WIN64
'// --------------------------------------------------------------------------------
'// Default Option Values
'// --------------------------------------------------------------------------------
%EQUATE `DEF_ALLOW_8BIT_HEADER = %FALSE
%EQUATE `DEF_CBMAX_HEADER_LINE = 1000
%EQUATE `DEF_SAVE_FORMAT = 1 ' %SAVE_RFC1521
%EQUATE `DEF_WRAP_BODY_TEXT = %TRUE
%EQUATE `DEF_CBMAX_BODY_LINE = 74
%EQUATE `DEF_GENERATE_MESSAGE_ID = %FALSE
%EQUATE `DEF_HASH_ALG_ID = &H8004 ' //SHA //N needed?
%EQUATE `DEF_ENCRYPTION_ALG_ID = &H6602 ' //RC2 //N needed?
%EQUATE `DEF_INCLUDE_SENDER_CERT = %FALSE
%EQUATE `DEF_HIDE_TNEF_ATTACHMENTS = %TRUE
%EQUATE `DEF_CLEANUP_TREE_ON_SAVE = %TRUE
%EQUATE `DEF_BODY_REMOVE_NBSP = %TRUE
%EQUATE `DEF_SECURITY_IGNOREMASK = 0
%EQUATE `DEF_DBCS_ESCAPE_IS_8BIT = %FALSE
%EQUATE `DEF_TRANSMIT_BODY_ENCODING = 11 ' %IET_UNKNOWN
%EQUATE `DEF_TRANSMIT_TEXT_ENCODING = 11 ' %IET_UNKNOWN
%EQUATE `DEF_XMIT_PLAIN_TEXT_ENCODING = 11 ' %IET_UNKNOWN
%EQUATE `DEF_XMIT_HTML_TEXT_ENCODING = 11 ' %IET_UNKNOWN
%EQUATE `DEF_NO_DEFAULT_CNTTYPE = %FALSE
%EQUATE `DEF_HEADER_RELOAD_TYPE_TREE = 1 ' %RELOAD_HEADER_RESET
%EQUATE `DEF_HEADER_RELOAD_TYPE_PROPSET = 0 ' %RELOAD_HEADER_NONE
%EQUATE `DEF_CAN_INLINE_TEXT_BODIES = %FALSE
%EQUATE `DEF_SHOW_MACBINARY = %FALSE
%EQUATE `DEF_SAVEBODY_KEEPBOUNDARY = %FALSE
'#if (_WIN32_OE >= 0x0500)
%EQUATE `DEF_SUPPORT_EXTERNAL_BODY = %FALSE
%EQUATE `DEF_LOAD_USE_BIND_FILE = %FALSE
%EQUATE `DEF_HANDSOFF_ONSAVE = %FALSE
%EQUATE `DEF_DECODE_RFC1154 = %FALSE
'#endif // _WIN32_OE
'// --------------------------------------------------------------------------------
'// Min-Max Option Values
'// --------------------------------------------------------------------------------
%EQUATE `MAX_CBMAX_HEADER_LINE = &HFFFFFFFF
%EQUATE `MIN_CBMAX_HEADER_LINE = 76
%EQUATE `MAX_CBMAX_BODY_LINE = &HFFFFFFFF
%EQUATE `MIN_CBMAX_BODY_LINE = 30
'// --------------------------------------------------------------------------------
'// LIBID_MIMEOLE
'// --------------------------------------------------------------------------------
#IF NOT %DEF(%MIMEOLE_LIBRARY_DEFINED)
 %MIMEOLE_LIBRARY_DEFINED = 1
'struct HCHARSET__
' {
' DWORD unused;
' };
'typedef struct HCHARSET__ *HCHARSET;
'TYPE HCHARSET
' unused AS DWORD
'END TYPE
'struct HBODY__
' {
' DWORD unused;
' };
'TYPE HBODY
' unused AS DWORD
'END TYPE
'struct HHEADERROW__
' {
' DWORD unused;
' };
'TYPE HHEADERROW
' unused AS DWORD
'END TYPE
' typedef DWORD TYPEDID;
' MACRO TYPEDID = DWORD
' RELOADTYPE enum
%EQUATE `RELOAD_HEADER_NONE = 0
%EQUATE `RELOAD_HEADER_RESET = %RELOAD_HEADER_NONE + 1
%EQUATE `RELOAD_HEADER_APPEND = %RELOAD_HEADER_RESET + 1
%EQUATE `RELOAD_HEADER_REPLACE = %RELOAD_HEADER_APPEND + 1
' MIMESAVETYPE enum
%EQUATE `SAVE_RFC822 = 0
%EQUATE `SAVE_RFC1521 = %SAVE_RFC822 + 1
' CSETAPPLYTYPE enum
%EQUATE `CSET_APPLY_UNTAGGED = 0
%EQUATE `CSET_APPLY_ALL = %CSET_APPLY_UNTAGGED + 1
%EQUATE `CSET_APPLY_TAG_ALL = %CSET_APPLY_ALL + 1
' ENCODINGTYPE enum
%EQUATE `IET_BINARY = 0
%EQUATE `IET_BASE64 = %IET_BINARY + 1
%EQUATE `IET_UUENCODE = %IET_BASE64 + 1
%EQUATE `IET_QP = %IET_UUENCODE + 1
%EQUATE `IET_7BIT = %IET_QP + 1
%EQUATE `IET_8BIT = %IET_7BIT + 1
%EQUATE `IET_INETCSET = %IET_8BIT + 1
%EQUATE `IET_UNICODE = %IET_INETCSET + 1
%EQUATE `IET_RFC1522 = %IET_UNICODE + 1
%EQUATE `IET_ENCODED = %IET_RFC1522 + 1
%EQUATE `IET_CURRENT = %IET_ENCODED + 1
%EQUATE `IET_UNKNOWN = %IET_CURRENT + 1
%EQUATE `IET_BINHEX40 = %IET_UNKNOWN + 1
%EQUATE `IET_LAST = %IET_BINHEX40 + 1
%EQUATE `IET_DECODED = %IET_BINARY
%EQUATE `CCHMAX_HEADER_LINE = 1000
' ########################################################################################
' Interface name = IMimeInternational
' IID = {C5588349-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeInternational_INTERFACE_DEFINED)
 %IMimeInternational_INTERFACE_DEFINED = 1
'typedef DWORD CODEPAGEID;
%EQUATE `CP_USASCII = 1252
%EQUATE `CP_UNICODE = 1200
%EQUATE `CP_JAUTODETECT = 50932
%EQUATE `CP_KAUTODETECT = 50949
%EQUATE `CP_ISO2022JPESC = 50221
%EQUATE `CP_ISO2022JPSIO = 50222
%EQUATE `CCHMAX_CSET_NAME = 128
%EQUATE `CCHMAX_LANG_NAME = 128
%EQUATE `CCHMAX_FACE_NAME = 128
' // Size = 144 bytes
TYPE INETCSETINFO DWORD
 szName AS ASCIIZ * %CCHMAX_CSET_NAME ' CHAR
 hCharset AS DWORD ' HCHARSET
 cpiWindows AS DWORD ' CODEPAGEID
 cpiInternet AS DWORD ' CODEPAGEID
 dwReserved1 AS DWORD
END TYPE
' INETLANGMASK enum
%EQUATE `ILM_FAMILY = &H1
%EQUATE `ILM_NAME = &H2
%EQUATE `ILM_BODYCSET = &H4
%EQUATE `ILM_HEADERCSET = &H8
%EQUATE `ILM_WEBCSET = &H10
%EQUATE `ILM_FIXEDFONT = &H20
%EQUATE `ILM_VARIABLEFONT = &H40
' // Size = 804 bytes
TYPE CODEPAGEINFO DWORD
 dwMask AS DWORD
 cpiCodePage AS DWORD ' CODEPAGEID
 fIsValidCodePage AS LONG
 ulMaxCharSize AS DWORD
 fInternetCP AS LONG
 cpiFamily AS DWORD ' CODEPAGEID
 szName AS ASCIIZ * %CCHMAX_LANG_NAME ' CHAR
 szBodyCset AS ASCIIZ * %CCHMAX_LANG_NAME ' CHAR
 szHeaderCset AS ASCIIZ * %CCHMAX_LANG_NAME ' CHAR
 szWebCset AS ASCIIZ * %CCHMAX_LANG_NAME ' CHAR
 szFixedFont AS ASCIIZ * %CCHMAX_FACE_NAME ' CHAR
 szVariableFont AS ASCIIZ * %CCHMAX_FACE_NAME ' CHAR
 ietNewsDefault AS LONG ' ENCODINGTYPE enum
 ietMailDefault AS LONG ' ENCODINGTYPE enum
 dwReserved1 AS DWORD
END TYPE
' // Size = 16 bytes
TYPE RFC1522INFO DWORD
 fRfc1522Allowed AS LONG
 fRfc1522Used AS LONG
 fAllow8bit AS LONG
 hRfc1522Cset AS DWORD ' // HCHARSET
END TYPE
' CHARSETTYPE enum
%EQUATE `CHARSET_BODY = 0
%EQUATE `CHARSET_HEADER = %CHARSET_BODY + 1
%EQUATE `CHARSET_WEB = %CHARSET_HEADER + 1
INTERFACE IMimeInternational $IID_IMimeInternational
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetDefaultCharset ( ' VTable offset = 12
 BYVAL hCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDefaultCharset ( ' VTable offset = 16
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageCharset ( ' VTable offset = 20
 BYVAL cpiCodePage AS DWORD
 , BYVAL ctCsetType AS LONG
 , BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindCharset ( ' VTable offset = 24
 BYREF pszCharset AS ASCIIZ
 , BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharsetInfo ( ' VTable offset = 28
 BYVAL hCharset AS DWORD
 , BYREF pCsetInfo AS INETCSETINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetCodePageInfo ( ' VTable offset = 32
 BYVAL cpiCodePage AS DWORD
 , BYREF pCodePageInfo AS CODEPAGEINFO
 ) AS LONG
 ' =====================================================================================
 METHOD CanConvertCodePages ( ' VTable offset = 36
 BYVAL cpiSource AS DWORD
 , BYVAL cpiDest AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DecodeHeader ( ' VTable offset = 40
 BYVAL hCharset AS DWORD
 , BYREF pszData AS ASCIIZ
 , BYREF pDecoded AS PROPVARIANT
 , BYREF pRfc1522Info AS RFC1522INFO
 ) AS LONG
 ' =====================================================================================
 METHOD EncodeHeader ( ' VTable offset = 44
 BYVAL hCharset AS DWORD
 , BYREF pData AS PROPVARIANT
 , BYREF ppszEncoded AS DWORD
 , BYREF pRfc1522Info AS RFC1522INFO
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertBuffer ( ' VTable offset = 48
 BYVAL cpiSource AS DWORD
 , BYVAL cpiDest AS DWORD
 , BYREF pIn AS BLOB
 , BYREF pOut AS BLOB
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ConvertString ( ' VTable offset = 52
 BYVAL cpiSource AS DWORD
 , BYVAL cpiDest AS DWORD
 , BYREF pIn AS PROPVARIANT
 , BYREF pOut AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD MLANG_ConvertInetReset ( ' VTable offset = 56
 ) AS LONG
 ' =====================================================================================
 METHOD MLANG_ConvertInetString ( ' VTable offset = 60
 BYVAL cpiSource AS DWORD
 , BYVAL cpiDest AS DWORD
 , BYREF pSource AS ASCIIZ
 , BYREF pnSizeOfSource AS LONG
 , BYREF pDestination AS DWORD
 , BYREF pnDstSize AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Rfc1522Decode ( ' VTable offset = 64
 BYREF pszValue AS ASCIIZ
 , BYREF pszCharset AS ASCIIZ
 , BYVAL cchmax AS DWORD
 , BYREF ppszDecoded AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Rfc1522Encode ( ' VTable offset = 68
 BYREF pszValue AS ASCIIZ
 , BYVAL hCharset AS DWORD
 , BYREF ppszEncoded AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeInternational_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeSecurity
' IID = {C5588353-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeSecurity_INTERFACE_DEFINED)
 %IMimeSecurity_INTERFACE_DEFINED = 1
'typedef BLOB THUMBBLOB;
' // Size = 8 bytes
TYPE THUMBBLOB DWORD
 cbSize AS DWORD
 pBlobData AS BYTE PTR
END TYPE
'typedef void *HCAPICERTSTORE;
'#ifndef __WINCRYPT_H__
'typedef const void *PCX509CERT;
'typedef void *HCERTSTORE;
'#else
'typedef PCCERT_CONTEXT PCX509CERT;
'#endif
'#ifndef IMS_ALGIDDEF
'#define IMS_ALGIDDEF
'typedef unsigned int ALG_ID;
'#endif // IMS_ALGIDDEF
'// -------------------------------------------------------------------
'// ITT_* - thumbprint types
'// -------------------------------------------------------------------
'typedef DWORD ITHUMBPRINTTYPE;
%EQUATE `ITT_SIGNING = &H00000001
%EQUATE `ITT_ENCRYPTION = &H00000002
'// -------------------------------------------------------------------
'// SEF_* - Secure Encoding Flags
'// must not overlap the EBF flags
'// -------------------------------------------------------------------
%EQUATE `SEF_ENCRYPTWITHNOSENDERCERT = &H00000001
%EQUATE `SEF_SENDERSCERTPROVIDED = &H00000002
%EQUATE `SEF_NOUI = &H00000004
%EQUATE `SEF_MASK = &H0000FFFF
'// -------------------------------------------------------------------
'// EBF_* - Enchanted Broccoli Forest, also Encode Body Flags
'// must not overlap the SEF flags
'// -------------------------------------------------------------------
%EQUATE `EBF_RECURSE = &H00010000
%EQUATE `EBF_COMMITIFDIRTY = &H00020000
%EQUATE `EBF_MASK = &HFFFF0000
'// -------------------------------------------------------------------
'// MSV_* - MIME Security Validity
'// -------------------------------------------------------------------
%EQUATE `MSV_OK = &H00000000
%EQUATE `MSV_BADSIGNATURE = &H00000001
%EQUATE `MSV_UNVERIFIABLE = &H00000002
%EQUATE `MSV_UNKHASH = &H00000004
%EQUATE `MSV_MALFORMEDSIG = &H00000080
%EQUATE `MSV_SIGNATURE_MASK = &H000000ff
%EQUATE `MSV_EXPIRED_SIGNINGCERT = &H00000100
%EQUATE `MSV_SIGNING_MASK = &H00000f00
%EQUATE `MSV_CANTDECRYPT = &H00001000
%EQUATE `MSV_ENC_FOR_EXPIREDCERT = &H00002000
%EQUATE `MSV_ENCRYPT_MASK = &H000ff000
%EQUATE `MSV_INVALID = &H01000000
%EQUATE `MSV_MSG_MASK = &H0f000000
'// -------------------------------------------------------------------
'// MST_* - MIME Security Type
'// -------------------------------------------------------------------
%EQUATE `MST_NONE = &H00000000
%EQUATE `MST_THIS_SIGN = &H00000001
%EQUATE `MST_THIS_ENCRYPT = &H00000002
%EQUATE `MST_THIS_BLOBSIGN = &H00000005 ' // %MST_BLOB_FLAG OR %MST_THIS_SIGN
%EQUATE `MST_CHILD_SIGN = &H00000100
%EQUATE `MST_CHILD_ENCRYPT = &H00000200
%EQUATE `MST_SUBMSG_SIGN = &H00001000
%EQUATE `MST_SUBMSG_ENCRYPT = &H00002000
%EQUATE `MST_THIS_MASK = &H000000ff
%EQUATE `MST_CHILD_MASK = &H00000f00
%EQUATE `MST_SUBMSG_MASK = &H0000f000
%EQUATE `MST_DESCENDENT_MASK = &H0000ff00 ' // %MST_CHILD OR %MST_SUBMSG
%EQUATE `MST_SIGN_MASK = &H00001101
%EQUATE `MST_ENCRYPT_MASK = &H00002202
%EQUATE `MST_BLOB_FLAG = &H00000004
%EQUATE `MST_TYPE_MASK = &H0000ffff
%EQUATE `MST_RECEIPT_REQUEST = &H00010000
%EQUATE `MST_SUPPRESS_UI = &H00020000
%EQUATE `MST_CLASS_SMIME_V1 = &H00000000
%EQUATE `MST_CLASS_PGP = &H01000000
%EQUATE `MST_CLASS_MASK = &Hff000000
' CERTSTATE enum
%EQUATE `CERTIFICATE_OK = 0
%EQUATE `CERTIFICATE_NOT_PRESENT = %CERTIFICATE_OK + 1
%EQUATE `CERTIFICATE_EXPIRED = %CERTIFICATE_NOT_PRESENT + 1
%EQUATE `CERTIFICATE_CHAIN_TOO_LONG = %CERTIFICATE_EXPIRED + 1
%EQUATE `CERTIFICATE_MISSING_ISSUER = %CERTIFICATE_CHAIN_TOO_LONG + 1
%EQUATE `CERTIFICATE_CRL_LISTED = %CERTIFICATE_MISSING_ISSUER + 1
%EQUATE `CERTIFICATE_NOT_TRUSTED = %CERTIFICATE_CRL_LISTED + 1
%EQUATE `CERTIFICATE_INVALID = %CERTIFICATE_NOT_TRUSTED + 1
%EQUATE `CERTIFICATE_ERROR = %CERTIFICATE_INVALID + 1
%EQUATE `CERTIFICATE_NOPRINT = %CERTIFICATE_ERROR + 1
%EQUATE `CERTIFICATE_UNKNOWN = %CERTIFICATE_NOPRINT + 1
' CERTNAMETYPE enum
%EQUATE `SIMPLE = 0
%EQUATE `OID = %SIMPLE + 1
%EQUATE `X500 = %OID + 1
' CERTDATAID enum
%EQUATE `CDID_EMAIL = 0
%EQUATE `CDID_ALT_EMAIL = %CDID_EMAIL + 1
%EQUATE `CDID_MAX = %CDID_ALT_EMAIL + 1
' // Size = 12 bytes
TYPE X509CERTRESULT DWORD
 cEntries AS DWORD ' DWORD cEntries
 rgcs AS DWORD ' CERTSTATE *rgcs // Array of CERTSTATE values
 rgpCert AS DWORD ' PCX509CERT *rgpCert // PCX509CERT - Pointer to an array of CERT_CONTEXT certificate values
END TYPE
INTERFACE IMimeSecurity $IID_IMimeSecurity
 INHERIT IUnknown
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD CheckInit ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD EncodeMessage ( ' VTable offset = 20
 BYVAL pTree AS IMimeMessageTree
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EncodeBody ( ' VTable offset = 24
 BYVAL pTree AS IMimeMessageTree
 , BYVAL hEncodeRoot AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DecodeMessage ( ' VTable offset = 28
 BYVAL pTree AS IMimeMessageTree
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DecodeBody ( ' VTable offset = 32
 BYVAL pTree AS IMimeMessageTree
 , BYVAL hDecodeRoot AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumCertificates ( ' VTable offset = 36
 BYVAL hc AS DWORD
 , BYVAL dwUsage AS DWORD
 , BYVAL pPrev AS DWORD
 , BYREF ppCert AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCertificateName ( ' VTable offset = 40
 BYVAL pX509Cert AS DWORD
 , BYVAL cn AS LONG
 , BYREF ppszName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMessageType ( ' VTable offset = 44
 BYVAL hwndParent AS DWORD
 , BYVAL pBody AS IMimeBody
 , BYREF pdwSecType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetCertData ( ' VTable offset = 48
 BYVAL pX509Cert AS DWORD
 , BYVAL dataid AS LONG
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeSecurity_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeHeaderTable
' IID = {FD853CD1-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IPersistStream
' ########################################################################################
#IF NOT %DEF(%IMimeHeaderTable_INTERFACE_DEFINED)
 %IMimeHeaderTable_INTERFACE_DEFINED = 1
' // Size = 8 bytes
TYPE FINDHEADER DWORD
 pszHeader AS ASCIIZ PTR
 dwReserved AS DWORD
END TYPE
' // Size = 16 bytes
TYPE HEADERROWINFO DWORD
 dwRowNumber AS DWORD
 cboffStart AS DWORD
 cboffColon AS DWORD
 cboffEnd AS DWORD
END TYPE
' HEADERTABLEFLAGS enum
%EQUATE `HTF_NAMEINDATA = &H1
%EQUATE `HTF_ENUMHANDLESONLY = &H2
INTERFACE IMimeHeaderTable $IID_IMimeHeaderTable
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersistStream methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeHeaderTable methods
 ' =====================================================================================
 METHOD FindFirstRow ( ' VTable offset = 32
 BYREF pFindHeader AS FINDHEADER
 , BYREF phRow AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindNextRow ( ' VTable offset = 36
 BYREF pFindHeader AS FINDHEADER
 , BYREF phRow AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CountRows ( ' VTable offset = 40
 BYREF pszHeader AS ASCIIZ
 , BYREF pcRows AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AppendRow ( ' VTable offset = 44
 BYREF pszHeader AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pszData AS ASCIIZ
 , BYVAL cchData AS DWORD
 , BYREF phRow AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteRow ( ' VTable offset = 48
 BYVAL hRow AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRowData ( ' VTable offset = 52
 BYVAL hRow AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF ppszData AS DWORD
 , BYREF pcchData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetRowData ( ' VTable offset = 56
 BYVAL hRow AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF pszData AS ASCIIZ
 , BYVAL cchData AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRowInfo ( ' VTable offset = 60
 BYVAL hRow AS DWORD
 , BYREF pInfo AS HEADERROWINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetRowNumber ( ' VTable offset = 64
 BYVAL hRow AS DWORD
 , BYVAL dwRowNumber AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumRows ( ' VTable offset = 68
 BYREF pszHeader AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF ppEnum AS IMimeEnumHeaderRows
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 72
 BYREF ppTable AS IMimeHeaderTable
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 76
 BYREF riid AS GUID
 , BYREF ppvObject AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeHeaderTable_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimePropertySchema
' IID = {FD853CEC-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimePropertySchema_INTERFACE_DEFINED)
 %IMimePropertySchema_INTERFACE_DEFINED = 1
' MIMEPROPFLAGS enum
%EQUATE `MPF_INETCSET = &H1
%EQUATE `MPF_RFC1522 = &H2
%EQUATE `MPF_ADDRESS = &H4
%EQUATE `MPF_HASPARAMS = &H8
%EQUATE `MPF_MIME = &H10
%EQUATE `MPF_READONLY = &H20
INTERFACE IMimePropertySchema $IID_IMimePropertySchema
 INHERIT IUnknown
 ' =====================================================================================
 METHOD RegisterProperty ( ' VTable offset = 12
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYVAL dwRowNumber AS DWORD
 , BYVAL vtDefault AS WORD
 , BYREF pdwPropId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ModifyProperty ( ' VTable offset = 16
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYVAL dwRowNumber AS DWORD
 , BYVAL vtDefault AS WORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyId ( ' VTable offset = 20
 BYREF pszName AS ASCIIZ
 , BYREF pdwPropId AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyName ( ' VTable offset = 24
 BYVAL dwPropId AS DWORD
 , BYREF ppszName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterAddressType ( ' VTable offset = 28
 BYREF pszName AS ASCIIZ
 , BYREF pdwAdrType AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimePropertySchema_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimePropertySet
' IID = {FD853CD3-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IPersistStreamInit
' ########################################################################################
#IF NOT %DEF(%IMimePropertySet_INTERFACE_DEFINED)
 %IMimePropertySet_INTERFACE_DEFINED = 1
%EQUATE `PDF_ENCODED = &H00000001
%EQUATE `PDF_NAMEINDATA = &H00000002
%EQUATE `PDF_HEADERFORMAT = &H00000004 OR %PDF_ENCODED
%EQUATE `PDF_NOCOMMENTS = &H00000008
%EQUATE `PDF_SAVENOENCODE = &H00000010
%EQUATE `PDF_VECTOR = &H00000020
' // Size = 8 bytes
TYPE MIMEPARAMINFO DWORD
 pszName AS ASCIIZ PTR
 pszData AS ASCIIZ PTR
END TYPE
' PROPINFOMASK enum
%EQUATE `PIM_CHARSET = &H1
%EQUATE `PIM_ENCODINGTYPE = &H2
%EQUATE `PIM_ROWNUMBER = &H4
%EQUATE `PIM_FLAGS = &H8
%EQUATE `PIM_PROPID = &H10
%EQUATE `PIM_VALUES = &H20
%EQUATE `PIM_VTDEFAULT = &H40
%EQUATE `PIM_VTCURRENT = &H80
' // Size = 32 bytes
TYPE MIMEPROPINFO DWORD FILL
 dwMask AS DWORD
 hCharset AS DWORD ' // HCHARSET
 ietEncoding AS LONG ' // ENCODINGTYPE enum
 dwRowNumber AS DWORD
 dwFlags AS DWORD
 dwPropId AS DWORD
 cValues AS DWORD
 vtDefault AS WORD ' // VARTYPE
 vtCurrent AS WORD ' // VARTYPE
END TYPE
%EQUATE `EPF_NONAME = &H00000001
INTERFACE IMimePropertySet $IID_IMimePropertySet
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistStreamInit methods
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimePropertySet methods
 ' =====================================================================================
 METHOD GetPropInfo ( ' VTable offset = 36
 BYREF pszName AS ASCIIZ
 , BYREF pInfo AS MIMEPROPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropInfo ( ' VTable offset = 40
 BYREF pszName AS ASCIIZ
 , BYREF pInfo AS MIMEPROPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetProp ( ' VTable offset = 44
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetProp ( ' VTable offset = 48
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD AppendProp ( ' VTable offset = 52
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteProp ( ' VTable offset = 56
 BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD CopyProps ( ' VTable offset = 60
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 , BYVAL pPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD MoveProps ( ' VTable offset = 64
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 , BYVAL pPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteExcept ( ' VTable offset = 68
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryProp ( ' VTable offset = 72
 BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharset ( ' VTable offset = 76
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCharset ( ' VTable offset = 80
 BYVAL hCharset AS DWORD
 , BYVAL applytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetParameters ( ' VTable offset = 84
 BYREF pszName AS ASCIIZ
 , BYREF pcParams AS DWORD
 , BYREF pprgParam AS MIMEPARAMINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsContentType ( ' VTable offset = 88
 BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 92
 BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 96
 BYREF ppPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD SetOption ( ' VTable offset = 100
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetOption ( ' VTable offset = 104
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD EnumProps ( ' VTable offset = 108
 BYVAL dwFlags AS DWORD
 , BYREF ppEnum AS IMimeEnumProperties
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimePropertySet_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeAddressTable
' IID = {C558834A-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeAddressTable_INTERFACE_DEFINED)
 %IMimeAddressTable_INTERFACE_DEFINED = 1
'typedef DWORD IADDRESSTYPE;
'struct HADDRESS__
' {
' DWORD unused;
' };
'typedef struct HADDRESS__ *HADDRESS;
'typedef HADDRESS *LPHADDRESS;
'TYPE HADDRESS
' unused AS DWORD
'END TYPE
%EQUATE `IAT_UNKNOWN = &H00000000
%EQUATE `IAT_FROM = &H00000001
%EQUATE `IAT_SENDER = &H00000002
%EQUATE `IAT_TO = &H00000004
%EQUATE `IAT_CC = &H00000008
%EQUATE `IAT_BCC = &H00000010
%EQUATE `IAT_REPLYTO = &H00000020
%EQUATE `IAT_RETURNPATH = &H00000040
%EQUATE `IAT_RETRCPTTO = &H00000080
%EQUATE `IAT_RR = &H00000100
%EQUATE `IAT_APPARTO = &H00000200
%EQUATE `IAT_ALL = &HFFFFFFFF
%EQUATE `IAT_KNOWN = %IAT_FROM OR %IAT_TO OR %IAT_CC OR %IAT_BCC OR %IAT_REPLYTO OR %IAT_SENDER
%EQUATE `IAT_RECIPS = %IAT_TO OR %IAT_CC OR %IAT_BCC
' ADDRESSFORMAT enum
%EQUATE `AFT_DISPLAY_FRIENDLY = 0
%EQUATE `AFT_DISPLAY_EMAIL = %AFT_DISPLAY_FRIENDLY + 1
%EQUATE `AFT_DISPLAY_BOTH = %AFT_DISPLAY_EMAIL + 1
%EQUATE `AFT_RFC822_DECODED = %AFT_DISPLAY_BOTH + 1
%EQUATE `AFT_RFC822_ENCODED = %AFT_RFC822_DECODED + 1
%EQUATE `AFT_RFC822_TRANSMIT = %AFT_RFC822_ENCODED + 1
%EQUATE `IAP_CHARSET = &H00000001
%EQUATE `IAP_HANDLE = &H00000002
%EQUATE `IAP_ADRTYPE = &H00000004
%EQUATE `IAP_FRIENDLY = &H00000008
%EQUATE `IAP_EMAIL = &H00000020
%EQUATE `IAP_CERTSTATE = &H00000100
%EQUATE `IAP_SIGNING_PRINT = &H00000200
%EQUATE `IAP_ENCRYPTION_PRINT = &H00000400
%EQUATE `IAP_ENCODING = &H00000800
%EQUATE `IAP_COOKIE = &H00001000
%EQUATE `IAP_FRIENDLYW = &H00002000
%EQUATE `IAP_ALL = &HFFFFFFFF
' // Size = 64 bytes
TYPE ADDRESSPROPS DWORD
 dwProps AS DWORD
 hAddress AS DWORD ' // HADDRESS
 ietFriendly AS LONG ' // ENCODINGTYPE enum
 hCharset AS DWORD ' // HCHARSET
 dwAdrType AS DWORD
 pszFriendly AS ASCIIZ PTR ' // LPSTR
 pszFriendlyW AS WSTRINGZ PTR ' // LPWSTR
 pszEmail AS ASCIIZ PTR ' // LPSTR
 certstate AS LONG ' // CERTSTATE enum
 tbSigning AS THUMBBLOB
 tbEncryption AS THUMBBLOB
 dwCookie AS DWORD
 dwReserved1 AS DWORD
 dwReserved2 AS DWORD
END TYPE
' // Size = 8 bytes
TYPE ADDRESSLIST DWORD
 cAdrs AS DWORD
 prgAdr AS ADDRESSPROPS PTR
END TYPE
INTERFACE IMimeAddressTable $IID_IMimeAddressTable
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Append ( ' VTable offset = 12
 BYVAL dwAdrType AS DWORD
 , BYVAL ietFriendly AS LONG
 , BYREF pszFriendly AS ASCIIZ
 , BYREF pszEmail AS ASCIIZ
 , BYREF phAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Insert ( ' VTable offset = 16
 BYREF pAddress AS ADDRESSPROPS
 , BYREF phAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProps ( ' VTable offset = 20
 BYVAL hAddress AS DWORD
 , BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD GetProps ( ' VTable offset = 24
 BYVAL hAddress AS DWORD
 , BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD GetSender ( ' VTable offset = 28
 BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD CountTypes ( ' VTable offset = 32
 BYVAL dwAdrTypes AS DWORD
 , BYREF pcAdrs AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypes ( ' VTable offset = 36
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD EnumTypes ( ' VTable offset = 40
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF ppEnum AS IMimeEnumAddressTypes
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 44
 BYVAL hAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteTypes ( ' VTable offset = 48
 BYVAL dwAdrTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 52
 BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppszFormat AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AppendRfc822 ( ' VTable offset = 56
 BYVAL dwAdrType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF pszRfc822Adr AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD ParseRfc822 ( ' VTable offset = 60
 BYVAL dwAdrType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF pszRfc822Adr AS ASCIIZ
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 64
 BYREF ppTable AS IMimeAddressTable
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 68
 BYREF riid AS GUID
 , BYREF ppvObject AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeAddressTable_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeAddressTableW
' IID = {11C8D742-0FB4-11D3-A01E-00A0C90C9BB6}
' Inherited interface = IMimeAddressTable
' ########################################################################################
#IF NOT %DEF(%IMimeAddressTableW_INTERFACE_DEFINED)
 %IMimeAddressTableW_INTERFACE_DEFINED = 1
INTERFACE IMimeAddressTableW $IID_IMimeAddressTableW
 INHERIT IUnknown
 ' =====================================================================================
 ' IMimeAddressTable Methods
 ' =====================================================================================
 METHOD Append ( ' VTable offset = 12
 BYVAL dwAdrType AS DWORD
 , BYVAL ietFriendly AS LONG
 , BYREF pszFriendly AS ASCIIZ
 , BYREF pszEmail AS ASCIIZ
 , BYREF phAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Insert ( ' VTable offset = 16
 BYREF pAddress AS ADDRESSPROPS
 , BYREF phAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetProps ( ' VTable offset = 20
 BYVAL hAddress AS DWORD
 , BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD GetProps ( ' VTable offset = 24
 BYVAL hAddress AS DWORD
 , BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD GetSender ( ' VTable offset = 28
 BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD CountTypes ( ' VTable offset = 32
 BYVAL dwAdrTypes AS DWORD
 , BYREF pcAdrs AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetTypes ( ' VTable offset = 36
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD EnumTypes ( ' VTable offset = 40
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF ppEnum AS IMimeEnumAddressTypes
 ) AS LONG
 ' =====================================================================================
 METHOD Delete ( ' VTable offset = 44
 BYVAL hAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteTypes ( ' VTable offset = 48
 BYVAL dwAdrTypes AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormat ( ' VTable offset = 52
 BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppszFormat AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AppendRfc822 ( ' VTable offset = 56
 BYVAL dwAdrType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF pszRfc822Adr AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD ParseRfc822 ( ' VTable offset = 60
 BYVAL dwAdrType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF pszRfc822Adr AS ASCIIZ
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 64
 BYREF ppTable AS IMimeAddressTable
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 68
 BYREF riid AS GUID
 , BYREF ppvObject AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeAddressTableW Methods
 ' =====================================================================================
 METHOD AppendW ( ' VTable offset = 72
 BYVAL dwAdrType AS DWORD
 , BYVAL ietFriendly AS LONG
 , BYREF pwszFriendly AS DWORD
 , BYREF pwszEmail AS DWORD
 , BYREF phAddress AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormatW ( ' VTable offset = 76
 BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppwszFormat AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AppendRfc822W ( ' VTable offset = 80
 BYVAL dwAdrType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF pwszRfc822Adr AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ParseRfc822W ( ' VTable offset = 84
 BYVAL dwAdrType AS DWORD
 , BYREF pwszRfc822Adr AS DWORD
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeAddressTableW_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeWebDocument
' IID = {EE519F11-851A-11D0-825C-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeWebDocument_INTERFACE_DEFINED)
 %IMimeWebDocument_INTERFACE_DEFINED = 1
INTERFACE IMimeWebDocument $IID_IMimeWebDocument
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetURL ( ' VTable offset = 12
 BYREF ppszURL AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD BindToStorage ( ' VTable offset = 16
 BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeWebDocument_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeBody
' IID = {C558834C-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IMimePropertySet
' ########################################################################################
#IF NOT %DEF(%IMimeBody_INTERFACE_DEFINED)
 %IMimeBody_INTERFACE_DEFINED = 1
' IMSGBODYTYPE enum
%EQUATE `IBT_SECURE = 0
%EQUATE `IBT_ATTACHMENT = %IBT_SECURE + 1
%EQUATE `IBT_EMPTY = %IBT_ATTACHMENT + 1
%EQUATE `IBT_CSETTAGGED = %IBT_EMPTY + 1
%EQUATE `IBT_AUTOATTACH = %IBT_CSETTAGGED + 1
' // Size = 16 bytes
TYPE BODYOFFSETS DWORD
 cbBoundaryStart AS DWORD
 cbHeaderStart AS DWORD
 cbBodyStart AS DWORD
 cbBodyEnd AS DWORD
END TYPE
' // Size = 32 bytes
TYPE TRANSMITINFO DWORD
 ietCurrent AS LONG ' // ENCODINGTYPE
 ietXmitMime AS LONG ' // ENCODINGTYPE
 ietXmit822 AS LONG ' // ENCODINGTYPE
 cbLongestLine AS DWORD
 cExtended AS DWORD
 ulPercentExt AS DWORD
 cbSize AS DWORD
 cLines AS DWORD
END TYPE
INTERFACE IMimeBody $IID_IMimeBody
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistStreamInit methods
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimePropertySet methods
 ' =====================================================================================
 METHOD GetPropInfo ( ' VTable offset = 36
 BYREF pszName AS ASCIIZ
 , BYREF pInfo AS MIMEPROPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropInfo ( ' VTable offset = 40
 BYREF pszName AS ASCIIZ
 , BYREF pInfo AS MIMEPROPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetProp ( ' VTable offset = 44
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetProp ( ' VTable offset = 48
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD AppendProp ( ' VTable offset = 52
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteProp ( ' VTable offset = 56
 BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD CopyProps ( ' VTable offset = 60
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 , BYVAL pPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD MoveProps ( ' VTable offset = 64
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 , BYVAL pPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteExcept ( ' VTable offset = 68
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryProp ( ' VTable offset = 72
 BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharset ( ' VTable offset = 76
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCharset ( ' VTable offset = 80
 BYVAL hCharset AS DWORD
 , BYVAL applytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetParameters ( ' VTable offset = 84
 BYREF pszName AS ASCIIZ
 , BYREF pcParams AS DWORD
 , BYREF pprgParam AS MIMEPARAMINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsContentType ( ' VTable offset = 88
 BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 92
 BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 96
 BYREF ppPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD SetOption ( ' VTable offset = 100
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetOption ( ' VTable offset = 104
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD EnumProps ( ' VTable offset = 108
 BYVAL dwFlags AS DWORD
 , BYREF ppEnum AS IMimeEnumProperties
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeBody methods
 ' =====================================================================================
 METHOD IsType ( ' VTable offset = 112
 BYVAL bodytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetDisplayName ( ' VTable offset = 116
 BYREF pszDisplay AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisplayName ( ' VTable offset = 120
 BYREF ppszDisplay AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOffsets ( ' VTable offset = 124
 BYREF pOffsets AS BODYOFFSETS
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentEncoding ( ' VTable offset = 128
 BYREF pietEncoding AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetCurrentEncoding ( ' VTable offset = 132
 BYVAL ietEncoding AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetEstimatedSize ( ' VTable offset = 136
 BYVAL ietEncoding AS LONG
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDataHere ( ' VTable offset = 140
 BYVAL ietEncoding AS LONG
 , BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 144
 BYVAL ietEncoding AS LONG
 , BYREF ppStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 148
 BYVAL ietEncoding AS LONG
 , BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 , BYREF riid AS GUID
 , BYVAL pvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EmptyData ( ' VTable offset = 152
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 156
 BYVAL pBody AS IMimeBody
 ) AS LONG
 ' =====================================================================================
 METHOD GetTransmitInfo ( ' VTable offset = 160
 BYREF pTransmitInfo AS TRANSMITINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToFile ( ' VTable offset = 164
 BYVAL ietEncoding AS LONG
 , BYREF pszFilePath AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetHandle ( ' VTable offset = 168
 BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeBody_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeBodyW
' IID = {2F38042B-D02F-11D2-A004-00A0C90C9BB6}
' Inherited interface = IMimeBody
' ########################################################################################
#IF NOT %DEF(%IMimeBodyW_INTERFACE_DEFINED)
 %IMimeBodyW_INTERFACE_DEFINED = 1
INTERFACE IMimeBodyW $IID_IMimeBodyW
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistStreamInit methods
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimePropertySet methods
 ' =====================================================================================
 METHOD GetPropInfo ( ' VTable offset = 36
 BYREF pszName AS ASCIIZ
 , BYREF pInfo AS MIMEPROPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropInfo ( ' VTable offset = 40
 BYREF pszName AS ASCIIZ
 , BYREF pInfo AS MIMEPROPINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetProp ( ' VTable offset = 44
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetProp ( ' VTable offset = 48
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD AppendProp ( ' VTable offset = 52
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteProp ( ' VTable offset = 56
 BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD CopyProps ( ' VTable offset = 60
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 , BYVAL pPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD MoveProps ( ' VTable offset = 64
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 , BYVAL pPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteExcept ( ' VTable offset = 68
 BYVAL cNames AS DWORD
 , BYREF prgszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryProp ( ' VTable offset = 72
 BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharset ( ' VTable offset = 76
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCharset ( ' VTable offset = 80
 BYVAL hCharset AS DWORD
 , BYVAL applytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetParameters ( ' VTable offset = 84
 BYREF pszName AS ASCIIZ
 , BYREF pcParams AS DWORD
 , BYREF pprgParam AS MIMEPARAMINFO
 ) AS LONG
 ' =====================================================================================
 METHOD IsContentType ( ' VTable offset = 88
 BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 92
 BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 96
 BYREF ppPropertySet AS IMimePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD SetOption ( ' VTable offset = 100
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetOption ( ' VTable offset = 104
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD EnumProps ( ' VTable offset = 108
 BYVAL dwFlags AS DWORD
 , BYREF ppEnum AS IMimeEnumProperties
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeBody methods
 ' =====================================================================================
 METHOD IsType ( ' VTable offset = 112
 BYVAL bodytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetDisplayName ( ' VTable offset = 116
 BYREF pszDisplay AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisplayName ( ' VTable offset = 120
 BYREF ppszDisplay AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetOffsets ( ' VTable offset = 124
 BYREF pOffsets AS BODYOFFSETS
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurrentEncoding ( ' VTable offset = 128
 BYREF pietEncoding AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetCurrentEncoding ( ' VTable offset = 132
 BYVAL ietEncoding AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetEstimatedSize ( ' VTable offset = 136
 BYVAL ietEncoding AS LONG
 , BYREF pcbSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDataHere ( ' VTable offset = 140
 BYVAL ietEncoding AS LONG
 , BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD GetData ( ' VTable offset = 144
 BYVAL ietEncoding AS LONG
 , BYREF ppStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD SetData ( ' VTable offset = 148
 BYVAL ietEncoding AS LONG
 , BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 , BYREF riid AS GUID
 , BYVAL pvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD EmptyData ( ' VTable offset = 152
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTo ( ' VTable offset = 156
 BYVAL pBody AS IMimeBody
 ) AS LONG
 ' =====================================================================================
 METHOD GetTransmitInfo ( ' VTable offset = 160
 BYREF pTransmitInfo AS TRANSMITINFO
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToFile ( ' VTable offset = 164
 BYVAL ietEncoding AS LONG
 , BYREF pszFilePath AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetHandle ( ' VTable offset = 168
 BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeBodyW Methods
 ' =====================================================================================
 METHOD SetDisplayNameW ( ' VTable offset = 172
 BYREF pwszDisplay AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisplayNameW ( ' VTable offset = 176
 BYREF ppwszDisplay AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDataW ( ' VTable offset = 180
 BYVAL ietEncoding AS LONG
 , BYREF pwszPriType AS DWORD
 , BYREF pwszSubType AS DWORD
 , BYREF riid AS GUID
 , BYVAL pvObject AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SaveToFileW ( ' VTable offset = 184
 BYVAL ietEncoding AS LONG
 , BYREF pwszFilePath AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeBodyW_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeMessageTree
' IID = {FD853CD4-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IPersistStreamInit
' ########################################################################################
#IF NOT %DEF(%IMimeMessageTree_INTERFACE_DEFINED)
 %IMimeMessageTree_INTERFACE_DEFINED = 1
%EQUATE `HBODY_ROOT = &HFFFFFFFF ' ( ( HBODY )-1 )
' BODYLOCATION enum
%EQUATE `IBL_ROOT = 0
%EQUATE `IBL_PARENT = %IBL_ROOT + 1
%EQUATE `IBL_FIRST = %IBL_PARENT + 1
%EQUATE `IBL_LAST = %IBL_FIRST + 1
%EQUATE `IBL_NEXT = %IBL_LAST + 1
%EQUATE `IBL_PREVIOUS = %IBL_NEXT + 1
' // Size = 12 bytes
TYPE FINDBODY DWORD
 pszPriType AS ASCIIZ PTR
 pszSubType AS ASCIIZ PTR
 dwReserved AS DWORD
END TYPE
%EQUATE `COMMIT_ONLYIFDIRTY = &H00000001
%EQUATE `COMMIT_REUSESTORAGE = &H00000002
%EQUATE `COMMIT_SMIMETRANSFERENCODE = &H00000004
%EQUATE `SAVEBODY_KEEPBOUNDARY = &H00000001
%EQUATE `DELETE_PROMOTE_CHILDREN = &H00000001
%EQUATE `DELETE_CHILDREN_ONLY = &H00000002
INTERFACE IMimeMessageTree $IID_IMimeMessageTree
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistStreamInit methods
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeMessageTree methods
 ' =====================================================================================
 METHOD GetMessageSource ( ' VTable offset = 36
 BYREF ppStream AS IStream
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMessageSize ( ' VTable offset = 40
 BYREF pcbSize AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadOffsetTable ( ' VTable offset = 44
 BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD SaveOffsetTable ( ' VTable offset = 48
 BYVAL pStream AS IStream
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFlags ( ' VTable offset = 52
 BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 56
 BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD HandsOffStorage ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 64
 BYVAL hBody AS DWORD
 , BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SaveBody ( ' VTable offset = 68
 BYVAL hBody AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD InsertBody ( ' VTable offset = 72
 BYVAL location AS LONG
 , BYVAL hPivot AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBody ( ' VTable offset = 76
 BYVAL location AS LONG
 , BYVAL hPivot AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteBody ( ' VTable offset = 80
 BYVAL hBody AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD MoveBody ( ' VTable offset = 84
 BYVAL hBody AS DWORD
 , BYVAL location AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CountBodies ( ' VTable offset = 88
 BYVAL hParent AS DWORD
 , BYVAL fRecurse AS BYTE
 , BYREF pcBodies AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindFirst ( ' VTable offset = 92
 BYREF pFindBody AS FINDBODY
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindNext ( ' VTable offset = 96
 BYREF pFindBody AS FINDBODY
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResolveURL ( ' VTable offset = 100
 BYVAL hRelated AS DWORD
 , BYREF pszBase AS ASCIIZ
 , BYREF pszURL AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ToMultipart ( ' VTable offset = 104
 BYVAL hBody AS DWORD
 , BYREF pszSubType AS ASCIIZ
 , BYREF phMultipart AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBodyOffsets ( ' VTable offset = 108
 BYVAL hBody AS DWORD
 , BYREF pOffsets AS BODYOFFSETS
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharset ( ' VTable offset = 112
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCharset ( ' VTable offset = 116
 BYVAL hCharset AS DWORD
 , BYVAL applytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsBodyType ( ' VTable offset = 120
 BYVAL hBody AS DWORD
 , BYVAL bodytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsContentType ( ' VTable offset = 124
 BYVAL hBody AS DWORD
 , BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryBodyProp ( ' VTable offset = 128
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetBodyProp ( ' VTable offset = 132
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetBodyProp ( ' VTable offset = 136
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteBodyProp ( ' VTable offset = 140
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetOption ( ' VTable offset = 144
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetOption ( ' VTable offset = 148
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeMessageTree_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeMessage
' IID = {FD853CD5-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IMimeMessageTree
' ########################################################################################
#IF NOT %DEF(%IMimeMessage_INTERFACE_DEFINED)
 %IMimeMessage_INTERFACE_DEFINED = 1
'typedef DWORD TEXTTYPE;
' IMSGFLAGS enum
%EQUATE `IMF_ATTACHMENTS = &H1
%EQUATE `IMF_MULTIPART = &H2
%EQUATE `IMF_SUBMULTIPART = &H4
%EQUATE `IMF_MIME = &H8
%EQUATE `IMF_HTML = &H10
%EQUATE `IMF_PLAIN = &H20
%EQUATE `IMF_PARTIAL = &H40
%EQUATE `IMF_SIGNED = &H80
%EQUATE `IMF_ENCRYPTED = &H100
%EQUATE `IMF_TNEF = &H200
%EQUATE `IMF_MHTML = &H400
%EQUATE `IMF_SECURE = &H800
%EQUATE `IMF_TEXT = &H1000
%EQUATE `IMF_CSETTAGGED = &H2000
%EQUATE `IMF_NEWS = &H4000
%EQUATE `IMF_VOICEMAIL = &H8000
%EQUATE `IMF_HASVCARD = &H10000
%EQUATE `IMF_RFC1154 = &H20000
' IMSGPRIORITY enum
%EQUATE `IMSG_PRI_LOW = 5
%EQUATE `IMSG_PRI_NORMAL = 3
%EQUATE `IMSG_PRI_HIGH = 1
%EQUATE `WPF_HTML = &H00000001
%EQUATE `WPF_AUTOINLINE = &H00000002
%EQUATE `WPF_SLIDESHOW = &H00000004
%EQUATE `WPF_ATTACHLINKS = &H00000008
%EQUATE `WPF_IMAGESONLY = &H00000010
%EQUATE `WPF_NOMETACHARSET = &H00000020
%EQUATE `WPF_TEXTONLY = &H00000040
' // Size = 20 bytes
TYPE WEBPAGEOPTIONS DWORD
 cbSize AS DWORD
 dwFlags AS DWORD
 dwDelay AS DWORD
 wchQuote AS WORD ' // WCHAR
 fQuoteSpaces AS LONG
END TYPE
%EQUATE `TXT_PLAIN = &H00000001
%EQUATE `TXT_HTML = &H00000002
%EQUATE `URL_ATTACH_INTO_MIXED = &H00000001
%EQUATE `URL_ATTACH_GENERATE_CID = &H00000002
%EQUATE `URL_ATTACH_SET_CNTTYPE = &H00000004
%EQUATE `URL_RESOLVE_RENDERED = &H00000001
%EQUATE `URL_RESULVE_NO_BASE = &H00000002
INTERFACE IMimeMessage $IID_IMimeMessage
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistStreamInit methods
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeMessageTree methods
 ' =====================================================================================
 METHOD GetMessageSource ( ' VTable offset = 36
 BYREF ppStream AS IStream
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMessageSize ( ' VTable offset = 40
 BYREF pcbSize AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadOffsetTable ( ' VTable offset = 44
 BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD SaveOffsetTable ( ' VTable offset = 48
 BYVAL pStream AS IStream
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFlags ( ' VTable offset = 52
 BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 56
 BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD HandsOffStorage ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 64
 BYVAL hBody AS DWORD
 , BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SaveBody ( ' VTable offset = 68
 BYVAL hBody AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD InsertBody ( ' VTable offset = 72
 BYVAL location AS LONG
 , BYVAL hPivot AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBody ( ' VTable offset = 76
 BYVAL location AS LONG
 , BYVAL hPivot AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteBody ( ' VTable offset = 80
 BYVAL hBody AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD MoveBody ( ' VTable offset = 84
 BYVAL hBody AS DWORD
 , BYVAL location AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CountBodies ( ' VTable offset = 88
 BYVAL hParent AS DWORD
 , BYVAL fRecurse AS BYTE
 , BYREF pcBodies AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindFirst ( ' VTable offset = 92
 BYREF pFindBody AS FINDBODY
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindNext ( ' VTable offset = 96
 BYREF pFindBody AS FINDBODY
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResolveURL ( ' VTable offset = 100
 BYVAL hRelated AS DWORD
 , BYREF pszBase AS ASCIIZ
 , BYREF pszURL AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ToMultipart ( ' VTable offset = 104
 BYVAL hBody AS DWORD
 , BYREF pszSubType AS ASCIIZ
 , BYREF phMultipart AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBodyOffsets ( ' VTable offset = 108
 BYVAL hBody AS DWORD
 , BYREF pOffsets AS BODYOFFSETS
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharset ( ' VTable offset = 112
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCharset ( ' VTable offset = 116
 BYVAL hCharset AS DWORD
 , BYVAL applytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsBodyType ( ' VTable offset = 120
 BYVAL hBody AS DWORD
 , BYVAL bodytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsContentType ( ' VTable offset = 124
 BYVAL hBody AS DWORD
 , BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryBodyProp ( ' VTable offset = 128
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetBodyProp ( ' VTable offset = 132
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetBodyProp ( ' VTable offset = 136
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteBodyProp ( ' VTable offset = 140
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetOption ( ' VTable offset = 144
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetOption ( ' VTable offset = 148
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeMessage methods
 ' =====================================================================================
 METHOD CreateWebPage ( ' VTable offset = 152
 BYVAL pRootStm AS IStream
 , BYREF pOptions AS WEBPAGEOPTIONS
 , BYVAL pCallback AS IMimeMessageCallback
 , BYREF ppMoniker AS IMoniker
 ) AS LONG
 ' =====================================================================================
 METHOD GetProp ( ' VTable offset = 156
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetProp ( ' VTable offset = 160
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteProp ( ' VTable offset = 164
 BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryProp ( ' VTable offset = 168
 BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetTextBody ( ' VTable offset = 172
 BYVAL dwTxtType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF ppStream AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTextBody ( ' VTable offset = 176
 BYVAL dwTxtType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYVAL hAlternative AS DWORD
 , BYVAL pStream AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachObject ( ' VTable offset = 180
 BYREF riid AS GUID
 , BYVAL pvObject AS IUnknown
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachFile ( ' VTable offset = 184
 BYREF pszFilePath AS ASCIIZ
 , BYVAL pstmFile AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachURL ( ' VTable offset = 188
 BYREF pszBase AS ASCIIZ
 , BYREF pszURL AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pstmURL AS IStream
 , BYREF ppszCIDURL AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAttachments ( ' VTable offset = 192
 BYREF pcAttach AS DWORD
 , BYREF pprghAttach AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressTable ( ' VTable offset = 196
 BYREF ppTable AS IMimeAddressTable
 ) AS LONG
 ' =====================================================================================
 METHOD GetSender ( ' VTable offset = 200
 BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressTypes ( ' VTable offset = 204
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressFormat ( ' VTable offset = 208
 BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppszFormat AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumAddressTypes ( ' VTable offset = 212
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF ppEnum AS IMimeEnumAddressTypes
 ) AS LONG
 ' =====================================================================================
 METHOD SplitMessage ( ' VTable offset = 216
 BYVAL cbMaxPart AS DWORD
 , BYREF ppParts AS IMimeMessageParts
 ) AS LONG
 ' =====================================================================================
 METHOD GetRootMoniker ( ' VTable offset = 220
 BYREF ppMoniker AS IMoniker
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeMessage_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeMessageW
' IID = {F90ADFEF-D01F-11D2-A004-00A0C90C9BB6}
' Inherited interface = IMimeMessage
' ########################################################################################
#IF NOT %DEF(%IMimeMessageW_INTERFACE_DEFINED)
 %IMimeMessageW_INTERFACE_DEFINED = 1
INTERFACE IMimeMessageW $IID_IMimeMessageW
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistStreamInit methods
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL pStm AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pStm AS IStream
 , BYVAL fClearDirty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSizeMax ( ' VTable offset = 28
 BYREF pcbSize AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD InitNew ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeMessageTree methods
 ' =====================================================================================
 METHOD GetMessageSource ( ' VTable offset = 36
 BYREF ppStream AS IStream
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetMessageSize ( ' VTable offset = 40
 BYREF pcbSize AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadOffsetTable ( ' VTable offset = 44
 BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD SaveOffsetTable ( ' VTable offset = 48
 BYVAL pStream AS IStream
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFlags ( ' VTable offset = 52
 BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Commit ( ' VTable offset = 56
 BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD HandsOffStorage ( ' VTable offset = 60
 ) AS LONG
 ' =====================================================================================
 METHOD BindToObject ( ' VTable offset = 64
 BYVAL hBody AS DWORD
 , BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD SaveBody ( ' VTable offset = 68
 BYVAL hBody AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD InsertBody ( ' VTable offset = 72
 BYVAL location AS LONG
 , BYVAL hPivot AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBody ( ' VTable offset = 76
 BYVAL location AS LONG
 , BYVAL hPivot AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteBody ( ' VTable offset = 80
 BYVAL hBody AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD MoveBody ( ' VTable offset = 84
 BYVAL hBody AS DWORD
 , BYVAL location AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD CountBodies ( ' VTable offset = 88
 BYVAL hParent AS DWORD
 , BYVAL fRecurse AS BYTE
 , BYREF pcBodies AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindFirst ( ' VTable offset = 92
 BYREF pFindBody AS FINDBODY
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindNext ( ' VTable offset = 96
 BYREF pFindBody AS FINDBODY
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResolveURL ( ' VTable offset = 100
 BYVAL hRelated AS DWORD
 , BYREF pszBase AS ASCIIZ
 , BYREF pszURL AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ToMultipart ( ' VTable offset = 104
 BYVAL hBody AS DWORD
 , BYREF pszSubType AS ASCIIZ
 , BYREF phMultipart AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetBodyOffsets ( ' VTable offset = 108
 BYVAL hBody AS DWORD
 , BYREF pOffsets AS BODYOFFSETS
 ) AS LONG
 ' =====================================================================================
 METHOD GetCharset ( ' VTable offset = 112
 BYREF phCharset AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetCharset ( ' VTable offset = 116
 BYVAL hCharset AS DWORD
 , BYVAL applytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsBodyType ( ' VTable offset = 120
 BYVAL hBody AS DWORD
 , BYVAL bodytype AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsContentType ( ' VTable offset = 124
 BYVAL hBody AS DWORD
 , BYREF pszPriType AS ASCIIZ
 , BYREF pszSubType AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryBodyProp ( ' VTable offset = 128
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetBodyProp ( ' VTable offset = 132
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetBodyProp ( ' VTable offset = 136
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteBodyProp ( ' VTable offset = 140
 BYVAL hBody AS DWORD
 , BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetOption ( ' VTable offset = 144
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD GetOption ( ' VTable offset = 148
 BYVAL oid AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeMessage methods
 ' =====================================================================================
 METHOD CreateWebPage ( ' VTable offset = 152
 BYVAL pRootStm AS IStream
 , BYREF pOptions AS WEBPAGEOPTIONS
 , BYVAL pCallback AS IMimeMessageCallback
 , BYREF ppMoniker AS IMoniker
 ) AS LONG
 ' =====================================================================================
 METHOD GetProp ( ' VTable offset = 156
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetProp ( ' VTable offset = 160
 BYREF pszName AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteProp ( ' VTable offset = 164
 BYREF pszName AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD QueryProp ( ' VTable offset = 168
 BYREF pszName AS ASCIIZ
 , BYREF pszCriteria AS ASCIIZ
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD GetTextBody ( ' VTable offset = 172
 BYVAL dwTxtType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYREF ppStream AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetTextBody ( ' VTable offset = 176
 BYVAL dwTxtType AS DWORD
 , BYVAL ietEncoding AS LONG
 , BYVAL hAlternative AS DWORD
 , BYVAL pStream AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachObject ( ' VTable offset = 180
 BYREF riid AS GUID
 , BYVAL pvObject AS IUnknown
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachFile ( ' VTable offset = 184
 BYREF pszFilePath AS ASCIIZ
 , BYVAL pstmFile AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachURL ( ' VTable offset = 188
 BYREF pszBase AS ASCIIZ
 , BYREF pszURL AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 , BYVAL pstmURL AS IStream
 , BYREF ppszCIDURL AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAttachments ( ' VTable offset = 192
 BYREF pcAttach AS DWORD
 , BYREF pprghAttach AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressTable ( ' VTable offset = 196
 BYREF ppTable AS IMimeAddressTable
 ) AS LONG
 ' =====================================================================================
 METHOD GetSender ( ' VTable offset = 200
 BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressTypes ( ' VTable offset = 204
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressFormat ( ' VTable offset = 208
 BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppszFormat AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumAddressTypes ( ' VTable offset = 212
 BYVAL dwAdrTypes AS DWORD
 , BYVAL dwProps AS DWORD
 , BYREF ppEnum AS IMimeEnumAddressTypes
 ) AS LONG
 ' =====================================================================================
 METHOD SplitMessage ( ' VTable offset = 216
 BYVAL cbMaxPart AS DWORD
 , BYREF ppParts AS IMimeMessageParts
 ) AS LONG
 ' =====================================================================================
 METHOD GetRootMoniker ( ' VTable offset = 220
 BYREF ppMoniker AS IMoniker
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeMessageW Methods
 ' =====================================================================================
 METHOD GetPropW ( ' VTable offset = 224
 BYREF pwszName AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetPropW ( ' VTable offset = 228
 BYREF pwszName AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF pValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD DeletePropW ( ' VTable offset = 232
 BYREF pwszName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryPropW ( ' VTable offset = 236
 BYREF pwszName AS DWORD
 , BYREF pwszCriteria AS DWORD
 , BYVAL fSubString AS BYTE
 , BYVAL fCaseSensitive AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD AttachFileW ( ' VTable offset = 240
 BYREF pwszFilePath AS DWORD
 , BYVAL pstmFile AS IStream
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AttachURLW ( ' VTable offset = 244
 BYREF pwszBase AS DWORD
 , BYREF pwszURL AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL pstmURL AS IStream
 , BYREF ppwszCIDURL AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAddressFormatW ( ' VTable offset = 248
 BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppwszFormat AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResolveURLW ( ' VTable offset = 252
 BYVAL hRelated AS DWORD
 , BYREF pwszBase AS DWORD
 , BYREF pwszURL AS DWORD
 , BYREF dwFlags AS DWORD
 , BYREF phBody AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeMessageW_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeMessageCallback
' IID = {761AA641-7BDA-11D1-8AA9-00C04FB951F3}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeMessageCallback_INTERFACE_DEFINED)
 %IMimeMessageCallback_INTERFACE_DEFINED = 1
INTERFACE IMimeMessageCallback $IID_IMimeMessageCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnWebPageSplitter ( ' VTable offset = 12
 BYVAL cInlined AS DWORD
 , BYVAL ppStream AS IStream
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeMessageCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IPersistMime
' IID = {DE4AD8DA-555F-11D1-8DD0-00C04FB951F9}
' Inherited interface = IPersist
' ########################################################################################
#IF NOT %DEF(%IPersistMime_INTERFACE_DEFINED)
 %IPersistMime_INTERFACE_DEFINED = 1
%EQUATE `PMS_HTML = &H00000001
%EQUATE `PMS_TEXT = &H00000002
INTERFACE IPersistMime $IID_IPersistMime
 INHERIT IUnknown
 ' =====================================================================================
 ' IPersist methods
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IPersistMime methods
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 16
 BYVAL pMsg AS IMimeMessage
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 20
 BYVAL pMsg AS IMimeMessage
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPersistMime_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeMessageParts
' IID = {C558834F-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeMessageParts_INTERFACE_DEFINED)
 %IMimeMessageParts_INTERFACE_DEFINED = 1
INTERFACE IMimeMessageParts $IID_IMimeMessageParts
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CombineParts ( ' VTable offset = 12
 BYREF ppMessage AS IMimeMessage
 ) AS LONG
 ' =====================================================================================
 METHOD AddPart ( ' VTable offset = 16
 BYVAL pMessage AS IMimeMessage
 ) AS LONG
 ' =====================================================================================
 METHOD SetMaxParts ( ' VTable offset = 20
 BYVAL cParts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CountParts ( ' VTable offset = 24
 BYREF pcParts AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnumParts ( ' VTable offset = 28
 BYREF ppEnum AS IMimeEnumMessageParts
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeMessageParts_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeEnumHeaderRows
' IID = {C558834D-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeEnumHeaderRows_INTERFACE_DEFINED)
 %IMimeEnumHeaderRows_INTERFACE_DEFINED = 1
' // Size = 20 bytes
TYPE ENUMHEADERROW DWORD
 hRow AS DWORD ' HHEADERROW
 pszHeader AS ASCIIZ PTR
 pszData AS ASCIIZ PTR
 cchData AS DWORD ' ULONG
 dwReserved AS DWORD ' DWORD_PTR
END TYPE
INTERFACE IMimeEnumHeaderRows $IID_IMimeEnumHeaderRows
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL cFetch AS DWORD
 , BYREF prgRow AS ENUMHEADERROW
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL cItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppEnum AS IMimeEnumHeaderRows
 ) AS LONG
 ' =====================================================================================
 METHOD Count ( ' VTable offset = 28
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeEnumHeaderRows_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeEnumProperties
' IID = {FD853CEE-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeEnumProperties_INTERFACE_DEFINED)
 %IMimeEnumProperties_INTERFACE_DEFINED = 1
' // Size = 12 bytes
TYPE ENUMPROPERTY DWORD
 pszName AS ASCIIZ PTR
 hRow AS DWORD ' HHEADERROW
 dwPropId AS DWORD
END TYPE
INTERFACE IMimeEnumProperties $IID_IMimeEnumProperties
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL cFetch AS DWORD
 , BYREF prgProp AS ENUMPROPERTY
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL cItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppEnum AS IMimeEnumProperties
 ) AS LONG
 ' =====================================================================================
 METHOD Count ( ' VTable offset = 28
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeEnumProperties_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeEnumAddressTypes
' IID = {C5588354-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeEnumAddressTypes_INTERFACE_DEFINED)
 %IMimeEnumAddressTypes_INTERFACE_DEFINED = 1
INTERFACE IMimeEnumAddressTypes $IID_IMimeEnumAddressTypes
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL cFetch AS DWORD
 , BYREF prgAdr AS ADDRESSPROPS
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL cItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppEnum AS IMimeEnumAddressTypes
 ) AS LONG
 ' =====================================================================================
 METHOD Count ( ' VTable offset = 28
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeEnumAddressTypes_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeEnumMessageParts
' IID = {C5588350-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeEnumMessageParts_INTERFACE_DEFINED)
 %IMimeEnumMessageParts_INTERFACE_DEFINED = 1
INTERFACE IMimeEnumMessageParts $IID_IMimeEnumMessageParts
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 12
 BYVAL cFetch AS DWORD
 , BYREF prgpMessage AS IMimeMessage
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Skip ( ' VTable offset = 16
 BYVAL cItems AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 24
 BYREF ppEnum AS IMimeEnumMessageParts
 ) AS LONG
 ' =====================================================================================
 METHOD Count ( ' VTable offset = 28
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeEnumMessageParts_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IHashTable
' IID = {64577981-86D7-11D1-BDFC-00C04FA31009}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IHashTable_INTERFACE_DEFINED)
 %IHashTable_INTERFACE_DEFINED = 1
%EQUATE `HF_NO_DUPLICATES = &H1
INTERFACE IHashTable $IID_IHashTable
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Init ( ' VTable offset = 12
 BYVAL dwSize AS DWORD
 , BYVAL fDupeKeys AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Insert ( ' VTable offset = 16
 BYREF psz AS ASCIIZ
 , BYVAL pv AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Replace ( ' VTable offset = 20
 BYREF psz AS ASCIIZ
 , BYVAL pv AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Find ( ' VTable offset = 24
 BYREF psz AS ASCIIZ
 , BYVAL fRemove AS LONG
 , BYREF ppv AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 32
 BYVAL cFetch AS DWORD
 , BYREF prgpv AS DWORD
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IHashTable_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeAllocator
' IID = {C5588351-7F86-11D0-8252-00C04FD85AB4}
' Inherited interface = IMalloc
' ########################################################################################
#IF NOT %DEF(%IMimeAllocator_INTERFACE_DEFINED)
 %IMimeAllocator_INTERFACE_DEFINED = 1
INTERFACE IMimeAllocator $IID_IMimeAllocator
 INHERIT IUnknown
 ' =====================================================================================
 ' IMalloc methods
 ' =====================================================================================
 METHOD Alloc ( ' VTable offset = 12
 BYVAL cb AS DWORD
 ) AS DWORD ' void *
 ' =====================================================================================
 METHOD Realloc ( ' VTable offset = 16
 BYVAL pv AS DWORD
 , BYVAL cb AS DWORD
 ) AS DWORD ' void *
 ' =====================================================================================
 METHOD Free ( ' VTable offset = 20
 BYVAL pv AS DWORD
 ) ' void
 ' =====================================================================================
 METHOD GetSize ( ' VTable offset = 24
 BYVAL pv AS DWORD
 ) AS DWORD ' ULONG
 ' =====================================================================================
 METHOD DidAlloc ( ' VTable offset = 28
 BYVAL pv AS DWORD
 ) AS LONG ' int
 ' =====================================================================================
 METHOD HeapMinimize ( ' VTable offset = 32
 ) ' void
 ' =====================================================================================
 ' =====================================================================================
 ' IMimeAllocator methods
 ' =====================================================================================
 METHOD FreeParamInfoArray ( ' VTable offset = 36
 BYVAL cParams AS DWORD
 , BYREF prgParam AS MIMEPARAMINFO
 , BYVAL fFreeArray AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD FreeAddressList ( ' VTable offset = 40
 BYREF pList AS ADDRESSLIST
 ) AS LONG
 ' =====================================================================================
 METHOD FreeAddressProps ( ' VTable offset = 44
 BYREF pAddress AS ADDRESSPROPS
 ) AS LONG
 ' =====================================================================================
 METHOD ReleaseObjects ( ' VTable offset = 48
 BYVAL cObjects AS DWORD
 , BYREF prgpUnknown AS IUnknown
 , BYVAL fFreeArray AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD FreeEnumHeaderRowArray ( ' VTable offset = 52
 BYVAL cRows AS DWORD
 , BYREF prgRow AS ENUMHEADERROW
 , BYVAL fFreeArray AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD FreeEnumPropertyArray ( ' VTable offset = 56
 BYVAL cProps AS DWORD
 , BYREF prgProp AS ENUMPROPERTY
 , BYVAL fFreeArray AS BYTE
 ) AS LONG
 ' =====================================================================================
 METHOD FreeThumbprint ( ' VTable offset = 60
 BYREF pthumbprint AS BLOB
 ) AS LONG
 ' =====================================================================================
 METHOD PropVariantClear ( ' VTable offset = 64
 BYREF pProp AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeAllocator_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeObjResolver
' IID = {FECEAFFD-C441-11D1-960E-00C04FBD7C09}
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeObjResolver_INTERFACE_DEFINED)
 %IMimeObjResolver_INTERFACE_DEFINED = 1
INTERFACE IMimeObjResolver $IID_IMimeObjResolver
 INHERIT IUnknown
 ' =====================================================================================
 METHOD MimeOleObjectFromMoniker ( ' VTable offset = 12
 BYVAL bindf AS LONG
 , BYVAL pmkOriginal AS IMoniker
 , BYVAL pBindCtx AS IBindCtx
 , BYREF riid AS GUID
 , BYREF ppvObject AS IUnknown
 , BYREF ppmkNew AS IMoniker
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeObjResolver_INTERFACE_DEFINED__ */
#ENDIF ' /* __MIMEOLE_LIBRARY_DEFINED__ */
' FNTSYSTYPE enum
%EQUATE `FNT_SYS_ICON = 0
%EQUATE `FNT_SYS_ICON_BOLD = %FNT_SYS_ICON + 1
%EQUATE `FNT_SYS_MENU = %FNT_SYS_ICON_BOLD + 1
%EQUATE `FNT_SYS_ICON_STRIKEOUT = %FNT_SYS_MENU + 1
%EQUATE `FNT_SYS_LAST = %FNT_SYS_ICON_STRIKEOUT + 1
' ########################################################################################
' Interface name = IFontCache
' IID = B0D17FC2-7BC4-11d1-BDFA-00C04FA31009
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IFontCache_INTERFACE_DEFINED)
 %IFontCache_INTERFACE_DEFINED = 1
INTERFACE IFontCache $IID_IFontCache
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Init ( ' VTable offset = 12
 BYVAL hkey AS DWORD
 , BYREF pszIntlKey AS ASCIIZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFont ( ' VTable offset = 16
 BYVAL fntType AS LONG
 , BYVAL hCharset AS DWORD
 , BYREF phFont AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnOptionChange ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD GetJP_ISOControl ( ' VTable offset = 24
 BYREF pfUseSIO AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IFontCache_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IFontCacheNotify
' IID = B0D17FC5-7BC4-11d1-BDFA-00C04FA31009
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IFontCacheNotify_INTERFACE_DEFINED)
 %IFontCacheNotify_INTERFACE_DEFINED = 1
INTERFACE IFontCacheNotify $IID_IFontCacheNotify
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnPreFontChange ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD OnPostFontChange ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IFontCacheNotify_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeEditTag
' IID = 70183210-7b36-11d2-8c12-00c04fa31009
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeEditTag_INTERFACE_DEFINED)
 %IMimeEditTag_INTERFACE_DEFINED = 1
INTERFACE IMimeEditTag $IID_IMimeEditTag
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSrc ( ' VTable offset = 12
 BYREF pbstr AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD SetSrc ( ' VTable offset = 16
 BYVAL bstr AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetDest ( ' VTable offset = 20
 BYREF pbstr AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD SetDest ( ' VTable offset = 24
 BYVAL bstr AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD OnPreSave ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD OnPostSave ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 METHOD CanPackage ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD IsValidMimeType ( ' VTable offset = 40
 BYREF pszTypeW AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeEditTag_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeEditTagCollection
' IID = d09ee528-7b38-11d2-8c12-00c04fa31009
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeEditTagCollection_INTERFACE_DEFINED)
 %IMimeEditTagCollection_INTERFACE_DEFINED = 1
INTERFACE IMimeEditTagCollection $IID_IMimeEditTagCollection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Init ( ' VTable offset = 12
 BYVAL pHtmlDoc AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Next ( ' VTable offset = 16
 BYVAL cFetch AS DWORD
 , BYREF ppTag AS IMimeEditTag
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Reset ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD Count ( ' VTable offset = 24
 BYREF pcItems AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeEditTagCollection_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IMimeSecurityCallback
' IID = BA715AE0-A740-11D2-8B22-0080C76B34C6
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeSecurityCallback_INTERFACE_DEFINED)
 %IMimeSecurityCallback_INTERFACE_DEFINED = 1
%EQUATE `CMS_RECIPIENT_INFO_TYPE_UNKNOWN = 0
%EQUATE `CMS_RECIPIENT_INFO_TYPE_KEYTRANS = 1
%EQUATE `CMS_RECIPIENT_INFO_TYPE_KEYAGREE = 2
%EQUATE `CMS_RECIPIENT_INFO_TYPE_MAIL_LIST = 3
%EQUATE `CMS_RECIPIENT_INFO_PUBKEY_CERTIFICATE = 0
%EQUATE `CMS_RECIPIENT_INFO_PUBKEY_KEYTRANS = 1
%EQUATE `CMS_RECIPIENT_INFO_PUBKEY_PROVIDER = 2
%EQUATE `CMS_RECIPIENT_INFO_PUBKEY_EPHEMERAL_KEYAGREE = 3
%EQUATE `CMS_RECIPIENT_INFO_PUBKEY_STATIC_KEYAGREE = 4
%EQUATE `CMS_RECIPIENT_INFO_KEYID_CERTIFICATE = 0
%EQUATE `CMS_RECIPIENT_INFO_KEYID_ISSUERSERIAL = 1
%EQUATE `CMS_RECIPIENT_INFO_KEYID_KEY_ID = 2
'typedef struct tagCMS_RECIPIENT_INFO
' {
' DWORD dwRecipientType;
' PCCERT_CONTEXT pccert;
' CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
' void *pvKeyEncryptionAuxInfo;
' DWORD cbKeyEncryptionAuxInfo;
' CRYPT_ALGORITHM_IDENTIFIER KeyWrapAlgorithm;
' void *pvKeyWrapAuxInfo;
' DWORD cbKeyWrapAuxInfo;
' DWORD dwU1;
' union
' {
' CRYPT_BIT_BLOB SubjectPublicKey;
' struct
' {
' HCRYPTPROV hprov;
' HCRYPTKEY hkey;
' } 	u2;
' struct
' {
' CRYPT_DATA_BLOB UserKeyingMaterial;
' CRYPT_ALGORITHM_IDENTIFIER EphemeralAlgorithm;
' CRYPT_BIT_BLOB SubjectPublicKey;
' } 	u3;
' struct
' {
' CRYPT_DATA_BLOB UserKeyingMaterial;
' HCRYPTPROV hprov;
' DWORD dwKeySpec;
' CERT_ID senderCertId;
' CRYPT_BIT_BLOB SubjectPublicKey;
' } 	u4;
' } 	u1;
' DWORD dwU3;
' union
' {
' CERT_ISSUER_SERIAL_NUMBER IssuerSerial;
' CRYPT_DATA_BLOB KeyId;
' } 	u3;
' FILETIME filetime;
' PCRYPT_ATTRIBUTE_TYPE_VALUE pOtherAttr;
' } 	CMS_RECIPIENT_INFO;
'typedef struct tagCMS_RECIPIENT_INFO *PCMS_RECIPIENT_INFO;
'typedef union tagCMS_CTRL_DECRYPT_INFO
' {
' CMSG_CTRL_KEY_TRANS_DECRYPT_PARA trans;
' CMSG_CTRL_KEY_AGREE_DECRYPT_PARA agree;
' CMSG_CTRL_MAIL_LIST_DECRYPT_PARA maillist;
' } 	CMS_CTRL_DECRYPT_INFO;
'typedef union tagCMS_CTRL_DECRYPT_INFO *PCMS_CTRL_DECYRPT_INFO;
TYPE CMS_RECIPIENT_INFO_t1_STRUCT DWORD
 hprov AS DWORD ' HCRYPTPROV
 hkey AS DWORD ' HCRYPTKEY
END TYPE
TYPE CMS_RECIPIENT_INFO_t2_STRUCT DWORD
 UserKeyingMaterial AS CRYPT_DATA_BLOB
 EphemeralAlgorithm AS CRYPT_ALGORITHM_IDENTIFIER
 SubjectPublicKey AS CRYPT_BIT_BLOB
END TYPE
TYPE CMS_RECIPIENT_INFO_t3_STRUCT DWORD
 UserKeyingMaterial AS CRYPT_DATA_BLOB
 hprov AS DWORD ' HCRYPTPROV
 dwKeySpec AS DWORD
 senderCertId AS CERT_ID
 SubjectPublicKey AS CRYPT_BIT_BLOB
END TYPE
UNION CMS_RECIPIENT_INFO_u1_UNION DWORD
 SubjectPublicKey AS CRYPT_BIT_BLOB
 t1 AS CMS_RECIPIENT_INFO_t1_STRUCT
 t2 AS CMS_RECIPIENT_INFO_t2_STRUCT
 t3 AS CMS_RECIPIENT_INFO_t3_STRUCT
END UNION
UNION CMS_RECIPIENT_INFO_u2_UNION DWORD
 IssuerSerial AS CERT_ISSUER_SERIAL_NUMBER
 KeyId AS CRYPT_DATA_BLOB
END UNION
' // Size = 132 bytes
TYPE CMS_RECIPIENT_INFO DWORD
 dwRecipientType AS DWORD
 pccert AS CERT_CONTEXT PTR ' PCCERT_CONTEXT
 KeyEncryptionAlgorithm AS CRYPT_ALGORITHM_IDENTIFIER
 pvKeyEncryptionAuxInfo AS DWORD ' void *
 cbKeyEncryptionAuxInfo AS DWORD
 KeyWrapAlgorithm AS CRYPT_ALGORITHM_IDENTIFIER
 pvKeyWrapAuxInfo AS DWORD ' void *
 cbKeyWrapAuxInfo AS DWORD
 dwU1 AS DWORD
 CMS_RECIPIENT_INFO_u1_UNION
 dwU3 AS DWORD
 CMS_RECIPIENT_INFO_u2_UNION
 filetime AS FILETIME
 pOtherAttr AS CRYPT_ATTRIBUTE_TYPE_VALUE PTR ' PCRYPT_ATTRIBUTE_TYPE_VALUE
END TYPE
' // Size = 36 bytes
UNION CMS_CTRL_DECRYPT_INFO DWORD
 trans AS CMSG_CTRL_KEY_TRANS_DECRYPT_PARA
 agree AS CMSG_CTRL_KEY_AGREE_DECRYPT_PARA
 maillist AS CMSG_CTRL_MAIL_LIST_DECRYPT_PARA
END UNION
$IID_IMimeSecurityCallback = GUID$("{BA715AE0-A740-11D2-8B22-0080C76B34C6}")
INTERFACE IMimeSecurityCallback $IID_IMimeSecurityCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD FindKeyFor ( ' VTable offset = 12
 BYVAL hwnd AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwRecipientIndex AS DWORD
 , BYREF pRecipInfo AS CMSG_CMS_RECIPIENT_INFO
 , BYREF pdwCtrl AS DWORD
 , BYREF pDecryptInfo AS CMS_CTRL_DECRYPT_INFO
 , BYREF ppccert AS CERT_CONTEXT
 ) AS LONG
 ' =====================================================================================
 METHOD GetParameters ( ' VTable offset = 16
 BYREF pccert AS CERT_CONTEXT
 , BYVAL hstoreMsg AS DWORD
 , BYREF pcbParams AS DWORD
 , BYREF pbParams AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeSecurityCallback_INTERFACE_DEFINED__ */
'// {80830b40-962c-11d2-8af6-0080c76b34c6}
'DEFINE_GUID(IID_IMimeSecurity2, 0x80830b40, 0x962c, 0x11d2, 0x8a, 0xf6, 0x00, 0x80, 0xc7, 0x6b, 0x34, 0xc6);
$IID_IMimeSecurity2 = GUID$("{80830b40-962c-11d2-8af6-0080c76b34c6}")
%EQUATE `SMIME_RECIPIENT_REPLACE_ALL = &H00000001
%EQUATE `SMIME_ATTRIBUTE_SET_SIGNED = 0
%EQUATE `SMIME_ATTRIBUTE_SET_UNSIGNED = 1
%EQUATE `SMIME_ATTRIBUTE_SET_UNPROTECTED = 2
%EQUATE `SMIME_ATTR_REPLACE_EXISTING = 0
%EQUATE `SMIME_ATTR_ADD_TO_EXISTING = 1
%EQUATE `SMIME_ATTR_ADD_IF_NOT_EXISTS = 2
%EQUATE `SMIME_SUPPORT_LABELS = &H00000001
%EQUATE `SMIME_SUPPORT_RECEIPTS = &H00000002
%EQUATE `SMIME_SUPPORT_MAILLIST = &H00000004
%EQUATE `SMIME_SUPPORT_KEY_AGREE = &H00000008
' ########################################################################################
' Interface name = IMimeSecurity2
' IID = 80830B40-962C-11D2-8AF6-0080C76B34C6
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IMimeSecurity2_INTERFACE_DEFINED)
 %IMimeSecurity2_INTERFACE_DEFINED = 1
$IID_IMimeSecurity2 = GUID$("{80830B40-962C-11D2-8AF6-0080C76B34C6}")
INTERFACE IMimeSecurity2 $IID_IMimeSecurity2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Encode ( ' VTable offset = 12
 BYVAL hwnd AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Decode ( ' VTable offset = 16
 BYVAL hwnd AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL pCallback AS IMimeSecurityCallback
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecipientCount ( ' VTable offset = 20
 BYVAL dwFlags AS DWORD
 , BYREF pdwRecipCount AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AddRecipient ( ' VTable offset = 24
 BYVAL dwFlags AS DWORD
 , BYVAL cRecipData AS DWORD
 , BYREF recipData AS CMS_RECIPIENT_INFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetRecipient ( ' VTable offset = 28
 BYVAL dwFlags AS DWORD
 , BYVAL iRecipient AS DWORD
 , BYVAL cRecipients AS DWORD
 , BYREF pRecipData AS CMS_RECIPIENT_INFO
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteRecipient ( ' VTable offset = 32
 BYVAL dwFlags AS DWORD
 , BYVAL iRecipient AS DWORD
 , BYVAL cRecipients AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAttribute ( ' VTable offset = 36
 BYVAL dwFlags AS DWORD
 , BYVAL iSigner AS DWORD
 , BYVAL iAttributeSet AS DWORD
 , BYVAL iInstance AS DWORD
 , BYREF pszObjectId AS ASCIIZ
 , BYREF ppattr AS CRYPT_ATTRIBUTE
 ) AS LONG
 ' =====================================================================================
 METHOD SetAttribute ( ' VTable offset = 40
 BYVAL dwFlags AS DWORD
 , BYVAL iSigner AS DWORD
 , BYVAL iAttributeSet AS DWORD
 , BYREF pattr AS CRYPT_ATTRIBUTE
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteAttribute ( ' VTable offset = 44
 BYVAL dwFlags AS DWORD
 , BYVAL iSigner AS DWORD
 , BYVAL iAttributeSet AS DWORD
 , BYVAL iInstance AS DWORD
 , BYREF pszObjId AS ASCIIZ
 ) AS LONG
 ' =====================================================================================
 METHOD CreateReceipt ( ' VTable offset = 48
 BYVAL dwFlags AS DWORD
 , BYVAL cbFromNames AS DWORD
 , BYVAL pbFromNames AS BYTE PTR
 , BYVAL cSignerCertificates AS DWORD
 , BYREF rgSignerCertificates AS CERT_CONTEXT
 , BYREF ppMimeMessageReceipt AS IMimeMessage
 ) AS LONG
 ' =====================================================================================
 METHOD GetReceiptSendersList ( ' VTable offset = 52
 BYVAL dwFlags AS DWORD
 , BYREF pcSendersList AS DWORD
 , BYREF rgSendersList AS CERT_NAME_BLOB
 ) AS LONG
 ' =====================================================================================
 METHOD VerifyReceipt ( ' VTable offset = 56
 BYVAL dwFlags AS DWORD
 , BYVAL pMimeMessageReceipt AS IMimeMessage
 ) AS LONG
 ' =====================================================================================
 METHOD CapabilitiesSupported ( ' VTable offset = 60
 BYREF pdwFeatures AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMimeSecurity2_INTERFACE_DEFINED__ */
%EQUATE `NGH_DEFAULT = &H00000000 ' // Display the default newsgroup view for a product type
%EQUATE `NGH_FULLSEARCH = &H00000001 ' // Execute the query against available newsgroups, and display results.
' ########################################################################################
' Interface name = INewsgroupHelp
' IID = 0887C54F-4F42-4937-81DA-BC9C97494627
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%INewsgroupHelp_INTERFACE_DEFINED)
 %INewsgroupHelp_INTERFACE_DEFINED = 1
INTERFACE INewsgroupHelp $IID_INewsgroupHelp
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetUrl ( ' VTable offset = 12
 BYREF pwszProductGroup AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYREF pwszSearchText AS WSTRINGZ
 , BYREF pLangID AS WORD
 , BYREF ppwszUrl AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __INewsgroupHelp_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IHashTableW
' IID = 71D6B38C-7A15-42C6-AF84-B2A5DC242CEB
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IHashTableW_INTERFACE_DEFINED)
 %IHashTableW_INTERFACE_DEFINED = 1
INTERFACE IHashTableW $IID_IHashTableW
 INHERIT IUnknown
 ' =====================================================================================
 METHOD InsertW ( ' VTable offset = 12
 BYREF pwsz AS WSTRINGZ
 , BYVAL pv AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReplaceW ( ' VTable offset = 16
 BYREF pwsz AS WSTRINGZ
 , BYVAL pv AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindW ( ' VTable offset = 20
 BYREF pwsz AS WSTRINGZ
 , BYVAL fRemove AS LONG
 , BYREF ppv AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IHashTableW_INTERFACE_DEFINED__ */
'#if (_WIN32_OE >= 0x0500)
'// --------------------------------------------------------------------------------
'// CMDSETID_MimeEdit commands
'// --------------------------------------------------------------------------------
%EQUATE `MECMDID_DIRTY = 1
%EQUATE `MECMDID_EMPTY = 2
%EQUATE `MECMDID_STYLE = 3
%EQUATE `MECMDID_EDITHTML = 4
%EQUATE `MECMDID_DOWNGRADEPLAINTEXT = 5
%EQUATE `MECMDID_SETTEXT = 6
%EQUATE `MECMDID_ROT13 = 7
%EQUATE `MECMDID_INSERTTEXTFILE = 8
%EQUATE `MECMDID_VIEWSOURCE = 9
%EQUATE `MECMDID_FORMATFONT = 10
%EQUATE `MECMDID_PREVIEWFORMAT = 11
%EQUATE `MECMDID_EDITMODE = 12
%EQUATE `MECMDID_CHARSET = 13
%EQUATE `MECMDID_SAVEASSTATIONERY = 14
%EQUATE `MECMDID_BACKGROUNDIMAGE = 15
%EQUATE `MECMDID_INSERTTEXT = 16
%EQUATE `MECMDID_INSERTHTML = 17
%EQUATE `MECMDID_BACKGROUNDCOLOR = 18
%EQUATE `MECMDID_APPLYDOCUMENT = 19
%EQUATE `MECMDID_SAVEATTACHMENTS = 20
%EQUATE `MECMDID_BACKGROUNDSOUND = 21
%EQUATE `MECMDID_INSERTBGSOUND = 22
%EQUATE `MECMDID_SHOWSOURCETABS = 23
%EQUATE `MECMDID_SETSOURCETAB = 24
%EQUATE `MECMDID_TABLINKS = 25
%EQUATE `MECMDID_FORMATPARAGRAPH = 26
%EQUATE `MECMDID_CANENCODETEXT = 27
%EQUATE `MECMDID_RELOAD_EXTERNAL_CONTENT = 28
%EQUATE `MECMDID_EXTERNAL_CONTENT_BLOCKED = 29
'// --------------------------------------------------------------------------------
'// MEO_FLAGS
'// --------------------------------------------------------------------------------
%EQUATE `MEO_FLAGS_INCLUDEMSG = &H0001
%EQUATE `MEO_FLAGS_HTML = &H0002
%EQUATE `MEO_FLAGS_AUTOINLINE = &H0004
%EQUATE `MEO_FLAGS_SLIDESHOW = &H0008
%EQUATE `MEO_FLAGS_AUTOTEXT = &H0010
%EQUATE `MEO_FLAGS_BLOCKQUOTE = &H0020
%EQUATE `MEO_FLAGS_SENDIMAGES = &H0040
%EQUATE `MEO_FLAGS_DONTSPELLCHECKQUOTED = &H0080
%EQUATE `MEO_FLAGS_SENDEXTERNALIMGSRC = &H0100
%EQUATE `MEO_FLAGS_REPLYATEND = &H0200
'// --------------------------------------------------------------------------------
'// MECMDID_VIEWSOURCE options
'// --------------------------------------------------------------------------------
%EQUATE `MECMD_VS_HTML = &H0001
%EQUATE `MECMD_VS_MESSAGE = &H0002
'// --------------------------------------------------------------------------------
'// MEST_
'// --------------------------------------------------------------------------------
%EQUATE `MEST_EDIT = 0
%EQUATE `MEST_SOURCE = 1
%EQUATE `MEST_PREVIEW = 2
%EQUATE `MEST_NEXT = 3
%EQUATE `MEST_PREVIOUS = 4
'// --------------------------------------------------------------------------------
'// MECMDID_STYLE options
'// --------------------------------------------------------------------------------
%EQUATE `MESTYLE_NOHEADER = 0
%EQUATE `MESTYLE_PREVIEW = 1
%EQUATE `MESTYLE_FORMATBAR = 2
%EQUATE `MESTYLE_MINIHEADER = 3
'// --------------------------------------------------------------------------------
'// MECMDID_HEADER_TYLE options
'// --------------------------------------------------------------------------------
%EQUATE `MEHEADER_NONE = &H00
%EQUATE `MEHEADER_NEWS = &H01
%EQUATE `MEHEADER_MAIL = &H02
%EQUATE `MEHEADER_FORCE_ENGLISH = &H04
'// --------------------------------------------------------------------------------
'// MECMDID_SIGNATURE_ENABLED options
'// --------------------------------------------------------------------------------
%EQUATE `MESIG_AUTO = &H0001
%EQUATE `MESIG_MANUAL = &H0002
'// --------------------------------------------------------------------------------
'// MECMDID_SIGNATURE_OPTIONS options
'// --------------------------------------------------------------------------------
%EQUATE `MESIGOPT_PLAIN = &H0001
%EQUATE `MESIGOPT_TOP = &H0002
%EQUATE `MESIGOPT_PREFIX = &H0004
%EQUATE `MESIGOPT_BOTTOM = &H0008
%EQUATE `MESIGOPT_HTML = &H0010
'// --------------------------------------------------------------------------------
'// MEHOSTCMDID_BORDERFLAGS options
'// --------------------------------------------------------------------------------
%EQUATE `MEBF_OUTERCLIENTEDGE = &H0001
%EQUATE `MEBF_INNERCLIENTEDGE = &H0002
%EQUATE `MEBF_FORMATBARSEP = &H0004
%EQUATE `MEBF_NOSCROLL = &H0008
'// --------------------------------------------------------------------------------
'// MEHOSTCMDID_SPELL_OPTIONS options
'// --------------------------------------------------------------------------------
%EQUATE `MESPELLOPT_IGNORENUMBER = &H0001
%EQUATE `MESPELLOPT_IGNOREUPPER = &H0002
%EQUATE `MESPELLOPT_IGNOREDBCS = &H0004
%EQUATE `MESPELLOPT_IGNOREPROTECT = &H0008
%EQUATE `MESPELLOPT_IGNOREURL = &H0010
%EQUATE `MESPELLOPT_ALWAYSSUGGEST = &H0020
%EQUATE `MESPELLOPT_CHECKONSEND = &H0040
%EQUATE `MESPELLOPT_CHECKONTYPE = &H0080
'// -------------------------------------------------------------------------------
'// MEHOSTCMDID_MESSAGE_TYPE options
'// -------------------------------------------------------------------------------
%EQUATE `MEMESSAGETYPE_NEWS = &H0001
%EQUATE `MEMESSAGETYPE_MAIL = &H0002
'// --------------------------------------------------------------------------------
'// MEHOSTCMDID_SOURCEEDIT_FLAGS options
'// --------------------------------------------------------------------------------
%EQUATE `MESRCFLAGS_COLOR = &H0001
'// --------------------------------------------------------------------------------
'// CMDSETID_MimeEditHost commands
'// --------------------------------------------------------------------------------
%EQUATE `MEHOSTCMDID_SIGNATURE_ENABLED = 1
%EQUATE `MEHOSTCMDID_SIGNATURE_OPTIONS = 2
%EQUATE `MEHOSTCMDID_SIGNATURE = 3
%EQUATE `MEHOSTCMDID_HEADER_TYPE = 4
%EQUATE `MEHOSTCMDID_ONPARSECOMPLETE = 5
%EQUATE `MEHOSTCMDID_FLAGS = 6
%EQUATE `MEHOSTCMDID_QUOTE_CHAR = 7
%EQUATE `MEHOSTCMDID_REPLY_TICK_COLOR = 8
%EQUATE `MEHOSTCMDID_COMPOSE_FONT = 9
%EQUATE `MEHOSTCMDID_ADD_TO_ADDRESSBOOK = 10
%EQUATE `MEHOSTCMDID_ADD_TO_FAVORITES = 11
%EQUATE `MEHOSTCMDID_SLIDESHOW_DELAY = 12
%EQUATE `MEHOSTCMDID_FONTCACHE = 13
%EQUATE `MEHOSTCMDID_BORDERFLAGS = 14
%EQUATE `MEHOSTCMDID_SECURITY_ZONE = 15
%EQUATE `MEHOSTCMDID_SPELL_OPTIONS = 16
%EQUATE `MEHOSTCMDID_SAVEATTACH_PATH = 17
%EQUATE `MEHOSTCMDID_SOURCEEDIT_FLAGS = 18
%EQUATE `MEHOSTCMDID_SPELL_LANGUAGE = 19
%EQUATE `MEHOSTCMDID_HTML_HELP = 20
%EQUATE `MEHOSTCMDID_UNSAFEATTACHMENTS = 21
%EQUATE `MEHOSTCMDID_IS_READ_IN_TEXT_ONLY = 22
%EQUATE `MEHOSTCMDID_QUOTE_SPACES = 23
%EQUATE `MEHOSTCMDID_BLOCK_EXTERNAL_CONTENT = 24
%EQUATE `MEHOSTCMDID_RELOAD_WITH_EXTERNAL_CONTENT = 25
%EQUATE `MEHOSTCMDID_GETCOMPOSEFONT = 26
%EQUATE `MEHOSTCMDID_RESETSETTINGS = 27
%EQUATE `MEHOSTCMDID_GETREADFONT = 28
%EQUATE `MEHOSTCMDID_MESSAGE_TYPE = 29
%EQUATE `MEHOSTCMDID_COMMUNITIES = 30
%EQUATE `MEHOSTCMDID_COMMUNITIES_SERVER = 31
%EQUATE `MEHOSTCMDID_PASSPORT_AUTHENTICATED = 32
%EQUATE `MEHOSTCMDID_COMMUNITYSITE = 33
%EQUATE `MEHOSTCMDID_PASSPORT_MANAGER = 34
%EQUATE `MEHOSTCMDID_COMMUNITY_VOTE = 35
%EQUATE `MEHOSTCMDID_PHISHING_SITE = 36
%EQUATE `MEHOSTCMDID_CHARSET = 37
%EQUATE `MEHOSTCMDID_USE_WEBPREVIEW_SECURITY = 38
'#endif //_WIN32_OE
'// --------------------------------------------------------------------------------
'// MimeOLE Exported C API Functions
'// --------------------------------------------------------------------------------
'// --------------------------------------------------------------------------------
'// Depends
'// --------------------------------------------------------------------------------
#INCLUDE ONCE "Legacy/Network/UrlMon.inc"
'// --------------------------------------------------------------------------------
'// Constants
'// --------------------------------------------------------------------------------
%EQUATE `NOFLAGS = 0
%EQUATE `CCHMAX_CID = 255
%EQUATE `CCHMAX_MID = 255
%EQUATE `CCHMAX_INTERNET_DATE = 50
%EQUATE `MECD_HTML = &H0001
%EQUATE `MECD_PLAINTEXT = &H0002
%EQUATE `MECD_ENCODEIMAGES = &H0004
%EQUATE `MECD_ENCODEFILEURLSONLY = &H0008
%EQUATE `MECD_ENCODESOUNDS = &H0010
%EQUATE `MECD_ENCODEVIDEO = &H0020
%EQUATE `MECD_ENCODEPLUGINS = &H0040
'// --------------------------------------------------------------------------------
'// Macros
'// --------------------------------------------------------------------------------
'#define MimeOleVariantInit(_pProp) \
' ZeroMemory(_pProp, sizeof(PROPVARIANT))
MACRO MimeOleVariantInit(pProp)
 ZeroMemory(pProp, SIZEOF(PROPVARIANT))
END MACRO
'// --------------------------------------------------------------------------------
'// MimeOLE API Prototypes
'// --------------------------------------------------------------------------------
%EQUATE `MIMEOLE_COMPAT_OE5 = &H00000001
%EQUATE `MIMEOLE_COMPAT_MLANG2 = &H00000002
' ========================================================================================
' Sets the MIMEOLE compatibility mode.
' ========================================================================================
DECLARE FUNCTION MimeOleSetCompatMode LIB "inetcomm.dll" ALIAS "MimeOleSetCompatMode" ( BYVAL dwMode AS QUAD ) AS LONG
' ========================================================================================
' Returns the Content-Type for the specified URL.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleContentTypeFromUrl LIB "inetcomm.dll" ALIAS "MimeOleContentTypeFromUrl" ( BYREF pszBase AS ASCIIZ , BYREF pszUrl AS ASCIIZ , BYREF ppszCntType AS ASCIIZ ) AS LONG
' ========================================================================================
' On success, supplied MHTML URL is parsed into root and body.
' ========================================================================================
DECLARE FUNCTION MimeOleParseMhtmlUrl LIB "inetcomm.dll" ALIAS "MimeOleParseMhtmlUrl" ( BYREF pszUrl AS ASCIIZ , BYREF ppszRootUrl AS ASCIIZ , BYREF ppszBodyUrl AS ASCIIZ ) AS LONG
' ========================================================================================
' Creates a new message object and loads its state from the supplied URL (on success).
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleObjectFromUrl LIB "inetcomm.dll" ALIAS "MimeOleObjectFromUrl" ( BYREF pszUrl AS ASCIIZ , BYVAL fCreate AS LONG , BYREF riid AS GUID , BYREF ppvObject AS IUnknown , BYREF ppUnkKeepAlive AS IUnknown ) AS LONG
' ========================================================================================
' Deprecated. Creates a new message object and loads its state from the supplied moniker.
' ========================================================================================
DECLARE FUNCTION MimeOleObjectFromMoniker LIB "inetcomm.dll" ALIAS "MimeOleObjectFromMoniker" ( BYVAL bindf AS LONG , BYVAL pmkOriginal AS IMoniker , BYVAL pBindCtx AS IBindCtx , BYREF riid AS GUID , BYREF ppvObject AS IUnknown , BYREF ppmkNew AS IMoniker ) AS LONG
' ========================================================================================
' On success, combines base and relative URL.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleCombineURL LIB "inetcomm.dll" ALIAS "MimeOleCombineURL" ( BYREF pszBase AS ASCIIZ , BYVAL cchBase AS QUAD , BYREF pszURL AS ASCIIZ , BYVAL cchURL AS QUAD , BYVAL fUnEscape AS LONG , BYREF ppszAbsolute AS ASCIIZ ) AS LONG
' ========================================================================================
' Returns E_FAIL.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleGetSubjectFileName LIB "inetcomm.dll" ALIAS "MimeOleGetSubjectFileName" ( BYVAL pPropertySet AS IMimePropertySet , BYREF pulPart AS QUAD , BYREF pulTotal AS QUAD , BYREF pszFileName AS ASCIIZ , BYVAL cchMax AS QUAD ) AS LONG
' ========================================================================================
' On success, creates and initializes a new Web document.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleCreateWebDocument LIB "inetcomm.dll" ALIAS "MimeOleCreateWebDocument" ( BYREF pszBase AS ASCIIZ , BYREF pszURL AS ASCIIZ , BYREF ppDocument AS IMimeWebDocument ) AS LONG
' ========================================================================================
' Returns handle to the first body in the message tree that has the related content type.
' Also returns whether other instances were found. If related content type is not found,
' method argument specifies whether it should be created.
' ========================================================================================
DECLARE FUNCTION MimeOleGetRelatedSection LIB "inetcomm.dll" ALIAS "MimeOleGetRelatedSection" ( BYVAL pTree AS IMimeMessageTree , BYVAL fCreate AS BYTE , BYREF phRelated AS QUAD , BYREF pfMultiple AS BYTE ) AS LONG
' ========================================================================================
' Returns a handle to the first body in the message tree that has the mixed content type.
' Also returns whether other instances were found. If mixed content type is not found,
' method argument specifies whether it should be created.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleGetMixedSection LIB "inetcomm.dll" ALIAS "MimeOleGetMixedSection" ( BYVAL pTree AS IMimeMessageTree , BYVAL fCreate AS BYTE , BYVAL phMixed AS QUAD , BYREF pfMultiple AS BYTE ) AS LONG
' ========================================================================================
' Returns handle to the first body in the message tree that has the alternative content
' type. Also returns whether other instances were found.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleGetAlternativeSection LIB "inetcomm.dll" ALIAS "MimeOleGetAlternativeSection" ( BYVAL pTree AS IMimeMessageTree , BYVAL phAlternative AS QUAD , BYREF pfMultiple AS BYTE ) AS LONG
' ========================================================================================
' Creates a content ID as a string.
' ========================================================================================
DECLARE FUNCTION MimeOleGenerateCID LIB "inetcomm.dll" ALIAS "MimeOleGenerateCID" ( BYREF pszCID AS ASCIIZ , BYVAL cchMax AS QUAD , BYVAL fAbsolute AS BYTE ) AS LONG
' ========================================================================================
' Creates a message ID as a string.
' ========================================================================================
DECLARE FUNCTION MimeOleGenerateMID LIB "inetcomm.dll" ALIAS "MimeOleGenerateMID" ( BYREF pszMID AS ASCIIZ , BYVAL cchMax AS QUAD , BYVAL fAbsolute AS BYTE ) AS LONG
' ========================================================================================
' Creates a new byte stream.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateByteStream LIB "inetcomm.dll" ALIAS "MimeOleCreateByteStream" ( BYREF ppStream AS IStream ) AS LONG
' ========================================================================================
' Returns an interface used to manipulate MimeOLE's global property schema.
' MIMEOLEAPI MimeOleGetPropertySchema(
' /* out */ IMimePropertySchema **ppSchema);
' ========================================================================================
DECLARE FUNCTION MimeOleGetPropertySchema LIB "inetcomm.dll" ALIAS "MimeOleGetPropertySchema" ( BYREF ppSchema AS IMimePropertySchema ) AS LONG
' ========================================================================================
' Queries a specified string for a qualified match.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleQueryString LIB "inetcomm.dll" ALIAS "MimeOleQueryString" ( BYREF pszSearchMe AS ASCIIZ , BYREF pszCriteria AS ASCIIZ , BYVAL fSubString AS BYTE , BYVAL fCaseSensitive AS BYTE ) AS LONG
' ========================================================================================
' Gets the value of the specified property.
' ========================================================================================
DECLARE FUNCTION MimeOleGetPropA LIB "inetcomm.dll" ALIAS "MimeOleGetPropA" ( BYVAL pPropertyset AS IMimePropertySet , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF ppszData AS ASCIIZ ) AS LONG
' ========================================================================================
' Gets the Unicode value of the specified property.
' ========================================================================================
DECLARE FUNCTION MimeOleGetPropW LIB "inetcomm.dll" ALIAS "MimeOleGetPropW" ( BYVAL pPropertyset AS IMimePropertySet , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF ppszData AS WSTRINGZ ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleGetProp = MimeOleGetPropW
#ELSE
 MACRO MimeOleGetProp = MimeOleGetPropA
#ENDIF
' ========================================================================================
' Sets the value of the specified property.
' ========================================================================================
DECLARE FUNCTION MimeOleSetPropA LIB "inetcomm.dll" ALIAS "MimeOleSetPropA" ( BYVAL pPropertyset AS IMimePropertySet , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF pszData AS ASCIIZ ) AS LONG
' ========================================================================================
' Sets the Unicode value of the specified property.
' ========================================================================================
DECLARE FUNCTION MimeOleSetPropW LIB "inetcomm.dll" ALIAS "MimeOleSetPropW" ( BYVAL pPropertyset AS IMimePropertySet , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF pszData AS WSTRINGZ ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleSetProp = MimeOleSetPropW
#ELSE
 MACRO MimeOleSetProp = MimeOleSetPropA
#ENDIF
' ========================================================================================
' Gets the value of a property for a specified body.
' ========================================================================================
DECLARE FUNCTION MimeOleGetBodyPropA LIB "inetcomm.dll" ALIAS "MimeOleGetBodyPropA" ( BYVAL pTree AS IMimeMessageTree , BYVAL hBody AS QUAD , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF ppszData AS ASCIIZ ) AS LONG
' ========================================================================================
' Gets the value of a property for a specified body as Unicode.
' ========================================================================================
DECLARE FUNCTION MimeOleGetBodyPropW LIB "inetcomm.dll" ALIAS "MimeOleGetBodyPropW" ( BYVAL pTree AS IMimeMessageTree , BYVAL hBody AS QUAD , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF ppszData AS WSTRINGZ ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleGetBodyProp = MimeOleGetBodyPropW
#ELSE
 MACRO MimeOleGetBodyProp = MimeOleGetBodyPropA
#ENDIF
' ========================================================================================
' Sets the value of a property for a specified body.
' ========================================================================================
DECLARE FUNCTION MimeOleSetBodyPropA LIB "inetcomm.dll" ALIAS "MimeOleSetBodyPropA" ( BYVAL pTree AS IMimeMessageTree , BYVAL hBody AS QUAD , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF pszData AS ASCIIZ ) AS LONG
' ========================================================================================
' Sets the value of a property for a specified body.
' ========================================================================================
DECLARE FUNCTION MimeOleSetBodyPropW LIB "inetcomm.dll" ALIAS "MimeOleSetBodyPropW" ( BYVAL pTree AS IMimeMessageTree , BYVAL hBody AS QUAD , BYREF pszName AS ASCIIZ , BYVAL dwFlags AS QUAD , BYREF pszData AS WSTRINGZ ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleSetBodyProp = MimeOleSetBodyPropW
#ELSE
 MACRO MimeOleSetBodyProp = MimeOleSetBodyPropA
#ENDIF
' ========================================================================================
' On success, creates and initializes a header table.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateHeaderTable LIB "inetcomm.dll" ALIAS "MimeOleCreateHeaderTable" ( BYREF ppTable AS IMimeHeaderTable ) AS LONG
' ========================================================================================
' Frees any memory pointed to by the variant.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleVariantFree LIB "inetcomm.dll" ALIAS "MimeOleVariantFree" ( BYREF pProp AS PROPVARIANT ) AS LONG
' ========================================================================================
' Copies memory pointed to by the source variant and allocates new memory for the
' destination variant.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleVariantCopy LIB "inetcomm.dll" ALIAS "MimeOleVariantCopy" ( BYREF pDest AS PROPVARIANT , BYREF pSource AS PROPVARIANT ) AS LONG
' ========================================================================================
' On success, returns the class ID for a given file extension string.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleGetExtClassId LIB "inetcomm.dll" ALIAS "MimeOleGetExtClassId" ( BYREF pszExtension AS ASCIIZ , BYREF pclsid AS GUID ) AS LONG
' ========================================================================================
' Encodes a message header string.
' ========================================================================================
DECLARE FUNCTION MimeOleEncodeHeader LIB "inetcomm.dll" ALIAS "MimeOleEncodeHeader" ( BYVAL hCharset AS QUAD , BYREF pData AS ANY , BYREF ppszEncoded AS ASCIIZ , BYREF pRfc1522Info AS RFC1522INFO ) AS LONG
' ========================================================================================
' Decodes a message header string.
' ========================================================================================
DECLARE FUNCTION MimeOleDecodeHeader LIB "inetcomm.dll" ALIAS "MimeOleDecodeHeader" ( BYVAL hCharset AS QUAD , BYREF pszData AS ASCIIZ , BYREF pDecoded AS ANY , BYREF pRfc1522Info AS RFC1522INFO ) AS LONG
' ========================================================================================
' Decodes an RFC 1522 World Wide Web link encoded string and, if found, stores the name of
' the character set contained in the encoded string.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleRfc1522Decode LIB "inetcomm.dll" ALIAS "MimeOleRfc1522Decode" ( BYREF pszValue AS ASCIIZ , BYVAL pszCharset AS QUAD , BYVAL cchmax AS QUAD , BYREF ppszDecoded AS ASCIIZ ) AS LONG
' ========================================================================================
' Encodes a string using RFC 1522 World Wide Web link format.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleRfc1522Encode LIB "inetcomm.dll" ALIAS "MimeOleRfc1522Encode" ( BYREF pszValue AS ASCIIZ , BYVAL hCharset AS QUAD , BYREF ppszEncoded AS ASCIIZ ) AS LONG
' ========================================================================================
' Returns an interface used to perform character-set conversions and query information
' about character sets and codepages.
' ========================================================================================
DECLARE FUNCTION MimeOleGetInternat LIB "inetcomm.dll" ALIAS "MimeOleGetInternat" ( BYREF ppInternat AS IMimeInternational ) AS LONG
' ========================================================================================
' On success, finds handle of specified character set.
' ========================================================================================
DECLARE FUNCTION MimeOleFindCharset LIB "inetcomm.dll" ALIAS "MimeOleFindCharset" ( BYREF pszCharset AS ASCIIZ , BYREF phCharset AS QUAD ) AS LONG
' ========================================================================================
' Gets information about the specified character set.
' ========================================================================================
DECLARE FUNCTION MimeOleGetCharsetInfo LIB "inetcomm.dll" ALIAS "MimeOleGetCharsetInfo" ( BYVAL hCharset AS QUAD , BYREF pCsetInfo AS INETCSETINFO ) AS LONG
' ========================================================================================
' Returns a specified CODEPAGEINFO struct.
' ========================================================================================
DECLARE FUNCTION MimeOleGetCodePageInfo LIB "inetcomm.dll" ALIAS "MimeOleGetCodePageInfo" ( BYVAL cpiCodePage AS QUAD , BYREF pCodePageInfo AS QUAD ) AS LONG
' ========================================================================================
' Returns the default charset.
' ========================================================================================
DECLARE FUNCTION MimeOleGetDefaultCharset LIB "inetcomm.dll" ALIAS "MimeOleGetDefaultCharset" ( BYREF phCharset AS QUAD ) AS LONG
' ========================================================================================
' Sets default character set to the specified value (on success).
' ========================================================================================
DECLARE FUNCTION MimeOleSetDefaultCharset LIB "inetcomm.dll" ALIAS "MimeOleSetDefaultCharset" ( BYVAL hCharset AS QUAD ) AS LONG
' ========================================================================================
' Finds a character set for the specified code page.
' ========================================================================================
DECLARE FUNCTION MimeOleGetCodePageCharset LIB "inetcomm.dll" ALIAS "MimeOleGetCodePageCharset" ( BYVAL cpiCodePage AS LONG , BYVAL ctCsetType AS LONG , BYREF phCharset AS QUAD ) AS LONG
' ========================================================================================
' Creates a new virtual stream.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateVirtualStream LIB "inetcomm.dll" ALIAS "MimeOleCreateVirtualStream" ( BYREF ppStream AS IStream ) AS LONG
' ========================================================================================
' Opens or, if non-existing, creates a file stream with specified read/write properties.
' ========================================================================================
DECLARE FUNCTION MimeOleOpenFileStream LIB "inetcomm.dll" ALIAS "MimeOleOpenFileStream" ( BYREF pszFilePath AS ASCIIZ , BYVAL dwCreationDistribution AS QUAD , BYVAL dwAccess AS QUAD , BYREF ppstmFile AS IStream ) AS LONG
' ========================================================================================
' Reads the first four bytes to determine whether data stream is Transport Neutral
' Encapsulation Format (TNEF).
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleIsTnefStream LIB "inetcomm.dll" ALIAS "MimeOleIsTnefStream" ( BYVAL pStream AS IStream ) AS LONG
' ========================================================================================
' On success, creates a file name.
' ========================================================================================
DECLARE FUNCTION MimeOleGenerateFileName LIB "inetcomm.dll" ALIAS "MimeOleGenerateFileName" ( BYREF pszContentType AS ASCIIZ , BYREF pszSuggest AS ASCIIZ , BYREF pszDefaultExt AS ASCIIZ , BYREF ppszFileName AS ASCIIZ ) AS LONG
' ========================================================================================
' Gets the file extension for the specified file.
' ========================================================================================
DECLARE FUNCTION MimeOleGetFileExtension LIB "inetcomm.dll" ALIAS "MimeOleGetFileExtension" ( BYREF pszFilePath AS ASCIIZ , BYREF pszExt AS ASCIIZ , BYVAL cchMax AS QUAD ) AS LONG
' ========================================================================================
' On success, creates a new Secure/Multipurpose Internet Mail Extensions (S/MIME) object.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateSecurity LIB "inetcomm.dll" ALIAS "MimeOleCreateSecurity" ( BYREF ppSecurity AS IMimeSecurity ) AS LONG
' ========================================================================================
' On success, creates a file time from a specified Internet date. Input is in RFC822
' format: "ddd, dd mmm yyyy hh:mm:ss +/- hhmm\0", such as "Tue, 21 Jan 1997 18:25:40 GMT".
' On failure, created file time defaults to current system time.
' ========================================================================================
DECLARE FUNCTION MimeOleInetDateToFileTime LIB "inetcomm.dll" ALIAS "MimeOleInetDateToFileTime" ( BYREF pszDate AS ASCIIZ , BYREF pft AS FILETIME ) AS LONG
' ========================================================================================
' Creates an internet date from a specified file time. Output is in RFC822 format:
' "ddd, dd mmm yyyy hh:mm:ss +/- hhmm\0", such as "Tue, 21 Jan 1997 18:25:40 GMT".
' ========================================================================================
DECLARE FUNCTION MimeOleFileTimeToInetDate LIB "inetcomm.dll" ALIAS "MimeOleFileTimeToInetDate" ( BYREF pft AS FILETIME , BYREF pszDate AS ASCIIZ , BYVAL cchMax AS QUAD ) AS LONG
' ========================================================================================
' On success, creates and initializes a message parts.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateMessageParts LIB "inetcomm.dll" ALIAS "MimeOleCreateMessageParts" ( BYREF ppParts AS IMimeMessageParts ) AS LONG
' ========================================================================================
' Creates a new IMimeAllocator object.
' ========================================================================================
DECLARE FUNCTION MimeOleGetAllocator LIB "inetcomm.dll" ALIAS "MimeOleGetAllocator" ( BYREF ppAllocator AS IMimeAllocator ) AS LONG
' ========================================================================================
' Parses the specified address string (on success).
' ========================================================================================
DECLARE FUNCTION MimeOleParseRfc822AddressA LIB "inetcomm.dll" ALIAS "MimeOleParseRfc822Address" ( BYVAL dwAdrType AS QUAD , BYVAL ietEncoding AS LONG , BYREF pszRfc822Adr AS ASCIIZ , BYREF pList AS ADDRESSLIST ) AS LONG
' ========================================================================================
' On success, creates and initializes a message.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateMessage LIB "inetcomm.dll" ALIAS "MimeOleCreateMessage" ( BYVAL pUnkOuter AS IUnknown , BYREF ppMessage AS IMimeMessage ) AS LONG
' ========================================================================================
' Merges partial headers. The resulting stream should contain the headers for the first
' message (using normal RFC822 rules), then a blank line, and then the headers for the
' second message (again following RFC822 rules).
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleMergePartialHeaders LIB "inetcomm.dll" ALIAS "MimeOleMergePartialHeaders" ( BYVAL pstmIn AS IStream , BYVAL pstmOut AS IStream ) AS LONG
' ========================================================================================
' Adds escape character ('\') to otherwise-invalid characters, such as backslash, quote
' and parens, in supplied zero-terminated string.
' ========================================================================================
DECLARE FUNCTION MimeOleEscapeString LIB "inetcomm.dll" ALIAS "MimeOleEscapeString" ( BYVAL cpiCodePage AS QUAD , BYREF pszIn AS ASCIIZ , BYREF ppszOut AS ASCIIZ ) AS LONG
' ========================================================================================
' Returns the Content-Type of the specified file extension.
' ========================================================================================
DECLARE FUNCTION MimeOleGetExtContentTypeA LIB "inetcomm.dll" ALIAS "MimeOleGetExtContentType" ( BYREF pszExtension AS ASCIIZ , BYREF ppszContentType AS ASCIIZ ) AS LONG
' ========================================================================================
' Returns the Content-Type of the specified file extension.
' ========================================================================================
DECLARE FUNCTION MimeOleGetExtContentTypeW LIB "inetcomm.dll" ALIAS "MimeOleGetExtContentTypeW" ( BYREF pszExtension AS ASCIIZ , BYREF ppszContentType AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleGetExtContentType = MimeOleGetExtContentTypeW
#ELSE
 MACRO MimeOleGetExtContentType = MimeOleGetExtContentTypeA
#ENDIF
' ========================================================================================
' Returns the file extension for a supplied content type.
' ========================================================================================
DECLARE FUNCTION MimeOleGetContentTypeExt LIB "inetcomm.dll" ALIAS "MimeOleGetContentTypeExt" ( BYREF pszContentType AS ASCIIZ , BYREF ppszExtension AS ASCIIZ ) AS LONG
' ========================================================================================
' Returns file information for a supplied file path string.
' ========================================================================================
DECLARE FUNCTION MimeOleGetFileInfoA LIB "inetcomm.dll" ALIAS "MimeOleGetFileInfoA" ( BYREF pszFilePath AS ASCIIZ , BYREF ppszCntType AS ASCIIZ , BYREF ppszSubType AS ASCIIZ , BYREF ppszCntDesc AS ASCIIZ , BYREF ppszFileName AS ASCIIZ , BYREF ppszExtension AS ASCIIZ ) AS LONG
' ========================================================================================
' Returns file information for a supplied file path string.
' ========================================================================================
DECLARE FUNCTION MimeOleGetFileInfoW LIB "inetcomm.dll" ALIAS "MimeOleGetFileInfoW" ( BYREF pszFilePath AS WSTRINGZ , BYREF ppszCntType AS QUAD , BYREF ppszSubType AS QUAD , BYREF ppszCntDesc AS QUAD , BYREF ppszFileName AS QUAD , BYREF ppszExtension AS QUAD ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleGetFileInfo = MimeOleGetFileInfoW
#ELSE
 MACRO MimeOleGetFileInfo = MimeOleGetFileInfoA
#ENDIF
' ========================================================================================
' On success, creates a new message body.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateBody LIB "inetcomm.dll" ALIAS "MimeOleCreateBody" ( BYREF ppBody AS IMimeBody ) AS LONG
' ========================================================================================
' On success, creates a new property set object.
' ========================================================================================
DECLARE FUNCTION MimeOleCreatePropertySet LIB "inetcomm.dll" ALIAS "MimeOleCreatePropertySet" ( BYVAL pUnkOuter AS IUnknown , BYREF ppPropertySet AS IMimePropertySet ) AS LONG
' ========================================================================================
' On success, creates and initializes a message tree.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateMessageTree LIB "inetcomm.dll" ALIAS "MimeOleCreateMessageTree" ( BYVAL pUnkOuter AS IUnknown , BYREF ppMessageTree AS IMimeMessageTree ) AS LONG
' ========================================================================================
' Given a set of thumbprints, returns an equivalent set of certificates.
' ========================================================================================
DECLARE FUNCTION MimeOleGetCertsFromThumbprints LIB "inetcomm.dll" ALIAS "MimeOleGetCertsFromThumbprints" ( BYREF rgThumbprint AS THUMBBLOB , BYREF pResults AS X509CERTRESULT , BYREF rghCertStore AS QUAD , BYVAL cCertStore AS QUAD ) AS LONG
' ========================================================================================
' Splits message into a collection of parts, as determined by a specified maximum part size.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleSplitMessage LIB "inetcomm.dll" ALIAS "MimeOleSplitMessage" ( BYVAL pMessage AS IMimeMessage , BYVAL cbMaxPart AS QUAD , BYREF ppParts AS IMimeMessageParts ) AS LONG
' ========================================================================================
' Clears dirty tree flag and any dirty body flags for the specified message tree object.
' ========================================================================================
DECLARE FUNCTION MimeOleClearDirtyTree LIB "inetcomm.dll" ALIAS "MimeOleClearDirtyTree" ( BYVAL pTree AS IMimeMessageTree ) AS LONG
' ========================================================================================
' Converts text/enriched to text/html.
' ========================================================================================
DECLARE FUNCTION MimeOleConvertEnrichedToHTML LIB "inetcomm.dll" ALIAS "MimeOleConvertEnrichedToHTML" ( BYVAL codepage AS QUAD , BYVAL pIn AS IStream , BYVAL pOut AS IStream ) AS LONG
' ========================================================================================
' Checks whether stream is enriched, as indicated by existence of "c_szXRich" in stream.
' Note: Doesn't appear in the export list of INETCOMM.DLL 6.0
' ========================================================================================
DECLARE FUNCTION MimeOleIsEnrichedStream LIB "inetcomm.dll" ALIAS "MimeOleIsEnrichedStream" ( BYVAL pStream AS IStream ) AS LONG
' ========================================================================================
' Outputs supplied Secure/Multipurpose Internet Mail Extensions (S/MIME) capabilities to
' supplied dialog.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapsToDlg LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapsToDlg" ( BYVAL pbSMimeCaps AS BYTE PTR , BYVAL cbSMimeCaps AS QUAD , BYVAL cCerts AS QUAD , BYVAL rgCerts AS QUAD , BYVAL hwndDlg AS QUAD , BYVAL idEncAlgs AS QUAD , BYVAL idSignAlgs AS QUAD , BYVAL idBlob AS QUAD ) AS LONG
' ========================================================================================
' Reads a combo box of encryption algorithm IDs (Using the handle passed in), to select a
' default encryption algorithm and reads a combo box of signature algorithm IDs to select
' a default signing algorithm. A list of capabilities for each is built from the combo box
' items. Without combo boxes, the defaults are 40-bit RC2 and SHA-1. Optionally, if a
' checkbox with a blob item ID is checked, the capabilities list is generated as a blob.
' The results are used to encode an Secure/Multipurpose Internet Mail Extensions (S/MIME)
' capabilities array object of the specified size.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapsFromDlg LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapsFromDlg" ( BYVAL hwnd AS QUAD , BYVAL idEncAlgs AS QUAD , BYVAL idSignAlgs AS QUAD , BYVAL idBlob AS QUAD , BYREF pbSMimeCaps AS QUAD , BYREF pcbSmimeCaps AS QUAD ) AS LONG
' ========================================================================================
' Returns an equivalent of the cookie returned by MimeOleSMimeCapAddSMimeCap when an array
' of CRYPT_SMIME_CAPABILITIES is passed in; otherwise, the function attempts to match
' MimeOle encryption capabilities to a Microsoft-enhanced provider (CryptoAPI), and flags
' matching algorithms in the returned cookie.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapInit LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapInit" ( BYVAL pbSMimeCap AS BYTE PTR , BYVAL cbSMimeCap AS QUAD , BYREF ppv AS ANY ) AS LONG
' ========================================================================================
' Receives an array of CRYPT_SMIME_CAPABILITIES allocated by MimeOleSMimeCapInit and
' returns a cookie flagged with a filtered list of available algorithms. See wincrypt.h.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapAddSMimeCap LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapAddSMimeCap" ( BYVAL pbSMimeCap AS BYTE PTR , BYVAL cbSMimeCap AS QUAD , BYREF pv AS ANY ) AS LONG
' ========================================================================================
' Sets a passed-in cookie with a flag indicating the encryption algorithm to be used.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapAddCert LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapAddCert" ( BYVAL pbCert AS BYTE PTR , BYVAL cbCert AS QUAD , BYVAL fParanoid AS LONG , BYREF pv AS ANY ) AS LONG
' ========================================================================================
' Encodes an object of a specified size, using the best encryption algorithm flagged in
' the cookie. On success, returns the number of bits used for the encryption.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapGetEncAlg LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapGetEncAlg" ( BYVAL pv AS BYTE PTR , BYREF pbEncode AS QUAD , BYREF pcbEncode AS QUAD , BYREF pdwBits AS QUAD ) AS LONG
' ========================================================================================
' Encodes an object of specified size using the best hash algorithm flagged in the cookie.
' On success, returns the number of bits used for the hash signing.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapGetHashAlg LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapGetHashAlg" ( BYVAL pv AS QUAD , BYREF pbEncode AS QUAD , BYREF pcbEncode AS QUAD , BYREF pfBlobSign AS QUAD ) AS LONG
' ========================================================================================
' Clears allocated capabilities memory.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapRelease LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapRelease" ( BYVAL pv AS QUAD ) AS LONG
' ========================================================================================
' Obtains algorithm name from supplied Secure/Multipurpose Internet Mail Extensions
' (S/MIME) capabilities array.
' ========================================================================================
DECLARE FUNCTION MimeOleAlgNameFromSMimeCap LIB "inetcomm.dll" ALIAS "MimeOleAlgNameFromSMimeCap" ( BYVAL pb AS BYTE PTR , BYVAL cb AS QUAD , BYREF ppzProtocol AS ASCIIZ ) AS LONG
' ========================================================================================
' Used to obtain the bit strength of an encryption algorithm.
' ========================================================================================
DECLARE FUNCTION MimeOleAlgStrengthFromSMimeCap LIB "inetcomm.dll" ALIAS "MimeOleAlgStrengthFromSMimeCap" ( BYVAL pb AS BYTE PTR , BYVAL cb AS QUAD , BYVAL fEncryption AS LONG , BYREF pdwStrength AS QUAD ) AS LONG
' ========================================================================================
' Builds a list of encryption capabilities (if all encryption algorithms are to be
' supported) from the passed-in cookie, or defaults to 40-bit RC2. Similarly, if all
' signature algorithms are to be supported, builds a list of signing capabilities from the
' cookie, or defaults to SHA-1. The results are used to encode an Secure/Multipurpose
' Internet Mail Extensions (S/MIME) capabilities array object of the specified size.
' ========================================================================================
DECLARE FUNCTION MimeOleSMimeCapsFull LIB "inetcomm.dll" ALIAS "MimeOleSMimeCapsFull" ( BYVAL pv AS QUAD , BYVAL fFullEncryption AS LONG , BYVAL fFullSigning AS LONG , BYREF pbSymCaps AS QUAD , BYREF pcbSymCaps AS QUAD ) AS LONG
'#if (_WIN32_OE >= 0x0500)
' ========================================================================================
' On success, creates and initializes a hash table.
' ========================================================================================
DECLARE FUNCTION MimeOleCreateHashTable LIB "inetcomm.dll" ALIAS "MimeOleCreateHashTable" ( BYVAL dwSize AS QUAD , BYVAL fDupeKeys AS LONG , BYREF ppHashTable AS IHashTable ) AS LONG
' ========================================================================================
' Strips and adds a message header.
' ========================================================================================
DECLARE FUNCTION MimeOleStripHeaders LIB "inetcomm.dll" ALIAS "MimeOleStripHeaders" ( BYVAL pMessage AS IMimeMessage , BYVAL hBody AS QUAD , BYREF pszNameDelete AS ASCIIZ , BYREF pszHeaderAdd AS ASCIIZ , BYREF ppStream AS IStream ) AS LONG
' ========================================================================================
' Parses the specified RFC 822 address string.
' ========================================================================================
DECLARE FUNCTION MimeOleParseRfc822AddressW LIB "inetcomm.dll" ALIAS "MimeOleParseRfc822AddressW" ( BYVAL dwAdrType AS QUAD , BYREF pszRfc822Adr AS WSTRINGZ , BYREF pList AS ADDRESSLIST ) AS LONG
#IF %DEF(%UNICODE)
 MACRO MimeOleParseRfc822Address = MimeOleParseRfc822AddressW
#ELSE
 MACRO MimeOleParseRfc822Address = MimeOleParseRfc822AddressA
#ENDIF
'#endif //_WIN32_OE
'#if (_WIN32_OE >= 0x0500)
'// --------------------------------------------------------------------------------
'// MimeEdit API Prototypes
'// --------------------------------------------------------------------------------
DECLARE FUNCTION MimeEditViewSource LIB "inetcomm.dll" ALIAS "MimeEditViewSource" ( BYVAL hwndParent AS QUAD , BYVAL pMsg AS IMimeMessage ) AS LONG
DECLARE FUNCTION MimeEditIsSafeToRun LIB "inetcomm.dll" ALIAS "MimeEditIsSafeToRun" ( BYVAL hwndParent AS QUAD
 , BYREF lpszFileName AS ASCIIZ
 ) AS LONG
DECLARE FUNCTION MimeEditVerifyTrust LIB "inetcomm.dll" ALIAS "MimeEditVerifyTrust" ( BYVAL hwndParent AS DWORD
 , BYREF lpszFileName AS ASCIIZ
 , BYREF lpszPathName AS ASCIIZ
 ) AS LONG
DECLARE FUNCTION MimeEditCreateMimeDocument LIB "inetcomm.dll" ALIAS "MimeEditCreateMimeDocument" ( BYVAL pDoc AS IUnknown
 , BYVAL pMsgSrc AS IMimeMessage
 , BYVAL dwFlags AS DWORD
 , BYREF ppMsg AS IMimeMessage
 ) AS LONG
DECLARE FUNCTION MimeEditGetBackgroundImageUrl LIB "inetcomm.dll" ALIAS "MimeEditGetBackgroundImageUrl" ( BYVAL pDoc AS IUnknown
 , BYREF pbstr AS WSTRING
 ) AS LONG
DECLARE FUNCTION MimeEditDocumentFromStream LIB "inetcomm.dll" ALIAS "MimeEditDocumentFromStream" ( BYVAL pstm AS IStream
 , BYREF riid AS GUID
 , BYREF ppDoc AS IUnknown
 ) AS LONG
DECLARE FUNCTION MimeGetAddressFormatW LIB "inetcomm.dll" ALIAS "MimeGetAddressFormatW" ( BYREF riid AS GUID
 , BYVAL pvObject AS DWORD
 , BYVAL dwAdrType AS DWORD
 , BYVAL format AS LONG
 , BYREF ppszFormat AS WSTRINGZ
 ) AS LONG
MACRO MimeGetAddressFormat = MimeGetAddressFormatW
'#if (_WIN32_OE >= 0x501)
'#ifdef __WINCRYPT_H__
'//+-------------------------------------------------------------------------
'// RecipientID
'//
'// The value of dwRecepintType MUST be 0.
'//--------------------------------------------------------------------------
$szOID_Microsoft_Encryption_Cert = "1.3.6.1.4.1.311.16.4"
' // Size = 20 bytes
TYPE CRYPT_RECIPIENT_ID DWORD
 dwRecipientType AS DWORD
 Issuer AS CERT_NAME_BLOB
 SerialNumber AS CRYPT_INTEGER_BLOB
END TYPE
'#endif // __WINCRYPT_H__
'#endif //_WIN32_OE
#ENDIF
