wcscpy_s是对应于wcscpy的安全版本。
CString cstrVolDesc;
wchar_t* label = new wchar_t[100];
..
..
//wcscpy_s(label, cstrVolDesc.GetLength(), cstrVolDesc.GetString());//error:"Buffer too small"
wcscpy_s(label, cstrVolDesc.GetLength()+1, cstrVolDesc.GetString());
..
可见,使用wcscpy_s一定要保证目标字符串的大小一定要比源字符串大,而且第二个参数指定的数量至少等于源字符串的大小+1(包括最后的 )