I've been writing a program which runs through a hard disk and identifies items of data of interest, in a similar way to an anti virus scanner.
This has been done using the ReadFile windows API functions
(http://msdn.microsoft.com/en-us/library/aa365467%28VS.85%29.aspx)
I have been reading 32kb chunks of a disk and am getting a speed of about 500-800MB per min. I'm looking to try and increase the speed.
Has anyone done anything similar?
Also, is there a way to set a "timeout" function so that if the api doesnt return data within a given timescale the program doesnt wait and does something else?
Have had a look at the overlapped I/O using readfile and it appears I have to run a loop after the read request until it returns that it has read, if this is the case wont it be the same speed? I'm sorry if my understaning of overlapped read i/o is wrong here.
On that note could that be a solution to my second problem, i.e. that if it doesnt return a done signal after so long I could use that as a timeout?
So I take it you mean a process similar to the following:
Read first block
start reading second block
process first block
at end of processing check second block ready
start read of next block