| 1 | = GetKernelVer = |
| 2 | Gets the OS (kernel) version |
| 3 | |
| 4 | {{{ |
| 5 | int GetKernelVer(char *pszKernelVerNum = NULL, int nMaxLen = 11); |
| 6 | }}} |
| 7 | |
| 8 | == Parameters == |
| 9 | |
| 10 | * pszKernelVerNum - pointer to character array to receive kernel version. May be NULL to not receive kernel version string. If it is not null it must point to a array with sufficient space allocated to receive the result. |
| 11 | * nMaxLen - maximum length to copy into pszKernelVerNum |
| 12 | |
| 13 | == Return Value == |
| 14 | |
| 15 | * Returns numeric representation of the OS version such as 20100804 for version 2010.08.04 (4 Aug 2010). |
| 16 | |
| 17 | == Remarks == |
| 18 | |
| 19 | |
| 20 | == Examples == |
| 21 | |
| 22 | {{{ |
| 23 | int n = GetKernelVer(); |
| 24 | if(n < 20100628) |
| 25 | { |
| 26 | DisplayText(0, 0, "Newer OS recommended"); |
| 27 | } |
| 28 | }}} |
| 29 | |
| 30 | {{{ |
| 31 | char szVer[20]; |
| 32 | GetKernelVer(szVer, 18); |
| 33 | string str = StrFmt("Version: %s", szVer); |
| 34 | DisplayText(0, 0, str); |
| 35 | }}} |
| 36 | |
| 37 | == See Also == |
| 38 | |