Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Jul : help with Indy socket WriteFile()
| Subject: | help with Indy socket WriteFile() |
| Posted by: | "keyser" (keyser_so..@usa.com) |
| Date: | 13 Jul 2005 11:03:15 |
I have the following code using Indy 9 TidTCPServer:
...
ASender : TidCommand;
....
Asender.Thread.Connection.WriteLn(intToStr(reportfilesize(s)));
Asender.Thread.Connection.OpenWriteBuffer;
Asender.Thread.Connection.WriteFile(s,true);
Asender.Thread.Connection.CloseWriteBuffer;
I am getting an access violation:
Access violation at address 0. Read of address 0.
s is a widestring pointing to a uni-code filename (asian
characters in filename) on the server. When s is an invalid
file, I get the file not found exception, so I have some
confidence that the correct file is begin used. ( I also get the
same access violation for a valid non-unicode filename)
Can someone point me to an example on using writefile to send a
file?
Thanks.