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