MFC常规DLL调用MFC扩展DLL
我的程序中当前存在这样的问题:
通过CWnd::FromHandle()函数不能正确地将窗口句柄hWnd找到对应的CWnd对象。即窗口handle和CWnd对象的映射表(map)似已毁坏。
原因可能是dll调用出的问题。
请问:
1.MFC扩展DLL可以调用其它MFC扩展DLL吗?
2.MFC常规DLL(或ActiveX控件)可以调用MFC扩展DLL吗?
以上调用需要注意什么问题?
在新建一个regular(常规)DLL时,会有如下语句:
// Insert this DLL into the resource chain
// NOTE: If this Extension DLL is being implicitly linked to by
// an MFC Regular DLL (such as an ActiveX Control)
// instead of an MFC application, then you will want to
// remove this line from DllMain and put it in a separate
// function exported from this Extension DLL. The Regular DLL
// that uses this Extension DLL should then explicitly call that
// function to initialize this Extension DLL. Otherwise,
// the CDynLinkLibrary object will not be attached to the
// Regular DLL's resource chain, and serious problems will
// result.
它提示我们dll调用时要注意什么呢?