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

Re: WPF and C++ by Ben

Ben
Fri May 09 15:13:55 CDT 2008

DeanB wrote:
> 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.

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