Setting Up a Static Link to the Registrar Code (C++ Only)
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Setting Up a Static Link to the Registrar Code (C++ Only).
C++ clients can create a static link to the Registrar's code. Static linking of the Registrar's parser adds approximately 5K to a release build.
The simplest way to set up static linking assumes you have specified DECLARE_REGISTRY_RESOURCEID in your object's declaration. (This is the default specification used by the ATL.)
To create a static link using DECLARE_REGISTRY_RESOURCEID
Specify /D
_ATL_STATIC_REGISTRY
instead of /D**_ATL_DLL**.Recompile.