打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
window api 常识

1。在WinAPI中的数据类型中,LPSTR、LPCSTR、LPWSTR、LPCWSTR的具体区别是什么?

LPCSTR   A 32-bit pointer to a constant character string.

LPSTR   A 32-bit pointer to a character string.

LPCWSTR Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, seeCharacter Sets Used By Fonts

LPWSTR Pointer to a null-terminated string of 16-bit Unicode characters. For more information, seeCharacter Sets Used By Fonts.


LPSTR   A 32-bit pointer to a character string.
LPCSTR   A 32-bit pointer to a constant character string.

LPSTR 一个32位的指向字符串的指针
LPCSTR 一个32位的指向字符串常量的指针
LPWSTR 一个32位的指向unicode字符串的指针
LPCWSTR 个32位的指向unicode字符串常量的指针

前面的L代表LONG,P就是指针的意思,C就是constant的意思
W是wide的意思,STR就是string的意思

具体的定义参看头文件

typedef char *LPSTR;typedef const char *LPCSTR;typedef w_char *LPWSTR;typedef char w_char *LPCWSTR;
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
ANSI与Unicode编码,TCHAR | LPSTR | LPCSTR | LPWSTR | LPCWSTR | LPTSTR | LPCTSTR 的含义
LPSTR、LPCSTR、LPWSTR、LPCWSTR类型
LPWSTR,LPCTSTR,LPTSTR
CString与LPCWSTR、LPSTR、char*、LPWSTR等类型的转换
【整理】Dword、LPSTR、LPWSTR、LPCSTR、LPCWSTR、LPTSTR、...
VC数据类型
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服