How could indicator know the window OS Version?

 

How could indicator know the window OS Version?

my indicator work different in XP and Win8

I have to code differently.

but how could my indicator know in which OS it is running?

by kernel32 ? or user32?