Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How are regular mfc dlls dynamically linked to mfc?


Asked by Danielle Gentry on Dec 07, 2021 FAQ



Applications link to regular MFC DLLs dynamically linked to MFC it just like any other DLL. Symbols are usually exported from a regular MFC DLL using the standard C interface. The declaration of a function exported from a regular MFC DLL looks something like this:
Furthermore,
A DLL that is statically linked to MFC cannot also dynamically link to the shared MFC DLLs. A DLL that is statically linked to MFC is dynamically bound to an application just like any other DLL; applications link to it just like any other DLL.
One may also ask, If both a DLL and an application want to use MFC, both have a choice to either use the shared version of the MFC libraries or to statically link to a copy of the libraries. The application and DLL may both use one of the standard versions of the MFC library. regular MFC DLLs have several advantages:
In respect to this,
Functions are usually exported from a regular MFC DLL using the standard C interface. For an example of how to write, build, and use a regular MFC DLL, see the sample DLLScreenCap.
In addition,
The standard MFC static link libraries are named according to the convention described in Naming Conventions for MFC DLLs. However, with MFC version 3.0 and later, it is no longer necessary to manually specify to the linker the version of the MFC library you want linked in.