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
Related
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.
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.
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.
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).
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Objective C for Windows
I know there are several posts about this but I don't feel that any of them fit my scenario. I have been asked to learn Objective-C and write a report over its differences from C/C++ along with develop a presentation for my Programming Languages class. I would like to write a simple program using Objective-C but I do not have access to a Mac. I have a Windows machine and I am looking for an IDE that is not too complex (no need for source control or anything like that) but something that has a compiler (debugger is a plus). Any recommendations on what IDE to use for this? Thanks ahead of time.
Try GnuStep which has an IDE called ProjectCenter. It is aimed at reproducing the NextStep/OpenStep programming experience on multiple platforms, including Windows.
Take a look at MinGW. It contains all the compilers from the GNU Compiler Collection, which includes also the objective-c compiler.
Take at look at GNUstep.
I personally never tested it, but it's supposed to suport AppKit, which is the UI Framework for Mac OS X.