Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why OS Architecture not the same on my windows system info? #46

Closed
fiantyogalihp opened this issue Jul 7, 2023 · 3 comments
Closed

Comments

@fiantyogalihp
Copy link

fiantyogalihp commented Jul 7, 2023

My code:
`hwinfo::OS os;
std::cout << "----------------------------------- OS ------------------------------------" << std::endl;

std::cout << std::left << std::setw(20) << "Operating System:";

std::cout << os.fullName() << std::endl;

std::cout << std::left << std::setw(20) << "short name:";

std::cout << os.name() << std::endl;

std::cout << std::left << std::setw(20) << "version:";

std::cout << os.version() << std::endl;

std::cout << std::left << std::setw(20) << "kernel:";

std::cout << os.kernel() << std::endl;

std::cout << std::left << std::setw(20) << "architecture:";

std::cout << (os.is32bit() ? "32 bit" : "64 bit") << std::endl;

std::cout << std::left << std::setw(20) << "endianess:";

std::cout << (os.isLittleEndian() ? "little endian" : "big endian") << std::endl;`

My code result
image

My windows System Information:
Screenshot 2023-07-07 113123

@lfreist
Copy link
Owner

lfreist commented Jul 7, 2023

Hi, Thank you for the report.

This bug is new to me and I could not reproduce it on my Windows machine. However, I have tried to harden the code responsible for the bit-architecture report in this commit. Could you please check, if it is working now?

@fiantyogalihp
Copy link
Author

fiantyogalihp commented Jul 7, 2023

Thanks very much, now it's working at all 👍

My code is same to your example.cpp, and my result code:
Screenshot 2023-07-07 201656


Oh ya... you might got typo in your example.cpp on line 103 at Main Board serial number :)

@lfreist
Copy link
Owner

lfreist commented Jul 7, 2023

Thanks for sharing your result and happy that I could fix the bug.

You might want to contribute your implementations of kernel and version to this library since they are empty for windows at the moment.

@lfreist lfreist closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants