0
votes

Dll best practices document from Microsoft available Here recommends avoiding use of memory management function from the dynamic C Run-Time (CRT) within DllMain. But DllMain function of MFC Extension DLL is dynamically allocating the memory for CDynLinkLibrary in the code snippet available at MSDN "http://msdn.microsoft.com/en-us/library/1btd5ea3%28v=VS.80%29.aspx".

Is it a violation of Dll Best Practices or ok to use in MFC extension DLL?

thanks

1

1 Answers

0
votes

"Because the MFCx0.dll is fully initialized by the time DllMain is called, you can allocate memory and call MFC functions within DllMain (unlike the 16-bit version of MFC)."