LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to end a process in win 2000

when I shutdown excel 2000 under win 2000 from my application written in cvi 6.0, O.S. do not terminate the process named "EXCEL.EXE". what way can I use to force O.S. to close this process?
0 Kudos
Message 1 of 2
(3,048 Views)
The process is not shutting down because there are handles in your code that have not been properly released. Every time you get a object handle back from an ActiveX function you have to free it with CA_DiscardObjHandle. Make sure you are discarding all the object handles you retrieve.

Also, one piece of bad news. If you are using the excelreport.fp instrument driver, we have verified a couple of problems in its code with freeing these handles. So it may not be a problem in your code, but a problem in the excelreport.fp source. We will be fixing the excel report tool in an upcoming release, but it isn't available yet. So, if this is the case you will have to terminate the process manually until the update is available. There is an SDK function ca
lled TerminateProcess that can be used to do this programmatically.

If you are NOT using the excelreport.fp tool, it would be far better to debug your application and look for handles you aren't discarding.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 2
(3,048 Views)