Creating a MFC DLL in Visual Studio
As far as I can tell, Visual Studio 2008 provides two ways of making a MFC DLL:
- New Project -> MFC DLL
- New Project -> Win32 Project -> select DLL, Export symbols, &开发者_StackOverflowamp; MFC
What is the difference? The two methods seem to generate very different starter code. The second methods appears to generate code that I would expect to see for a DLL. Thanks.
The first creates what is called an MFC "Extension DLL". The key distinction here is that this DLL is only available to MFC programs and other DLLs that use MFC. Its public interface may pass MFC types between the DLL and its clients.
The second creates a "Regular DLL" that links to MFC. It can use MFC internally but exposes an MFC-independent interface so non-MFC programs can use it too.
There are more distinctions, which you can read about in the linked pages.
精彩评论