在DLL中使用AfxGetInstanceHandle()的正确方法

编程入门 行业动态 更新时间:2024-10-11 17:19:08
本文介绍了在DLL中使用AfxGetInstanceHandle()的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好 有人可以解释一下如何在DLL(基于对话框的MFC应用程序作为DLL)中使用AfxGetInstanceHandle()吗? 它一直都返回NULL值,但是不知何故,它可以在Release模式下工作,我不知道如何正确使用它. 请指教. 谢谢 Sutha

Hi All Can Someone explain me how to use AfxGetInstanceHandle() inside a DLL (Dialog based MFC Application as a DLL)? It returns NULL value all the time, but somehow It works in Release mode, I have no idea how to use this properly. Please advice. Thanks Sutha

推荐答案

要成功获取dll文件与DLL的USRDLL版本链接所需的Instance值. 我想您在调试和发行版本中使用了不同的项目设置,从而导致了问题. To sucessfully get the Instance value the dll file needs to linked with USRDLL version of MFC. I guess you are having different project settings for debug and release version and that causing the problem.

更多推荐

在DLL中使用AfxGetInstanceHandle()的正确方法

本文发布于:2023-10-11 17:29:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1482355.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正确   方法   DLL   AfxGetInstanceHandle

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!