I am testing a VB6.0 application. I need the recovery system to close all open windows if a testcase fails. The Segue implementation of DefaultBaseState(), in defaults.inc, requires wMainWin being invoked before it can close any other windows, but my application does not allow a second instance to be launched without completely exiting the current one. The question is how I can get all the currently open windows so that I can write my own TestCaseExit() to close them?
Make a list of window that contain the list of windows that can be open in your application. Next write an appstate where the list is gone through to see if the app exists and to close them if they do.
Sorry, I don't know of a way that doesn't include wrapping an external program. Myself I use external apps very often with silktest with exellent reliability (provided you choose a good utility to wrap). If you know the exact name of 'the thing' that you need to kill, then you can call killall.exe on it with sys_execute. This external app is very reliable.