Re: Security Attributes on a Notification Event creat ed at Kernel level

There are a lot of problems with named events and they should be avoided if
at all possible. A big problem is named events created in the driver in the
context of a process will become invalid when that process exits as all
handles to the event will be gone. This will completely screw the case you
described with potential multiple unknown clients. If you create the event
in the context of a system process, then this problem goes away but another
arises:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q228785

So, it should be recommended by MS if it isn’t already, and anyone else to
just not use this approach.


Bill McKenzie

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
>
> > ----------
> > From: xxxxx@storagecraft.com[SMTP:xxxxx@storagecraft.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Friday, May 03, 2002 4:27 PM
> > To: xxxxx@lists.osr.com
> > Subject: [ntdev] RE: Security Attributes on a Notification Event
> > created at Kernel level
> >
> > Do not use named events. MS have obsoleted this technique.
> > Create an unnamed event in user mode and pass the handle to the driver
via
> > IOCTL.
> >
> Named events have their use. Start winobj and open BaseNamedObjects
folder.
> Suprisingly, there are a lot of named events created by OS. Names indicate
> their possible use.
>
> I would agree if you say using named event for communication between
coupled
> app and driver has some drawbacks and there are better techniques. But if
> you for example want to indicate some event for several possibly unknown
> clients, named notification event can be used with advangate.
>
> I guess original poster didn’t say why want to use named event and may has
a
> good reason.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
>
>
>
>

It depends. The CD-ROM driver in the DDK uses named events to notify
user-mode components of CD-ROM insertion. I think it uses a
IoCreateXxx() function to create the named event. This named event is
global and not tied to a particular user-mode process.

Note that the driver must create the event in the basenamedobjects
directory for it to be visible to user-mode

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill McKenzie
Sent: Friday, May 03, 2002 11:52 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Security Attributes on a Notification Event creat
ed at Kernel level

There are a lot of problems with named events and they should be avoided
if at all possible. A big problem is named events created in the driver
in the context of a process will become invalid when that process exits
as all handles to the event will be gone. This will completely screw
the case you described with potential multiple unknown clients. If you
create the event in the context of a system process, then this problem
goes away but another
arises:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q228785

So, it should be recommended by MS if it isn’t already, and anyone else
to just not use this approach.


Bill McKenzie

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
>
> > ----------
> > From: xxxxx@storagecraft.com[SMTP:xxxxx@storagecraft.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Friday, May 03, 2002 4:27 PM
> > To: xxxxx@lists.osr.com
> > Subject: [ntdev] RE: Security Attributes on a Notification Event
> > created at Kernel level
> >
> > Do not use named events. MS have obsoleted this technique. Create an

> > unnamed event in user mode and pass the handle to the driver
via
> > IOCTL.
> >
> Named events have their use. Start winobj and open BaseNamedObjects
folder.
> Suprisingly, there are a lot of named events created by OS. Names
> indicate their possible use.
>
> I would agree if you say using named event for communication between
coupled
> app and driver has some drawbacks and there are better techniques. But

> if you for example want to indicate some event for several possibly
> unknown clients, named notification event can be used with advangate.
>
> I guess original poster didn’t say why want to use named event and may

> has
a
> good reason.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
>
>
>
>


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to %%email.unsub%%

specifically the old cdrom driver used a named event to notify the win32
subsystem that a media change event had occurred. I believe we’ve moved
entirely over to using PNP events now.

-p

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Friday, May 03, 2002 12:34 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Security Attributes on a Notification Event creat
ed at Kernel level

It depends. The CD-ROM driver in the DDK uses named events to notify
user-mode components of CD-ROM insertion. I think it uses a
IoCreateXxx() function to create the named event. This named event is
global and not tied to a particular user-mode process.

Note that the driver must create the event in the basenamedobjects
directory for it to be visible to user-mode

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill McKenzie
Sent: Friday, May 03, 2002 11:52 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Security Attributes on a Notification Event creat
ed at Kernel level

There are a lot of problems with named events and they should be avoided
if at all possible. A big problem is named events created in the driver
in the context of a process will become invalid when that process exits
as all handles to the event will be gone. This will completely screw
the case you described with potential multiple unknown clients. If you
create the event in the context of a system process, then this problem
goes away but another
arises:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q228785

So, it should be recommended by MS if it isn’t already, and anyone else
to just not use this approach.


Bill McKenzie

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
>
> > ----------
> > From: xxxxx@storagecraft.com[SMTP:xxxxx@storagecraft.com]
> > Reply To: xxxxx@lists.osr.com
> > Sent: Friday, May 03, 2002 4:27 PM
> > To: xxxxx@lists.osr.com
> > Subject: [ntdev] RE: Security Attributes on a Notification Event
> > created at Kernel level
> >
> > Do not use named events. MS have obsoleted this technique. Create an

> > unnamed event in user mode and pass the handle to the driver
via
> > IOCTL.
> >
> Named events have their use. Start winobj and open BaseNamedObjects
folder.
> Suprisingly, there are a lot of named events created by OS. Names
> indicate their possible use.
>
> I would agree if you say using named event for communication between
coupled
> app and driver has some drawbacks and there are better techniques. But

> if you for example want to indicate some event for several possibly
> unknown clients, named notification event can be used with advangate.
>
> I guess original poster didn’t say why want to use named event and may

> has
a
> good reason.
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
>
>
>
>


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%