Connecting Tech Pros Worldwide Forums | Help | Site Map

How do you combine vb and c code

Newbie
 
Join Date: Sep 2009
Posts: 15
#1: Oct 13 '09
How easy is it to combine vb and c code in VS 2008? I have an application that is written in vb and interface files for a motion controller written in C++. The vb and c++ code need to communicate between each other. How hard would it be to use events and delegates to solve this problem?

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,180
#2: Oct 14 '09

re: How do you combine vb and c code


Probably the thing to would be to wrap the C++ code in a C++/CLR class library. That would allow any .NET programming language (including VB.NET) to use the class library.
Newbie
 
Join Date: Sep 2009
Posts: 15
#3: Oct 15 '09

re: How do you combine vb and c code


If there is a really simple program that combines vb and c++ code in Visual Studio 2008, it would really help me.

I have looked and haven't found a good example I can work off of yet.
Reply

Tags
delegates, events, vb c