From - Thu Oct 23 08:08:25 1997 Path: news.mitre.org!blanket.mitre.org!agate!newsgate.duke.edu!nntprelay.mathworks.com!newsfeed.internetmci.com!24.128.1.125!chnws03.mediaone.net!24.128.1.107!chnws04.ne.mediaone.net!not-for-mail From: "Fred Hewett" Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: Creating event object in driver for access by Win32 program Date: Wed, 22 Oct 1997 20:08:38 -0400 Organization: Vireo Software Lines: 27 Message-ID: <62m4ig$9mb$1@brnws01.ne.mediaone.net> References: <01bcdf1c$208e5b50$5b227392@glastonbury> NNTP-Posting-Host: swift.ne.mediaone.net X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOle: Produced By Microsoft MimeOLE V4.71.1712.3 dave porter wrote in message <01bcdf1c$208e5b50$5b227392@glastonbury>... >What must one do in a kernel driver to create a named event >object which can also be manipulated by user-mode Win32 >calls? > >That is, I want the driver to create the event, then some >program (which does not have any file handles open to the >driver in question - this is a requirement which I won't go >into at this point) to be able to open a handle to the event >and wait on it. I got this working (on NT 4.0) by noticing that when you create a named event at user level, it ends up in the object directory under \BaseNamedObjects. So, when you create the event in your driver, the first parameter to IoCreateSynchronizationEvent should be a PUNICODE_STRING initialized to L"\\BaseNamedObjects\\xxxx", where the xxxx is the name you pass to OpenEvent in your app. Btw, the event is initially signaled, so you should clear it if you're going to wait on it. I haven't investigated the protection issue. ----- Fred Hewett mailto:hewett@vireo.com Vireo Software http://www.vireo.com