In my VC6 project we have a class derived from CString called CString2. It has a convenient method that loads a file. Here is the code:
BOOL CString2::Load(FILE* stream, long bytes)
size_t count = fread(m_pchData, sizeof(BYTE), bytes, stream);
return ((long)count == bytes);
The problem that I'm having is that "AllocBuffer()" is no longer implement in 2005/2008. Since this class is used in so many places within our code, for various reasons, I have been trying to come up with a way to replace the contents of the above method so as to not have to replace the entire class everywhere it's used. I'm not that familiar with 2008 so any help would be GREAT!