Solved

Shelling headache

Posted on 1999-01-26
3
169 Views
Last Modified: 2010-05-03
I have a program that checks its own Version number, then calls another VB executable that is responsible for getting the newest version via FTP and copying it to the right directory.  As soon as the second application is shelled, I issue the "End" command in the first application, but unfortunately, I can't seem to force it to end soon enough for the shelled executable to work properly with FileCopy's and Kill's, and nothing I do in the second executable, short of displaying a mesage box, releases the processor sufficiently so that first program can shut down.  What can I do?  Do I need to release the system somehow, or change priority settings?  Help!
0
Comment
Question by:NickHeitz
[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
3 Comments
 

Author Comment

by:NickHeitz
ID: 1470784
Oh yes, I forgot...shouldn't DoEvents help?  It never seems to aid me in releasing the processor.
0
 
LVL 1

Accepted Solution

by:
james_bligh earned 60 total points
ID: 1470785
Hi Nick,

DoEvents should work but you may need to call it more than once, ie. keep calling it until the previous application has closed down.  Of course with this solution you need to devise a method for detecting the first application which is a problem all by itself.

The other option is to use the Win32 API call 'sleep' which causes a process to sleep for a certain number of milliseconds.  Just like DoEvents except you can specify a specific delay time.

Hope this helps,

James


0
 

Author Comment

by:NickHeitz
ID: 1470786
I actually ended up using an ActiveX control instead.  Thanks anyway.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month6 days, 1 hour left to enroll

627 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