Редагувати

Поділитися через


MFC extension DLLs: Overview

An MFC extension DLL is a DLL that typically implements reusable classes derived from existing Microsoft Foundation Class Library classes. MFC extension DLLs are built using the dynamic-link library version of MFC (also known as the shared version of MFC). Only MFC executables (either applications or regular MFC DLLs) that are built with the shared version of MFC can use an MFC extension DLL. With an MFC extension DLL, you can derive new custom classes from MFC and then offer this extended version of MFC to applications that call your DLL.

Extension DLLs can also be used for passing MFC-derived objects between the application and the DLL. The member functions associated with the passed object exist in the module where the object was created. Because these functions are properly exported when using the shared DLL version of MFC, you can freely pass MFC or MFC-derived object pointers between an application and the MFC extension DLLs it loads.

For an example of a DLL that fulfills the basic requirements of an MFC extension DLL, see the MFC sample DLLHUSK. In particular, look at the Testdll1.cpp and Testdll2.cpp files.

What do you want to do?

What do you want to know more about?

See also

Kinds of DLLs