LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
runtime
windows
windows/Host.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
#ifndef LIEF_RUNTIME_WINDOWS_HOST_H
16
#define LIEF_RUNTIME_WINDOWS_HOST_H
17
#include "
LIEF/visibility.h
"
18
#include <cstdint>
19
#include <ostream>
20
#include <string>
21
22
23
namespace
LIEF::runtime::windows
{
24
26
class
LIEF_API
Host
{
27
public
:
28
struct
LIEF_API
version_t
{
29
uint32_t
major
= 0;
30
uint32_t
minor
= 0;
31
uint32_t
build_number
= 0;
32
33
version_t
() =
default
;
34
35
version_t
(uint32_t
major
, uint32_t
minor
, uint32_t
build_number
) :
36
major
{
major
},
37
minor
{
minor
},
38
build_number
{
build_number
} {}
39
40
bool
operator<=
(
const
version_t
& rhs)
const
;
41
bool
operator>
(
const
version_t
& rhs)
const
{
42
return
!(*
this
<= rhs);
43
}
44
45
bool
operator>=
(
const
version_t
& rhs)
const
;
46
bool
operator<
(
const
version_t
& rhs)
const
{
47
return
!(*
this
>= rhs);
48
}
49
50
bool
operator==
(
const
version_t
& other)
const
;
51
bool
operator!=
(
const
version_t
& other)
const
{
52
return
!(*
this
== other);
53
}
54
55
56
std::string
to_string
()
const
;
57
LIEF_API
friend
std::ostream&
operator<<
(std::ostream& os,
58
const
version_t
&
version
) {
59
os <<
version
.to_string();
60
return
os;
61
}
62
};
63
65
static
version_t
version
();
66
};
67
68
69
}
70
71
72
#endif
LIEF::runtime::windows::Host
This class exposes Windows-specific host information.
Definition
windows/Host.hpp:26
LIEF::runtime::windows::Host::version
static version_t version()
Return the Windows version (e.g., 10.0.26200).
LIEF::runtime::windows
Definition
windows/Host.hpp:23
LIEF::runtime::windows::Host::version_t
Definition
windows/Host.hpp:28
LIEF::runtime::windows::Host::version_t::minor
uint32_t minor
Definition
windows/Host.hpp:30
LIEF::runtime::windows::Host::version_t::major
uint32_t major
Definition
windows/Host.hpp:29
LIEF::runtime::windows::Host::version_t::operator>=
bool operator>=(const version_t &rhs) const
LIEF::runtime::windows::Host::version_t::to_string
std::string to_string() const
LIEF::runtime::windows::Host::version_t::operator==
bool operator==(const version_t &other) const
LIEF::runtime::windows::Host::version_t::version_t
version_t(uint32_t major, uint32_t minor, uint32_t build_number)
Definition
windows/Host.hpp:35
LIEF::runtime::windows::Host::version_t::operator<<
friend std::ostream & operator<<(std::ostream &os, const version_t &version)
Definition
windows/Host.hpp:57
LIEF::runtime::windows::Host::version_t::operator<
bool operator<(const version_t &rhs) const
Definition
windows/Host.hpp:46
LIEF::runtime::windows::Host::version_t::build_number
uint32_t build_number
Definition
windows/Host.hpp:31
LIEF::runtime::windows::Host::version_t::operator!=
bool operator!=(const version_t &other) const
Definition
windows/Host.hpp:51
LIEF::runtime::windows::Host::version_t::version_t
version_t()=default
LIEF::runtime::windows::Host::version_t::operator>
bool operator>(const version_t &rhs) const
Definition
windows/Host.hpp:41
LIEF::runtime::windows::Host::version_t::operator<=
bool operator<=(const version_t &rhs) const
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:44
Generated by
1.19.0