3 ms·
The screenshot function pointed in the article out will only be able to take screenshots on older versions of Windows with no compositor, i.e. the ones that dra
by BearOso 2y ago
The screenshot function pointed in the article out will only be able to take screenshots on older versions of Windows with no compositor, i.e. the ones that draw directly to the scan-out framebuffer. That's why he found it's not used anywhere--it's obsolete.
- bjc 2y agonot true, BitBlt is still able to access screen content on Win10 & 11
- mook 2y agoSpecifically, it can access screen content, but not window content. As in, passing in the desktop hwnd gets you a picture, passing in a different hwnd gets you a bunch of black. At least as of when I tried it a few months ago on Windows 10.
- willvarfar 2y agoDoes the screen content contain all the windows that are visible, or is it the desktop image?
- mook 2y agoAll of the windows visible on screen. For my use case, I was taking a screenshot of my app (for automated testing), so I ended up taking a full desktop screenshot and cropping it to the window.
- bjc 2y agoI was curious about this so I just tested it... some windows are able to be captured and some are black
- nvy 2y agoLooking at the MSDN docs I don't believe this is true. Can you point to something showing it doesn't work on modern windows? My only windows box is in an actual physical box right now and I cannot verify.
- ianhawes 2y agoThats what I was thinking. Some of the higher end EFT cheats I've used were drawing to the screen but were not picked up by any sort of screenshot tools or even streaming on Discord. It would appear that the whole "take a screenshot of the screen" anti-cheat is no longer effective. As a connoisseur of online game hacks, I'm utterly stunned at the level of sophistication that both parties partake in with respect to the cat-and-mouse game of cheat/anti-cheat. Some are technically very interesting, like the hardware DMA device I previously used. The firmware was customized specifically for a subset of users specifically to avoid detection (it eventually failed). Others are very clever, like the hack that was dynamically compiled as an Xbox Game Bar module.
- korhojoa 2y agoWhy do you cheat? Genuinely asking, as I've stopped playing EFT due to rampant cheating.
- ack_complete 2y agoNo, this works fine even on current versions of Windows that can only run with the compositor, as the DWM special-cases blits from a display DC or GetDC(0). It will even switch windows out of independent flip if necessary to do this, which can be seen with PresentMon.
- BearOso 2y agoInteresting. When I think about this, of course Microsoft would go to those lengths to maintain backward compatibility.
- ack_complete 2y agoWell, it's more basic functionality than backwards compatibility. There was no other API to capture the screen from Vista to Windows 8, and not being able to programmatically take screenshots wouldn't have been viable. The newer DXGI Output Duplication API wasn't added until 8.1 and that still requires the DWM to change its composition strategy when active.