Skip to content

Commit 9f76edc

Browse files
authored
Update afx-extension-module-structure_1.cpp
The first two parameters of the structure AFX_EXTENSION_MODULE are BOOL and HMODULE. So initialisation with = { NULL, NULL } is inaccurate: 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 9f76edc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/atl-mfc-shared/codesnippet/CPP/afx-extension-module-structure_1.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
static AFX_EXTENSION_MODULE NVC_MFC_DLLDLL = { NULL, NULL };
1+
static AFX_EXTENSION_MODULE NVC_MFC_DLLDLL = { 0 };
22
extern "C" int APIENTRY
33
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
44
{
@@ -11,4 +11,4 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
1111

1212
// MFC extension DLL one-time initialization
1313
if (!AfxInitExtensionModule(NVC_MFC_DLLDLL, hInstance))
14-
return 0;
14+
return 0;

0 commit comments

Comments
 (0)