From: George Blat [georgeb@brd.com] Sent: Wednesday, February 21, 2001 4:31 PM To: NT Developers Interest List Subject: [ntdev] Re: Semaphore visible from user-mode application. ZwCreateSemaphore() is an undocumented native NT application call. It's not available to a kernel mode driver. George At 09:22 PM 2/21/01 +0100, you wrote: >Well, but the original poster wanted a semaphore. Create named semaphore in >BaseNamedObjects directory using ZwCreateSemaphore() should solve the >problem in kernel mode (and OpenSemaphore() can be used in user mode). > >Best regards, > >Michal Vodicka >Veridicom >(RKK - Skytale) >[WWW: http://www.veridicom.com , http://www.skytale.com] > > > > > ---------- > > From: Jamey Kirby[SMTP:jkirby@storagecraft.com] > > Reply To: NT Developers Interest List > > Sent: Wednesday, February 21, 2001 8:25 PM > > To: NT Developers Interest List > > Subject: [ntdev] Re: Semaphore visible from user-mode application. > > > > My preference is to use a named event in the BaseNamedObjects directory. > > You > > can create it in the driver or the UM code. > > > > > -----Original Message----- > > > From: bounce-ntdev-562@lists.osr.com > > > [mailto:bounce-ntdev-562@lists.osr.com]On Behalf Of George Blat > > > Sent: Wednesday, February 21, 2001 10:57 AM > > > To: NT Developers Interest List > > > Subject: [ntdev] Re: Semaphore visible from user-mode application. > > > > > > > > > > > > Pablo: > > > > > > It's better to change places. You create the semaphore in your > > application > > > and pass the handle to your driver via an IOCTL. Once in your driver, > > you > > > need a pointer from the handle to allow access to the semaphore in an > > > arbitrary context. You use ObReferenceObjectByHandle to get such > > > a pointer. > > > The pointer will be of type PRKSEMAPHORE. > > > > > > You must still be in the context of your application when you call > > > ObReferenceObjectByHandle. > > > > > > When done with your pointer, call ObDereferenceObject to allow the > > > object to be released. > > > > > > > > > George > > > > > > > > > --- > > > You are currently subscribed to ntdev as: jkirby@storagecraft.com > > > To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com > > > > > > > > > --- > > You are currently subscribed to ntdev as: MVodicka@rkk.cz > > To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com > > > >--- >You are currently subscribed to ntdev as: georgeb@brd.com >To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com --- You are currently subscribed to ntdev as: GlennEverhart@FirstUSA.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com