Re:Persistence of TAutoObject
Chris,
Not sure what your implementation is, but I believe generally you support
IPersistxxxx so that the client of your object can tell you to save
yourself. If this is what you wish to do, then you will support
IPersistStorage or IPersistStream or IPersistFile even. All you have to do
is provide the interface functionality obviously. Again I am not sure what
your implementation is, but typically the client (host) will tell you how to
save yourself - invoking you on one of your IPersistxxxx interfaces. At the
point of streaming your COM objects, it will be down to you what you wish to
make Persistent in the context of the object being saved. You will not
implement IStorage/ISteam unless you wish to write your own Structured
Storage model - you would normally use Compound Files - OLE's implementation
of SS. You will be given an IStorage/IStream within the
IPersistStorage.Load(pIStorage)/IPersistStream.Load(pIStream). If you are
instigating a storage operation your self, the steps involved are:
1. Open something to store to (file/compound file[storage/strea])
2. Get the IPersistxxxx interface from the object that is to be saved
3. Pass store object interface to IPersistxxxx interface call
4. Viola.
HTH
Nick.
http://www.deja.com/~comdelphi
Quote
Chris Gnther wrote in message <7ql4k1$e...@forums.borland.com>...
>Hello !
>Does anyone know how to implement IPersist, IStorage, ....
>in descands of TAutoObject ?
>I have to stream comobjects (dual interfaces)
>Thanks
> Chris