Q

Creating a Web services that uses existing C++ code

I want to create a Web service that uses two files of existing C++ code (not written by me) using Visual Studio

.NET. (My development language is Visual Basic .NET.) Any pointers as to how to go about this would be useful.

From my research so far, Managed Extensions seem to be the way to go, but this seems to be very convoluted -- involved in going through most of the C++ code and 'managing' the unmanaged bits.

Are there any other options?
There's a lot left unsaid in your question but I'll take a stab at it anyway. It all comes down to what those C++ files do. If you can massage those files to produce full .NET classes (the __gc keyword and all that) you can compile them with Managed C++ and use them from Visual Basic .NET just fine. If those C++ files are COM components, you'll probably want to continue to compile them as COM components and use .NET InterOp in order to consume them from .NET. If those C++ files export a traditional C-type interface (functions), you may be better off compiling the code to a DLL and exporting those functions from the DLL. You can use those exported functions through .NET InterOp as well.

This was first published in November 2003

Dig deeper on VB code downloads

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close