MFC常规DLL调用MFC扩展DLL

jiangminfeng 2006-07-27 12:52:52
我的程序中当前存在这样的问题:
通过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调用时要注意什么呢?
...全文
95 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
syy64 2006-07-27
  • 打赏
  • 举报
回复
1、2都可以。

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