I’m having on problem when using the IConverterSession instance,
more specifically when using the MAPItoMIMEStm procedure
in my application while called on workstations with Outlook 2019 MSO (16.0.10352.20042) 32-bit installed under Windows (10.0.17763.1).
MAPI32.DLL file version is (1.0.2536.0).
My function does not return a result, because of empty stream st.DataString = ''
!?
function IMessageToEml(msg: IMessage): String;
var mime: IStream; cs: IConverterSession; st: TStringStream; Subject: String;
begin
Result := '';
Subject := GetMapiStringProperty(msg,PR_SUBJECT);
st := TStringStream.Create('');
try
if CoCreateInstance(CLSID_IConverterSession, nil, CLSCTX_INPROC_SERVER, IID_IConverterSession, cs) = 0 then begin
cs.SetEncoding(IET_BASE64);
mime := TStreamAdapter.Create(st,soReference);
cs.MAPIToMIMEStm(msg, mime, CCSF_SMTP or CCSF_INCLUDE_BCC);
Result := EncodingSubject(st.DataString, Subject);
end;
finally
st.Free;
Finalize(Subject);
end;
end;
While the app is running on workstations with Outlook 2013 (15.0.5172.1000) MSO (15.0.5172.1000) 32-bit installed under Windows (10.0.18362)
MAPI32.DLL file version is (1.0.2536.0)
the function works correctly in most cases.
Thanks for replies