
Help Required With Serial Data Transfer
I've written a personal e-mail system that allows any user of the system to
dial another user and transfer mail. I've done this using the MSCOMM custom
VBX. The way I transfer files is to read the file in line by line as a
string and then output that string along with a control string to ensure
that the line has been received. I have tried working with blocks of data,
reading in at 1K a time but have encountered buffer overflow problems. The
above method works but is fairly slow.
I have also added in a binary file transfer, whereby files can be attached
to a mail message, I had no idea how to transfer these files across the
dial up link so I went about it the same way as the mail transfer by
opening the file and using GET statements to read parts of the file into a
string and then outputting that string to MSCOMM along with control
characters. Amazingly this method does work with binary files, however I
have noticed some problems a) The creation date and time of the file is not
correct as it is written as a new file by the receiver b) the size of the
received file is different from the sent file!
I would appreciate any info, code samples or help with ways to transfer
information via the serial port, and specifically ways of transfering
binary files to ensure integrity at the receiving end.
Thanks
Peter Jones.