能力值:
( LV2,RANK:10 )
|
-
-
2 楼
磁盘上的任何文件都是以二进制方式保存的,为了方便阅读等,例如,某些软件会将文件以十六进制方式显示;修改可执行文件用UltraEdit比较合适。
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
搞掂了。
var
iFileHandle: Integer;
iFileLength: Integer;
iBytesRead: Integer;
Buffer: byte;
offset: Integer;
filename: string;
begin
if opendialog1.Execute then filename := opendialog1.FileName else exit;
try
iFileHandle := FileOpen(filename, fmOpenWrite);
iFileLength := FileSeek(iFileHandle, 0, 2);
edit1.Text := inttostr(ifilelength);
offset := $4eaac8-$401000+$fff + 1;
FileSeek(iFileHandle, offset, 0);
buffer := $33;
fileWrite(iFileHandle, buffer, 1);
finally
FileClose(iFileHandle);
end;
end;
|
|
|