LICK
 All Data Structures Files Functions Variables Enumerations Enumerator
system-info.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 typedef enum {
9  F_UNKNOWN,
10  F_WINDOWS_9X,
11  F_WINDOWS_NT,
12  F_WINDOWS_VISTA,
13 } family_e;
14 
15 typedef enum {
16  V_UNKNOWN,
17  V_WINDOWS_95,
18  V_WINDOWS_98,
19  V_WINDOWS_ME,
20  V_WINDOWS_NT,
21  V_WINDOWS_2000,
22  V_WINDOWS_XP,
23  V_WINDOWS_VISTA,
24  V_WINDOWS_7,
25  V_WINDOWS_8,
26  V_WINDOWS_8_1,
27  V_WINDOWS_10,
28 } version_e;
29 
30 typedef enum {
31  A_UNKNOWN,
32  A_WINDOWS_X86,
33  A_WINDOWS_X86_64,
34 } architecture_e;
35 
36 typedef enum {
37  ADMIN_UNKNOWN,
38  ADMIN_YES,
39  ADMIN_NO,
40 } is_admin_e;
41 
42 typedef enum {
43  BIOS_UNKNOWN,
44  BIOS_BIOS,
45  BIOS_UEFI,
46 } bios_type_e;
47 
53 char *version_name(version_e v);
59 char *family_name(family_e f);
65 char *arch_name(architecture_e a);
71 char *bios_name(bios_type_e b);
72 
76 typedef struct {
78  family_e family;
80  char *family_name;
82  version_e version;
84  char *version_name;
86  architecture_e arch;
88  char *arch_name;
90  bios_type_e is_bios;
92  char *bios_name;
94  is_admin_e is_admin;
95 } sys_info_t;
96 
105 void free_sys_info(sys_info_t *info);
is_admin_e is_admin
does the process have administrator privileges
Definition: system-info.h:94
char * arch_name
name of the architecture
Definition: system-info.h:88
char * bios_name(bios_type_e b)
determines the name of the given BIOS type
Definition: system-info.c:193
architecture_e arch
the architecture
Definition: system-info.h:86
version_e version
the windows version
Definition: system-info.h:82
sys_info_t * get_system_info()
returns info about the system
Definition: system-info.c:204
char * bios_name
name of the type of BIOS
Definition: system-info.h:92
bios_type_e is_bios
the type of BIOS
Definition: system-info.h:90
char * family_name(family_e f)
determines the name of the given windows family
Definition: system-info.c:169
char * version_name(version_e v)
determines the name of the given windows version
Definition: system-info.c:140
relevant info about the system
Definition: system-info.h:76
char * family_name
name of the windows version family
Definition: system-info.h:80
char * arch_name(architecture_e a)
determines the name of the given architecture
Definition: system-info.c:182
void free_sys_info(sys_info_t *info)
frees memory used by a sys_info_t
Definition: system-info.c:226
char * version_name
name of the windows version
Definition: system-info.h:84
family_e family
the windows version family
Definition: system-info.h:78