Hey Guys
This little piece of code works fine copying one buffer to the other up to 59kb if the buffer is bigger then this the program crashes any ideas. I originally had int y not DWORD y and was convinced it was the problem but it still causes a crash.Code:void CMiscFunctions::CopyValueToBuffer(BYTE *pDataToCopy, BYTE *pBuffer, DWORD *dwLengthOfBuffer, DWORD dwSizeOfData) { DWORD i = *dwLengthOfBuffer; for(DWORD y = 0; y < dwSizeOfData; y++, i++) { pBuffer[i] = pDataToCopy[y]; } *dwLengthOfBuffer = i; }
Any Ideas
Peter




Reply With Quote