تسجيل الدخول

مشاهدة النسخة كاملة : Junk characters appearing after writing buffer to file



C++ Programming
07-25-2009, 02:10 PM
Hi everyone i m facing one problem while writing buffer into a file.
Actually i m using Ramanan T's NTFS undelete code for reading MFT table for files in
NTFS file system of a partition.
Undelete a file in NTFS (http://www.codeproject.com/KB/files/NTFSUndelete.aspx)

I m getting junk characters for small headers files of visual studio.Its reading all other formatted files like .doc,.xls or JPEG,.bmp etc properly.Even large sized cpp files also reading properly.i m reading 4kb ie one cluster at a time.

Here is the code where i m getting the junk characters.

class CErrorLog
{
public:
CErrorLog(void);
public:
? ErrorLog(void);

WCHAR wcErrLogPath[QP_MAX_PATH];
}

I m not able to find out why that junk is coming in between for some files only

Thankx in advance for any help.....