X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com Date: Fri, 03 Oct 2008 15:43:41 +0100 Subject: Re: non-persistent DllMain Envelope-To: cygwin AT cygwin DOT com References: <48E5FB68 DOT 1090104 AT liddicott DOT com> <48E5FE38 DOT 7040400 AT gmail DOT com> <48E60C19 DOT 8070409 AT liddicott DOT com> <028e01c92554$709fef20$9601a8c0 AT CAM DOT ARTIMI DOT COM> <48E61763 DOT 8040601 AT liddicott DOT com> <029801c9255d$598fc3b0$9601a8c0 AT CAM DOT ARTIMI DOT COM> Message-ID: <48E62F9D.9060107@liddicott.com> From: "Sam Liddicott" User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com * 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/