Create a .NET interface to C++ classes

A

Angus

Hello

I have written all code for a client server application in C++. It is
standard C++ written using Visual Studio v6. Basically C++ and STL.

I want to provide a .NET interface for those developers who use vb.net, C#,
etc.

Can anyone give me some pointers as to how to get started. Do I need to
purchase the .NET Visual Studio? How much .NET will I need to learn? Any
resources on how to write a .NET wrapper around C++ classes?

Angus

p.s. If there are more appropriate newsgroups please let me know.
 
A

Andre Kaufmann

Angus said:
Hello

I have written all code for a client server application in C++. It is
standard C++ written using Visual Studio v6. Basically C++ and STL.

I want to provide a .NET interface for those developers who use vb.net, C#,
etc.

Can anyone give me some pointers as to how to get started. Do I need to
purchase the .NET Visual Studio? How much .NET will I need to learn? Any
resources on how to write a .NET wrapper around C++ classes?

There are several possible solutions:

AFAIK you can use the free Visual C++ Express edition, but I couldn't
figure out if this compiler supports C++/CLI (the C++ .NET extensions),
otherwise you would have to purchase the edition supporting it.
By the way the name Visual C++ .NET is somewhat misleading, since it's
still a native C++ compiler, with some .NET extensions.

You should at least have some basic knowledge about .NET. Memory
handling, .NET framework and the basic data structures / lists. etc.
Additionally you should have a good knowledge about C++/CLI - a standard
ized extension for C++ to access / provide access for .NET.

I would suggest you to start with C# (free express edition available)
and play around with the .NET framework, to get familiar with the
framework and garbage collection. You have to use C# anyways to check
your C++/CLI wrappers.

After that you should get familiar with C++/CLI, which you will use to
wrap your native C++ classes.
You may have a look at STL/CLR (the .NET compatible implementation of
the STL) too.

Hope this helps to start.

Angus

p.s. If there are more appropriate newsgroups please let me know.

Andre
 
G

Giovanni Dicanio

I have written all code for a client server application in C++. It is
standard C++ written using Visual Studio v6. Basically C++ and STL.

I want to provide a .NET interface for those developers who use vb.net,
C#,
etc.

In addition to the other reply:

If you don't want to use an IDE/compiler that supports C++/CLI (like VS2005
or VS2008), and you want to continue using VC6, you may build a COM wrapper
to your existing C++ code.

VC6 supports COM development, using both ATL and MFC (I don't know about
your code details, but I would suggest using ATL to make a thin COM wrapper
on your existing C++ code).

VB.NET and C# can use COM objects.

Giovanni
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top