LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

process handle to external application

Hi,
I am opening an external program with System Exec.VI.
I would like to create a process handle to that program
to determine when it is finished, the program closes it self down after execution. Is that possible?

Thanks in advance
//Johan
Best Regards

Johan
0 Kudos
Message 1 of 3
(2,762 Views)
Hi,

A much easier (an better) way is to let the System Exec.vi wait until it
completes. If the program has to continue execution, start the VI
dynamically, and check if the dynamic VI is done.

I can't think of an easy way to get a process handle. It would be easier to
get the new window handler (even if it's hidden there will probably be a
window handler), and check it the window is still there.

Regards,

Wiebe.


"Johan, Ireland, Fermoy" wrote in message
news:506500000008000000F9EA0000-1079395200000@exchange.ni.com...
> Hi,
> I am opening an external program with System Exec.VI.
> I would like to create a process handle to that program
> to determine when it is finished, the program closes it self down
> after execution. Is that possible?
>
> Th
anks in advance
> //Johan
0 Kudos
Message 2 of 3
(2,762 Views)
Wiebe@CARYA wrote:

> Hi,
>
> A much easier (an better) way is to let the System Exec.vi wait until it
> completes. If the program has to continue execution, start the VI
> dynamically, and check if the dynamic VI is done.
>
> I can't think of an easy way to get a process handle. It would be easier to
> get the new window handler (even if it's hidden there will probably be a
> window handler), and check it the window is still there.

Well, not with the system Exec.vi anyhow. There is however on the Linux
and MacOS X side a Pipe library which actually does allow to create a
process, and returns the process ID as well as the handles to that
processes standard IO and standard error console.

I have tried to do something like this on Windows and posted a

prelimenary version with DLL on the OpenG Toolkit CVS repository on
sourceforge. I haven't gotten around to it to do more tests and refine
what is currently available there but it does give an idea of how it is
supposed to work.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(2,762 Views)