1

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.