哪个版本支持Windows.Graphics.Capture?
Which version does support Windows.Graphics.Capture?
我看到微软网站上的图形捕捉项目在 1803 上受支持,但我在这个版本上 运行 不支持。
如果我调用下面的代码,然后崩溃
auto interop_factory = winrt::get_activation_factory<winrt::Windows::Graphics::Capture::GraphicsCaptureItem, IGraphicsCaptureItemInterop>();
GraphicsCaptureItem
确实存在于Windows10,版本1803中。但是,IGraphicsCaptureItemInterop
不存在,你需要Windows10,版本1903来消费API这样。
在 Windows 10 版本 1803 中,您应该改用 GraphicsCapturePicker.PickSingleItemAsync
。
我看到微软网站上的图形捕捉项目在 1803 上受支持,但我在这个版本上 运行 不支持。 如果我调用下面的代码,然后崩溃
auto interop_factory = winrt::get_activation_factory<winrt::Windows::Graphics::Capture::GraphicsCaptureItem, IGraphicsCaptureItemInterop>();
GraphicsCaptureItem
确实存在于Windows10,版本1803中。但是,IGraphicsCaptureItemInterop
不存在,你需要Windows10,版本1903来消费API这样。
在 Windows 10 版本 1803 中,您应该改用 GraphicsCapturePicker.PickSingleItemAsync
。