- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
char unsigned c;
DWORD m;
DWORD n;
int i = 0;
BOOL b = TRUE;
HANDLE hFile = CreateFile(szFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
printf("Could not open File");
return NULL;
}
// узнаем размер файла
while (b)
{
b = ReadFile(hFile, &c, 1, &m, NULL);
if (m == 0)
{
printf("STOP ");
printf("%i\n", i);
break;
}
i++;
}