FindFirstFile

>Actually, the flag can be cleared (usually by a backup program, for
>incremental or differential backups). Now, I don't think (but could be
>wrong) that this flag is still used actively, even by backup programs (a
>database would probably be their best bet know, with a signature of the
>file).
>In Wine, the flag is only "set" when a program wants to know the
>attributes of a file; elsewhere, the attribute is non existent. So I
>guess it can stay that way.
>Insyde, does the Archive flag is one of the differences you saw? BTW,
>FAT32 or NTFS?
>Bye,
>Vincent
Hi,
Sorry for the late answer.
My latest test, made this morning show some differences
between W2K, W98 and Wine. The logs I have are:
W2K:
Target file is fff.c.
The first file found is 1244784
The first alternate file found is 1245044
The first file attributes is 32
The first file found creation is -1416328896
The first file found last access is -1684948992
The first file found last write is -1827365376
The first file found (reserved0) is 16908546
The first file found (reserved1) is 16908546
The first file found size high is 0
The first file found size low is 1631
W98:
Target file is fff.c.
The first file found is 6552808
The first alternate file found is 6553068
The first file attributes is 32
The first file found creation is -1416328896
The first file found last access is -1684948992
The first file found last write is -1827365376
The first file found (reserved0) is 0
The first file found (reserved1) is 0
The first file found size high is 0
The first file found size low is 1631
Wine:
Target file is fff.c.
The first file found is 1079340360
The first alternate file found is 1079340620
The first file attributes is 32
The first file found creation is -1827365376
The first file found last access is -1684948992
The first file found last write is -1827365376
The first file found (reserved0) is 0
The first file found (reserved1) is 0
The first file found size high is 0
The first file found size low is 1631
The first file found, first alternate are always different.
Attributes, last write, last access, size hig and low are always the same.
Reserved 0 and 1 just make sense in W2K, so, no problem ins here.
(Or there is when running --winver nt(35/40/2k)?)
Wine is mismatching the Creation, both w2k and w98 have the same.
(I test with the same file in a floppy, so always the same.)
This is the source of the program I run to make the tests, I get this from
MSDN and add some to it:
-----8<--- begin of the source -------
#define _WIN32_WINNT 0x0400
#include "windows.h"
int
main(int argc, char *argv[])
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
printf ("Target file is %s.\n", argv[1]);
hFind = FindFirstFile(argv[1], &FindFileData);
if (hFind == INVALID_HANDLE_VALUE) {
printf ("Invalid File Handle. Get Last Error reports %d\n", GetLastError
());
} else {
printf ("The first file found is %d\n", FindFileData.cFileName);
printf ("The first alternate file found is %d\n",
FindFileData.cAlternateFileName);
printf ("The first file attributes is %d\n",
FindFileData.dwFileAttributes);
printf ("The first file found creation is %d\n",
FindFileData.ftCreationTime);
printf ("The first file found last access is %d\n",
FindFileData.ftLastAccessTime);
printf ("The first file found last write is %d\n",
FindFileData.ftLastWriteTime);
printf ("The first file found (reserved0) is %d\n",
FindFileData.dwReserved0);
printf ("The first file found (reserved1) is %d\n",
FindFileData.dwReserved1);
printf ("The first file found size high is %d\n",
FindFileData.nFileSizeHigh);
printf ("The first file found size low is %d\n",
FindFileData.nFileSizeLow);
FindClose(hFind);
}
return (0);
}
/*
typedef struct _WIN32_FIND_DATA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD dwReserved0;
DWORD dwReserved1;
TCHAR cFileName[ MAX_PATH ];
TCHAR cAlternateFileName[ 14 ];
} WIN32_FIND_DATA, *PWIN32_FIND_DATA;
*/
----- 8< end of the source ------
Hope this help you.
Thanks,
Ricardo.