I hate to say it, but this sounds really scary to me. Let’s make a thought experiment!
What if there are multiple users logged on through remote desktop and none to the console?
- Which screen saver are you going to clear?
What about fast user switching?
- Is the user who requested the action the user who is currently using the machine?
What if there is no console?
What if there is a password?
- Doesn’t really help to clear the screen saver!
Why clear the screen saver?
- The user isn’t there (or else it wouldn’t have gone on), so it doesn’t matter that
the job is done yet. When the user gets back, they are going to dismiss the screen
saver themselves anyway! Let the screen saver save that screen!
I think you might want to re-think your design. At least have a look at blogs.msdn.com/oldnewthing
before start doing freaky stuff like that. Search for something like “notify user from a service”
on that blog for a really good discussion as to the issues with what you are doing.
And besides, screen savers are neat!
-Jeff
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, November 03, 2006 1:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Clearing screen saver from kernel mode
No, the input stacks call them in an arbitrary thread context when the input is reported.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Stan Mitchell
Sent: Friday, November 03, 2006 10:35 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Clearing screen saver from kernel mode
Unfortunately, PoSetSystemState does not work with ES_DISPLAY_REQUIRED,
ES_USER_PRESENT or in combination (also tried adding in ES_SYSTEM_REQUIRED).
Does this have to be called in the context of the system input thread?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, November 03, 2006 7:42 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Clearing screen saver from kernel mode
You could ?try PoSetSystemState() with either ES_DISPLAY_REQUIRED or
ES_USER_PRESENT (the keyboard/mouse stacks use the latter value)
d
–
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.13.26/516 - Release Date: 11/3/2006
2:20 PM
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer