分类: C/C++
2011-10-11 09:53:52
2.用TCHAR*代替char*,用WORD*代替unsigned char*
next:
CString str = "abcd";
unsigned char* pC = (unsigned char*)(LPCTSTR)str;
或
CString s("ABC");
unsigned char *puc = (unsigned char*)s.GetBuffer( s.GetLength() );
...;//必须等指针使用完之后才能进行下一条释放命令。
s.ReleaseBuffer();