No, but you can run a service as user system, which will allow for the
security.
On the service comments, my brain damage on suggesting a service directly.
Note, if the data being reported is important, the developer should also
consider how to communicate data to a headless (i.e. serial VT-100)
connection.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Mathieu Routhier”
To: “Windows System Software Developers Interest List”
Sent: Tuesday, August 19, 2003 3:51 PM
Subject: [ntdev] Re: driver integration with systray icon status
> Can a driver differentiate an application from a service so it can reject
> ioctls from the unauthorized apps? I think it’s not possible.
>
> That must be something else. What did you mean by security?
>
> Mat
>
> -----Original Message-----
> From: Nick Ryan [mailto:xxxxx@nryan.com]
> Sent: Tuesday, August 19, 2003 3:40 PM
> To: Windows System Software Developers Interest List
> Subject: [ntdev] Re: driver integration with systray icon status
>
> True, but for security reasons it’s better for some products to only
> allow a system service to communicate with their drivers.
>
> Moreira, Alberto wrote:
>
> > But you don’t need a service to tie an application to a driver and to a
> tray
> > icon. For example, in our DriverStudio 3.0 we have the BoundsChecker
Tray
> > App, which we internally call “BoundsChecker for Dummies”, it interacts
> with
> > the BoundsChecker driver and with the rest of the system to be notified
of
> > user-selected errors and events, so that the user can package
information
> > and send it attached to an email to a remote developer. On another tack,
> > services are jolly easy to develop these days, all you need is a copy of
> > .NET and you can even write a service in Visual Basic. 
> >
> > Alberto.
> >
> >
> > -----Original Message-----
> > From: Nick Ryan [mailto:xxxxx@nryan.com]
> > Sent: Tuesday, August 19, 2003 1:41 PM
> > To: Windows System Software Developers Interest List
> > Subject: [ntdev] Re: driver integration with systray icon status
> >
> >
> > A service should NEVER do UI of any kind, and this includes tray icons.
> > Always delegate this to a helper app that is launched by one of the Run
> > keys in the registry, for every user login. Anything service-UI related
> > that kinda, sorta works in a single-user environment will require a
> > rewrite of this kind when management demands compatibility with Terminal
> > Services (been there, done that).
> >
> > Moreira, Alberto wrote:
> >
> >
> >>A tray app is just a plain vanilla Windows app that calls the right
APIs,
> >
> > it
> >
> >>can issue IOCTLs, no problem. You can look at the Shell_NotifyIcon
> >
> > function,
> >
> >>or read the mass of documentation that comes if you give “Shell” to the
> >
> > MSDN
> >
> >>Search. Or you can start at the “Shell Programmer’s Guide”. In fact, the
> >>Shell_NofityIcon function allows you to change the tray icon on the fly
to
> >>reflect your current status.
> >>
> >>Hope this helps,
> >>
> >>Alberto.
> >>
> >>
> >>-----Original Message-----
> >>From: Mathieu Routhier [mailto:xxxxx@guillemot.com]
> >>Sent: Tuesday, August 19, 2003 9:50 AM
> >>To: Windows System Software Developers Interest List
> >>Subject: [ntdev] Re: driver integration with systray icon status
> >>
> >>
> >>Wasn’t there a discussion lately about the difficulties a service can
have
> >>to access the current desktop? I thought services were for more
> >>“transparent” daemon-like things. I’m not very used to services so it
> >
> > might
> >
> >>be easier than I think… User-mode land is known territory, though 
> >>
> >>If what you’re looking for is automatic start of your tray icon, you can
> >>also add an entry in the “Run” key (or alternatively the Startup folder
of
> >>the start menu?).
> >>
> >>Yes you’re right about the pending ioctl technique, it might be a better
> >>technique. While we’re at it; I was just thinking about something
lately:
> >>in this scenario, the driver pends the IRP and completes it when the
> >>condition occurs. After the application gets control back because
> >>DeviceIoControl() returns, if it wants to be notified again, it needs to
> >>send another IOCTL, right? So until this new IRP reaches the driver,
the
> >>events that happened were not propagated to the application. I know
this
> >
> > is
> >
> >>a short period of time but sometimes, the app could have a certain
number
> >
> > of
> >
> >>things to do before calling DeviceIoControl again. Still, no matter how
> >>short this time is, there is a gap. Is there a simple solution to this?
> >>
> >>Mat
> >>
> >>
> >>-----Original Message-----
> >>From: Don Burn [mailto:xxxxx@acm.org]
> >>Sent: Tuesday, August 19, 2003 9:31 AM
> >>To: Windows System Software Developers Interest List
> >>Subject: [ntdev] Re: driver integration with systray icon status
> >>
> >>Because he said he wanted to tie a driver to a tray icon, so either you
> >
> > tell
> >
> >>folks to run a application all the time, or you make a service that
starts
> >>automatically for you to do it. Also, why go to the trouble of an
event,
> >>especially since there may be state with needed to be retrieved, versus
> >
> > the
> >
> >>wait on the completion of an IOCTL for information or state change.
> >
> > Keeping
> >
> >>it simple is still the best, and the event can lead to complications.
> >>
> >>Don Burn (MVP, Windows DDK)
> >>Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >>
> >>----- Original Message -----
> >>From: “Mathieu Routhier”
> >>To: “Windows System Software Developers Interest List”
> >
> >
> >
> >>Sent: Tuesday, August 19, 2003 9:08 AM
> >>Subject: [ntdev] Re: driver integration with systray icon status
> >>
> >>
> >>
> >>
> >>>Why would you need a service there?? Au user-mode app can perfectly do
> >>
> >>the
> >>
> >>
> >>>job here.
> >>>
> >>>To fiddle with tray icons, read on about Shell_NotifyIcon() (in the
> >>
> >>Platform
> >>
> >>
> >>>SDK, of course).
> >>>
> >>>For communicating with your driver, you can try sending a event handle
> >>>through an IOCTL to your driver, which will
ObReferenceObjectByHandle().
> >>>Then, in due time, the driver can trigger the event (KeSetEvent()).
> >>>
> >>>Mat
> >>>
> >>>-----Original Message-----
> >>>From: Don Burn [mailto:xxxxx@acm.org]
> >>>Sent: Tuesday, August 19, 2003 6:12 PM
> >>>To: Windows System Software Developers Interest List
> >>>Subject: [ntdev] Re: driver integration with systray icon status
> >>>
> >>>You are going to have to have a service to handle the systray icon, and
> >>
> >>then
> >>
> >>
> >>>have the service query the driver for the status. I don’t know of any
> >>>examples of this.
> >>>
> >>>Don Burn (MVP, Windows DDK)
> >>>Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >>>
> >>>----- Original Message -----
> >>>From: “M.Tam”
> >>>To: “Windows System Software Developers Interest List”
> >>
> >>
> >>
> >>>Sent: Monday, August 18, 2003 5:13 PM
> >>>Subject: [ntdev] driver integration with systray icon status
> >>>
> >>>
> >>>
> >>>
> >>>>Hello. Does anyone have a good starting point (source code examples
and
> >>>>link) on how to write a systray icon that shows status/events? I’d
like
> >>>>to tie this to a device driver. Let me give you an example – you can
> >>>>enable network status icon in W2K/XP, which blinks depending on
whether
> >>>>there is inbound/outbound network traffic.
> >>>>
> >>>>I don’t mind doing my homework by having to study examples, or do some
> >>>>additional reading.
> >>>>
> >>>>Thanks!
> >>>>Tommy
> >>>>
> >>>>—
> >>>>Questions? First check the Kernel Driver FAQ at
> >>>
> >>>http://www.osronline.com/article.cfm?id=256
> >>>
> >>>
> >>>>You are currently subscribed to ntdev as: xxxxx@acm.org
> >>>>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>>
> >>>
> >>>
> >>>—
> >>>Questions? First check the Kernel Driver FAQ at
> >>>http://www.osronline.com/article.cfm?id=256
> >>>
> >>>You are currently subscribed to ntdev as: xxxxx@guillemot.com
> >>>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>>
> >>>
> >>>—
> >>>Questions? First check the Kernel Driver FAQ at
> >>
> >>http://www.osronline.com/article.cfm?id=256
> >>
> >>
> >>>You are currently subscribed to ntdev as: xxxxx@acm.org
> >>>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>
> >>
> >>
> >>
> >>—
> >>Questions? First check the Kernel Driver FAQ at
> >>http://www.osronline.com/article.cfm?id=256
> >>
> >>You are currently subscribed to ntdev as: xxxxx@guillemot.com
> >>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>
> >>
> >>—
> >>Questions? First check the Kernel Driver FAQ at
> >>http://www.osronline.com/article.cfm?id=256
> >>
> >>You are currently subscribed to ntdev as: xxxxx@compuware.com
> >>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>
> >>
> >>
> >>The contents of this e-mail are intended for the named addressee only.
It
> >>contains information that may be confidential. Unless you are the named
> >>addressee or an authorized designee, you may not copy or use it, or
> >
> > disclose
> >
> >>it to anyone else. If you received it in error please notify us
> >
> > immediately
> >
> >>and then destroy it.
> >>
> >>
> >>
> >>
> >
> >
>
> –
> Nick Ryan (MVP for DDK)
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@guillemot.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com