“GetModuleFileNameW”: 不能将参数 2 从“char [260]”转换为“LPWSTR”
来源:互联网 发布:linux 脚本 批量执行 编辑:程序博客网 时间:2024/06/07 07:49
编译环境:Windows XP + VS2008
在VC6中可以编译成功的代码在VS2005,VS2008中编译出错。
原因:LPWCH是指long pointer to wide char,VS2005和2008默认使用unicode编码,而vc6默认使用多字节编码。
解决方法:
(1)将char改为wchar_t,但是会引起很多题目(在既有代码中)
(2)在项目的属性>配置属性>常规中,将“字符集”由“使用Unicode字符集”改为“使用多字节字符集”
from:http://blog.163.com/fullsee@126/blog/static/142021443201082094659934
阅读全文
0 0
- error C2664: “GetModuleFileNameW”: 不能将参数 2 从“char [260]”转换为“LPWSTR”
- error C2664: “GetModuleFileNameW”: 不能将参数 2 从“char [260]”转换为“LPWSTR”
- “GetModuleFileNameW”: 不能将参数 2 从“char [260]”转换为“LPWSTR”
- 不能将参数 2 从“char [256]”转换为“LPWSTR”
- “strcmp”: 不能将参数 1 从“LPWSTR”转换为“const char *”
- error C2664: “wsprintfW”: 不能将参数 1 从“char [32]”转换为“LPWSTR” 1>
- 无法将参数 1 从“char ”转换为“LPWSTR”
- BOOL CreateProcessW: 无法将参数 2 从“char [4]”转换为“LPWSTR” 错误的解决方法
- 不能将参数 从“char [260]”转换为“ACHAR *”
- 不能将参数 2 从“char [8]”转换为“LPCWSTR”
- 不能将参数 2 从“TCHAR *”转换为“const char *”
- 不能将参数 1 从“char [10]”转换为“LPTSTR”
- 不能将参数1从“const char []”转换为“LPCTSTR
- 不能将参数1从“const char []”转换为“LPCTSTR
- 不能将参数 1 从“CString”转换为“const char *”
- 不能将参数1从“CString”转换为“const char *”
- 不能将参数 1 从“CString”转换为“const char *”
- 不能将参数1从“const char []”转换为“LPCTSTR
- Mysql 排序原理
- 杭电ACM1000
- Python报错信息与原因分析
- /usr/local/lib/libpython2.7.a: could not read symbols: Bad value. collect2: ld retur ned 1 exit
- jquery+css实现下拉列表
- “GetModuleFileNameW”: 不能将参数 2 从“char [260]”转换为“LPWSTR”
- Find a multiple POJ
- hadoop 压缩解压
- Humble Numbers(hdoj1058)
- [NOIP模拟赛]分钱
- ESP8266程序烧写
- 标签总结
- 简单文件上传到服务器
- 假期总结开学计划