Skip to content
Permalink
Browse files

Commited files

  • Loading branch information...
deathmock5 committed Feb 21, 2019
1 parent d9608c7 commit 51ebe1be81a6824c278f7ea92b0b17d8cf3946af
Showing with 1,044 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +35 −0 CPUID.h
  3. +426 −0 InstalledPrograms.cpp
  4. +32 −0 InstalledPrograms.h
  5. +136 −0 RegistryKey.cpp
  6. +38 −0 RegistryKey.h
  7. +375 −0 Source.cpp
@@ -328,3 +328,5 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/
UniqueInformationExample.vcxproj
UniqueInformationExample.vcxproj.filters
35 CPUID.h
@@ -0,0 +1,35 @@
#ifndef CPUID_H
#define CPUID_H

#ifdef _WIN32
#include <limits.h>
#include <intrin.h>
typedef unsigned __int32 uint32_t;

#else
#include <stdint.h>
#endif

class CPUID {
uint32_t regs[4];

public:
explicit CPUID(unsigned i) {
#ifdef _WIN32
__cpuid((int *)regs, (int)i);

#else
asm volatile
("cpuid" : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
: "a" (i), "c" (0));
// ECX is set to zero for CPUID function 4
#endif
}

const uint32_t &EAX() const { return regs[0]; }
const uint32_t &EBX() const { return regs[1]; }
const uint32_t &ECX() const { return regs[2]; }
const uint32_t &EDX() const { return regs[3]; }
};

#endif // CPUID_H
Oops, something went wrong.

0 comments on commit 51ebe1b

Please sign in to comment.
You can’t perform that action at this time.