Skip to content

Update extension-dll-macros.md - #2624

Merged
Colin Robertson (colin-home) merged 1 commit into
MicrosoftDocs:masterfrom
yury-fedorov:patch-3
Nov 30, 2020
Merged

Update extension-dll-macros.md#2624
Colin Robertson (colin-home) merged 1 commit into
MicrosoftDocs:masterfrom
yury-fedorov:patch-3

Conversation

@yury-fedorov

Copy link
Copy Markdown
Contributor

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;
};

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;
};
@PRMerger10

Copy link
Copy Markdown
Contributor

Yury Fedorov (@yury-fedorov) : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yury Fedorov (@yury-fedorov) Thanks. I've pushed a similar change for the remaining instance found in the docs.

@colin-home
Colin Robertson (colin-home) merged commit 8e137b5 into MicrosoftDocs:master Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants