Already got this nightmare issue of a black screen when capturing windows with OpenScrape and OpenHoldem?
It was often due to hardware or driver issues to resolve with your graphic card manufacturer, often a question of a driver to be updated to latest one or a correction on its settings…
But it now happens, due to a completely other reason: e.g. due to an incompatibility with our current capturing way, with the classic GDI api (BitBlit).
Because GDI can’t scrape Hardware Accelered (HA) windows, producing only a black or white screen. GDI is incompatible with HA and many casinos are more or more using HA, mainly either with new UWP/WinRT applications or OpenGL or DirectX applications:
https://stackoverflow.com/questions/43595289/screenshot-with-bitblt-results-in-black-image-on-windows-10
https://www.vbforums.com/showthread.php?898778-Problems-getting-a-window-capture-with-Bitblt-and-PrintWindow
So the only way was to disable HA on our graphic card settings, but with recent Windows 10 (v.1803 – 04/2018 update) or 11 versions, many graphic card manufacters removed now the possibility to disable HA.
So do we have to stuck now with GDI capture api and its stressing black screen scrape issue?!…
No, no,
OpenHoldem team never sleep and has already found the solution to this, always ahead of the competition… 😛
To better understand how we choose the best alternative to GDI api capture, here’s some recaps:
https://github.com/mika-f/dotnet-window-capture
With any doubt, it is the WinRT.GraphicsCapture method from the WinRT api that is the best suited for our scraping case and the only one compatible with all window kinds.
The only disadvantage with WinRT api capture is that only support at least Windows 10 v.1803 mini version, so it can’t support WinXP/Win7 as OpenHoldem could before, normal because recent WinRT api (do not to confuse with the older one on Win8…) was only introduced on this Win10 1803 update…
So for future, it will surely needed 2 versions of OpenHoldem, our classic one still compatible with WinXP/7 but not compatible with HA windows and a new WinRT api version one compatible with HA windows but only compatible with recent Win10/11 versions.
Here’s a presentation by Microsoft of the “New Way to do Screen Capture” with UWP/WinRT api graphic capture:
https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/
And a better understanding on how the new C++/WinRT api works:
https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt
Here’s our current work state on the new WinRT api capture (replacing GDI api):
https://www.maxinmontreal.com/forums/viewtopic.php?p=184382#p184382
https://www.maxinmontreal.com/forums/viewtopic.php?p=188128#p188128
And the corresponding commit on Github:
https://github.com/Mudr0x/openholdembot/tree/oh_winrt_api
https://github.com/Lab0ne/openholdembot/commit/7196e519d10cce62dcd8fd92bbfe75a725dba45b
Leave a Reply