blob: 2c50d465e777c9e18e110c47811b8ea7c1276432 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
//
// versioninfo.h
//
// representation of version#
//
// Note: must be platform independent
//
// ======================================================================================
#ifndef VERSIONINFO_H
#define VERSIONINFO_H
struct VersionInfo
{
protected:
unsigned short m_wMajor;
unsigned short m_wMinor;
unsigned short m_wBuild;
unsigned short m_wRevision;
public:
VersionInfo();
VersionInfo( const unsigned short major,
const unsigned short minor,
const unsigned short build,
const unsigned short revision
);
unsigned short Major() const;
unsigned short Minor() const;
unsigned short Build() const;
unsigned short Revision() const;
// 1 if "this" is bigger, -1 if "this' is smaller
int Compare(const VersionInfo& version) const;
// on success returns count of numbers read (<=4), otherwise -1
static int Parse( LPCTSTR szString,
VersionInfo* result);
};
#include "versioninfo.inl"
#endif
|