IConverterSession - Do You Converter Session?
[This is now documented here: https://msdn2.microsoft.com/en-us/library/bb821176.aspx]
Ryan, one of our PMs over in Outlook, got an e-mail to his blog asking for a header for IConverterSession. He knows I'm the MAPI guy so he asked me if I could help out.
Here's the header I use in MFCMAPI - it's built directly from the docs:
#pragma once
//Class Identifiers
// {4e3a7680-b77a-11d0-9da5-00c04fd65685}
DEFINE_GUID(CLSID_IConverterSession, 0x4e3a7680, 0xb77a,
0x11d0, 0x9d, 0xa5, 0x0, 0xc0, 0x4f, 0xd6, 0x56, 0x85);
//Interface Identifiers
// {4b401570-b77b-11d0-9da5-00c04fd65685}
DEFINE_GUID(IID_IConverterSession, 0x4b401570, 0xb77b,
0x11d0, 0x9d, 0xa5, 0x0, 0xc0, 0x4f, 0xd6, 0x56, 0x85);
// These are out of mimeole.h, which is a pain to include
typedef
enum tagMIMESAVETYPE
{ SAVE_RFC822 = 0,
SAVE_RFC1521 = SAVE_RFC822 + 1
} MIMESAVETYPE;
typedef
enum tagENCODINGTYPE
{ IET_BINARY = 0,
IET_BASE64 = IET_BINARY + 1,
IET_UUENCODE = IET_BASE64 + 1,
IET_QP = IET_UUENCODE + 1,
IET_7BIT = IET_QP + 1,
IET_8BIT = IET_7BIT + 1,
IET_INETCSET = IET_8BIT + 1,
IET_UNICODE = IET_INETCSET + 1,
IET_RFC1522 = IET_UNICODE + 1,
IET_ENCODED = IET_RFC1522 + 1,
IET_CURRENT = IET_ENCODED + 1,
IET_UNKNOWN = IET_CURRENT + 1,
IET_BINHEX40 = IET_UNKNOWN + 1,
IET_LAST = IET_BINHEX40 + 1
} ENCODINGTYPE;
// Constants
#define CCSF_SMTP 0x0002
#define CCSF_NOHEADERS 0x0004
#define CCSF_INCLUDE_BCC 0x0020
#define CCSF_USE_RTF 0x0080
#define CCSF_NO_MSGID 0x4000
interface IConverterSession : public IUnknown
{
public:
virtual HRESULT PlaceHolder1();
virtual HRESULT STDMETHODCALLTYPE SetEncoding(ENCODINGTYPE et);
virtual HRESULT PlaceHolder2();
virtual HRESULT STDMETHODCALLTYPE MIMEToMAPI(LPSTREAM pstm,
LPMESSAGE pmsg,
LPCSTR pszSrcSrv,
ULONG ulFlags);
virtual HRESULT STDMETHODCALLTYPE MAPIToMIMEStm(LPMESSAGE pmsg,
LPSTREAM pstm,
ULONG ulFlags);
virtual HRESULT PlaceHolder3();
virtual HRESULT PlaceHolder4();
virtual HRESULT PlaceHolder5();
virtual HRESULT STDMETHODCALLTYPE SetTextWrapping(BOOL fWrapText,
ULONG ulWrapWidth);
virtual HRESULT STDMETHODCALLTYPE SetSaveFormat(MIMESAVETYPE mstSaveFormat);
virtual HRESULT PlaceHolder8();
virtual HRESULT PlaceHolder9();
};
Lemme know if I left anything out or made any mistakes and I'll fix them up. Enjoy!
†Pardon the bad pun in the title. Couldn't resist.