hi all,

i have a problem, i want to use CPP and header files written in VC++ .NET in C# because i m more comfortable in this language. is there any way i can achieve this if there is so can u plz tell me or reference me to tht website

thanx in advance

have a nice day

Re: Visual C# General Using VC++.NET code in C#>NET

David Anton

We are a few weeks away from releasing a C++ to C# converter, which will handle C++/CLI, native C++, and Managed (2003) C++.

However, it will not convert native C++ library calls - we'll allow you to specify your own custom replacement scheme for these. It will do a fairly fine job on C++/CLI to C# though.

Drop us an email at 'info' at the url below and we'll let you know when it's released.

David Anton
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
Instant C++: converts C# to C++/CLI and VB to C++/CLI
Instant Python: converts C# to IronPython and VB to IronPython

Re: Visual C# General Using VC++.NET code in C#>NET

Vic Vega

There are different ways to do it. It depends on type of dll.

1st way : Using a MC++ layer to delegate call from Managed ( C# ) to UnManaged code( C++). This takes more time if you are going to create wrapper


Class A


public :

void Method(){}



Class AWrap



void Method() { ptrToCPlusObj->Method()}


A* ptrToCPlusObj // create a object in constructor



AWrap myObj = new AWrap ()


2nd way : If it is COM dll, you can add reference using COM references ( will create Interop ).

3rd way : using PInvoke. DLLImport.