Skip to content

Commit 19de8c3

Browse files
authored
Update run-time-library-behavior.md
The first two parameters of the structure AFX_EXTENSION_MODULE are BOOL and HMODULE. So initialization with = { NULL, NULL } is misleading: first NULL is FALSE (or 0 due to BOOL is defined as int). In fact this expression cannot be transformed to modern C++ equivalent = { nullptr, nullptr }. struct AFX_EXTENSION_MODULE { BOOL bInitialized; HMODULE hModule; HMODULE hResource; CRuntimeClass* pFirstSharedClass; COleObjectFactory* pFirstSharedFactory; };
1 parent 24d2e9c commit 19de8c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/build/run-time-library-behavior.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The wizard provides the following code for MFC extension DLLs. In the code, `PRO
116116
#undef THIS_FILE
117117
static char THIS_FILE[] = __FILE__;
118118
#endif
119-
static AFX_EXTENSION_MODULE PROJNAMEDLL = { NULL, NULL };
119+
static AFX_EXTENSION_MODULE PROJNAMEDLL = { 0 };
120120

121121
extern "C" int APIENTRY
122122
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)

0 commit comments

Comments
 (0)