Solved

transfer data via modem with mscomm32

Posted on 2003-12-01
5
1,161 Views
Last Modified: 2013-11-13
HI
I have problem with transfer data via modem in VB .I can send & receive textfile but i can't send & receive pics or exe file. I use from mscomm and my input mode propert set to text
and i read & write  binary from a file .but i have a problem with send & receive pics & exe file.
my receive file can' t run and my picture is damage.
pleas help me
thanks
0
Comment
Question by:anooshe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:jcaceres
ID: 9850297
You could use microsoft winsock control to achieve this. There is one good code sample in this url http://www.a1vbcode.com/coderedirect.asp?type=application&ID=341

should work for u.

cheers.
0
 
LVL 4

Accepted Solution

by:
1mak earned 30 total points
ID: 9850637
You need to send/receive binary data to transfer pics and exe files.

Set your InputMode to comInputModeBinary. And then pass Byte arrays to the Output method, and also use a Byte array when calling Input in your receiver application.

0
 

Author Comment

by:anooshe
ID: 9856449
Hi 1mak
I write codef for every operation ,when i send text in textbox i send "#@" & text and another PC recognize i send a text and show it in texttbox.and when i send "#@" & filenname &filesize &file another PC recognize that send a file. my Input mode set to text and i can recognize this code and file name and size but when I set it to Binary I can't recognize my code and filename an my receive procedure will be fail. if you have possible for you send me a source code for this. or guide me in my project.
thanks
0
 
LVL 4

Expert Comment

by:1mak
ID: 9856770
So....

You're saying that you want to send the name of the file & the size of the file as a header prior to actually sending the file itself?
How about you send that in text mode, and then, once you get a response from the client that it's received the header, switch both server and client to binary, and then push the file itself?


0
 

Author Comment

by:anooshe
ID: 9858214
hi
thanks for replay .
but when I set my property to text in Client & Server I can't  sned and receive data because my Header that is "#@" & filename ,... don't recognize in binary mode.
Good Luck
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question