Interoperability with .Net Framework

  • Thread starter Frederik Kesting
  • Start date
F

Frederik Kesting

Hi!
I heard about the possibilty of using different languages for one
project whith the .Net Framework. Is it f.e. possible to include
Managed C++ code into a VB.Net project without changing syntax? Could
someone tell me more about interoperability or just give me a tutorial
link?
greetz!
 
J

Jack Klein

Hi!
I heard about the possibilty of using different languages for one
project whith the .Net Framework. Is it f.e. possible to include

What is the possibility that questions about the .Net framework and
about other languages are completely off-topic here?
Managed C++ code into a VB.Net project without changing syntax? Could
someone tell me more about interoperability or just give me a tutorial
link?
greetz!

The only thing that manages C++ here is the ANSI/ISO/IEC International
Standard, which does not mention "VB" or ".Net". These things have
nothing at all to do with the C++ language, they are all Microsoft
specific non-standard extensions.

There are Microsoft specific newsgroups in the family on the server msnews.microsoft.com.
 
F

Frederik Kesting

The only thing that manages C++ here is the ANSI/ISO/IEC International
Standard, which does not mention "VB" or ".Net". These things have
nothing at all to do with the C++ language, they are all Microsoft
specific non-standard extensions.
Even if they don't have standart-extension, they have a lot in common
with the ANSI/ISO/IEC International Standart. I know that this is a
newbie-question and of couse an off-topic, but I also thought some of
you are able to help ;)

There are Microsoft specific newsgroups in the family on the server msnews.microsoft.com.
Thanx, I'll watch for help in that newsgroup.
 
J

Jack Klein

Even if they don't have standart-extension, they have a lot in common
with the ANSI/ISO/IEC International Standart. I know that this is a
newbie-question and of couse an off-topic, but I also thought some of
you are able to help ;)

I was able to help. I explained, politely, why your question was
off-topic here, and I pointed out exactly where you could get good
answers to your question, below.
Thanx, I'll watch for help in that newsgroup.

Good luck to you, then.
 
C

Cornel Barna

Hi!
I heard about the possibilty of using different languages for one
project whith the .Net Framework. Is it f.e. possible to include
Managed C++ code into a VB.Net project without changing syntax? Could
someone tell me more about interoperability or just give me a tutorial
link?
greetz!

The answer is short: NO.
Your managed C++ code must be compiled with a C++ compiler (that
creates managed code) and your VB.Net code must be compiled with a
VB.Net compiler.

The interoperability refer to something else: when you compile in .Net
you don't get native code (like you do with standard C++), you get
managed code in MSIL language (assemblies; there is more, but just
i'll keep it simple). Most of the times you see that assembly like a
dll or exe file. These are not normal binary files. You can include
these files in you project and use them.

For instance: you created a class, MyClass, in Managed C++. You
compile it and get a file, a.dll. Then you wanna use MyClass in one of
your VB.Net projects. You just use it like any other class written in
VB.Net (VB.Net syntax), even if the class is written in C++ managed,
with a different syntax.

and to get all working you just compile your vb.net project
referencing a.dll (the file that have MyClass implementation) - this
is done by using /r:a.dll compiler option. You don't have to do
anything else. just use the corect namespaces and refer the correct
dll.

The code written in a language must be compiled with the proper
compiler!!
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top