Skip to content

Commit 6f698a5

Browse files
authored
fixed ver
1 parent bf04603 commit 6f698a5

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

1.01/WinXPChecker.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
typedef struct IUnknown IUnknown;
2+
3+
#include "WindowsXPChecker.h"
4+
5+
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow)
6+
{
7+
//DETECTOR 1ST PHASE
8+
MessageBoxA(NULL, "We are checking to see if you are using XP, This should take a little", "WindowsXPChecker.exe - Detection Starting", MB_ICONWARNING|MB_OK);
9+
10+
//SLEEP
11+
Sleep(1000 * 5); //5 SECONDS
12+
13+
//DETECTOR 2ND PHASE
14+
if (!CheckForWindowsXP()) NotWindowsXP();
15+
MessageBoxA(NULL, "You are currently using XP.\r\nYou may proceed to exit the program", "WindowsXPChecker.exe - Detection Successful", MB_ICONINFORMATION|MB_OK);
16+
}

1.01/WindowsXPChecker.exe

271 KB
Binary file not shown.

1.01/WindowsXPChecker.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
typedef struct IUnknown IUnknown;
2+
3+
#pragma once
4+
5+
//Include the Windows API
6+
#include <Windows.h>
7+
8+
//Windows XP Checker
9+
WINBOOL CheckForWindowsXP() {
10+
OSVERSIONINFOA osvi;
11+
ZeroMemory(&osvi, sizeof(OSVERSIONINFOA));
12+
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
13+
GetVersionExA(&osvi);
14+
if (osvi.dwMajorVersion == 5) {
15+
return true;
16+
}
17+
return false;
18+
}
19+
20+
//If detection knows your not using XP, this shows up.
21+
void NotWindowsXP() {
22+
MessageBoxA(NULL, "No. You are not using XP.", "WindowsXPChecker.exe - Detection Failed", MB_ICONERROR|MB_OK);
23+
exit(0);
24+
}
25+
26+

0 commit comments

Comments
 (0)