I'm not sure if this is the right place to ask, but I noticed
something strange with the files written by my program. I'm using
Windows Vista, and have written a program using Visual Studio .NET
2003. The program uses both fwrite( ) and WriteFile( ) to write
different binary files to disk. I was checking the contents of the
files using Hex Editor v2.0 by HHD Software after the program has
terminated. After the file was opened, I noticed that the size of the
file doubled in size, and returned to its original size once I close
the file. This does not happen if I use Notepad to open the file. The
contents remain unchanged.
I'm not sure if this is common with Windows systems, as I've never
seen this happen before. What is happening here?
Thank you.
Regards,
Rayne
> ...I was checking the contents of the
> files using Hex Editor v2.0 by HHD Software after the program has
> terminated. After the file was opened, I noticed that the size of the
> file doubled in size, and returned to its original size once I close
> the file. This does not happen if I use Notepad to open the file. The
> contents remain unchanged.
This could be a "feature" of the HHD Hex Editor (additional space for
editing?).
Which filesize is returned by Explorer's property dialog?
What do you get from GetFileSize, when you open the file with CreateFile?
Regards,
Friedel
This seems to be only specific to the Hex Editor. The file size
displayed in the property dialog is always doubled when opened by the
Hex Editor, be it a binary file, a MS Word file, or a pcap file. But
the file size returns to its original when it's opened by other
programs or when it's closed.