Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSCOMM: SENDING & RECEIVING BINARY FILE PLEASE HELP...

Status
Not open for further replies.

vijithamar

Programmer
Feb 14, 2002
29
IN
Hi friends,

Please help me in using MSCOMM control for sending & receiving binary files along with file name.

In my Programm, user will select the file-name and send the file, The receiving computer will save the file in the same name.

my problem is this, When i am sending the file in single byte (byte by byte using a loop) it taking lot of time to complete a file. And I can’t make out in receivable computer that the received byte is a part of file-name or the file itself

Please explain me. How to send and receive the data in packets. And how to flag it start/end of file-name or start/end of file.

Thank you,
Regards.

Vijith
 
The first thing you send is how many bytes that are being sent as filename then how many as the file itself.


Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
hi
Thanks for ur reply
suppose my file-name is 'amruth.exe' and size about 6,160,384 bytes. how to send the no of bites in a single time
 
Well the first 8 bytes that you send would be two long values the first being len("amruth.exe") then the 6,160,384.


Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top