I want to copy some data from a char buffer into a CString. The following works great on VC++6 but does not work on windows CE.
loadDataIntoBuffer(dataBuff); //dataBuff has data
DWORD Pos = 10;
CString tmpStr = "";
LPTSTR pstr = tmpStr.GetBuffer(Pos); //addr of pstr is 0x0004bad4
memcpy( pstr,dataBuff,Pos); //value of pstr is "??????..."
Why this doesn't work under winCE? is there a better way to copy retrieve data from a char buffer into a CString?
thanks in advance