>Using VS 2005.
>I want to write a DLL in C++.NET that will then be used in a Windows
Forms application written in C#.
How do I write the C++ DLL such that C# will be able to use it?
How do I then use the DLL in C#?
If you write it in C++/CLI you can create a seamless interface to your
C#. I'd define an idealised C# interface and then convert that to
C++/CLI syntax.
In your C++/CLI you can interface to native code effortlessly (or as
effortless as it can be) :)
Using the C++/CLI DLL is as easy as it is if it were C# or VB.Net -
just add a reference to it and you can then access its public classes
and methods.
Dave