VC2005 error C2664
来源:互联网 发布:中国为何要建立网络墙 编辑:程序博客网 时间:2024/05/16 04:59
错误 1 error C2664: “CreateFileW”: 不能将参数 1 从“char [7]”转换为“LPCWSTR” e:/mystudy/09/myvirtualdisk11/myvirtualdiskdll/diskdll.cpp 112
错误 2 error C2664: “DefineDosDeviceW”: 不能将参数 2 从“char *__w64 ”转换为“LPCWSTR” e:/mystudy/09/myvirtualdisk11/myvirtualdiskdll/diskdll.cpp 134
解决方法:利用类型强制转换,即在参数1前加上(LPCWSTR)或reinterpret_cast<LPCWSTR>(表达式)
扩展:C++ 新的类型转换操作符 static_cast, const_cast, dynamic_cast, 和reinterpret_cast。
关于详情及更多相关资料 参阅MSDN
- VC2005 error C2664
- VC2005 error C2664 的解决方法
- error C2664
- error C2664
- ERROR C2664
- error C2664:
- error C2664
- error C2664
- error C2664,error C2039
- error C2664 c++
- error C2664: “MessageBoxW”解决方案
- error C2664-----STL学习
- error C2664-----STL学习
- error C2664的解决方法
- 关于error C2664
- error C2664: 'LoadImageW'
- Error C2664 解决方法
- VS2008 出现 error C2664
- 利用模块化的可扩展参考设计瞄准ATCA和AMC市场机会
- 探索MPICH2安装与设置
- [Windows编程] 如何判断操作系统是64位还是32位
- 山后还有山,错误背后还隐含着错误
- My first blog
- VC2005 error C2664
- OpenSUSE linux下安装MyEclipse7.0.1
- 智能技术
- YTITYYYITYI
- 唉
- 脚本常用功能
- 真心话大接龙
- kernel基本功练习
- include 与 jsp:include的区别