WinOs.vip

网吧技术,我们的认真的!
QQ群:594362448
首页 » 未分类 » 显示器恢复出厂工具(成品 源码)
分类:

显示器恢复出厂工具(成品 源码)

文章作者:admin
手机扫码查看

办站宗旨:收集和分享一些实用的工具,好用的网吧系统,解决问题经验等,保证都是非常实用的工具。做这个博客,我一直把用户体验放在第一位。

显示器恢复出厂工具(成品 源码)

// test.cpp : 定义应用程序的入口点。
//

#include "stdafx.h"
#include "test.h"
#include <PhysicalMonitorEnumerationAPI.h>
#include <HighLevelMonitorConfigurationAPI.h>

#pragma  comment(lib, "dxva2.lib")

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
        HMONITOR hMonitor = NULL;
        DWORD cPhysicalMonitors;
        LPPHYSICAL_MONITOR pPhysicalMonitors = NULL;

        // Get the monitor handle.
        hMonitor = MonitorFromWindow(GetDesktopWindow(), MONITOR_DEFAULTTOPRIMARY);

        // Get the number of physical monitors.
        BOOL bSuccess = GetNumberOfPhysicalMonitorsFromHMONITOR(
                hMonitor, 
                &cPhysicalMonitors
                );

        if (bSuccess)
        {
                // Allocate the array of PHYSICAL_MONITOR structures.
                pPhysicalMonitors = (LPPHYSICAL_MONITOR)malloc(
                        cPhysicalMonitors* sizeof(PHYSICAL_MONITOR));

                if (pPhysicalMonitors != NULL)
                {
                        // Get the array.
                        bSuccess = GetPhysicalMonitorsFromHMONITOR(
                                hMonitor, cPhysicalMonitors, pPhysicalMonitors);

                        // Use the monitor handles (not shown).
                        RestoreMonitorFactoryDefaults(pPhysicalMonitors->hPhysicalMonitor);
                        // Close the monitor handles.
                        bSuccess = DestroyPhysicalMonitors(
                                cPhysicalMonitors, 
                                pPhysicalMonitors);

                        // Free the array.
                        free(pPhysicalMonitors);
                }

        }

        return 0;
}

显示器恢复出厂工具(成品 源码).rar

如遇到无法下载,请扫码加我,留言。能修复的,第一时间修复后,微信回复。 本站还开通了VIP专属下载通道,需要联系微信 wkcyyx开通!

文章如无特别注明均为原创! 作者: admin, 转载或复制请以 超链接形式 并注明出处 Winos.vip
原文地址《 显示器恢复出厂工具(成品 源码)》发布于2018-8-19

评论

切换注册

登录

您也可以使用第三方帐号快捷登录

Q Q 登 录
微 博 登 录
切换登录

注册

sitemap