LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
ResourceFixedFileInfo.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 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_PE_RESOURCE_FIXED_FILE_INFO_H
17#define LIEF_PE_RESOURCE_FIXED_FILE_INFO_H
18#include <ostream>
19#include <sstream>
20
21#include "LIEF/visibility.h"
22
23#include "LIEF/Object.hpp"
24
25#include "LIEF/PE/enums.hpp"
26
27namespace LIEF {
28namespace PE {
29
30namespace details {
31struct pe_resource_fixed_file_info;
32}
33
37
38 public:
40 ResourceFixedFileInfo(const details::pe_resource_fixed_file_info& header);
41
45
47 uint32_t signature() const;
48
53 uint32_t struct_version() const;
54
59 uint32_t file_version_MS() const;
60
64 uint32_t file_version_LS() const;
65
69 uint32_t product_version_MS() const;
70
74 uint32_t product_version_LS() const;
75
79 uint32_t file_flags_mask() const;
80
83 uint32_t file_flags() const;
84
87
90
93
95 uint32_t file_date_MS() const;
96
98 uint32_t file_date_LS() const;
99
100 void signature(uint32_t signature);
101 void struct_version(uint32_t struct_version);
102 void file_version_MS(uint32_t file_version_MS);
103 void file_version_LS(uint32_t file_version_LS);
104 void product_version_MS(uint32_t product_version_MS);
105 void product_version_LS(uint32_t product_version_LS);
106 void file_flags_mask(uint32_t file_flags_mask);
107 void file_flags(uint32_t file_flags);
111 void file_date_MS(uint32_t file_date_MS);
112 void file_date_LS(uint32_t file_date_LS);
113
114 void accept(Visitor& visitor) const override;
115
116
117 LIEF_API friend std::ostream& operator<<(std::ostream& os, const ResourceFixedFileInfo& fixed_info);
118
119 private:
120 uint32_t signature_;
121 uint32_t struct_version_;
122 uint32_t file_version_MS_;
123 uint32_t file_version_LS_;
124 uint32_t product_version_MS_;
125 uint32_t product_version_LS_;
126 uint32_t file_flags_mask_;
127 uint32_t file_flags_;
128 FIXED_VERSION_OS file_os_;
129 FIXED_VERSION_FILE_TYPES file_type_;
130 FIXED_VERSION_FILE_SUB_TYPES file_subtype_;
131 uint32_t file_date_MS_;
132 uint32_t file_date_LS_;
133
134
135};
136
137
138
139
140}
141}
142
143
144#endif
Definition Object.hpp:25
Representation of VS_FIXEDFILEINFO Structure.
Definition ResourceFixedFileInfo.hpp:36
ResourceFixedFileInfo(const ResourceFixedFileInfo &)
friend std::ostream & operator<<(std::ostream &os, const ResourceFixedFileInfo &fixed_info)
uint32_t file_date_MS() const
The most significant 32 bits of the file's 64-bit binary creation date and time stamp.
void file_date_MS(uint32_t file_date_MS)
FIXED_VERSION_FILE_SUB_TYPES file_subtype() const
The function of the file (PE::FIXED_VERSION_FILE_SUB_TYPES)
void struct_version(uint32_t struct_version)
uint32_t file_version_MS() const
The most significant 32 bits of the file's binary version number.
uint32_t file_version_LS() const
The least significant 32 bits of the file's binary version number.
void file_flags_mask(uint32_t file_flags_mask)
void file_version_LS(uint32_t file_version_LS)
uint32_t file_date_LS() const
The least significant 32 bits of the file's 64-bit binary creation date and time stamp.
void product_version_MS(uint32_t product_version_MS)
void product_version_LS(uint32_t product_version_LS)
FIXED_VERSION_OS file_os() const
The operating system for which this file was designed (PE::FIXED_VERSION_OS).
uint32_t product_version_LS() const
The least significant 32 bits of the product with which this file was distributed.
uint32_t file_flags() const
Contains a bitmask that specifies the Boolean attributes of the file (PE::FIXED_VERSION_FILE_FLAGS)
uint32_t struct_version() const
The binary version number of this structure.
void file_flags(uint32_t file_flags)
ResourceFixedFileInfo(const details::pe_resource_fixed_file_info &header)
void accept(Visitor &visitor) const override
void file_os(FIXED_VERSION_OS file_os)
uint32_t signature() const
Must be set to 0xFEEF04BD
uint32_t product_version_MS() const
The most significant 32 bits of the product with which this file was distributed.
ResourceFixedFileInfo & operator=(const ResourceFixedFileInfo &)
void signature(uint32_t signature)
void file_date_LS(uint32_t file_date_LS)
void file_subtype(FIXED_VERSION_FILE_SUB_TYPES file_subtype)
uint32_t file_flags_mask() const
Contains a bitmask that specifies the valid bits in ResourceFixedFileInfo::file_flags.
FIXED_VERSION_FILE_TYPES file_type() const
The general type of file (PE::FIXED_VERSION_FILE_TYPES)
void file_type(FIXED_VERSION_FILE_TYPES file_type)
void file_version_MS(uint32_t file_version_MS)
Definition Visitor.hpp:224
FIXED_VERSION_OS
Definition PE/enums.hpp:273
FIXED_VERSION_FILE_SUB_TYPES
Definition PE/enums.hpp:312
FIXED_VERSION_FILE_TYPES
Definition PE/enums.hpp:301
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41