EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Decoding S/MIME -> "Access violation" with DecodedPart.Stream

Posted: 12/17/2007 04:08:04
by Alexander Bauer (Standard support level)
Joined: 08/17/2007
Posts: 3


i've some trouble with DecodedParts.
The decoding works without any problems. But if i want to access
the Stream of decoded parts i get an "access violation", but not at all messages.

Messages only signed => No problem.
Messages only encrypted => No problem.
Messages signed and encrypted => Access violation!

I think i did something wrong, but i don't know what ?!

Here are some lines of my sample code:

// Loading the message
// FileStream will not freed!
ElMsg.ParseMessage(FileStream, '', '',
                   [mpoStoreStream, mpoLoadData, mpoCalcDataSize],
                   False, False, ActivatePartHandlers);


// Decoding the message
PartHandlerSMime := TElMessagePartHandlerSMime(ElMsgPart.MessagePartHandler);
PartHandlerSMime.CertificatesStorage := FDecoderCerts;
Res := ElMsgPart.MessagePartHandler.Decode(true);


// Try to access the decoded part stream
if assigned(ElMsgPart.MessagePartHandler.DecodedPart) then
  // The stream is assigned, but seem to be freed
  ElMsgPart.MessagePartHandler.DecodedPart.Stream.Position := 0;

Can you help me with that problem ?




Topic viewed 1741 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!