Integrating c# code in vc++.net
-
Hi, Is it possible to integrate the module developed in c#.net in vc++.net? If yes, then please let me know how it is done and using what? Archana Raj
-
Hi, Is it possible to integrate the module developed in c#.net in vc++.net? If yes, then please let me know how it is done and using what? Archana Raj
_FYI: Going forward Please Post all C++/CLI/Managed C++ queries under "(Managed) C++/CLI" forum. This is not a .Net forum._
Hope your C# module is an assebly/dll and not an exe/application. If it is an assembly then you can use #using to include the C# dll into your code. Then use the namespace declaration and create the class instance. declaration part:#using <csharpassebly.dll> using namespace csharpassebly::mycomponents;
class instantiation:CMyCSharpClass* objCMyCSharpClass = gcnew CMyCSharpClass(); objCMyCSharpClass->method1();
If you c# module is an exe/application, then it is a diffrent story: useSystem.Diagnostic.Process
class to invoke the process. cheers...milton. -
_FYI: Going forward Please Post all C++/CLI/Managed C++ queries under "(Managed) C++/CLI" forum. This is not a .Net forum._
Hope your C# module is an assebly/dll and not an exe/application. If it is an assembly then you can use #using to include the C# dll into your code. Then use the namespace declaration and create the class instance. declaration part:#using <csharpassebly.dll> using namespace csharpassebly::mycomponents;
class instantiation:CMyCSharpClass* objCMyCSharpClass = gcnew CMyCSharpClass(); objCMyCSharpClass->method1();
If you c# module is an exe/application, then it is a diffrent story: useSystem.Diagnostic.Process
class to invoke the process. cheers...milton.Thanks Milton :) Mine was a .EXE and i could get that application in .net by creating the process using System.Diagnostic.Process. can you tell me the way to creat a DLL for the existing vc++ application? Thanks and regards