我最近在调试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. oracle_经常使用分组函数

     oracle_经常使用分组函数 ①分组函数 1.max(column):求最大值,对数据类型没有要求,随意数据类型都能够 2.min(column):求最小值,对数据类型没有要求,随意数据类型都 ...

  2. LoadRunner--录制手机APP脚本

    通过LR录制手机脚本的方式有三种: 1)通过安卓模拟器录制: 2)通过抓包录制: 3)通过代理方式录制: 本文使用第二种方式进行录制,首先需要先安装LoadRunner11测试工具,然后安装lr录制A ...

  3. 重构——DataTable转泛型

         泛型简单介绍         泛型能够最大限度的重用代码.保护类型的安全.提高性能.         泛型最常见的用途是创建集合类         泛型数据类型中使用的信息可在执行时通过反射 ...

  4. php实现 查找输入整数二进制中1的个数

    php实现 查找输入整数二进制中1的个数 一.总结 一句话总结: 1.if($j&intval($num)){}的作用是什么? 1 <?php 2 while($num=trim(fge ...

  5. gvim 窗口最大化启动

    此文来源于vimer的程序世界 首先需要 gvimfullscreen.dll 文件  下载gvimfullscreen.dll 下载源码 之后只需要在vimrc中配置如下代码就可以按F11使Vim全 ...

  6. Your algorithm's runtime complexity must be in the order of O(log n).

    Given a sorted array of integers, find the starting and ending position of a given target value. You ...

  7. Coverage报告生成

    Coverage报告生成 覆盖率 覆盖率驱动的验证方法中覆盖率报告的生成至关重要,现在介绍一下使用DVE和URG生成覆盖率报告的步骤. 使用VCS生成数据 在VCS的运行脚本中添加-cm cond+f ...

  8. [Angular] Testing @Input and @Output bindings

    Component: import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output } from '@angular ...

  9. 广播(broadcast)、电视与电视网络

    1. 闭路电视与电视 Closed Circuit Television (CCTV) 一种图像通信系统.其信号从源点只传给预先安排好的与源点相通的特定电视机.广泛用于大量不同类型的监视工作.教育.电 ...

  10. (一一六)新浪微博client的离线缓存实现思路

    上一节(一一五)利用NSKeyedArchiver实现随意对象转为二进制介绍了将随意对象转化为二进制数据和还原的方法.可用于实现本节介绍的微博数据离线缓存. 通过新浪官方的API能够发现,返回的微博数 ...