Hi, I need serialize a Com Object using .net using c# or Delphi .Net is this possible? Bye.
You could probably do this by wrapping the COM object in a (serializable) .NET class, exposing the fields that you want serialized.
You can get a Managed Object
through GetObjectForIUnknown Method. And then, you can serialize this managed object.
Check to see if you COM object implements IPersistStream, IPersistMemory or any other of the IPersist variants -- that would be your best bet.
I am not sure there will be difference in how you serialize your data in C++, .Net or in any other language. COM object is like a class and can be serialized by getting each data member and serializing it .I did like this in C++.
I think this should be same in .Net unless there are specific APIs to do it.
Not simply by passing object to serializer - implement ISerializable interface on COM object wrapper (primary interop assembly is a wrapper too) and define your own serialization.