Hi Jon,

Here's another option:  Sending a WM_CLOSE message to any windows app will close it, 
normally.  

You'll call the SendMessageA function from User32.dll for this.  But you'll need a 
handle to the windows app for this.  This handle can be obtained by calling 
FindWindowsA from the same dll and passing the title fo the window.  

I have uploaded an example VI which shows this at:
ftp://ftp.ni.com/incoming/quitapp.vi

Hope this helps.

Regards,

Khalid Ansari


_________________________________
What is the accepted method to terminate an 
application started with System Exec if it 
doesn't terminate itself ? (from LabVIEW of 
course). I am calling System Exec with "Wait for 
Completion"=F so that I can do a timeout 
polling, and would like to stop the application 
after a certain number of seconds or if a 
certain file gets too large, especially because 
under some error conditions it starts to consume 
memory resources quickly.

(Using Windows XP and LabVIEW 6.0.2)

Thanks,
Jon
          
          


Reply via email to