Antzzz Posted November 15, 2006 Report Share Posted November 15, 2006 Hi all, after making the forehead-slapping discovery that it is possible to run multiple instances of a LV compiled executable using a ini setting, I've run into a small issue. If for some reason you need to kill off (or check memory usage etc in) one of the running instances you can't tell which is which in Task Manager. So I thought easy fix, just change the window title using the VI FP.Title property to something specific to each instance. But this doesn't get picked up by task manager - it seems to use the executable name as the title. So does anyone know if there is a way around this? Maybe some property that I'm overlooking? Quote Link to comment
lraynal Posted November 15, 2006 Report Share Posted November 15, 2006 And why not creating your own "task killer" in LabVIEW? With VI Server you should be able to know which task is which, and then to kill it! Quote Link to comment
Antzzz Posted November 15, 2006 Author Report Share Posted November 15, 2006 An interesting idea that I hadn't thought of! So I guess the 'task killer' would do the following: 1) Enumerate all running processes 2) Somehow probe each process with VI server to see if it is a LV built executable 3) Then get the VI title if it is a LV built executable 4) Then allow the user to kill the process Steps 2) and 3) I'm a little hazy on - this would mean that all built executables would have to have the LV server enabled and running, along with a 'stub' VI exposed that could be called. And I'm not that that a call to the embedded LV server would work if the process is already locked up (which is why it has to be killed). Anyone have any comments on this? I think the that simply being able to change the name of the process shown in task manager would be far simpler - it must be possible as programs like MS Word can do it - the name of the active open doc shows in task manager. Quote Link to comment
Yair Posted November 15, 2006 Report Share Posted November 15, 2006 This seems to be a Windows issue, so searching for what the standard method of doing this is would be a good start. For example, a very quick Google search shows this and this. I don't know if those would work (for example, the first one requires a callback function, which I don't know if you can use, but you might be able to work around that using FindWindowEx). Anyway, there might be some other methods (through .Net, for instance). If you come up with something, it would be nice to see. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.