I was unable to understand what this code does.

I do not know how to use the code to determine if the OS is Vista.

This does not help.