BUG: OpenDesktop ("screen-saver",...) Returns a Valid Handle When the Screen Saver Is Not RunningID: Q230117
|
When you open the screen saver desktop by calling OpenDesktop, a valid handle may be returned even when the screen saver is not running. This problem occurs on Windows NT 4.0 with Service Pack 4 and may cause problems in applications that rely upon OpenDesktop("screen-saver, ...) to return a NULL handle when the screen saver is not running.
Check the validity of the desktop handle based on the function you use it in. For instance, if you use the desktop handle to enumerate the windows of this desktop, you may encounter the problem that the windows of the default desktop get enumerated.
For additional information on how to work around this problem, use the solution suggested in the following article in the Microsoft Knowledge Base:
Q198590 BUG: EnumDesktopWindows Might Enumerate the Wrong Desktop
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, 0, 0);
OpenDesktop("Screen-saver", 0, FALSE, DESKTOP_READOBJECTS);
For additional information, please see the following article in the Microsoft Knowledge Base:
Q140723 HOWTO: Force a Screen Saver to Close Once Started in Windows NT
Additional query words:
Keywords : kbNTOS400bug kbScreenSaver kbSDKPlatform kbGrpUser kbNTOS400sp4bug
Version : winnt:4.0 SP4
Platform : winnt
Issue type : kbbug
Last Reviewed: April 29, 1999