TIdMessage SaveToStream bug?

Giganews Newsgroups
Subject: TIdMessage SaveToStream bug?
Posted by:  Koller Krisztian (koll…@mkmcom.hu)
Date: Mon, 5 Apr 2004

I'd like to save a message by SaveToFile method.
I get an acccess violation error:

//TIdMessage.SaveToFile:
  ...
  vStream := TFileStream.create(AFileName, fmCreate);
  try
    SaveToStream(vStream, AHeadersOnly);  //saving is correct
  finally
    vStream.Free;    //access violation
  end;

I've debugged TIdMessage: before calls SaveToStream, FHandle of vStream
equals 1552, after calling FHandle is 12.
I think this is the reason of the problem. I didn't find any problem in
SaveToStream method...
How can I solve it?

(D7 + newest Indy)

Thanks,

Chris

Replies