Microsoft KB Archive/310870

= PRB: Unexpected Behavior in Applications Run Concurrently with WH_CALLWNDPROC Hooks =

Article ID: 310870

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Windows 98 Standard Edition
 * Microsoft Windows 95

-



This article was previously published under Q310870



SYMPTOMS
An application may behave abnormally when run concurrently with another application that installs global WH_CALLWNDPROC hooks.



CAUSE
This behavior tends to occur when you run applications that have small stack sizes. One such application is FreeCell, which is available on Windows 95, Windows 98, and Microsoft Windows Millennium Edition (Me)-based systems.



MORE INFORMATION
The behavior described in the &quot;Symptoms&quot; section of this article can be reproduced by concurrently running the FreeCell application that is included with Windows 98 and the Spy++ utility that is included with Microsoft Visual C++ 6.0. Spy++ sets global WH_CALLWNDPROC, WH_CALLWNDPROCRET, and WH_GETMESSAGE hooks to monitor sent and posted window messages. When you run Spy++, FreeCell no longer paints or functions correctly.

This issue does not occur when FreeCell and Spy++ are run on a Windows Me-based system, because FreeCell for Windows Me has a larger stack size.

An application's stack size is set when the executable is built. The stack size is typically specified in the Module-Definition File (.DEF) when you use the STACKSIZE command or the /STACK Linker command. You can modify an executable's stack size after it has been built by using the EDITBIN tool that is included with Visual C++.

