So when I am using the function, IsWin2000(), to figure out whether or not the computer running my application is running windows 2000, i get the warning:
warning C4996: 'IsWin2000': This function is exported to support existing modules and is obsolete.
If this is an obsolete, deprecated function, what is the proper way to query what operating system is running? Is there any other way to achieve this task, or is my only option to simply suppress the warning? Thanks!
See the Remarks at OSVERSIONINFO
for a list of results and how to interpret them. See Getting the System Version for a fully fledged example.
And lets not forget what the spec says:
Identifying the current operating system is usually not the best way to determine whether a particular operating system feature is present. This is because the operating system may have had new features added in a redistributable DLL. Rather than using GetVersionEx to determine the operating system platform or version number, test for the presence of the feature itself