MSComm and Winsock control


I need to use both winsock and mscomm control in my application. Simply put my application interacts with a router (TCP/IP) which replies, depending on the reply i need to set the control bit of the port on the machine where my application is running to 1 or 0 (I assume this will be done using MSComm control?). This is one of the jobs my application does. Now I am a bit zapped regarding where to start from. Any help/sample code/tutorial etc will help .. so please tell me where to look for and what to look for.
Thanks a ton

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The MSCOMM control will drive COM1-4. This is quite simple to do, the following sends the AT command to a modem :-

' Set up the communications port
     MSComm1.CommPort = 1 ' Com Port 1

     ' Set for 9600 baud, no parity, 8 data, and 1 stop bit.
     MSComm1.Settings = "9600,N,8,1"

     ' Tell the control to read entire buffer when Input is used
     MSComm1.InputLen = 0

     ' Open the port
     MSComm1.PortOpen = True

     ' Send an 'AT' command to the phone
     MSComm1.Output = "AT" & Chr$(13) & Chr(10)

Futher info about the control can be found at msdn. Now what's this with the router and WinSock?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Wireless Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.