Show the empty example that crashes. Full code of the DLL, just setting
handling it. Make sure your HHOOK is in the shared data segment.
The violation occurs even if I have an empty hook proc with just a call
to
CallNextHookEx.
I have also confirmed that the violation does not occur if I disable the
"Show shadows under menus" option in Desktop Appreances page.
The call stack and assembly code at violation point is copied below.
Stranegly, my code is not even in the
picture in the call stack, but nonethless the error occurs if
-the hook is installed
-the "Show shadows under menus" option in Desktop Appreances page is
checked
-When a visible tooltip gets destroyed sometime after the WM_NCDESTROY
message of the 'SysShadow' window associated with a tooltip
call stack
-----------
user32.dll!77d4e63b()
ntdll.dll!7c90eae3()
comctl32.dll!7744f2de()
comctl32.dll!77450227()
user32.dll!77d48709()
user32.dll!77d487eb()
user32.dll!77d4b368()
user32.dll!77d4b3b4()
ntdll.dll!7c90eae3()
user32.dll!77d4b7ab()
comctl32.dll!773d58e4()
comctl32.dll!77441865()
comctl32.dll!77443c94()
comctl32.dll!77444e99()
user32.dll!77d48709()
user32.dll!77d487eb()
user32.dll!77d489a5()
user32.dll!77d489e8()
user32.dll!77d6e819()
user32.dll!77d6e956()
user32.dll!77d5688a()
user32.dll!77d568cc()
user32.dll!77d625b3()
comdlg32.dll!763b35de()
comdlg32.dll!763b33e5()
comdlg32.dll!763b33bc()
comdlg32.dll!763c7cc7()
notepad.exe!01002d89()
notepad.exe!01003927()
user32.dll!77d48709()
user32.dll!77d487eb()
user32.dll!77d489a5()
user32.dll!77d489e8()
notepad.exe!01002a12()
notepad.exe!01007511()
kernel32.dll!7c816d4f()
Code at 77D4E63B
--------
77D4E63B mov eax,dword ptr [esi]
77D4E63D mov eax,dword ptr [eax+9Ch]
77D4E643 test eax,eax
77D4E645 jne 77D50151
77D4E64B push 0
77D4E64D push 0Ch
77D4E64F pop edx
77D4E650 lea ecx,[ebp-0Ch]
77D4E653 mov dword ptr [ebp-0Ch],edi
77D4E656 call 77D494C9
77D4E65B pop edi
77D4E65C pop esi
77D4E65D leave
77D4E65E ret 4
77D4E661 nop
77D4E662 nop
77D4E663 nop
77D4E664 nop
77D4E665 nop
77D4E666 mov eax,1163h
77D4E66B mov edx,7FFE0300h
77D4E670 call dword ptr [edx]
77D4E672 ret 4
77D4E675 nop
77D4E676 nop
77D4E677 nop
77D4E678 nop
77D4E679 nop
77D4E67A mov edi,edi
77D4E67C push ebp
77D4E67D mov ebp,esp
77D4E67F sub esp,10h
77D4E682 push esi
77D4E683 mov esi,dword ptr [ebp+0Ch]
77D4E686 test esi,0FFFE0000h
77D4E68C jne 77D76FB1
77D4E692 mov eax,dword ptr [ebp+18h]
77D4E695 test eax,0FFFFFFF0h
77D4E69A jne 77D76FB1
77D4E6A0 push edi
77D4E6A1 mov edi,dword ptr [ebp+20h]
77D4E6A4 test edi,edi
77D4E6A6 je 77D4E6AB
77D4E6A8 and dword ptr [edi],0
77D4E6AB and dword ptr [ebp-8],0
77D4E6AF and dword ptr [ebp-4],0
77D4E6B3 mov dword ptr [ebp-10h],eax
77D4E6B6 mov eax,dword ptr [ebp+1Ch]
77D4E6B9 mov dword ptr [ebp-0Ch],eax
77D4E6BC mov eax,dword ptr [ebp+8]
77D4E6BF cmp eax,0FFFFFFFFh
-----
Bob
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:fcsba3dofod8iite3ddd3st9sa53h04ro8@4ax.com...
See below...
On Tue, 24 Jul 2007 16:42:59 +0530, "Bob S" <staheli.bob@gmail.com>
wrote:
I am setting a WH_CALLWNDPROC hook for the current thread using
SetWindowsHookEx.
When interacting with the file open/save dialogs of applications, I
get
a
'access violation' whenever a tooltip is about to be destroyed. The
tooltip
is associate with a shadow window having class name 'SysShadow' ; this
window receives the WM_NCDESTROY message. My hook receives all
messages
upto
this point. However, the crash occurs next ......
*****
Show your hook code. It would also be useful if we knew what function
was
lurking at
77D4e63b. But the detail level here doesn't help if we don't know
what
the actual code is
trying to do.
****
First-chance exception at 0x77d4e63b in notepad.exe: 0xC0000005:
Access
violation reading location 0x00000000.
Unhandled exception at 0x77d4e63b in notepad.exe: 0xC0000005: Access
violation reading location 0x00000000.
Contents of 77D4E63B are as follows :
77D4E63B mov eax,dword ptr [esi] // esi is 0 here
77D4E63D mov eax,dword ptr [eax+9Ch]
77D4E643 test eax,eax
77D4E645 jne 77D50151
77D4E64B push 0
77D4E64D push 0Ch
I appreciate any help!
Thanks
Bob
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]