views:

5

answers:

0

I have an application that reads from a very large binary file. It never has to read the whole file, only small parts of it, which are spreaded accross the file. For example, in VB6 code:

ReDim Data(26) as Integer
Get #1, 2536, Data

ReDim Data(79) as Integer
Get #1, 13504, Data

ReDim Data(51) as Integer
Get #1, 39827, Data

Etc..

For local files, this works superfast. When the file is located on a network share, performance quickly decreases. This is logical, because every read-operation causes a roundtrip over the network.

Is there any way using Windows API that I can 'batch' those read-ranges together, so that it results in less SMB calls? For example:

Dim ReadLoc(2) 

ReadLoc(0) = 2536-26
ReadLoc(1) = 13504-79
ReadLoc(2) = 39827-51

Get #1, ReadLoc

Or has the SMB protocol no support for grouping/batch read operations?