摘要: Introduction Since C-style strings can be error-prone and difficult to manage, not to mention a target for hackers looking for buffer overrun bugs, there are lots of string wrapper classes. Unfortunat... 阅读全文
posted @ 2007-04-27 16:42 能巴 阅读(873) 评论(0) 推荐(0) 编辑
摘要: Introduction You've undoubtedly seen all these various string types like TCHAR, std::string, BSTR, and so on. And then there are those wacky macros starting with _tcs. And you're staring at the screen... 阅读全文
posted @ 2007-04-27 16:39 能巴 阅读(447) 评论(0) 推荐(0) 编辑
摘要: For a dll, if there is nothing to export, means there is no dllMain, and no def file(maybe more cases), then no lib file will be generated. Easy to understand: lib file is used for other ... 阅读全文
posted @ 2007-04-27 11:28 能巴 阅读(209) 评论(0) 推荐(0) 编辑
摘要: char* lpStr = "shell-ai-天天向上.prt"CString strVal = lpStr;As a result, strVal won't have correct string.Solution:CString strVal = UTX_NTOM(lpStr).c_str(); 阅读全文
posted @ 2007-04-27 11:25 能巴 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Visual C++.NET涉及到ATL/ATL Server、MFC和托管C++等多种编程方式,不仅功能强大而且应用广泛。在编程中,我们常常会遇到ANSI、Unicode以及BSTR不同编码类型的字符串转换操作。本文先介绍基本字符串类型,然后说明相关的类,如CComBSTR、_bstr_t、CStringT等,最后讨论它们的转换方法,其中还包括使用最新ATL7.0的转换类和宏,如CA2CT、CA... 阅读全文
posted @ 2007-04-27 09:52 能巴 阅读(310) 评论(0) 推荐(0) 编辑