Modify ↓
Opened 16 years ago
Closed 16 years ago
#1053 closed Bug (No Bug)
The computer hangs for a while when used DllCallbackRegister()
| Reported by: | Yashied | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.0.0 | Severity: | None |
| Keywords: | Cc: |
Description
The computer hangs for a while (from several seconds or more), if any key is holding down when clicking on the Close, Minimize, Maximize, or Help buttons.
#Include <WinAPI.au3>
Global $hProc = DllCallbackRegister('_MyHook', 'long', 'int;wparam;lparam')
Global $hHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($hProc), _WinAPI_GetModuleHandle(0), 0)
GUICreate('Bug')
GUICtrlCreateLabel('Hold down any key and then click mouse on the close button.', 50, 20)
GUISetState()
Do
Until GUIGetMsg() = -3
Func _MyHook($iCode, $wParam, $lParam)
Return _WinAPI_CallNextHookEx($hHook, $iCode, $wParam, $lParam)
EndFunc ;==>_MyHook
Func OnAutoItExit()
ConsoleWrite('Call _WinAPI_UnhookWindowsHookEx()' & @CR)
_WinAPI_UnhookWindowsHookEx($hHook)
EndFunc ;==>OnAutoItExit
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.

Multiple event sources are put into a queue. You're creating a conflict here. This is not a bug, it's a design limitation.