Windows message with 0x3B code

While logging off in Windows XP the system is sending the message with code 0x3B to the main window of the application. It was received together with 0x11 WM_QUERYENDSESSION message. Here is the log of incoming messages for WndProc:

Message processing: Id = 0x3B, wParam = -2147483637, lParam = 0, result = 0
Message processing: Id = 0x11, wParam = 0, lParam = -2147483648, result = 0
Form closing event handler. Reason:WindowsShutDown
Message processed: Id = 0x11, wParam = 0, lParam = -2147483648, result = 1
Message processed: Id = 0x3B, wParam = -2147483637, lParam = 0, result = 1
Message processing: Id = 0x3B, wParam = -2147483639, lParam = 0, result = 0
Message processing: Id = 0x16, wParam = 1, lParam = -2147483648, result = 0
Form closed event handler. Reason:WindowsShutDown
Message processing: Id = 0x46, wParam = 0, lParam = 1239312, result = 0
Message processed: Id = 0x46, wParam = 0, lParam = 1239312, result = 0
Message processing: Id = 0x47, wParam = 0, lParam = 1239312, result = 0
Message processed: Id = 0x47, wParam = 0, lParam = 1239312, result = 0
Message processing: Id = 0x86, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x7F, wParam = 2, lParam = 0, result = 0
Message processed: Id = 0x7F, wParam = 2, lParam = 0, result = 852077
Message processing: Id = 0x7F, wParam = 2, lParam = 0, result = 0
Message processed: Id = 0x7F, wParam = 2, lParam = 0, result = 852077
Message processed: Id = 0x86, wParam = 0, lParam = 0, result = 1
Message processing: Id = 0x6, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x6, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x1C, wParam = 0, lParam = 2620, result = 0
Message processed: Id = 0x1C, wParam = 0, lParam = 2620, result = 0
Message processing: Id = 0x8, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x8, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x2, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x2, wParam = 0, lParam = 0, result = 0
Message processing: Id = 0x82, wParam = 0, lParam = 0, result = 0
Message processed: Id = 0x82, wParam = 0, lParam = 0, result = 0

My application has a bug in Windows XP during logging off. It doesn't close. And the reason is:

Message processed: Id = 0x3B, wParam = -2147483637, lParam = 0, result = <b>3</b>

instead of 1

Any ideas what does this message mean? And why is it processed incorrectly?


My Google-fu reveals this to be an undocumented message - WM_CLIENTSHUTDOWN. This may be of interest, but all it does is send WM_QUERYENDSESSION / WM_ENDSESSION to the window and its children. The return value of 3 (MCSR_DONOTSHUTDOWN) indicates that the window, or one of its children, is vetoing the request.

链接地址: http://www.djcxy.com/p/63600.html

上一篇: 虚拟鼠标点击c#

下一篇: 带有0x3B代码的Windows消息