Hi Pascal, Terminology: there are two types of string, UNICODE (wide, 16-bit) and multi-byte (default 8-bit). In UNICODE CString can load a multi-byte, for example:
char* pszMultiByte = "Simon is 8";
CString strUnicode(pszMultiByte); // Now held in UNICODE
So if you have strings in a CByteArray you can load them into a CString, then just add the CStrings.
CByteArray abyData;
CString strFromArray((char*)abyData.GetData()); // Note use of cast.
strUnicode += strFromArray;
To answer the question about the cast (where you use LPTSTR). This solves the ambiguity because you are telling the CString m_csRecon what type of data you are supplying, (and in your case it's going to go wrong I think). Without this, the compiler had more than one possible option, and is asking you for help (provide a cast). Casts are useful and dangerous - you can cast incorrectly, so watch out. I very strongly suggest that you use casts as I did with strFromArray((char*)abyData.GetData()) because that way you can see exactly what you are trying to do, it's also your note to yourself. If you supply a cast it will only work the way you intend, no default behaviour at all. I never rely on default conversion to UNICODE - I always cast everything. Also, I suggest you set VC++ to warning level 4 - this will pick up lots of areas where things may be going wrong. Based on what I understand about what you are doing: * Convert all incoming strings (held in the CByteArray) from char* to UNICODE in a CString or CStringArray. * Work with UNICODE internally. * Convery all outgoing strings from UNICODE (wide, 16 bit) to char* (multibyte) just before the vanish down the wire to the other side. There are routines in MSDN to do this. Look for wide to multi-byte. If you want to e-mail me directly do so using simon.brown@kns.ch and I'll help as I can. I only had 100,000 lines in my previous project when I had to convert to UNICODE, toook two long days. My advice is to alsways start in UNICODE, I do that except for some DLLs which talk to non-UNICODE targets such as Lotus Notes. Good Luck :rolleyes: Old Simon HB9DRV