diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:24:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:24:41 +0000 |
commit | a9bcc81f821d7c66f623779fa5147e728eb3c388 (patch) | |
tree | 98676963bcdd537ae5908a067a8eb110b93486a6 /winpr/libwinpr/sysinfo/test/TestGetNativeSystemInfo.c | |
parent | Initial commit. (diff) | |
download | freerdp3-a9bcc81f821d7c66f623779fa5147e728eb3c388.tar.xz freerdp3-a9bcc81f821d7c66f623779fa5147e728eb3c388.zip |
Adding upstream version 3.3.0+dfsg1.upstream/3.3.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'winpr/libwinpr/sysinfo/test/TestGetNativeSystemInfo.c')
-rw-r--r-- | winpr/libwinpr/sysinfo/test/TestGetNativeSystemInfo.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/winpr/libwinpr/sysinfo/test/TestGetNativeSystemInfo.c b/winpr/libwinpr/sysinfo/test/TestGetNativeSystemInfo.c new file mode 100644 index 0000000..f227164 --- /dev/null +++ b/winpr/libwinpr/sysinfo/test/TestGetNativeSystemInfo.c @@ -0,0 +1,29 @@ + +#include <winpr/crt.h> +#include <winpr/sysinfo.h> + +int TestGetNativeSystemInfo(int argc, char* argv[]) +{ + SYSTEM_INFO sysinfo; + + WINPR_UNUSED(argc); + WINPR_UNUSED(argv); + + GetNativeSystemInfo(&sysinfo); + + printf("SystemInfo:\n"); + printf("\twProcessorArchitecture: %" PRIu16 "\n", sysinfo.wProcessorArchitecture); + printf("\twReserved: %" PRIu16 "\n", sysinfo.wReserved); + printf("\tdwPageSize: 0x%08" PRIX32 "\n", sysinfo.dwPageSize); + printf("\tlpMinimumApplicationAddress: %p\n", sysinfo.lpMinimumApplicationAddress); + printf("\tlpMaximumApplicationAddress: %p\n", sysinfo.lpMaximumApplicationAddress); + printf("\tdwActiveProcessorMask: %p\n", (void*)sysinfo.dwActiveProcessorMask); + printf("\tdwNumberOfProcessors: %" PRIu32 "\n", sysinfo.dwNumberOfProcessors); + printf("\tdwProcessorType: %" PRIu32 "\n", sysinfo.dwProcessorType); + printf("\tdwAllocationGranularity: %" PRIu32 "\n", sysinfo.dwAllocationGranularity); + printf("\twProcessorLevel: %" PRIu16 "\n", sysinfo.wProcessorLevel); + printf("\twProcessorRevision: %" PRIu16 "\n", sysinfo.wProcessorRevision); + printf("\n"); + + return 0; +} |