You can see this article : New Ways to do Screen Capture
ScreenCapture with filter windows
JunPing Li
1
Reputation point
If I want to collect desktop data and filter some windows, what API can Microsoft provide? The magnification API was used before, but the key API MagSetImageScalingCallback is no longer maintained, and there is a memory leak problem with this API, which can not be used well. So I'd like to ask what new API can I use to support this function? Mainly want to get YUV data