VB Code:
  1. Function blockload(filename As String, Optional blocksize As Double, Optional block As Single)
  2. Dim fre As Integer
  3. Dim start As Double
  4. Dim data As [color=red]Byte(100)[/color]
  5.  
  6. If blocksize = 0 Then blocksize = 50000
  7. If block = 0 Then block = 1
  8.  
  9. 'calculate start of block to get
  10. start = (blocksize * (block - 1)) + 1
  11.  
  12. fre = FreeFile
  13. Open filename For [color=red]Binary[/color] As #fre Len = blocksize
  14. Get #fre, start, data
  15. blockload = data
  16. Close #fre
  17. End Function