From - Fri Sep 26 07:33:18 1997 Path: news.mitre.org!blanket.mitre.org!agate!newsgate.duke.edu!nntprelay.mathworks.com!newsfeed.internetmci.com!199.4.94.15!HSNX.wco.com!news.wco.com!not-for-mail From: Rick Lund Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: [Q]: Theads blocking in Windows NT Date: Tue, 23 Sep 1997 07:23:52 -0700 Organization: Hamilton Software, Inc. Lines: 31 Message-ID: <3427D0F8.2F8FCCE2@wco.com> References: <01bcc7bb$ea5545c0$91d35786@eugenen.spectrumsignal.com> NNTP-Posting-Host: serpens185.wco.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (WinNT; U) Eugene Nechamkin wrote: > > Hello evevrybody, > > I have the following situation. I want to spawn some user thread (in my > DLL) and block it. I want this thread to be unblocked only if my Windows > NT Kernel Driver (which I am writing) sees an interrupt from my dervice. > Blocking means stop the specific user thread from running and then allowing > it to run (unblocking it). Windows 95 did alow me to do this by using its > kerenel's functions (BlockonID/SignalID). I want to use the same strategy > as I had for Windows 95 on Windows NT platform. > > Does Windows NT Kernel API have any way to stop/resume any specified user's > thread from the Kernel level? Or I am taking a wrong path here? > > All ideas are greatly appreciated. > > Thank you very much for your time. > Eugene. Eugene, What you are doing is Ok for NT - you just create an event object in the kernel and DLL with the same name. Then, in your user mode DLL you can call WaitForSingleObject (for example) which will block that thread until something signals the event, in this case, your driver. See the SDK and DDK on how to do this. -- // Rick Lund | // Hamilton Software, Inc. | Keine Werbung bitte !