473,499 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create a .NET interface to C++ classes

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.
Jun 27 '08 #1
2 1411
Angus wrote:
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
Jun 27 '08 #2

"Angus" <no****@gmail.comha scritto nel messaggio
news:ed**************@TK2MSFTNGP04.phx.gbl...
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
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3722
by: Clint Hill | last post by:
I am working on a project that I would like to have some extensibility for later. So with this I am using interfaces to pass objects to derived classes. However I am running into a situation where...
9
4614
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
20
4222
by: Ole Hanson | last post by:
I am accessing my database through an interface, to allow future substitution of the physical datastore - hence I would like to declare in my Interface that my DAL-objects implementing the...
10
2942
by: Brett | last post by:
I'm still trying to figure out concrete reasons to use one over the other. I understand the abstract class can have implementation in its methods and derived classes can only inherit one abstract...
1
5663
by: News User | last post by:
This may sound stupid but I am having trouble figuring out this one. Any help would be appreciated. I have 3 classes ClassA & ClassB and ClassC From ClassC I would instantiate ClassA...
7
1753
by: Ron | last post by:
Hello, I have 4 classes that use 4 DTS packages on 4 different tables. So I have Dim cls1 As New clsDTS1, cls2 As New clsDTS2 Dim cls3 As New clsDTS3, cls4 As New clsDTS4 Each class has a...
7
1402
by: Brett | last post by:
I have created an interface with five properties and five methods. Five classes are accessed through this interface and contain the implementation. This setup works fine now. All the classes are...
13
2401
by: docschnipp | last post by:
Hi, I have a bunch of object derived from the same base class. They all share the same constructor with some parameters. Now, instead of using a large switch() statement where I call every...
15
2767
by: Xah Lee | last post by:
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs....
2
5539
by: Joseph Geretz | last post by:
When I create a Form, the VB IDE creates the following files in the following hierarchy: Form1.cs Form1.Designer.cs Form1.resx Both Form1.cs and Form1.Designer.cs are partial implementations...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.