Can anyone tell me anything blatently wrong with the following code, it
should send a file through a sockets connection and pop out the other end?
(Is there a better way to do it?) - I realise that I need to handle a lot
more things but just want to see I'm on the right track first. A file pops
out the other end the right size but it has been corrupted.

code which sends <<<<<<<<<<<

        f:=tfilestream.create('c:\conference_title.bmp',fmOpenReadwrite);
      try
        setlength(result1, f.Size);
        if f.Size > 0 then
          f.Read(result1[1], f.size);
      finally
        f.free;
      end;
      socketfile.Socket.Sendtext(result1);

code which reads <<<<<<<<<<<<<<<<<

        b:=socket.receivetext;
        aa.Write(b,length(b));

Any help much appreciated...

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to