That’s quite a coincidence - I needed exactly the same thing for something I was writing yesterday, and you’ve saved me the trouble of looking up how to do it! Thanks, I’ll probably put it into the SystemStats class.
I think the JUCE_WIN32 is a bit too discriminatory here, cause it should fail on Win64.
I know under visual C++, _WINDOWS is defined all the time (for 32 and 64 bit programs), maybe you could use it ? (Don’t know if it’s defined by default on other IDEs though)