在用 VC 新建一个 DLL .会有这样的说明
//
// Note!
//
// If this DLL is dynamically linked against the MFC
// DLLs, any functions exported from this DLL which
// call into MFC 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());
...........
这英文的意思是不是说
在我要导出的函数里面
都要加 AFX_MANAGE_STATE(AfxGetStaticModuleState()); (It is very important)