B
BuddyWang
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TfrmGenTracePage.CreateSysiniFile;
var
FN,str:String;
FileHandle: Integer;
begin
FN:='sys.ini';
if FileCreate(FN)=-1 then
raise Exception.Create('无法创建文件:'+FN);
FileHandle:=FileCreate(FN);
str:='[main]';
FileWrite(FileHandle,str,SizeOf(str));
str:='Directory=';
FileWrite(FileHandle,str,SizeOf(str));
FileClose(FileHandle);
end;
文件SYS.ini能够创建,但是写入不了内容,为什么!
var
FN,str:String;
FileHandle: Integer;
begin
FN:='sys.ini';
if FileCreate(FN)=-1 then
raise Exception.Create('无法创建文件:'+FN);
FileHandle:=FileCreate(FN);
str:='[main]';
FileWrite(FileHandle,str,SizeOf(str));
str:='Directory=';
FileWrite(FileHandle,str,SizeOf(str));
FileClose(FileHandle);
end;
文件SYS.ini能够创建,但是写入不了内容,为什么!