我最近在调试dll时刻,有一种模糊的断言错误,它是由主程序创建MFC 扩张DLL控制出口(从控制继承CWnd分类)时刻,呼叫Create()下列说法错误的功能:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY2JOb3Rlcw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

调试跟进去:

file:afxwin1.inl

line:21

发现是以下的断言语句报错:

_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()

{

ASSERT(afxCurrentResourceHandle != NULL);//这里出错!

return afxCurrentResourceHandle;

}

费了非常大的周折才解决,事实上就是犯了一个非常低级的错误,dll的字符集不匹配,mfc dll的字符集为UNICODE。但 我调用Create()函数时传进去表格命名ansi字符集,所以不匹配!

版权声明:本文博主原创文章,博客,未经同意不得转载。

左右Cwnd::Create()功能出现afxwin1.inl line:21错误的解决方案的更多相关文章

  1. 在Eclipse中配置Tomcat时,出现Cannot create a server using the selected type错误

    在eclipse中配置Tomcat时,出现Cannot create a server using the selected type错误 原因:Tomcat被删除或者是重新安装,并且安装目录改变了. ...

  2. 解决dedev5.7更新出现include\userlogin.class.php on line 21的办法

    第一种情况解决办法:   在dede\templets文件夹 找到 index_body.htm  文件 把这些注释掉. $(function() {    $.get("index_tes ...

  3. Wide character in print at hcp.pl line 21.

    jrhmpt01:/root# cat -n hcp.pl 1 use LWP::UserAgent; 2 use Encode; 3 $ua = LWP::UserAgent->new; 4 ...

  4. SyntaxError: Non-ASCII character '\xe5' in file D:/pcode/xx.py on line 21, but no encoding declared

    from selenium import webdriver from datetime import * import time starttime = datetime.now() print ( ...

  5. Create a Solution using the Wizard 使用向导创建解决方案

    In this lesson, you will learn how to create a new XAF solution. You will also be able to run the ge ...

  6. ECshop lib_base.php on line 1241 错误解决方法

    ECSHOP做的一个网站,突然报这个错误,整个网站打不开,后来找了很久,终于找到这个方法,亲测可用 Notice: Undefinedvariable: data in D:\wwwroot\KISS ...

  7. 用IFeatureWorkspaceAnno.CreateAnnotationClass 创建注记图层时报“The application is not licensed to modify or create schema”的错误的解决方案。

    用IFeatureWorkspaceAnno.CreateAnnotationClass 的方法创建注记图层的时候报"The application is not licensed to m ...

  8. MyEclipse项目的jquery.js发生[Multiple markers at this line - Missing semicolon]的解决方案

    问题描述: 导入jquery库后,发现提示错误信息:Multiple markers at this line - Missing semicolon,如下截图所示: 解决方案: 选中该jquery. ...

  9. tomcat错误信息解决方案【严重:StandardServer.await: create[8005]】

    错误信息:   严重: StandardServer.await: create[8005]:  java.net.BindException: Address already in use: JVM ...

随机推荐

  1. sql语句的编程手册 SQL PLUS

    一.SQL PLUS 引言 SQL命令 以下17个是作为语句开头的关键字: alter drop revoke audit grant rollback* commit* insert select ...

  2. x264代码剖析(十五):核心算法之宏块编码中的变换编码

    x264代码剖析(十五):核心算法之宏块编码中的变换编码 为了进一步节省图像的传输码率.须要对图像进行压缩,通常採用变换编码及量化来消除图像中的相关性以降低图像编码的动态范围.本文主要介绍变换编码的相 ...

  3. [array] leetCode-16. 3Sum Closest -Medium

    16. 3Sum Closest -Medium descrition Given an array S of n integers, find three integers in S such th ...

  4. stm32的adc时钟周期,ADC_SampleTime_1Cycles5是多长时间

  5. ZOJ 2476 Total Amount 字符串

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1476 题目大意: 给你n串数字组成的字符串,要求输出他们相加的和. 如:n=  ...

  6. Spring Tool Suite(STS)加速

    Java开发首选技术是Spring,使用Spring技术首选的开发工具是STS,STS有许多加速spring开发的提示和快捷方式,并将spring的最新技术通过STS快速简单的传递给用户. 但是STS ...

  7. swift学习第四天:swift中的循环

    区间for循环 for i in 0..<10 { print(i) } for i in 0...10 { print(i) } 特殊写法 如果在for循环中不需要用到下标i for _ in ...

  8. Android自定义组件系列【6】——进阶实践(3)

    上一篇<Android自定义组件系列[5]--进阶实践(2)>继续对任老师的<可下拉的PinnedHeaderExpandableListView的实现>进行了分析,这一篇计划 ...

  9. Windows Phone 8.1 应用间共享

    (1)LaunchUriAsync 将简单数据包含在 Uri 中,然后发送到目标应用: await Launcher.LaunchUriAsync(new Uri("target:messa ...

  10. bash keys

    stty-a CTRL-S and CTRL-Q are called flow-control characters. Bash readline 使用技巧_Linux编程_操作系统_希赛网 htt ...