?
Solved

Shell syntex & Dial-up monitoring

Posted on 1998-06-16
6
Medium Priority
?
258 Views
Last Modified: 2013-11-13
Two Questions: 1) Is it possible with the Shell command to allow command line
arguments to be taken from a Textbox? Example: Shell("App.exe "Text1", 1)
Text1 being user input data to be added to the Shell command line. I noticed
that Shell command won't read it?

2) I like a reliable method for dialing & monitoring the winsock connection 98/NT
and if lost, redial any number of times till the connection is re-established. While
the connection is active, ping every 5 mins incase of inactivity to prevent premature disconnection.

Looking forward to a wonderful reply from one of you VB guru's.
0
Comment
Question by:Capital1
[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
  • 3
  • 2
6 Comments
 

Author Comment

by:Capital1
ID: 1463374
Edited text of question
0
 

Author Comment

by:Capital1
ID: 1463375
Edited text of question
0
 
LVL 18

Expert Comment

by:deighton
ID: 1463376
Shell("App.exe " +  Text1, 1)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:Biffo
ID: 1463377
Proper syntax for what you want is to predfine the commands outside of the shell command line or VB will trip out and puke:

'Besure to add a extra space with last  " to space the Text1 input out
EX = "App.exe " & Text1
'Then go ahead and Shell as:

Shell(EX, 1)

0
 
LVL 2

Accepted Solution

by:
Biffo earned 400 total points
ID: 1463378
I'm sorry, I should had answered your questioned when I commented earlier on your Shell question.  I'll cover your question #2 since internet programming is one of specialities.

There is a number of ways of accomplishing what you want, some more involved than others. I'll direct you to perhaps the most straight forward way and by far the most easiest and best documented. Go to Catalyst Developement home web site at: www.catalyst.com and download
their SocketWrench kit. Note: SocketWrench, not their SocketTool kit since that cost $$ to use whereas SocketWrench is FREE and you can do whatever you want with it.

Install. It comes with CSRAS32.OCX and CSPING32.OCX. Load the sample VB5 Stdialer form, you can work off that as your project. Essentially you can follow your nose with developing it with the help topics that come with it to your needs. Example to have it reconnect automatically when disconneted you could add this to the form:


Private Sub Dialer1_Disconnect()
   
    If Dialer1.Connected = False Then
    Call ActionButton_Click
    End if

If you have AutoUpdate in properties set to True, then as soon as it loses connection it will immediately redial. AutoUpdate monitors the connection every second I beleive with the default interval setting.  You can then drop in the CSPING32.OCX  and set the interval to whater you like, say ping every 2 or 5 minutes with some code like:

Private Sub PingHostAddress()
    'Start up the Ping control on a host

    Ping1.hostaddress = hostaddress
    Ping1.Blocking = True
    Ping1.Interval = 1000
    Ping1.Enabled = True

End Sub

See the Netcheck sample project for ping info and usage.  This will do it, you will be able to build a dialer and have it do whatever you want using SocketWrench.

 -Jim

0
 

Author Comment

by:Capital1
ID: 1463379
Great !!!!!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

765 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