Ian Branch 127 Posted May 11, 2023 Hi Team, D11.3.1. I have this compression routine. procedure CompressStream(SourceStream: TMemoryStream; DestStream: TMemoryStream); var ZStream : TCompressionStream; begin ZStream := TCompressionStream.Create(clDefault, DestStream); try ZStream.CopyFrom(SourceStream, SourceStream.Size); finally ZStream.Free; end; end; If I have this procedure in my main form it is happy. If I move it to my Function library, I get this.. Why should it be happy in the main form an not in the library? Yes, I have System.ZLib in the uses in both cases Thoughts/suggestions? Regards & TIA, Ian Share this post Link to post
Lajos Juhász 293 Posted May 11, 2023 Most probably one of other units define the TCompressionStream class. You can try to rearange your uses statement or prefix the classname with the unitname. Share this post Link to post
Ian Branch 127 Posted May 11, 2023 (edited) Hi Lajos, Great call. I found that if I had the System.Zlib after the VCL.Graphics, all is fine. Before and I get the issue. Tks for the assist. Regards, Ian Edit: I didn't need VCL.Graphics in the library anyway. 😉 Edited May 11, 2023 by Ian Branch Share this post Link to post