ReactOS  0.4.12-dev-18-gf469aca
system.c File Reference
#include "precomp.h"
Include dependency graph for system.c:

Go to the source code of this file.

Typedefs

typedef BOOL(WINAPIISWOW64PROC) (HANDLE, PBOOL)
 

Functions

BOOL GetRegValue (HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size)
 
static BOOL GetDirectXVersion (WCHAR *szBuffer)
 
VOID GetSystemCPU (WCHAR *szBuffer)
 
static SIZE_T GetBIOSValue (BOOL UseSMBios, PCHAR DmiString, LPWSTR RegValue, PVOID pBuf, DWORD cchBuf, BOOL bTrim)
 
static VOID InitializeSystemPage (HWND hwndDlg)
 
INT_PTR CALLBACK SystemPageWndProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 

Typedef Documentation

◆ ISWOW64PROC

typedef BOOL(WINAPI * ISWOW64PROC) (HANDLE, PBOOL)

Definition at line 12 of file system.c.

Function Documentation

◆ GetBIOSValue()

static SIZE_T GetBIOSValue ( BOOL  UseSMBios,
PCHAR  DmiString,
LPWSTR  RegValue,
PVOID  pBuf,
DWORD  cchBuf,
BOOL  bTrim 
)
static

Definition at line 158 of file system.c.

Referenced by InitializeSystemPage().

