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

> ----------

From: xxxxx@bsquare.com[SMTP:xxxxx@bsquare.com]
Reply To: xxxxx@lists.osr.com
Sent: Friday, May 03, 2002 8:51 PM
To: xxxxx@lists.osr.com
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

In the case I meant a driver wants to notify user mode apps about some
event. All what such a client needs is to wait for the event and it is
possible. Sure, it must be created in system process context.

Also, you can set correct security attributes if necessary. Just use
ZwCreateEvent instead of IoCreateNotificationEvent which is simple wrapper
around the first one.

Best regards,

Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]