VB and VC++ appliations interaction

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi All,

I have devloped an gui in vb 6.0. I have launhed an application
(core.exe) from VB. Now, How do I know the status of core.exe? i mean,
whether it is running or not in VB application.

Does vb supports multi threading?

Thanks in advance.
 
Bill said:
Hi All,

I have devloped an gui in vb 6.0. I have launhed an application
(core.exe) from VB. Now, How do I know the status of core.exe? i
mean, whether it is running or not in VB application.

Have a look at the System.Diagnostics.Process class, and for example the
HasExited property.
Does vb supports multi threading?

Yes, it does.

http://msdn2.microsoft.com/en-us/library/eed6swsx.aspx

http://msdn2.microsoft.com/en-us/library/3e8s7xdd.aspx


Armin
 
Bill said:
I have devloped an gui in vb 6.0. I have launhed an application
(core.exe) from VB. Now, How do I know the status of core.exe? i mean,
whether it is running or not in VB application.

'System.Diagnostics.Process.Start' can be used to start the process.
'Process.GetProcessesByName' is used to get one or more 'Process' objects
representing processes with a certain name.

There are three ways to determine the process' state:

Call 'WaitForExit' on the 'Process' object representing the process to block
the current thread until the external process exits.

Check the 'HasExited' property to determine if the process is still running.

Set the 'EnableRaisingEvents' property to 'True' and handle the 'Exited'
event to get notified when the process exits.
 
Back
Top