---------------------------------------------------- “If you use the pointer returned by GetBuffer to change the string contents, you must call ReleaseBuffer before using any other CString member functions. ” 即调用GetLength()之前,先掉用ReleaseBuffer()函数; 例如: S.ReleaseBuffer(); for(i=0; i<S.GetLength(); i++) // 对加密结果进行转换 { }