473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
3 1501
Rabbit
12,516 Expert Mod 8TB
Perhaps if you post the code for version A and version B, we can see if there's a difference.
Aug 15 '13 #2
Killer42
8,435 Expert 8TB
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
!NoItAll
297 100+
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

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

Similar topics

2
by: news.tampabay.rr.com | last post by:
Any ideas?
3
by: Jeffrey | last post by:
hello, I have to call the Handle from a process and FullTrust is needed otherwise it happens an exception. currently i am using only this code and the exception occurs.
0
by: wayne hamilton | last post by:
I'm having a problem Interacting with Command Line programs. I can read and write anything I want as long as I don't have to interact with a process once it's started. Originally I had been calling...
9
by: Laurent | last post by:
Hello, I received a C++ DLL and I must include it in my C# programm. The problem is that I don't know how to convert the parameters from C++ to C#, specialy when there are pointers in it....
2
by: Steven Nagy | last post by:
Hi all, How would I go about detecting the current applications Process ID? I know I could do this by checking the EXE against the process list and getting the ID, however I can't guarantee that...
1
by: pigeonrandle | last post by:
Hi, This could also be read as 'Does the EnumChildWindows callback block the rest of my application until the enumeration has finished?'. Basically i want to create a treeview similar to...
7
by: christian13467 | last post by:
Hi, I'm using ASP.Net 2.0 with IIS 6.0 on windows server 2003 sp1. Calling a commandline program or a cmd file using Process.Start inside a webservice method. The call to Process.Start returns...
18
blazedaces
by: blazedaces | last post by:
My program is still running when I am finished. I outputted text at the end of the main, so I know it gets there just fine and the program finished everything just fine... but the jvm is still...
0
by: Girish12 | last post by:
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.