WPF and C++

D

DeanB

Hello all,

We're moving a project from Borland C++ to MS. We're planning to use
C# for the GUI work but have a lot of events and functions already in
form files/units in Borland that are in C++. What's the best way to
integrate the two languages? (To call a C++ function from a C# unit,
without using any dlls).

Apologies if this is a basic question here, but none of us is an
expert in the MS suite.

Thanks!

Dean
 
B

Ben Voigt [C++ MVP]

DeanB said:
Hello all,

We're moving a project from Borland C++ to MS. We're planning to use
C# for the GUI work but have a lot of events and functions already in
form files/units in Borland that are in C++. What's the best way to
integrate the two languages? (To call a C++ function from a C# unit,
without using any dlls).

You need a DLL. Every .NET application needs many DLLs, it's how all
libraries are loaded in the .NET world.

Best thing to do is build your DLL in C++/CLI, then it will have all the
metadata needed to call from C# without error-prone p/invoke declarations.
 

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