static QString GetSysVersion()
{
DWORD dwVersion = 0;
WKSTA_INFO_100 *wkstaInfo = NULL;
NET_API_STATUS netStatus = NetWkstaGetInfo(NULL, 100, (BYTE **)&wkstaInfo);
if (netStatus == NERR_Success) {
DWORD dwMajVer = wkstaInfo->wki100_ver_major;
DWORD dwMinVer = wkstaInfo->wki100_ver_minor;
dwVersion = (DWORD)MAKELONG(dwMinVer, dwMajVer);
NetApiBufferFree(wkstaInfo);
}
char buf[128];
sprintf(buf, "%d.%d", (dwVersion >> 16) & 0xffff, (dwVersion >> 0) & 0xffff);
QString version = QString::fromLocal8Bit(buf);
return version;
}
QString systemVersion()
{
static QString verName = "";
if (!verName.isEmpty()) {
return verName;
}
#ifdef Q_OS_W