hi,
I'am trying to write to a file in my win ce application.
This is the code :
//CODE
procedure TForm1.Button1Click(Sender: PObj);
var
dir : string;
f : thandle;
msg : String;
begin
msg := 'hello world';
dir := extractfilepath(paramstr(0));
f := FileCreate(dir+'xpto.txt', ofCreateNew);
FileClose(f);
f := FileCreate(dir+'xpto.txt', ofopenwrite);
FileWrite(f, msg,sizeof(msg));
FileClose(f);
end;
//CODE
It creates the file, but it writes nothing in it.
Can you tell me what's wrong?
Thanks in advance