-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystemCheck.cpp
More file actions
42 lines (41 loc) · 944 Bytes
/
systemCheck.cpp
File metadata and controls
42 lines (41 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <Windows.h>
#include <winternl.h>
#include <versionhelpers.h>
#include <tchar.h>
#include "globalVars.h"
#include "systemCheck.h"
#include <Shlwapi.h>
TCHAR* chkWinVer(void) {
if (IsWindowsXPOrGreater()) {
if (IsWindows7OrGreater()) {
if (IsWindows8Point1OrGreater()) {
if (IsWindows10OrGreater()) {
return OSList[5];
}
return OSList[4];
}
else {
return OSList[2];
}
}
else {
return OSList[0];
}
}
}
TCHAR *getUsrName(TCHAR *inputBuff, DWORD buffSize) {
bool res = GetUserName(inputBuff,&buffSize);
return inputBuff;
}
TCHAR *getHostName(TCHAR *inputBuff, DWORD buffSize) {
bool res = GetComputerName(inputBuff,&buffSize);
return inputBuff;
}
bool chkComCtlVersion(void) {
LPCTSTR lpszDllName = _T("C:\\Windows\\System32\\ComCtl32.dll");
DLLVERSIONINFO2 cmCtlStruct;
cmCtlStruct.info1.cbSize = sizeof(DLLVERSIONINFO2);
int iTargetVersion = 6;
int iGottenVersion = 0;
return 0;
}