165 {
166  SIZE_T Length = 0;
167  BOOL Result;
168 
169  if (UseSMBios)
170  {
171  Length = GetSMBiosStringW(DmiString, pBuf, cchBuf, bTrim);
172  }
173  if (Length == 0)
174  {
175  Result = GetRegValue(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\BIOS", RegValue, REG_SZ, pBuf, cchBuf * sizeof(WCHAR));
176  if (Result)
177  {
178  Length = wcslen(pBuf);
179  }
180  }
181  return Length;
182 }
__wchar_t WCHAR
Definition: xmlstorage.h:180
SIZE_T GetSMBiosStringW(_In_ PCSTR DmiString, _Out_ PWSTR pBuf, _In_ DWORD cchBuf, _In_ BOOL bTrim)
Definition: udmihelp.c:145
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
unsigned int BOOL
Definition: ntddk_ex.h:94
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
static const WCHAR L[]
Definition: oid.c:1087
ULONG_PTR SIZE_T
Definition: typedefs.h:78
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL GetRegValue(HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size)
Definition: system.c:15
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REG_SZ
Definition: layer.c:22

◆ GetDirectXVersion()

static BOOL GetDirectXVersion ( WCHAR szBuffer)
static

Definition at line 45 of file system.c.

Referenced by InitializeSystemPage().

46 {
47  WCHAR szVer[20];
48 
49  if (!GetRegValue(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectX", L"Version", REG_SZ, szVer, sizeof(szVer)))
50  return FALSE;
51 
52  if(!wcscmp(szVer, L"4.02.0095"))
53  wcscpy(szBuffer, L"1.0");
54  else if (!wcscmp(szVer, L"4.03.00.1096"))
55  wcscpy(szBuffer, L"2.0");
56  else if (!wcscmp(szVer, L"4.04.0068"))
57  wcscpy(szBuffer, L"3.0");
58  else if (!wcscmp(szVer, L"4.04.0069"))
59  wcscpy(szBuffer, L"3.0");
60  else if (!wcscmp(szVer, L"4.05.00.0155"))
61  wcscpy(szBuffer, L"5.0");
62  else if (!wcscmp(szVer, L"4.05.01.1721"))
63  wcscpy(szBuffer, L"5.0");
64  else if (!wcscmp(szVer, L"4.05.01.1998"))
65  wcscpy(szBuffer, L"5.0");
66  else if (!wcscmp(szVer, L"4.06.02.0436"))
67  wcscpy(szBuffer, L"6.0");
68  else if (!wcscmp(szVer, L"4.07.00.0700"))
69  wcscpy(szBuffer, L"7.0");
70  else if (!wcscmp(szVer, L"4.07.00.0716"))
71  wcscpy(szBuffer, L"7.0a");
72  else if (!wcscmp(szVer, L"4.08.00.0400"))
73  wcscpy(szBuffer, L"8.0");
74  else if (!wcscmp(szVer, L"4.08.01.0881"))
75  wcscpy(szBuffer, L"8.1");
76  else if (!wcscmp(szVer, L"4.08.01.0810"))
77  wcscpy(szBuffer, L"8.1");
78  else if (!wcscmp(szVer, L"4.09.0000.0900"))
79  wcscpy(szBuffer, L"9.0");
80  else if (!wcscmp(szVer, L"4.09.00.0900"))
81  wcscpy(szBuffer, L"9.0");
82  else if (!wcscmp(szVer, L"4.09.0000.0901"))
83  wcscpy(szBuffer, L"9.0a");
84  else if (!wcscmp(szVer, L"4.09.00.0901"))
85  wcscpy(szBuffer, L"9.0a");
86  else if (!wcscmp(szVer, L"4.09.0000.0902"))
87  wcscpy(szBuffer, L"9.0b");
88  else if (!wcscmp(szVer, L"4.09.00.0902"))
89  wcscpy(szBuffer, L"9.0b");
90  else if (!wcscmp(szVer, L"4.09.00.0904"))
91  wcscpy(szBuffer, L"9.0c");
92  else if (!wcscmp(szVer, L"4.09.0000.0904"))
93  wcscpy(szBuffer, L"9.0c");
94  else
95  return FALSE;
96 
97  return TRUE;
98 }
#define TRUE
Definition: types.h:120
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1087
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
BOOL GetRegValue(HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size)
Definition: system.c:15
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REG_SZ
Definition: layer.c:22

◆ GetRegValue()

BOOL GetRegValue ( HKEY  hBaseKey,
LPWSTR  SubKey,
LPWSTR  ValueName,
DWORD  Type,
LPWSTR  Result,
DWORD  Size 
)

Definition at line 15 of file system.c.

Referenced by EnumerateServiceProviders(), GetBIOSValue(), GetDirectXVersion(), InitializeDialog(), and InitializeSystemPage().

16 {
17  HKEY hKey;
18  LONG res;
19  DWORD dwType;
20  DWORD dwSize;
21 
22  if (RegOpenKeyExW(hBaseKey, SubKey, 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
23  return FALSE;
24 
25  dwSize = Size;
26  res = RegQueryValueExW(hKey, ValueName, NULL, &dwType, (LPBYTE)Result, &dwSize);
27  RegCloseKey(hKey);
28 
29  if (res != ERROR_SUCCESS)
30  return FALSE;
31 
32  if (dwType != Type)
33  return FALSE;
34 
35  if (Size == sizeof(DWORD))
36  return TRUE;
37 
38  Result[(Size / sizeof(WCHAR))-1] = L'\0';
39  return TRUE;
40 }
#define TRUE
Definition: types.h:120
Type
Definition: Type.h:6
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WCHAR
Definition: msvc.h:43
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1087
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
GLuint res
Definition: glext.h:9613
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3381
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

◆ GetSystemCPU()

VOID GetSystemCPU ( WCHAR szBuffer)

Definition at line 100 of file system.c.

Referenced by InitializeSystemPage().

101 {
102  SYSTEM_INFO archInfo;
103  ISWOW64PROC fnIsWow64Process;
104  BOOL isWow64 = FALSE;
105 
106  /* Find out if the program is running through WOW64 or not. Apparently,
107  IsWow64Process() is not available on all versions of Windows, so the function
108  has to be imported at runtime. If the function cannot be found, then assume
109  the program is not running in WOW64. */
110  fnIsWow64Process = (ISWOW64PROC)GetProcAddress(
111  GetModuleHandleW(L"kernel32"), "IsWow64Process");
112 
113  if (fnIsWow64Process != NULL)
114  fnIsWow64Process(GetCurrentProcess(), &isWow64);
115 
116  /* If the program is compiled as 32-bit, but is running in WOW64, it will
117  automatically report as 32-bit regardless of the actual system architecture.
118  It detects whether or not the program is using WOW64 or not, and then
119  uses GetNativeSystemInfo(). If it is, it will properly report the actual
120  system architecture to the user. */
121  if (isWow64)
122  GetNativeSystemInfo(&archInfo);
123  else
124  GetSystemInfo(&archInfo);
125 
126  /* Now check to see what the system architecture is */
128  {
129  switch(archInfo.wProcessorArchitecture)
130  {
132  {
133  wsprintfW(szBuffer, L"32-bit");
134  break;
135  }
137  {
138  wsprintfW(szBuffer, L"64-bit");
139  break;
140  }
142  {
143  wsprintfW(szBuffer, L"Itanium");
144  break;
145  }
147  {
148  wsprintfW(szBuffer, L"ARM");
149  break;
150  }
151  default:break;
152  }
153  }
154 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define PROCESSOR_ARCHITECTURE_ARM
Definition: ketypes.h:110
#define PROCESSOR_ARCHITECTURE_UNKNOWN
Definition: ketypes.h:115
VOID WINAPI GetNativeSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:206
#define PROCESSOR_ARCHITECTURE_IA64
Definition: ketypes.h:111
smooth NULL
Definition: ftsmooth.c:416
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1168
#define PROCESSOR_ARCHITECTURE_AMD64
Definition: ketypes.h:114
static const WCHAR L[]
Definition: oid.c:1087
#define PROCESSOR_ARCHITECTURE_INTEL
Definition: ketypes.h:105
BOOL(WINAPI * ISWOW64PROC)(HANDLE, PBOOL)
Definition: system.c:12
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:142
WORD wProcessorArchitecture
Definition: winbase.h:1122
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410

◆ InitializeSystemPage()

static VOID InitializeSystemPage ( HWND  hwndDlg)
static

Definition at line 186 of file system.c.

Referenced by SystemPageWndProc().

187 {
188  WCHAR szTime[200];
189  WCHAR szOSName[50];
190  DWORD Length;
191  DWORDLONG AvailableBytes, UsedBytes;
192  MEMORYSTATUSEX mem;
193  WCHAR szFormat[50];
194  WCHAR szDesc[50];
195  SYSTEM_INFO SysInfo;
196  OSVERSIONINFO VersionInfo;
197  PVOID SMBiosBuf;
198  PCHAR DmiStrings[ID_STRINGS_MAX] = { 0 };
199 
200  /* set date/time */
201  szTime[0] = L'\0';
202  Length = GetDateFormat(LOCALE_SYSTEM_DEFAULT, DATE_LONGDATE, NULL, NULL, szTime, _countof(szTime));
203  if (Length)
204  {
205  szTime[Length-1] = L',';
206  szTime[Length++] = L' ';
207  }
209  szTime[_countof(szTime)-1] = L'\0';
210  SendDlgItemMessageW(hwndDlg, IDC_STATIC_TIME, WM_SETTEXT, 0, (LPARAM)szTime);
211 
212  /* set computer name */
213  szTime[0] = L'\0';
214  Length = _countof(szTime);
215  if (GetComputerNameW(szTime, &Length))
217 
218  /* set product name */
219  if (GetRegValue(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", L"ProductName", REG_SZ, szOSName, sizeof(szOSName)))
220  {
221  if (LoadStringW(hInst, IDS_OS_VERSION, szFormat, _countof(szFormat)))
222  {
223  WCHAR szCpuName[50];
224 
225  ZeroMemory(&VersionInfo, sizeof(OSVERSIONINFO));
226  VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
227 
228  GetSystemCPU(szCpuName);
229 
230  if (GetVersionEx(&VersionInfo))
231  {
232  szTime[_countof(szTime)-1] = L'\0';
233  wsprintfW(szTime, szFormat, szOSName, szCpuName, VersionInfo.dwMajorVersion, VersionInfo.dwMinorVersion, VersionInfo.dwBuildNumber);
234  SendDlgItemMessageW(hwndDlg, IDC_STATIC_OS, WM_SETTEXT, 0, (LPARAM)szTime);
235  }
236  else
237  {
238  /* If the version of the OS cannot be retrieved for some reason, then just give the OS Name and Architecture */
239  szTime[_countof(szTime)-1] = L'\0';
240  wsprintfW(szTime, L"%s %s", szOSName, szCpuName);
241  SendDlgItemMessageW(hwndDlg, IDC_STATIC_OS, WM_SETTEXT, 0, (LPARAM)szTime);
242  }
243  }
244  }
245  else
246  {
247  if (LoadStringW(hInst, IDS_VERSION_UNKNOWN, szTime, _countof(szTime)))
248  {
249  szTime[_countof(szTime)-1] = L'\0';
251  }
252  }
253 
254  /* FIXME set product language/local language */
256  SendDlgItemMessageW(hwndDlg, IDC_STATIC_LANG, WM_SETTEXT, 0, (LPARAM)szTime);
257 
258  /* prepare SMBIOS data */
259  SMBiosBuf = LoadSMBiosData(DmiStrings);
260 
261  /* set system manufacturer */
262  szTime[0] = L'\0';
263  Length = GetBIOSValue(SMBiosBuf != NULL,
264  DmiStrings[SYS_VENDOR],
265  L"SystemManufacturer",
266  szTime, _countof(szTime), FALSE);
267  if (Length > 0)
268  {
269  szTime[_countof(szTime)-1] = L'\0';
270  SendDlgItemMessageW(hwndDlg, IDC_STATIC_MANU, WM_SETTEXT, 0, (LPARAM)szTime);
271  }
272 
273  /* set motherboard model */
274  szTime[0] = L'\0';
275  Length = GetBIOSValue(SMBiosBuf != NULL,
276  DmiStrings[SYS_PRODUCT],
277  L"SystemProductName",
278  szTime, _countof(szTime), FALSE);
279  if (Length > 0)
280  {
281  SendDlgItemMessageW(hwndDlg, IDC_STATIC_MODEL, WM_SETTEXT, 0, (LPARAM)szTime);
282  }
283 
284  /* set bios model */
285  szTime[0] = L'\0';
286  Length = GetBIOSValue(SMBiosBuf != NULL,
287  DmiStrings[BIOS_VENDOR],
288  L"BIOSVendor",
289  szTime, _countof(szTime), TRUE);
290  if (Length > 0)
291  {
292  DWORD Index;
293  DWORD StrLength = _countof(szTime);
294 
295  Index = wcslen(szTime);
296  if (Index + 1 < _countof(szTime))
297  {
298  szTime[Index++] = L' ';
299  szTime[Index] = L'\0';
300  }
301  StrLength -= Index;
302 
303  Length = GetBIOSValue(SMBiosBuf != NULL,
304  DmiStrings[BIOS_DATE],
305  L"BIOSReleaseDate",
306  szTime + Index, StrLength, TRUE);
307  if (Length > 0)
308  {
309  if (Index + StrLength > _countof(szTime) - 15)
310  {
311  //FIXME retrieve BiosMajorRelease, BiosMinorRelease
312  //StrLength = wcslen(szTime + Index);
313  //szTime[Index+StrLength] = L' ';
314  //wcscpy(szTime + Index + StrLength, L"Ver: "); //FIXME NON-NLS
315  //szTime[_countof(szTime)-1] = L'\0';
316  }
317  SendDlgItemMessageW(hwndDlg, IDC_STATIC_BIOS, WM_SETTEXT, 0, (LPARAM)szTime);
318  }
319  }
320 
321  /* clean SMBIOS data */
322  FreeSMBiosData(SMBiosBuf);
323 
324  /* set processor string */
325  if (GetRegValue(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\CentralProcessor\\0", L"ProcessorNameString", REG_SZ, szDesc, sizeof(szDesc)))
326  {
327  TrimDmiStringW(szDesc);
328  /* FIXME retrieve current speed */
329  szFormat[0] = L'\0';
330  GetSystemInfo(&SysInfo);
331  if (SysInfo.dwNumberOfProcessors > 1)
332  LoadStringW(hInst, IDS_FORMAT_MPPROC, szFormat, _countof(szFormat));
333  else
334  LoadStringW(hInst, IDS_FORMAT_UNIPROC, szFormat, _countof(szFormat));
335 
336  szFormat[_countof(szFormat)-1] = L'\0';
337  wsprintfW(szTime, szFormat, szDesc, SysInfo.dwNumberOfProcessors);
338  SendDlgItemMessageW(hwndDlg, IDC_STATIC_PROC, WM_SETTEXT, 0, (LPARAM)szTime);
339  }
340 
341  /* retrieve available memory */
342  ZeroMemory(&mem, sizeof(mem));
343  mem.dwLength = sizeof(mem);
344  if (GlobalMemoryStatusEx(&mem))
345  {
346  if (LoadStringW(hInst, IDS_FORMAT_MB, szFormat, _countof(szFormat)))
347  {
348  /* set total mem string */
349  szFormat[_countof(szFormat)-1] = L'\0';
350  wsprintfW(szTime, szFormat, (mem.ullTotalPhys/1048576));
351  SendDlgItemMessageW(hwndDlg, IDC_STATIC_MEM, WM_SETTEXT, 0, (LPARAM)szTime);
352  }
353 
354  if (LoadStringW(hInst, IDS_FORMAT_SWAP, szFormat, _countof(szFormat)))
355  {
356  /* set swap string */
357  AvailableBytes = (mem.ullTotalPageFile-mem.ullTotalPhys)/1048576;
358  UsedBytes = (mem.ullTotalPageFile-mem.ullAvailPageFile)/1048576;
359 
360  szFormat[_countof(szFormat)-1] = L'\0';
361  wsprintfW(szTime, szFormat, (UsedBytes), (AvailableBytes));
362  SendDlgItemMessageW(hwndDlg, IDC_STATIC_SWAP, WM_SETTEXT, 0, (LPARAM)szTime);
363  }
364  }
365  /* set directx version string */
366  wcscpy(szTime, L"ReactX ");
367  if (GetDirectXVersion(szTime + 7))
368  {
370  }
371  else
372  {
373  if (LoadStringW(hInst, IDS_VERSION_UNKNOWN, szTime, _countof(szTime)))
374  {
375  szTime[_countof(szTime)-1] = L'\0';
377  }
378  }
379 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define IDS_FORMAT_MPPROC
Definition: resource.h:114
signed char * PCHAR
Definition: retypes.h:7
#define IDC_STATIC_SWAP
Definition: resource.h:32
#define TRUE
Definition: types.h:120
ULONG dwMajorVersion
Definition: rtltypes.h:234
#define IDS_OS_VERSION
Definition: resource.h:155
#define LOCALE_SLANGUAGE
Definition: winnls.h:26
TCHAR szTime[64]
Definition: solitaire.cpp:18
#define IDS_VERSION_UNKNOWN
Definition: resource.h:115
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define IDC_STATIC_LANG
Definition: resource.h:26
#define _countof(array)
Definition: fontsub.cpp:30
#define IDC_STATIC_TIME
Definition: resource.h:23
#define GetLocaleInfo
Definition: winnls.h:1154
#define ZeroMemory
Definition: winbase.h:1635
#define IDC_STATIC_BIOS
Definition: resource.h:29
#define IDC_STATIC_PROC
Definition: resource.h:30
#define SendDlgItemMessage
Definition: winuser.h:5708
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
Definition: compname.c:339
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
TCHAR szOSName[50]
Definition: ver.c:29
OSVERSIONINFOA OSVERSIONINFO
Definition: rtltypes.h:289
#define LOCALE_NOUSEROVERRIDE
Definition: winnls.h:19
#define IDC_STATIC_COMPUTER
Definition: resource.h:24
LONG_PTR LPARAM
Definition: windef.h:208
#define IDC_STATIC_VERSION
Definition: resource.h:33
smooth NULL
Definition: ftsmooth.c:416
#define IDC_STATIC_MANU
Definition: resource.h:27
#define WM_SETTEXT
Definition: winuser.h:1599
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:233
static BOOL GetDirectXVersion(WCHAR *szBuffer)
Definition: system.c:45
ULONG dwBuildNumber
Definition: rtltypes.h:236
#define IDS_FORMAT_UNIPROC
Definition: resource.h:113
#define IDC_STATIC_MODEL
Definition: resource.h:28
#define LOCALE_SYSTEM_DEFAULT
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1087
ULONG dwMinorVersion
Definition: rtltypes.h:235
VOID GetSystemCPU(WCHAR *szBuffer)
Definition: system.c:100
#define IDS_FORMAT_MB
Definition: resource.h:111
HINSTANCE hInst
Definition: dxdiag.c:13
#define TIME_FORCE24HOURFORMAT
Definition: winnls.h:268
#define GetDateFormat
Definition: winnls.h:1152
VOID FreeSMBiosData(_In_ PVOID Buffer)
Definition: udmihelp.c:177
VOID TrimDmiStringW(_Inout_ PWSTR pStr)
Definition: udmihelp.c:110
#define DATE_LONGDATE
Definition: winnls.h:194
#define GetVersionEx
Definition: winbase.h:3666
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:142
static SIZE_T GetBIOSValue(BOOL UseSMBios, PCHAR DmiString, LPWSTR RegValue, PVOID pBuf, DWORD cchBuf, BOOL bTrim)
Definition: system.c:158
Definition: mem.c:156
unsigned long long DWORDLONG
Definition: intsafe.h:99
#define IDS_FORMAT_SWAP
Definition: resource.h:112
#define IDC_STATIC_OS
Definition: resource.h:25
DWORD dwNumberOfProcessors
Definition: winbase.h:1130
PVOID LoadSMBiosData(_Inout_updates_(ID_STRINGS_MAX) PCHAR *Strings)
Definition: udmihelp.c:30
BOOL NTAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
Definition: heapmem.c:1272
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1016
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL GetRegValue(HKEY hBaseKey, LPWSTR SubKey, LPWSTR ValueName, DWORD Type, LPWSTR Result, DWORD Size)
Definition: system.c:15
#define IDC_STATIC_MEM
Definition: resource.h:31
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REG_SZ
Definition: layer.c:22

◆ SystemPageWndProc()

INT_PTR CALLBACK SystemPageWndProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 383 of file system.c.

384 {
387  switch (message)
388  {
389  case WM_INITDIALOG:
390  {
392  InitializeSystemPage(hDlg);
393  return TRUE;
394  }
395  }
396 
397  return FALSE;
398 }
static VOID InitializeSystemPage(HWND hwndDlg)
Definition: system.c:186
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define SWP_NOZORDER
Definition: winuser.h:1232
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define SWP_NOSIZE
Definition: winuser.h:1230
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234