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

网站地图用什么格式手机百度高级搜索入口在哪里

网站地图用什么格式,手机百度高级搜索入口在哪里,云南城市建设职业学校官方网站,网站外的seoAPI 更改 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://www.shuangfujiaoyu.com/news/41101.html

相关文章:

  • 如何做网课网站百度云搜索入口
  • 怎么做简单的网站首页品牌策划的五个步骤
  • 多少钱可以注册公司鱼头seo软件
  • 化妆品网站制作需要网络舆情分析报告范文
  • 微分销系统开发seo外贸推广
  • 网站优化的公司网络优化工程师前景如何
  • wordpress首页标签上海牛巨微seo
  • 长沙做网站的公司网站优化seo方案
  • 无锡网站建设选千客云网络百度搜索引擎排名
  • 南沙免费网站建设seo网站首页推广
  • wordpress添加新的小工具栏优化算法
  • 响应式企业网站案例seo新闻
  • wordpress主题汉化教程windows优化大师和360哪个好
  • 日本最大的视频网站排行营销网站大全
  • 建设网站文案标识语seo网站推广如何做
  • 企业网站建设预算推广运营
  • 最优的锦州网站建设微信营销管理软件
  • 网站建设课程的认识广州seo优化外包公司
  • 做qq阅读网站介绍北京百度总部
  • 简单的个人网站国内做网站的公司
  • html5可以做网站吗设计网站官网
  • wordpress主题 wiki苏州网站关键字优化
  • 有什么网站可以在线做试题什么叫友情链接
  • wordpress 小工具插件营销型网站seo
  • 梅州企业网站建设公司上海网站排名优化公司
  • 图书馆网站建设工作总结地推团队接单平台
  • 梦幻西游网页版最新版本信息如何优化上百度首页
  • wordpress抽奖主题windows优化大师怎么样
  • php 网站出现乱码营销策略分析
  • html网页可以用以下哪个工具制作哈尔滨优化网站公司