【问题标题】:Alternate way to use DuplicateOutput() of IDXGIOutput1 in C# for UWP?在 C# 中为 UWP 使用 IDXGIOutput1 的 DuplicateOutput() 的替代方法?
【发布时间】:2017-09-09 05:51:42
【问题描述】:

有什么方法可以使用 IDXGIOutput1 接口的DuplicateOutput() 方法来获取桌面复制,目前它在 C++ 中可用,我想在 C# 中使用它。 DuplicateOutput() 仅适用于我希望它在 UWP 中实现的桌面,因此请为此指定任何替代方式。

【问题讨论】:

标签: c# uwp screen-capture sharpdx


【解决方案1】:

您可以实现 windows runtime component 并通过一些 supported win32 APIs in UWP 编写自己的 DuplicateOutput 方法。然后,您可以在 C# UWP 项目中添加对该组件的引用。

【讨论】:

    【解决方案2】:

    如果您正在开发通用 UWP 应用,则此 API 在 UWP 中不可用。您可以查看Win32 and COM APIs for UWP apps 了解更多详情。

    如果您不打算将应用发布到 Windows 商店,也就是说,您可能希望旁加载您的应用。然后,您可以选择Brokered Windows Runtime Components for a side-loaded Windows Store app。如果您使用代理的 Windows 运行时组件,您将能够使用此 API。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-10-17
      • 2013-02-05
      • 2014-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多