INF: Changes to DLL Makefiles for Windows NT 3.1 Release

PSS ID Number: Q101337
Article last modified on 04-20-1994

3.10
WINDOWS NT

----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Win32 Software Development Kit (SDK) for Windows NT,
   version 3.1
----------------------------------------------------------------------

SUMMARY
=======
The documentation and sample makefiles for beta versions of the Win32
software development kit (SDK) use a different entry point for dynamic-link
libraries (DLLs) than is recommended for the Windows NT 3.1 release. This
difference is especially important to note if your DLLs are linked with the
C Run-time.
Previously, Microsoft recommended calling _crt_init() in your DLL entry
point (or making it the DLL entry point), so that the C run time would be
correctly initialized. Currently, Microsoft recommends that all DLLs
provide a main function
   BOOL WINAPI DllMain( HANDLE hDLL, DWORD dwReason, LPVOID lpReserved )
and that the entry point be specified with the following linker
option:
   -entry:_DllMainCRTStartup$(DLLENTRY)

MORE INFORMATION
================
The loader calls DllMainCRTStartup(), which is provided in the C Run-time
library. This routine handles all C Run-time and C++ initialization, then
determines whether DllMain() is exported from the DLL, and executes it if
it exists.

Additional reference words: 3.10
KBCategory: Prg
KBSubcategory: BseDll
=============================================================================
Copyright Microsoft Corporation 1994.