04-30-2008 01:10 AM
04-30-2008 07:32 PM
04-30-2008 08:25 PM
Hi Abhijit,
They will all work with your .NET application, but it depends what you want to do with them and how to interface with them. The Class Library is a .NET, managed DLL. The MFC DLL is an unmanaged DLL interfaced with the Microsoft Foundation Class Library - the predecessor to .NET in C++. Both are different technologies used to encapsulate the windows API. Lastly, a Win32 DLL is the most basic of DLLs - providing no encapsulation and typically used now for simple programming (such as no GUI or object oriented programming). Again, it all depends what you want to do with the DLL. For example, if you would like to create dialog boxes from within the DLL (not your application), then you would use the MFC or Class Library DLLs. However, since you will be using the DLL in a .NET application, I would stick to Class Library to make life a lot easier. Be forewarned that developing in managed C++ could be a daunting task.
If you however just want to do simple operations, such as processing data, then go with Win32 DLLs. They can easily be imported to a .NET language (VB/C#) by using the DllImport() function.
Hope this helps Abhijit!
For examples, simply do a search for creating DLLs and you will get tons of information.
Here are just a few:
DLL Tutorial Part I: MFC DLL Basics
http://www.dotnetheaven.com/Uploadfile/mahesh/DLLBasicsPart105192005020909AM/DLLBasicsPart1.aspx?Art...
CodeProject: Win32 vs MFC
http://www.codeproject.com/KB/cpp/mfc_architecture.aspx
Step by Step: Calling C++ DLLs from VC++ and VB - Part 1
http://www.codeproject.com/KB/DLL/XDllPt1.aspx
Creation of a Simple DLL
http://www.codeproject.com/KB/DLL/dll.aspx
02-04-2010 08:17 PM
Dear Sir:
I succeeded in making DLL functions and implemented on my projects by using Visual C++ 5.0 or 6.0. This was a very easy job. I challenged the creation of DLL functions by using Visual Studio 2008. I tried to create in the same way as the creation of DLL's by VC++ 6.0, but I failed. I need step-by-step instructions of how to create DLL's by Visual Studio 2008. Please help me.
I appreciate your kind help.
07-07-2011 11:35 AM
Just build a completely example in Visual 2010, hope it will be help.
The DLL is created in c++, then call it from C#.