system_version.h 562 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef UTILS_WINVERSION
  2. #define UTILS_WINVERSION
  3. #include <stdint.h>
  4. #include <string>
  5. namespace am {
  6. typedef struct _winversion_info {
  7. int major;
  8. int minor;
  9. int build;
  10. int revis;
  11. }winversion_info;
  12. class system_version
  13. {
  14. private:
  15. system_version();
  16. public:
  17. static bool get_dll(const std::string tar, winversion_info *info);
  18. static void get_win(winversion_info *info);
  19. static bool is_win8_or_above();
  20. static bool is_win10_or_above(int build_number = -1);
  21. static bool is_32();
  22. private:
  23. std::string _target_file;
  24. };
  25. }
  26. #endif