Reputation: 9479
I am using a third party dll for image processing which returns COM objects. Currently I have declared DataContract
classes which include some of the information I need from the returned COM objects.
If I want to extend the functionality of my WCF service
, is there a way to return the COM object directly or will I be required to create new classes and decorate them using DataContract
manually? (~30 classes)
Thanks
Upvotes: 1
Views: 101
Reputation: 65391
You cannot send a Reference to a COM Object over WCF.
You must serialize it in some way. If the COM Object has a serialize Method you could serialize it to a text, send it over WCF and deserialize it on the other side. But then you need a Reference to the COM object defination on the Client side.
Simplest is to create the New classes, you could try some code generation Tools like resharper to help.
Upvotes: 2