"Detect Windows Version Directly" by Hank Marquis [Visual Studio Magazine, July 2002]

The code provides a working program that uses both techniques in the article.

The FunctionPresent function returns true if the string name of the expected function is in the module name passed.

In addition, the CheckForVersion function wraps up the extended version query information as well.

Simply open the project and run it, the Form_Load event will display True of False, depending if the version of Windows is 4.1 or higher. Change the version major and minor to experiment with your version of Windows. Examine the code to extend its functionality.