当前位置: 首页 > news >正文

网站源码交易平台代码商丘至开网络科技有限公司

网站源码交易平台代码,商丘至开网络科技有限公司,专业做官网的公司,自己如何制作一个网页API 更改 ADS 功能增加了以下公共 API 功能#xff1a; 枚举系统中的多路复用器设备。查询有关多路复用器的信息#xff0c;例如#xff0c;它连接了哪些目标#xff0c;以及当前切换到哪个目标。触发多路复用器切换。如何检测多路复用器是否已切换。 枚举系统中的多路复…API 更改 ADS 功能增加了以下公共 API 功能 枚举系统中的多路复用器设备。查询有关多路复用器的信息例如它连接了哪些目标以及当前切换到哪个目标。触发多路复用器切换。如何检测多路复用器是否已切换。 枚举系统中的多路复用器设备 应用程序可以使用通用的即插即用 API 来查找代表正常显示多路复用器的设备接口。 用户模式组件可使用Windows.Devices.Enumeration.DeviceInformation。 无论是 C# 还是 C都可以使用这些 API 来枚举多路复用器设备。 // Display Mux device interface // {93c33929-3180-46d3-8aab-008c84ad1e6e} DEFINE_GUID(GUID_DEVINTERFACE_DISPLAYMUX, 0x93c33929, 0x3180, 0x46d3, 0x8a, 0xab, 0x00, 0x8c, 0x84, 0xad, 0x1e, 0x6e); IDisplayMuxDevice 接口 添加 IDisplayMuxDevice 接口来表示多路复用器设备。 以下代码演示了如何使用 Windows Runtime API 枚举显示多路复用器设备、查询其状态、切换活动显示目标以及对状态变化做出反应。 #include winrt/Windows.Foundation.h #include winrt/Windows.Devices.Enumeration.h #include winrt/Windows.Foundation.Collections.h #include winrt/Windows.Devices.Display.Core.h#include string #include sstream #include iomanip #include windows.hnamespace winrt { using namespace winrt::Windows::Foundation; using namespace winrt::Windows::Foundation::Collections; using namespace winrt::Windows::Devices::Enumeration; using namespace winrt::Windows::Devices::Display; using namespace winrt::Windows::Devices::Display::Core; } // namespace winrtvoid SwitchDisplayMuxTarget() {// PnP device interface search string for Mux device interfacestd::wstring muxDeviceSelector LSystem.Devices.InterfaceClassGuid:\{93c33929-3180-46d3-8aab-008c84ad1e6e}\ AND System.Devices.InterfaceEnabled:System.StructuredQueryType.Boolean#True;// Execute the device interface querywinrt::DeviceInformationCollection deviceInformations winrt::DeviceInformation::FindAllAsync(muxDeviceSelector, nullptr).get();if (deviceInformations.Size() 0){printf(No DisplayMux devices\n);return;}printf(%ld display mux devices found\n\n, deviceInformations.Size());// Only one mux in first release but here is generic code for multiplefor (unsigned int i 0; i deviceInformations.Size(); i){printf(Display Mux device %ld :\n, i);// Get the device interface so we can query the infowinrt::DeviceInformation deviceInfo deviceInformations.GetAt(i);// Get the device idstd::wstring deviceId deviceInfo.Id().c_str();printf( Device ID string : %S \n, deviceId.c_str());// Create the DisplayMuxDevice objectauto displayMuxDevice winrt::DisplayMuxDevice::FromIdAsync(deviceId).get();if (!displayMuxDevice){printf(Failed to create DisplayMuxDevice object);continue;}// Check if DisplayMux is activeauto displayMuxActive displayMuxDevice.IsActive();printf( DisplayMux state : %s \n, displayMuxActive ? Active : Inactive);if (!displayMuxActive){continue;}// Register for call back when the state of the DisplayMux changesUINT changeCount 0;auto token displayMuxDevice.Changed([changeCount](auto, auto Args) - HRESULT {changeCount;return S_OK;});// Find targets connected to the DisplayMux and the current targetauto targetsList displayMuxDevice.GetAvailableMuxTargets();winrt::DisplayTarget currentTarget displayMuxDevice.CurrentTarget();// Switch the display mux to the other target// NOTE SetPreferredTarget() is a sync method so use .get() to wait for the operation to completeprintf(\n);if (currentTarget targetsList.GetAt(0)){printf(DisplayMux currently connected to first target\n);displayMuxDevice.SetPreferredTarget(targetsList.GetAt(1)).get();printf(Calling SetPreferredTarget to switch DisplayMux to second target\n);}else if (currentTarget targetsList.GetAt(1)){printf(DisplayMux currently connected to second target\n);displayMuxDevice.SetPreferredTarget(targetsList.GetAt(0)).get();printf(Calling SetPreferredTarget to switch DisplayMux to first target\n);}else{printf(Could not find current target in target list\n);}// Now read the current positioncurrentTarget displayMuxDevice.CurrentTarget();targetsList displayMuxDevice.GetAvailableMuxTargets();if (currentTarget targetsList.GetAt(0)){printf(DisplayMux is now currently connected to first target\n);}else if (currentTarget targetsList.GetAt(1)){printf(DisplayMux is now currently connected to second target\n);}else{printf(Could not find current target in target list\n);}// Now unregister for change callback and display thedisplayMuxDevice.Changed(token);printf(DisplayMux state change callback was called %ld times\n\n, changeCount);} }
http://www.hkea.cn/news/14441574/

相关文章:

  • 餐馆效果图网站wordpress图标字体不显示不出来
  • wordpress网站收录插件制作app平台需要多少钱
  • 域名seo站长工具重庆做腋臭骑士网站
  • 怎样推广自己做的网站小型电商平台
  • 北京专业做网站的网站搜索引擎提交
  • 阿里模板网站建设大连本地服务信息网
  • 公司网站域名注册费用小米网站开发流程书
  • 珠海建设局网站做网站应该会什么
  • 学平面设计的网站上饶婚纱工作室网站建设
  • 公司网站设计与开发群晖 wordpress 失败
  • 低俗网站推广哪里找空间网站
  • 北京三原色ps网站南通开发区:高质量发展
  • 西安城市建设职业学院官方网站网站源码平台
  • 清丰网站建设费用企业网站需要多大空间
  • 在线免费货源网站建立网站的公司有哪些
  • 关于我们网站设计wordpress订阅者
  • 国外产品网站安阳区号是多少
  • 免费开源企业网站程序劳务工程信息平台
  • flash网站设计欣赏如何选择顺德网站建设
  • 中跃建设集团网站杭州拱墅区网站建设
  • 建设商城网站的书籍钱价格低的英文怎么说
  • 如何选择网站项目广州哪里能建铝制自建房
  • 微信群 网站建设seo就业指导
  • 没有自己的网站做百度竞价石家庄网站建设推广公司哪家好
  • 加快网站速度吗高唐做网站推广
  • 网站可信认证网页设计与制作免费模板
  • 网站建设公司安丘市wordpress 验证
  • 网站的服务器怎么做的wordpress一万IP
  • 怎么给网站做百度优化婚庆网站开发计划书
  • 公司网站域名怎么续费手机微网站建设案例及报告