how to get BIOS information in c++ [duplicate] - c++

This question already has answers here:
How to read a value from the Windows registry
(8 answers)
Closed 6 years ago.
we are working on something in that requires BIOS information, i know that these information is available in HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System registry setting. But i need to do this in C++.
is there any API available for this?? i dont want to read from the system registry due to some limitation on client system.
Is there any other way to do this??

If you already know that the values are stored in a registry hive, then you could use CRegKey to read the values. This is just an ATL wrapper around Windows registry manipulation APIs.
If you want to use a Windows API instead, there's RegQueryValueEx.
Keine has also given you an excellent link in a comment, which discusses several things and also has a link that's detailing the 32/64 bit registry gotchas.

Related

Equivalent to windows.h for mac [duplicate]

This question already has answers here:
Where can I get windows.h for Mac?
(3 answers)
Closed 4 months ago.
Is there any equivalent to windows.h for mac?
I've been googling it but I can't find anything.
I don't know if it matters but I am currently using Mountain Lion.
There is no direct equivalent. That is, no file for file substitute. It's a different platform after all. You will simply have to work with their API. And without knowing exactly what it is you want to do and what functionality you intend to use, it's hard to provide any additional information.
There is the Carbon API. Or better said, there was. Specifically since Mountain Lion, this API has been deprecated. The aforementioned link mentions some alternatives to deprecated functionality, though the Objective-C route might be a more easily manageable alternative.

Platform-Independent Way to Obtain IP-Address in C++ [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Get the IP Address of local computer
I want to be able to get the IP address for the machine I'm on in C++ without querying external www.whatsmyip.com, but also want to do it in a platform-independent way. I can find specific examples for both Windows and Linux, but can't think of an easy way to do this in a platform-independent way. I would also consider options of putting an if-statement in depending on the Operating System if this seems like the best/only method.
If you are able to use boost, I highly recommend the boost::asio, which is about as cross-platform as you're going to get.
An alternative to boost::asio may be the POCO Network Library.

Very simple C/C++ XML Parser [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What XML parser should I use in C++?
It is generally required to parse application settings from local XML file under Linux platform and nothing more.
Requirements:
1. Can be used for commercial product
2. Free of charge
3. Easy to install (1 header file will be great)
4. Easy to use
5. Very stable
6. Unicode support
I think expat does everything you want.
I use Apache's xerces-c. It never gave me problems and you can find some useful info on Google, like: Tuto1.
Also, it is free of charge and you can use it commercial products.
have a look at boost::property_tree http://www.boost.org/doc/libs/1_52_0/doc/html/property_tree.html

Seeking C++ implementation of `hires_time_in_seconds()` [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
High resolution timer with C++ and Linux?
double hires_time_in_seconds();
I'm looking for this function for Windows, Linux too if you have it.
It is mentioned in http://gafferongames.com/game-physics/fix-your-timestep/.
I've looked on the web.
I know it's not a standard function but if anybody has an implementation that they want to share, that would be great.
Failing that, I need something as fine grained as possible to do synchronization in a client server game.
It's not a real function, it's just a self-descriptive placeholder name used in that blog post's example code.
For Windows, you'll want to use QueryPerformanceCounter along with QueryPerformanceFrequency. For Unix-based OSes, you'll want to use gettimeofday(3).

detect currently installed anti-virus [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicates:
Detect Antivirus on Windows using C#
How to detect if a virusscanner and/or firewall is installed? (And a few other security-related Q's.)
is there a way to detect currently instaled av without searching for known processes?
Yes there is. You can use WMI, I assume you are asking about Windows, to check installed instances of an anti-virus program. It is quite simple from C# and this link gives a good explanation of how to do it. It is also possible to access WMI from C++ and that is explained here. Also for anything WMI related I highly recommend the WMI Studio.
It depends on the AV software and the OS but it looks like you can use WMI. Here's an example on using WMI script - using WMI from C++ is outside of my knowledge, sorry.
http://blogs.msdn.com/b/alejacma/archive/2008/05/12/how-to-get-antivirus-information-with-wmi-vbscript.aspx