Dennis Doomen
8/6/2003 4:06:00 PM
Hi Teo,
What you basically do is create two .cpp files. One defines classes using the __gc keyword so that it compiled into managed code (MSIL) and is accessible from C# or VB.NET. The other defines classes or methods without any .NET related keywords or constructs.
You then compile one using cl /c purecppcode.cpp, and the other using cl /c /clr managedcode.cpp. When you link them together with link.exe, you basically end up with an assembly that contains both MSIL code and pure assembly code.
It is a bit of simple example, but it should make the concept clear. If you create a Managed C++ Class Library from VS.NET, you get most of plumbing. The only thing you need to do is to add a new .cpp file and change its individual settings, or compile the unmanaged (old) code into a .LIB file. You can use ILDASM.EXE from the SDK to see the native and MSIL code end-up int he assembly.
Dennis Doomen
Sioux TSO B.V. Netherlands
"news.tin.it" <teocrack@freemail.it> wrote in message news:I55Ya.24187$an6.871163@news1.tin.it...
Hi.
I want to build a mixed dll in VC++.NET 2002 to get advantage from code performance (using ASM and point arithmetic) and use the framework infrastructure to use libraries into VB.NET and C# without pInvoke.
How can I do?
Please, somebody can give me code sample or link where can I find something?
Thanks very much,
Teo.