I'm learning something on win32 programming. I read on the reference manual (here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365467%28v=vs.85%29.aspx ) that
If lpOverlapped is not NULL, the read operation starts at the offset that is specified in the OVERLAPPED structure and ReadFile does not return until the read operation is complete. The system updates the OVERLAPPED offset before ReadFile returns.
However if I call ReadFile(hmyFile, &myrecord, sizeof(record_t), &n, &ov);
I see that the value ov.offset
stay unchanged. How so? Where am I misunderstanding what is stated in the reference manual?
More details:
The file handler is opened as hmyFile = CreateFile(argv[1], GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
I'm not using FILE_FLAG_OVERLAPPED