Microsoft KB Archive/81189

= Microsoft Knowledge Base =

Windows Test Driver May Hang if It Sends Keys to Itself
Last reviewed: October 19, 1994

Article ID: Q81189

The information in this article applies to:

- Microsoft Test for Windows, version 1.0

SUMMARY
If the Microsoft Test for Windows Test Driver sends itself an ALT+F4 key combination (or another event that would result in Test Driver attempting to close itself), Test Driver may become deadlocked and may hang the system. Test Driver can send itself events if it becomes the active window while a test script is running.

To avoid this situation, make sure that Test Driver is minimized while running a script (choose Environment from the Options menu and select the Minimize Main Window First check box) or make sure that any event that may cause a window to close is going to the correct window (you can use the WGetActWnd function in TESTCTRL.DLL to check the handle of the active window).

This is a design limitation of Microsoft Test for Windows version 1.0. This limitation does not apply to Microsoft Test version 2.0.

MORE INFORMATION
If you are running a script created with the Recorder tool (by choosing Record Events from the Tools menu), make certain that the Minimize Main Window First check box is selected to avoid having Test Driver be the active window when you run the recorded script. This will prevent a recorded script that closes the active window from possibly hanging Test Driver.