我在Delphi中创建了一个工具来创建彩虹表.直到文件增长到3.1 GB才好.我关闭了我的程序.然后我再次打开它,并在执行此代码时崩溃:
Assign(RainbowFile,'Rainbow_table.txt'); {assign a text file}
Append(RainbowFile);
Run Code Online (Sandbox Code Playgroud)
Delphi显示错误"提出的预期类EInOutError消息'I/O错误131'.我的问题:如何将数据附加到大于2 GB的现有文件.//已过时下一个问题:我目前有代码:
Content_to_file := (#13+#10+Start_string+':'+hexstr(GTA_San_Andreas_CRC32(Start_string), 8));
RainbowFile_handle.WriteBuffer( Content_to_file[1], Length(Content_to_file)*SizeOf(Char));
Run Code Online (Sandbox Code Playgroud)
如何摆脱Content_to_file变量.如果可能的话,我想把它直接放到WriteBuffer上.
编辑:
TFileStream适用于大于2 GB的文件.我现在测试了.但是可以这样写:
RainbowFile_handle.WriteBuffer( Start_string[1]+':',
Run Code Online (Sandbox Code Playgroud)
我的意思是不传递变量参数.或者我确实传递了变量的第一个字符?
编辑2:
我目前这样做了:
Content_to_file := (#13+#10+Start_string+':'+hexstr(GTA_San_Andreas_CRC32(Start_string), 8));
RainbowFile_handle.WriteBuffer( Content_to_file[1], Length(Content_to_file)*SizeOf(Char));
Run Code Online (Sandbox Code Playgroud)
没有这个变量可以做到吗?