delphi.net

How Do I serialize a COM object in .Net?

主宰稳场 提交于 2019-12-11 09:21:55
问题 I need serialize a Com Object using .net using c# or Delphi .Net is this possible? 回答1: You could probably do this by wrapping the COM object in a (serializable) .NET class, exposing the fields that you want serialized. 回答2: Check to see if you COM object implements IPersistStream, IPersistMemory or any other of the IPersist variants -- that would be your best bet. 回答3: You can get a Managed Object through GetObjectForIUnknown Method. And then, you can serialize this managed object. 回答4: Not