FreeRDP
TestGetNativeSystemInfo.c
1 
2 #include <winpr/crt.h>
3 #include <winpr/sysinfo.h>
4 
5 int TestGetNativeSystemInfo(int argc, char* argv[])
6 {
7  SYSTEM_INFO sysinfo;
8 
9  WINPR_UNUSED(argc);
10  WINPR_UNUSED(argv);
11 
12  GetNativeSystemInfo(&sysinfo);
13 
14  printf("SystemInfo:\n");
15  printf("\twProcessorArchitecture: %" PRIu16 "\n", sysinfo.wProcessorArchitecture);
16  printf("\twReserved: %" PRIu16 "\n", sysinfo.wReserved);
17  printf("\tdwPageSize: 0x%08" PRIX32 "\n", sysinfo.dwPageSize);
18  printf("\tlpMinimumApplicationAddress: %p\n", sysinfo.lpMinimumApplicationAddress);
19  printf("\tlpMaximumApplicationAddress: %p\n", sysinfo.lpMaximumApplicationAddress);
20  printf("\tdwActiveProcessorMask: %p\n", (void*)sysinfo.dwActiveProcessorMask);
21  printf("\tdwNumberOfProcessors: %" PRIu32 "\n", sysinfo.dwNumberOfProcessors);
22  printf("\tdwProcessorType: %" PRIu32 "\n", sysinfo.dwProcessorType);
23  printf("\tdwAllocationGranularity: %" PRIu32 "\n", sysinfo.dwAllocationGranularity);
24  printf("\twProcessorLevel: %" PRIu16 "\n", sysinfo.wProcessorLevel);
25  printf("\twProcessorRevision: %" PRIu16 "\n", sysinfo.wProcessorRevision);
26  printf("\n");
27 
28  return 0;
29 }