Cześć mam pewien problem otóż pisze program do odczytu pewnego pliku o to jego specyfikacja
[Header (Size: 8)]
Description Length Type Offset Comments
------------ ------- ------- ------- --------------------------------
CRC32 4 UInt32 0 Start = 0x0000C0B0
Count 4 UInt32 4
[Item (Read: FOR 0 TO Header.Count)]
Description Type Length Comments
------------ ----------- ------------------- -------------------------
Path Length UInt32 4
Path String OPLNode.Path_Length
x Uint32 4
no i teraz nie wiem w jaki sposób dynamicznie ograniczyć długość zmiennej Path przy czytaniu danych :/
Praktycznie zatrzymałem się w tym miejscu
fil:=TFileStream.Create(opendialog1.FileName, fmOpenRead);
fil.position:=0;
fil.ReadBuffer(Header,SizeOf(Header));
for i:=0 to Header.Count do
begin
//tu jestem
end;
Ma ktoś jakiś pomysł co z robić z tym fantem ?