Damjan Jovanovic damjan.jov@gmail.com writes:
if (h2 != INVALID_HANDLE_VALUE)
{
BY_HANDLE_FILE_INFORMATION info2;
if (GetFileInformationByHandle( h2, &info2 ))
{
if (info.dwVolumeSerialNumber == info2.dwVolumeSerialNumber &&
info.nFileIndexLow == info2.nFileIndexLow &&
info.nFileIndexHigh == info2.nFileIndexHigh)
The volume serial number is not the appropriate check.