Converting vc++.net code to c#
-
Hi I have a desktop application written using VC++.NET. Majority of the code in it is written for manipulating a MySQL database. I am planning to migrate the desktop application to a Web application. So will I be able to use the existing VC++.NET code for it? If not, how can I convert it to C#? Is there any good free tools for conversion? rgds Anvesh
-
Hi I have a desktop application written using VC++.NET. Majority of the code in it is written for manipulating a MySQL database. I am planning to migrate the desktop application to a Web application. So will I be able to use the existing VC++.NET code for it? If not, how can I convert it to C#? Is there any good free tools for conversion? rgds Anvesh
anveshvm wrote:
So will I be able to use the existing VC++.NET code for it?
You can use it. Just create managed wrappers for your VC++ classes and use the wrapper classes with your web applications. If you are writting your wrapper in C#, you need to use P-Invoke for accessing C++ classes. If you use C++/CLI, you can use it directly by including necessary files into your managed class.
Navaneeth How to use google | Ask smart questions
-
anveshvm wrote:
So will I be able to use the existing VC++.NET code for it?
You can use it. Just create managed wrappers for your VC++ classes and use the wrapper classes with your web applications. If you are writting your wrapper in C#, you need to use P-Invoke for accessing C++ classes. If you use C++/CLI, you can use it directly by including necessary files into your managed class.
Navaneeth How to use google | Ask smart questions
-
"If you use C++/CLI, you can use it directly by including necessary files into your managed class." If I wrap with C++/CLI can I call the functions from asp.net ??
anveshvm wrote:
If I wrap with C++/CLI can I call the functions from asp.net ??
Yes. But you will have problems if the VC++ classes are handling with MFC forms or other things which web application won't support.
Navaneeth How to use google | Ask smart questions