DWM/changes to desktop access?

SunnyD

Belgian Waffler
Jan 2, 2001
32,674
146
106
www.neftastic.com
I'm having issues being able to use GetDesktopWindow on Vista and Server 2008 - assumingly because of changes to the security model or DWM, but not sure which.

As a test, I wrote up a quick little app that grabs a screenshot of the desktop window using GetDesktopWindow() - simple stuff that has been done a million times really. The app works fine locally.

The catch!

In the context that the app is run remotely - IE: pushed over to the machine, and run as administrator via remote code (a service), all I get back is a black bitmap on Vista and 2008. On XP and earlier it happily grabs whatever is the currently visible desktop window. I vaguely remember something about the security changes partitioning all user spaces including the desktop off, but I haven't been able to find anything about it. I also suspect it may have something to do with DWM, but I'm less inclined there after testing that it can still grab the screen when run locally with the same code.

Anyone have any ideas or notes about this?