export.cpp 498 B

1234567891011121314151617
  1. #include "pch.h"
  2. #include <winrt/Windows.Foundation.Metadata.h>
  3. bool wgc_is_supported() {
  4. try {
  5. /* no contract for IGraphicsCaptureItemInterop, verify 10.0.18362.0 */
  6. return winrt::Windows::Foundation::Metadata::ApiInformation::
  7. IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 8);
  8. } catch (const winrt::hresult_error &) {
  9. return false;
  10. } catch (...) {
  11. return false;
  12. }
  13. }
  14. am::wgc_session *wgc_create_session() { return new am::wgc_session_impl(); }