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

网站建设 维护 编程怎么申请商标品牌

网站建设 维护 编程,怎么申请商标品牌,在线文字编辑器,网站开发相关专业API 更改 ADS 功能增加了以下公共 API 功能: 枚举系统中的多路复用器设备。查询有关多路复用器的信息,例如,它连接了哪些目标,以及当前切换到哪个目标。触发多路复用器切换。如何检测多路复用器是否已切换。 枚举系统中的多路复…
API 更改

ADS 功能增加了以下公共 API 功能:

  1. 枚举系统中的多路复用器设备。
  2. 查询有关多路复用器的信息,例如,它连接了哪些目标,以及当前切换到哪个目标。
  3. 触发多路复用器切换。
  4. 如何检测多路复用器是否已切换。
枚举系统中的多路复用器设备

应用程序可以使用通用的即插即用 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.h>namespace 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 = L"System.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://fybItF7w.xdzLj.cn
http://0o9i55aL.xdzLj.cn
http://tGoPmyg8.xdzLj.cn
http://F3TfmE4j.xdzLj.cn
http://Y45kM68B.xdzLj.cn
http://fZpJwrfo.xdzLj.cn
http://QASBG5oJ.xdzLj.cn
http://ArMagk5q.xdzLj.cn
http://36pMbOFj.xdzLj.cn
http://sNWOmsqq.xdzLj.cn
http://LEr8TJMv.xdzLj.cn
http://hLY1P2pL.xdzLj.cn
http://c5TPMv3j.xdzLj.cn
http://OHSVIMDT.xdzLj.cn
http://jbhZGHRw.xdzLj.cn
http://oelf7rFP.xdzLj.cn
http://bRblJ4hG.xdzLj.cn
http://XKphunX1.xdzLj.cn
http://RNO7OhYt.xdzLj.cn
http://6GS23A3x.xdzLj.cn
http://vVAIJGf0.xdzLj.cn
http://YBJLS1yR.xdzLj.cn
http://qcqTvvVz.xdzLj.cn
http://WrdWQn53.xdzLj.cn
http://jEjeO4wn.xdzLj.cn
http://jESkD9PC.xdzLj.cn
http://31YVFWuc.xdzLj.cn
http://0KJ8i8Lj.xdzLj.cn
http://hz63bgjM.xdzLj.cn
http://pGLvdxM5.xdzLj.cn
http://www.dtcms.com/wzjs/624880.html

相关文章:

  • 企业网站建设过程做网站教程下载
  • 网站备案每年审吗手机评分网站
  • 网站开发入门培训机构报告老板
  • 云霄网站建设上海企业信息公示网查询全国
  • 料远若近网站建设内蒙古包头网站建设
  • 网站建设素材深圳珠宝网站设计
  • 无锡网站制作价格在线小游戏
  • 千博企业网站管理系统旗舰版家具公司网站页面设计模板
  • 受欢迎的做pc端网站桂建云官网
  • 宁波网站建设培训班网站规划与建设课设报告
  • wordpress网站如何搬家正规网页设计培训怎么样
  • 高级网站开发工程师考试题wordpress修改右键菜单
  • 网站分享按钮免费外网加速器
  • 优购物官方网站直播装修旧房翻新价格表
  • 金华安全网站建设怎么收费网站排名优化专业定制
  • 一个后台管理多个网站代理注册公司怎么样
  • 珠海找工作哪个网站好网站建设的优点
  • 广州建网站价格厦门规划建设网站
  • 统计网站建设手机版网站建设报价
  • 东阳市网站建设简单的网页设计作品源代码
  • 网站备案加急php软件网站建设
  • 北京企业建站模板注册网站挣钱
  • wordpress站长工作wordpress 上传
  • 公司高端网站建设良品铺子网络营销案例
  • 唐山制作网站的公司廊坊首页霸屏优化
  • 网站头像有啥做会清晰wordpress 分享
  • 公司官方网站怎么做河北省建设局网站
  • 怀化市建设局网站地址改图宝在线制作印章
  • 一流的内蒙古网站建设宁波关键词排名优化
  • 一流的哈尔滨网站建设建设企业网站平台主要的目的是