N Nick Sep 9, 2004 #1 Hi, Is it possible to use C++ code directly in C#? (not by COM interop) Thanks.
N Nicholas Paldino [.NET/C# MVP] Sep 9, 2004 #2 Nick, No, it is not. The only way you could do it is through COM Interop, the P/Invoke layer, or by creating a managed wrapper. Hope this helps.
Nick, No, it is not. The only way you could do it is through COM Interop, the P/Invoke layer, or by creating a managed wrapper. Hope this helps.
R Ricky Sep 9, 2004 #3 Hi, In fact, I have some codes orginally written using C++/ATL, my concern is to port the code into a C# project. For the choices you adviced, which is the most easiest method of doing this? Thanks.
Hi, In fact, I have some codes orginally written using C++/ATL, my concern is to port the code into a C# project. For the choices you adviced, which is the most easiest method of doing this? Thanks.
N Nicholas Paldino [.NET/C# MVP] Sep 9, 2004 #4 Ricky, Why port it? If you have it written in using C++ and ATL, then I assume it is a COM object? If it works, why spend the money to port it? I would just use COM interop, setting a reference to the COM object in my .NET project.
Ricky, Why port it? If you have it written in using C++ and ATL, then I assume it is a COM object? If it works, why spend the money to port it? I would just use COM interop, setting a reference to the COM object in my .NET project.