Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › [Snippet] Detecting Operating System. [Also C++ Lessons?]

[Snippet] Detecting Operating System. [Also C++ Lessons?]

Posts 1–10 of 10 · Page 1 of 1
Faith
Faith
[Snippet] Detecting Operating System. [Also C++ Lessons?]
Had a bit of trouble finding this out for myself simply because Ive never done it before. But MSDN was more than helpful. This is my easier to understand version I guess and I hope it helps some of y'all out. As you know it was on one of my injectors and I got a few PMs asking how I did it so here it is.

Code:
    
//Operating System Detection
    OSVERSIONINFO OS;
    ZeroMemory(&OS, sizeof(OSVERSIONINFO));
    OS.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    GetVersionEx(&OS);

    if (OS.dwMajorVersion == 6 && OS.dwMinorVersion == 1) {
    Log->Lines->Add(”Windows 7 Detected”);
    }
    if (OS.dwMajorVersion == 6 && OS.dwMinorVersion == 0) {
    Log->Lines->Add(”Windows Vista Detected”);
    }
    if (OS.dwMajorVersion == 5) {
    Log->Lines->Add(”Windows XP Detected”);
    }
Also, if you wanted to get the name of the current user logged on:

//Get Computer Information
Code:
TCHAR sUserName[UNLEN + 1];
TCHAR sCompName[MAX_COMPUTERNAME_LENGTH + 1];
DWORD dwUserName = sizeof(sUserName);
DWORD dwCompName = sizeof(sCompName);
GetUserName(sUserName, &dwUserName);
GetComputerName(sCompName, &dwCompName);

How many of you guys would be interested in starting a set of classes geared towards teaching the average users the basics of C++? I was thinking bout hosting sessions
#1 · edited 16y ago · 16y ago
Luke420
[MPGH]Luke420
coool :P Faith told me to comment o i did XD
#2 · 16y ago
FA
Fatality319
I want the classes!
#3 · 16y ago
why06
why06
Quote Originally Posted by xFaith View Post

How many of you guys would be interested in starting a set of classes geared towards teaching the average users the basics of C++? I was thinking bout hosting sessions
Ummmm... there's plenty of resources out there. Hell someguy made a hundred video tutorials, but if you want to go for it. I am always a proponent of raising public awareness.

Oh and almost forgot. Thanks for the tip. I will remember this, I might have to use it someday.
#4 · 16y ago
User1
User1
Reading the registry for the OS is cool too. Buh I guess I won't be using this code any time soon because I'm a VB.Net(er).
#5 · 16y ago
Faith
Faith
I guess your right, but I kind of need something to do to keep me occupied. Plus live help is better than a video that wont help you with the specific problems you may have.
#6 · 16y ago
ZE
zeco
sure that sounds fun =).
#7 · 16y ago
Matrix_NEO006
Matrix_NEO006

How many of you guys would be interested in starting a set of classes geared towards teaching the average users the basics of C++? I was thinking bout hosting sessions


hmm im interested
#8 · edited 16y ago · 16y ago
origami7795
origami7795
im interested, good idea!
#9 · 16y ago
That0n3Guy
That0n3Guy
I want classes
#10 · 16y ago
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

  • [Request/Help] OPERATING SYSTEMBy apezwijn in General
    12Last post 18y ago
  • Best operating system for a new hackerBy hooter222 in Combat Arms Hacks & Cheats
    3Last post 17y ago
  • What operating system do you use?By brucevduyn in General
    5Last post 17y ago
  • VMware Operating System Not FoundBy squad-E in CrossFire Discussions
    17Last post 16y ago
  • Operating Systems, which one have you enjoyed the most.By radnomguywfq3 in General
    12Last post 16y ago

Tags for this Thread

#detecting#lessons#operating#snippet#system