Hopefully not too complex a task. I had a quick look at the source, so the quick-and-dirty fix should be simple enough. I'm not sure about making it work past 2Gb, but hopefully you will be able to sort that too
For reference:
Before:
Code:
brResIdx.BaseStream.Seek(12L, SeekOrigin.Begin)
intBlockOffset = brResIdx.ReadInt32()
brResIdx.BaseStream.Seek(184L, SeekOrigin.Begin)
intDataFileSize = brResIdx.ReadInt32()
brResIdx.BaseStream.Seek(72L, SeekOrigin.Begin)
intFirstBlock = brResIdx.ReadInt32()
brResIdx.BaseStream.Seek(intFirstBlock, SeekOrigin.Begin)
Do While intForwardLink > 0
intForwardLink = brResIdx.ReadUInt32()
' skip BackLink
brResIdx.ReadInt32()
intActiveEntry = brResIdx.ReadInt16()
' skip 8 bytes of unknown
brResIdx.ReadBytes(8)
Do While intActiveEntry <> 0
intROffset = brResIdx.ReadUInt32()
intRType = Me.SwapEndian(brResIdx.ReadInt32())
' skip next
brResIdx.ReadInt32()
If (intRType = lngRecType) Then
hdr = ReadDataFile(34, intDataFileSize, intBlockOffset, intROffset)
intDataSize = BitConverter.ToInt32(hdr, 18) - 12
If intDataSize > 0 And intDataSize < 10000 Then
bwOutput.Write(ReadDataFile(intDataSize, intDataFileSize, intBlockOffset, intROffset + 10))
'swDbgOutput.WriteLine("At Offset " & CStr(intROffset + 10) & " : " & intDataSize & " bytes")
'swDbgOutput.Flush()
intNumRecords = intNumRecords + 1
End If
End If
intActiveEntry = intActiveEntry - 1
Loop
brResIdx.BaseStream.Seek(intForwardLink, SeekOrigin.Begin)
Loop
After:
Code:
brResIdx.BaseStream.Seek(12L, SeekOrigin.Begin)
intBlockOffset = brResIdx.ReadInt32()
brResIdx.BaseStream.Seek(184L, SeekOrigin.Begin)
intDataFileSize = brResIdx.ReadInt32()
brResIdx.BaseStream.Seek(72L, SeekOrigin.Begin)
intFirstBlock = brResIdx.ReadInt32()
brResIdx.BaseStream.Seek(intFirstBlock, SeekOrigin.Begin)
Do While intForwardLink > 0
intForwardLink = brResIdx.ReadUInt32()
' skip BackLink
brResIdx.ReadInt32()
intActiveEntry = brResIdx.ReadInt16()
' skip 8 bytes of unknown
brResIdx.ReadBytes(8)
' *NEW* skip further 10 bytes of unknown
brResIdx.ReadBytes(10)
Do While intActiveEntry <> 0
' *NEW* read additional 4 bytes as high Long
intROffset2 = brResIdx.ReadUInt32()
intROffset = brResIdx.ReadUInt32()
' *NEW* recombine into a 64 bit offset
intROffset64 = intROffset2 * (2 ^ 32) + intROffset
intRType = Me.SwapEndian(brResIdx.ReadInt32())
' skip next
brResIdx.ReadInt32()
If (intRType = lngRecType) Then
hdr = ReadDataFile(34, intDataFileSize, intBlockOffset, intROffset)
intDataSize = BitConverter.ToInt32(hdr, 18) - 12
If intDataSize > 0 And intDataSize < 10000 Then
bwOutput.Write(ReadDataFile(intDataSize, intDataFileSize, intBlockOffset, intROffset + 10))
'swDbgOutput.WriteLine("At Offset " & CStr(intROffset + 10) & " : " & intDataSize & " bytes")
'swDbgOutput.Flush()
intNumRecords = intNumRecords + 1
End If
End If
intActiveEntry = intActiveEntry - 1
Loop
brResIdx.BaseStream.Seek(intForwardLink, SeekOrigin.Begin)
Loop
In each case, the line immediately after any *NEW* comment is what has been changed/added... also I'm not yet passing the intROffset64 value into the other functions (so this is the "quick-and-dirty" version) - the release version will hopefully do this correctly, but it'll be tricky to test until we have a bigger RDB