4/16/08

What are the advantages of using DLL's? What are the different types of DLL's? What are the differences between a User DLL and an MFC Extension DLL?

You may mention the following advantages:
1. DLLs are run-time modular. DLL is loaded when the program needs it.
2. Used as a code sharing between executables.

Types of dlls

Extension, Regular and pure Win32 DLL (without MFC)

Extension DLL -> supports a C++ interface, i.e. can export whole C++ classes and the client may construct objects from them. Extension DLL dynamically links to MFC DLLs (those which name starts with MFC??.DLL) and to be synchronous with the version it was developed for. Extension DLL is usually small (simple extension DLL might be around 10K)
Regular DLL -> can be loaded by any Win32 environment (e.g. VB 5) Big restriction is that regular DLL may export only C-style functions. Regular DLLs are generally larger. When you build a regular DLL, you may choose a static link (in this case MFC library code is copied to your DLL) and dynamic (in this case you would need MFC DLLs to be presented on the target machine)

No comments: