Home > Software engineering >  Ask everyone how to understand: If this DLL is dynamically linked against the MFC DLLs.
Ask everyone how to understand: If this DLL is dynamically linked against the MFC DLLs.

Time:02-09

Note!

If this DLL is dynamically linked against the MFC DLLs, any functions provides exported from this call into the MFC DLL which must have the AFX_MANAGE_STATE macro added at the very beginning of the function.
For example:

Extern "C" BOOL PASCAL EXPORT ExportedFunction ()
{
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
Normal function body here
}

It is very important that this macro appear in each function, the prior to any calls into the MFC. This means that It must appear as the first statement within the function, even before any object variable declarations as their constructors may generate calls into the MFC DLL.

Both Please see MFC Technical Notes 33 and 58 for additional details.

Machine translation is what B, see don't understand, so want to ask you how to understand,
If this DLL is dynamically linked against the MFC DLLs,
Baidu said: if the DLL with MFC DLL dynamic link,
GG to say: if the DLL is with MFC DLL dynamic link,
It itself is a DLL, how and what with the MFC DLL dynamic link? Look not to understand

CodePudding user response:

My translation:
If this DLL is dynamically linked against the MFC DLLs, any functions provides exported from this call into the MFC DLL which must have the AFX_MANAGE_STATE macro added at the very beginning of the function.
If the DLL is dynamic link with the MFC DLL (really don't understand the logic), in the MFC program call the DLL in the export of any function, must add AFX_MANAGE_STATE macro at the beginning of a function,

CodePudding user response:

Itself is a DLL, also can call the other DLL functions, this sentence is said:
If you set this DLL "in a Shared DLL using MFC", then you will need to add the export function,
  • Related