The information in this article applies to:
SYMPTOMS
An override of CSocket::OnMessagePending is not called for an application
that has an active timer. CAUSE
The function CSocket::PumpMessages is responsible for the message
processing during a blocking CSocket operation. It uses its own timer
to enable idle-time processing to occur periodically. RESOLUTIONFor 32-bit MFC (Included with Visual C++ 2.x)The resolution entails changing the PumpMessages function so that it always calls OnMessagePending. Currently it only calls OnMessagePending when a non- WM_TIMER message is received:
For 16-bit MFCThe default implementation of PumpMessages (in Sockcore.cpp) accesses private MFC data structures. Because of this, you cannot easily reimplement this code in your application. It might be possible to temporarily remove the timer (set by SetTimer) that is causing the problem, but if that is not the case, then the simplest workaround would be to rebuild the MFC library with the change shown above (changing the 'else if' to 'if'). Once the change has been made, you can rebuild the MFC libraries to incorporate the change. For details on how to rebuild the MFC libraries, please see the Readme.txt file in the Mfc\Src directory and Appendix A of the Class Library User's Guide. Microsoft recommends building the static versions so that you do not have to rely on the presence of your modified library. Otherwise, you will need to rename MFC250(D).DLL so that it does not conflict with other versions of the DLL that might be on a user's system.STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in the version of MFC that ships with Microsoft Visual C++, 32-bit Edition, version 4.0. Additional query words: 4.00 SetTimer OnTimer time-out CancelBlockingCall 2.52 2.52b 2.53 2.10 2.20 3.10 3.20
Keywords : kbMFC kbVC kbWinsock |
Last Reviewed: July 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |