MultiByteToWideChar和WideCharToMultiByte的用法
来源:互联网 发布:交大网络教育学院登录 编辑:程序博客网 时间:2024/05/21 17:57
多字节转换为宽字符:
同理,宽字符转为多字节字符的代码如下:
char sText[20] = {"多字节字符串!OK!"}; DWORD dwNum = MultiByteToWideChar (CP_ACP, 0, sText, -1, NULL, 0); wchar_t *pwText; pwText = new wchar_t[dwNum]; if(!pwText) { delete []pwText; } MultiByteToWideChar (CP_ACP, 0, psText, -1, sText, dwSize); delete []psText;
同理,宽字符转为多字节字符的代码如下:
wchar_t wText[20] = {L"宽字符转换实例!OK!"};DWORD dwNum = WideCharToMultiByte(CP_OEMCP,NULL,wText,-1,NULL,0,NULL,FALSE);char *psText;psText = new char[dwNum];if(!psText){delete []psText;}WideCharToMultiByte (CP_OEMCP,NULL,wText,-1,psText,dwNum,NULL,FALSE);delete []psText;
- MultiByteToWideChar和WideCharToMultiByte的用法
- MultiByteToWideChar和WideCharToMultiByte用法
- MultiByteToWideChar和WideCharToMultiByte用法
- MultiByteToWideChar和WideCharToMultiByte用法
- MultiByteToWideChar和WideCharToMultiByte用法
- MultiByteToWideChar和WideCharToMultiByte用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- (ZT)WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- WideCharToMultiByte和MultiByteToWideChar函数的用法
- android创建googlemap基础教程和画导航线路图
- Linux error code
- hdu 4674 边双连通缩点+倍增lca+麻烦的讨论 (2013多校联合)
- 分析集线器的工作原理--视频学习笔记
- VC中自定义消息的方法及步骤
- MultiByteToWideChar和WideCharToMultiByte的用法
- easyui中关闭所有的tab标签
- 汇编语言学习——第五章 [BX] 和LOOP 指令
- C语言实现函数模板
- hdu1128 Self Numbers
- linux注册设备驱动的理解
- Linux文件系统十问
- QXL驱动分析(二)——FindAdapter
- WAIT TYPE:PAGEIOLATCH_SH