By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,640 Members | 1,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,640 IT Pros & Developers. It's quick & easy.

Tell the program calling a VB .exe that a process is finished

P: 1
I'm using a simulation software (GenOpt) to run some building energy simulations, and I have written a custom .exe using visual basic to do some data processing for me. In a preliminary version of the VB script, it read one file and output one value to a text file. When I use this version (version A), GenOpt executes properly. When I use a more recent VB script version (version B, which has the rest of the data processing I actually need), the simulation program hangs up - like it's waiting for the process to finish, not realizing that it actually has. The only difference between the two is which .exe I use.

This makes me think there must be something different about how I'm handling system processing in version B. Unfortunately, I don't know what GenOpt is looking for while it's waiting for the process to complete.

Can anyone point me in the direction of things to try or look for in my code that can tell the calling program that the process has completed?
Aug 15 '13 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,382
Perhaps if you post the code for version A and version B, we can see if there's a difference.
Aug 15 '13 #2

Expert 5K+
P: 8,434
All I can think of is that you may have failed to destroy some object you created, so that technically your process hasn't ended.

As a simple example of this sort of thing, I can create a project in the VB editor which uses a form then hides it, but doesn't close it. I then run the project. Once the code ends, the editor still shows it running until I hit Stop, because that form is still hanging around waiting for something to happen.

Easy situation to reproduce, as described here, but can be tough to track down.

Edit: Sorry, thought I was in the VB6 forum. The general idea may still apply in VB.Net, but my example would probably not be so simple to set up.
Aug 23 '13 #3

P: 296
It is waiting for the exe to end. Make sure your Version B is actually terminating or your OptGen will just wait around until it does. You may also need to set the exitcode of your process (but it must be a console application to do that).
Sep 1 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.