System Info From Win32API
Posted: Thu Jan 23, 2014 9:24 am
Hey guys, Im trying to figure out this code I found which returns system info (OEM ID, ect).
Now I only want to get some piece of data which could be used to link a machine to a FS app.
Here's the C++ code:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724423%28v=vs.85%29.aspx
I would appreciate any help as I have no C++ modules installed in my brain so far. Some things concern me, like "#pragma comment(lib, "user32.lib")" . . .
And the simple GetSystemInfo(&siSysInfo);
But like I said, I have no idea what im doing here! Anyone understand this?
Thanks
Now I only want to get some piece of data which could be used to link a machine to a FS app.
Here's the C++ code:
Code: Select all
include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")
void main()
{
SYSTEM_INFO siSysInfo;
// Copy the hardware information to the SYSTEM_INFO structure.
GetSystemInfo(&siSysInfo);
// Display the contents of the SYSTEM_INFO structure.
printf("Hardware information: \n");
printf(" OEM ID: %u\n", siSysInfo.dwOemId);
printf(" Number of processors: %u\n",
siSysInfo.dwNumberOfProcessors);
printf(" Page size: %u\n", siSysInfo.dwPageSize);
printf(" Processor type: %u\n", siSysInfo.dwProcessorType);
printf(" Minimum application address: %lx\n",
siSysInfo.lpMinimumApplicationAddress);
printf(" Maximum application address: %lx\n",
siSysInfo.lpMaximumApplicationAddress);
printf(" Active processor mask: %u\n",
siSysInfo.dwActiveProcessorMask);
}
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724423%28v=vs.85%29.aspx
I would appreciate any help as I have no C++ modules installed in my brain so far. Some things concern me, like "#pragma comment(lib, "user32.lib")" . . .
And the simple GetSystemInfo(&siSysInfo);
But like I said, I have no idea what im doing here! Anyone understand this?
Thanks