Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

transfer data via modem with mscomm32

Posted on 2003-12-01
5
Medium Priority
?
1,162 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 90 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

721 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