blob: bdd0ccc67b949bd84e7b51db97c71e2420f1aa63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//
// Utils.cpp
//
#include "stdafx.h"
BOOL IsNt50()
{
WORD wOsVersion = LOWORD(GetVersion());
BYTE bMajorVer = LOBYTE(wOsVersion);
return (bMajorVer>=5);
}
void TruncateWithDots(wchar_t* szString, size_t iNewLen)
{
size_t iOrigLen = mir_wstrlen(szString);
if (iNewLen < iOrigLen) {
wchar_t* p = szString+iNewLen;
*p = '\0';
for(int i=0; --p>=szString && i<3; i++)
*p = '.';
}
}
|