I am working on Visual studio C++.
I have these codes:
CString str;
BYTE byBuffer[10000] = { 0 };
str ="Invalid Command. Spaces are not allowed too!!";
strcpy_s(reinterpret_cast<LPSTR>(byBuffer), 10000, T2CA(str ));
The problem is byBuffer = "Invalid Command. Spaces are not allowed too!!"; but after the following line, the string changes. LPBYTE lp=byBuffer ; Although it works fine for small strings like OK, GOOD JOB. etc..
i am debugging the whole code by setting the breakpoints. moreover this function has been called to another function in which ( LPBYTE lpBuffer) recieved this value.
Plz help