Serialize or persist to file a COM object from VB.Net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I am wondering if it is possible to serialize or somehow persist a COM
object that does not implement IPersist or IPersistStream from VB.NET. Is it
possible to roll my own serializer; ideally xml. However, this is an object
that contains other objects.

Please, any direction would be appreciated.
Thanks.
 
Hi. I am wondering if it is possible to serialize or somehow persist a COM
object that does not implement IPersist or IPersistStream from VB.NET. Is it
possible to roll my own serializer; ideally xml. However, this is an object
that contains other objects.

I guess you could probably use reflection to find all of the properties
that are read/write and create your own serializer. Sounds like a lot
of work -- but, in theory, it's probably possible.

However, if any state of the COM object that is crucial to the COM
objects operation is not exposed as a read/write property, then custom
serialization won't be worth it since it won't restore the objects
"true" state once deserialized.
 
Back
Top