Which of the following is NOT required in a synchronous ReadFile() call?
2025
Which of the following is NOT required in a synchronous ReadFile() call?
- A.
lpNumberOfBytesToRead
- B.
lpBuffer
- C.
lpOverlapped
- D.
hFile
Attempted by 1 students.
Show answer & explanation
Correct answer: C
The lpOverlapped parameter takes a pointer to an OVERLAPPED structure. This structure is essentially a tracking mechanism for the operating system. When you perform an asynchronous read, Windows starts the read operation in the background and returns control to your program immediately. It uses this structure to keep track of things like file offsets and event handles so your program can check back later to see if the data has finished loading.