> I have this MFC dll which I want to reuse in my .NET application If it
was
a COM dll then just adding a reference would have created the .net
wrapper
for me and the world would have been a simple place :-) But its not so
with
the MFC dl...so what should I do to reuse this guy?
If it's a "plain DLL" that uses MFC internally, you can use P/Invoke to
call functions in the DLL. An example:
using namespace System::Runtime::InteropServices;
extern "C" {
[DllImport("YourMfcDll")]
double Add(double num1, double num2);
}
But if your DLL exposes MFC classes, in the way where you can pass a
CString to another DLL for example, I am afraid it can be consumed only by
another MFC application.
Greetings,
Wessel