A few problems as I see it.
_tell and _tell64 do not give the current file position.
fgetwc does not in this case increment the file position by 2.
fgetwc returns 0XFFFF on each call, in this case.
#include <wchar.h>
#include <stdio.h>
#include <io.h>
int main(void)
{
wchar_t wc;
char c;
long long int pos;
int pos1;
int pos2;
int size;
char buff[700];
FILE * file;
file = fopen("file.c", "rb");
if(file != NULL){
size = _filelength(_fileno(file));
if(size > 700){
fread(buff, 1, 600, file);
c = fgetc(file);
wc = fgetwc(file);
wc = fgetwc(file);
wc = fgetwc(file);
pos = _tell64(_fileno(file));
pos1 = _tell(_fileno(file));
pos2 = ftell(file);
printf("%lld %d %d 0x%x\n", pos, pos1, pos2, wc);
}
fclose(file);
}
return 0;
}
John