This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: non-persistent DllMain


* Dave Korn wrote, On 03/10/08 14:38:
> Sam Liddicott wrote on 03 October 2008 14:00:
>
>   
>>>> It crashes when I do the first sendmessage after hooking.
>>>>
>>>>         
>>> ... with presumably a null pointer dereference?
>>>
>>>       
>> it's hard to tell, it's explorer.exe that is crashing.
>>     
>
>   ... and?  Explorer is just a program like any other.
>
>   Install WinDbg and attach it to explorer, so you can catch the crash when it
> happens.
>   
Thanks for the tip.

In other news (with the right dll handle) if I try and hook all threads
I get the infamous error:
   this application has failed to start because cygwin1.dll was not found

Which possibly merely couldn't show before because it was attached to a
less "outgoing" thread, so I added c:\cygwin\bin to my system path and
rebooted, and this time found that my explorer window locked up! Yay!
That means the hookproc is being called.

So I rebooted again and made it a thread-only hookproc and this time
explorer still hangs like a mad thing.

At the beginning of my hookproc I put:
{int i,j,k; for(i=0;i<65535;i++) for(j=0;j<65535;j++) for(k=0;k<10;k++);}
and cpu load doesn't go through the roof :-(

So sadly: it's know imported the hookproc into explorer.exe memory
space, it's even TRYING to call the hookproc.
But it isn't.

I'll try windbg and see if it can tell me anything.

Sam



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]