![](/img/trans.png)
[英]How to target x64 (64 bit) platform while using ActiViz in a .NET C# application (WinForms)
[英]C# WinForms using FlashLight built-in into mobile device running Windows 10 Professional x64
我已經創建了一個 WinForms (C#) 應用程序,我必須添加對內置 Flash 的支持。 該設備是運行 x64 架構的 Windows 10 Professional(普通 Windows 10)的平板電腦。 有沒有辦法做到這一點? 我的應用程序從內置相機捕獲視頻 - 我使用 OpenCV Sharp 來做到這一點,但我找不到任何使用內置手電筒的可能性。 我只需要手動打開和關閉燈。 我找到了很多示例,但只能通過 UWP 實現,而我無法以任何方式將其添加到 WinForms。 有誰知道在 WinForms 應用程序中使用內置手電筒的方法嗎?
通過添加UwpDesktog NuGet 包並添加以下引用,可以在任何非 UWP-C# 項目中使用 Windows API:
c:\\Program Files (x86)\\Windows Kits\\10\\References\\Windows.Foundation.FoundationContract\\1.0.0.0\\Windows.Foundation.FoundationContract.winmd c:\\Program Files (x86)\\Windows Kits\\10\\References\\Windows.Foundation.UniversalApiContract\\1.0.0.0\\Windows.Foundation.UniversalApiContract.winmd c:\\Program Files (x86)\\Windows Kits\\10\\UnionMetadata\\Facade\\Windows.WinMD c:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETCore\\v4.5\\System.Runtime.WindowsRuntime.dll
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.