What name you want because otherwise you can do something like this
Code:
if (version_majeure = 5) and (minor = 3)
then OS = "XP SP3"
is pseudo code but when I read the code of the example of MSDN GetVersion (), I am not very far
Code:
void main ()
(
DWORD dwVersion = 0;
DWORD dwMajorVersion = 0;
DWORD dwMinorVersion = 0;
DWORD dwBuild = 0;
dwVersion GetVersion = ();
/ / Get the Windows version.
dwMajorVersion = (DWORD) (LOBYTE (LOWORD (dwVersion)));
dwMinorVersion = (DWORD) (Hibyte (LOWORD (dwVersion)));
/ / Get the build number.
if (dwVersion <0x80000000)
dwBuild = (DWORD) (HIWORD (dwVersion));
printf ( "Version is% d.% d (% d) \ n",
dwMajorVersion,
dwMinorVersion,
dwBuild);
)
Bookmarks