I'm having issues with some code in VS2005. The code was previously compiled in VS 6 and it works fine, but when I moved to VS2005, I started getting problem. I get a runtime error when I attempt to open a certain file after it has been modified, and the line that causes this error is this:
fread(m_SEI[i].E[j].L.GetBuffer(StringLen), StringLen, 1, InStream);
Disregard the weird names (I am required to modify them).
m_SEI[i].E[j].L is a CString
StringLen is type short
and GetBuffer() is the CSimpleStringT method
Like I said, it only happens after the file has been modified, which means that the first time I run the program everything works fine, then if I make a change, it crashes.
I'm thinking that there has been some change in the way GetBuffer works in VS 2005 but I really don't know. All this code worked fine when compiled with VS 6. Was there anything changed?
Thanks