Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
general refact
Browse files Browse the repository at this point in the history
  • Loading branch information
mq1n committed Jun 28, 2021
1 parent 41254b5 commit d33d4c7
Show file tree
Hide file tree
Showing 3 changed files with 362 additions and 132 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ if(MSVC)
endif()

add_executable (${PROJECT_NAME}
include/main.h
src/main.cpp
)

target_link_libraries(${PROJECT_NAME} PowrProf WinInet Tbs)
target_link_libraries(${PROJECT_NAME} dxguid PowrProf WinInet Tbs)
47 changes: 47 additions & 0 deletions include/main.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#pragma once
#include <Windows.h>
#include <powerbase.h>
#include <WinInet.h>
#include <tbs.h>
#include <intrin.h>
#include <dxdiag.h>
#include <string>
#include <vector>
#include <array>
#include <iostream>
#include <fstream>

#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
#define SystemBootEnvironmentInformation 90
#define SystemSecureBootInformation 145
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }

typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
{
GUID BootIdentifier;
FIRMWARE_TYPE FirmwareType;
} SYSTEM_BOOT_ENVIRONMENT_INFORMATION, * PSYSTEM_BOOT_ENVIRONMENT_INFORMATION;
typedef struct _SYSTEM_SECUREBOOT_INFORMATION
{
BOOLEAN SecureBootEnabled;
BOOLEAN SecureBootCapable;
} SYSTEM_SECUREBOOT_INFORMATION, * PSYSTEM_SECUREBOOT_INFORMATION;
typedef struct _PROCESSOR_POWER_INFORMATION {
ULONG Number;
ULONG MaxMhz;
ULONG CurrentMhz;
ULONG MhzLimit;
ULONG MaxIdleState;
ULONG CurrentIdleState;
} PROCESSOR_POWER_INFORMATION, * PPROCESSOR_POWER_INFORMATION;

struct DISPLAY_DEVICE_INFORMATION
{
char szDescription[255]{ '\0' };
char szDriverModel[255]{ '\0' };
};
struct DIRECTX_VERSION_INFORMATION
{
int nMajorVersion{ 0 };
int nMinorVersion{ 0 };
};

0 comments on commit d33d4c7

Please sign in to comment.