Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a MFC DLL in Visual Studio

As far as I can tell, Visual Studio 2008 provides two ways of making a MFC DLL:

  1. New Project -> MFC DLL
  2. New Project -> Win32 Project -> select DLL, Export symbols, & 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.

like image 586
Jim Fell Avatar asked Nov 09 '10 17:11

Jim Fell


1 Answers

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.

like image 96
Nick Meyer Avatar answered Oct 02 '22 16:10

Nick Meyer