This behavior is by design (or rather implementation). If you want
to compact your compound file, create a new one and make a copy
of the root storage into it. There must be something to this effect
mentioned in the documentation I'm sure...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
> When I delete Streams in the Structured Storage file (by calling the
> DestroyElement function in the IStorage), the space occupied by the stream
> is not reclaimed. I am not using Transactions. The stream is deleted and I
> can't get to it. But the size of the whole file remains the same. I tested
> this by adding and deleting huge streams (>50MB) so I can see the change in
> the storage file size. I also tried copying the storage file into a
> different folder to see that would shrink the file. But it did not help.
> Please let me know if there is an API or a method to reclaim teh space.
> Thanks
> SP