DtWinVer is a C++ class which provides a comprehensive method to determine which OS the program that calls it is running on. All methods it uses are fully documented on various articles on the MSDN CD