此帖出自嵌入式系统论坛
最新回复
char* CString2cstr(CString csStr)
{
size_t convertedCharsw = 0;
char* cstr = NULL;
size_t size ;
#ifdef _UNICODE
size = (csStr.GetLength() + 1)*2;
cstr = new char[size];
if(cstr)
wcstombs_s(&convertedCharsw, cstr, size, csStr, _TRUNCATE );
#else
size = csStr.GetLength() + 1;
cstr = new char[size];
if(cstr)
strcpy_s(cstr, size, csStr);
#endif
return cstr;
}
详情
回复
发表于 2009-9-21 12:03
| ||
|
||
| |
|
|
此帖出自嵌入式系统论坛
| ||
|
||
| |
|
|
此帖出自嵌入式系统论坛
| ||
|
||
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
此帖出自嵌入式系统论坛
| ||
|
||
此帖出自嵌入式系统论坛
| ||
|
||
此帖出自嵌入式系统论坛
| ||
|
||
此帖出自嵌入式系统论坛
| ||
|
||
EEWorld Datasheet 技术支持