Daniel,
No, the file handle will not remain the same. The handle is nothing
more than a pointer in memory to a structure which contains information
about the open file.
If you want a way of uniquely identifying the file, you will have to
resort to something like hashing the file to determine if the contents are
the same (after checking the length of the files, of course).
If you have control over the format of the file you are comparing, then
I would create a GUID and place it somewhere in the file to be read (at a
fixed location, preferably). Then, you could just read the identifier and
see if they match (assuming that someone doesn't manually change it).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Daniel" <so*******************@yahoo.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
does the windows file handle change?
are file handles unique to the whole operating system or just the current
directoy? if a file is opened then closed then opened again, does the file
handle remain the same?