Last active
August 29, 2015 14:19
-
-
Save igorjacauna/3d2b209224404cb66b9a to your computer and use it in GitHub Desktop.
Get Windows version before SDK for Windows 8.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool GetWindowsVersion(DWORD& major, DWORD& minor) | |
{ | |
LPBYTE pinfoRawData; | |
if (NERR_Success == NetWkstaGetInfo(NULL, 100, &pinfoRawData)) | |
{ | |
WKSTA_INFO_100 * pworkstationInfo = (WKSTA_INFO_100 *)pinfoRawData; | |
major = pworkstationInfo->wki100_ver_major; | |
minor = pworkstationInfo->wki100_ver_minor; | |
::NetApiBufferFree(pinfoRawData); | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment