LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
ResourceDialog.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2025 R. Thomas
2 * Copyright 2017 - 2025 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_DIALOG_H
17#define LIEF_PE_RESOURCE_DIALOG_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/Object.hpp"
21#include "LIEF/enums.hpp"
22#include "LIEF/errors.hpp"
23#include "LIEF/span.hpp"
24
25#include <memory>
26#include <vector>
27#include <ostream>
28
29namespace LIEF {
30class BinaryStream;
31namespace PE {
32
33class ResourceData;
34
42 public:
43 using dialogs_t = std::vector<std::unique_ptr<ResourceDialog>>;
44
50 std::u16string string;
51
52 bool is_defined() const {
53 return ordinal || !string.empty();
54 }
55
56 operator bool() const {
57 return is_defined();
58 }
59
60 std::string to_string() const;
61 };
62
64 enum class TYPE {
67 };
68
70 enum class DIALOG_STYLES : uint32_t {
71 ABSALIGN = 0x0001,
72 SYSMODAL = 0x0002,
73 LOCALEDIT = 0x0020,
74 SETFONT = 0x0040,
75 MODALFRAME = 0x0080,
76 NOIDLEMSG = 0x0100,
77 SETFOREGROUND = 0x0200,
78 S3DLOOK = 0x0004,
79 FIXEDSYS = 0x0008,
80 NOFAILCREATE = 0x0010,
81 CONTROL = 0x0400,
82 CENTER = 0x0800,
83 CENTERMOUSE = 0x1000,
84 CONTEXTHELP = 0x2000,
86 };
87
89 enum class WINDOW_STYLES : uint32_t {
90 OVERLAPPED = 0x00000000,
91 POPUP = 0x80000000,
92 CHILD = 0x40000000,
93 MINIMIZE = 0x20000000,
94 VISIBLE = 0x10000000,
95 DISABLED = 0x08000000,
96 CLIPSIBLINGS = 0x04000000,
97 CLIPCHILDREN = 0x02000000,
98 MAXIMIZE = 0x01000000,
99 CAPTION = 0x00C00000,
100 BORDER = 0x00800000,
101 DLGFRAME = 0x00400000,
102 VSCROLL = 0x00200000,
103 HSCROLL = 0x00100000,
104 SYSMENU = 0x00080000,
105 THICKFRAME = 0x00040000,
106 GROUP = 0x00020000,
107 TABSTOP = 0x00010000,
108 };
109
111 enum class WINDOW_EXTENDED_STYLES : uint32_t {
112 DLGMODALFRAME = 0x00000001,
113 NOPARENTNOTIFY = 0x00000004,
114 TOPMOST = 0x00000008,
115 ACCEPTFILES = 0x00000010,
116 TRANSPARENT_STY = 0x00000020,
117 MDICHILD = 0x00000040,
118 TOOLWINDOW = 0x00000080,
119 WINDOWEDGE = 0x00000100,
120 CLIENTEDGE = 0x00000200,
121 CONTEXTHELP = 0x00000400,
122
123 RIGHT = 0x00001000,
124 LEFT = 0x00000000,
125 RTLREADING = 0x00002000,
126 LEFTSCROLLBAR = 0x00004000,
127
128 CONTROLPARENT = 0x00010000,
129 STATICEDGE = 0x00020000,
130 APPWINDOW = 0x00040000,
131 };
132
134 enum class CONTROL_STYLES : uint32_t {
135 TOP = 0x00000001,
136 NOMOVEY = 0x00000002,
137 BOTTOM = 0x00000003,
138 NORESIZE = 0x00000004,
139 NOPARENTALIGN = 0x00000008,
140 ADJUSTABLE = 0x00000020,
141 NODIVIDER = 0x00000040,
142 VERT = 0x00000080,
146 };
147
154 class Item {
155 public:
156 Item() = default;
157 Item(const Item&) = default;
158 Item& operator=(const Item&) = default;
159
160 Item(Item&&) = default;
161 Item& operator=(Item&&) = default;
162
163 enum class WINDOW_CLASS : uint32_t {
164 BUTTON = 0x0080,
165 EDIT = 0x0081,
166 STATIC = 0x0082,
167 LIST_BOX = 0x0083,
168 SCROLL_BAR = 0x0084,
169 COMBO_BOX = 0x0085,
170 };
171
174 uint32_t style() const {
175 return style_;
176 }
177
183 uint32_t extended_style() const {
184 return extended_style_;
185 }
186
188 int32_t id() const {
189 return id_;
190 }
191
193 bool has(WINDOW_STYLES style) const {
194 return (style_ & (uint32_t)style) != 0;
195 }
196
199 return (style_ & (uint32_t)style) != 0;
200 }
201
203 std::vector<WINDOW_STYLES> window_styles() const;
204
206 std::vector<CONTROL_STYLES> control_styles() const;
207
211 int16_t x() const { return x_; }
212
216 int16_t y() const { return y_; }
217
219 int16_t cx() const { return cx_; }
220
222 int16_t cy() const { return cy_; }
223
224 Item& style(uint32_t value) {
225 style_ = value;
226 return *this;
227 }
228
229 Item& extended_style(uint32_t value) {
230 extended_style_ = value;
231 return *this;
232 }
233
234 Item& x(int16_t value) { x_ = value; return *this; }
235 Item& y(int16_t value) { y_ = value; return *this; }
236 Item& cx(int16_t value) { cx_ = value; return *this; }
237 Item& cy(int16_t value) { cy_ = value; return *this; }
238
239 Item& id(int32_t value) { id_ = value; return *this; }
240
241 Item& data(std::vector<uint8_t> creation_data) {
242 creation_data_ = std::move(creation_data);
243 return *this;
244 }
245
246 Item& clazz(std::u16string title) {
247 class_.string = std::move(title);
248 class_.ordinal = make_error_code(lief_errors::not_found);
249 return *this;
250 }
251
252 Item& clazz(uint16_t ord) {
253 class_.ordinal = ord;
254 return *this;
255 }
256
257 Item& title(std::u16string value) {
258 title_.string = std::move(value);
259 title_.ordinal = make_error_code(lief_errors::not_found);
260 return *this;
261 }
262
263 Item& title(uint16_t ord) {
264 title_.ordinal = ord;
265 return *this;
266 }
267
271 const ordinal_or_str_t& clazz() const {
272 return class_;
273 }
274
278 const ordinal_or_str_t& title() const {
279 return title_;
280 }
281
284 return creation_data_;
285 }
286
288 return creation_data_;
289 }
290
291 virtual ~Item() = default;
292
293 virtual std::string to_string() const = 0;
294
295 LIEF_API friend std::ostream& operator<<(std::ostream& os, const Item& item) {
296 os << item.to_string();
297 return os;
298 }
299
300 protected:
301 uint32_t style_ = 0;
302 uint32_t extended_style_ = 0;
303
304 int16_t x_ = 0;
305 int16_t y_ = 0;
306 int16_t cx_ = 0;
307 int16_t cy_ = 0;
308
309 int32_t id_ = 0;
310
311 ordinal_or_str_t class_;
312 ordinal_or_str_t title_;
313 std::vector<uint8_t> creation_data_;
314 };
315
317 static dialogs_t parse(const ResourceData& node);
318 static dialogs_t parse(const uint8_t* buffer, size_t size);
319
320 ResourceDialog() = default;
323
326
328 type_(ty)
329 {}
330
331 virtual std::unique_ptr<ResourceDialog> clone() const = 0;
332
333 TYPE type() const {
334 return type_;
335 }
336
340 uint32_t style() const {
341 return style_;
342 }
343
347 uint32_t extended_style() const {
348 return extended_style_;
349 }
350
353 int16_t x() const { return x_; }
354
357 int16_t y() const { return y_; }
358
360 int16_t cx() const { return cx_; }
361
363 int16_t cy() const { return cy_; }
364
365 ResourceDialog& style(uint32_t value) {
366 style_ = value;
367 return *this;
368 }
369
371 extended_style_ = value;
372 return *this;
373 }
374
375 ResourceDialog& x(int16_t value) { x_ = value; return *this; }
376 ResourceDialog& y(int16_t value) { y_ = value; return *this; }
377 ResourceDialog& cx(int16_t value) { cx_ = value; return *this; }
378 ResourceDialog& cy(int16_t value) { cy_ = value; return *this; }
379
380 ResourceDialog& menu(std::u16string title) {
381 menu_.string = std::move(title);
383 return *this;
384 }
385
386 ResourceDialog& menu(uint16_t ord) {
387 menu_.ordinal = ord;
388 return *this;
389 }
390
392 window_class_.string = std::move(title);
393 window_class_.ordinal = make_error_code(lief_errors::not_found);
394 return *this;
395 }
396
398 window_class_.ordinal = ord;
399 return *this;
400 }
401
402 ResourceDialog& title(std::u16string value) {
403 title_ = std::move(value);
404 return *this;
405 }
406
407 ResourceDialog& title(const std::string& title);
408
410 bool has(DIALOG_STYLES style) const {
411 return (style_ & (uint32_t)style) != 0;
412 }
413
415 bool has(WINDOW_STYLES style) const {
416 return (style_ & (uint32_t)style) != 0;
417 }
418
421 return (extended_style_ & (uint32_t)style) != 0;
422 }
423
425 std::vector<DIALOG_STYLES> styles_list() const;
426
428 std::vector<WINDOW_STYLES> windows_styles_list() const;
429
431 std::vector<WINDOW_EXTENDED_STYLES> windows_ext_styles_list() const;
432
434 const std::u16string& title() const {
435 return title_;
436 }
437
439 std::string title_utf8() const;
440
442 const ordinal_or_str_t& menu() const {
443 return menu_;
444 }
445
449 return window_class_;
450 }
451
452 virtual std::string to_string() const = 0;
453
454 virtual ~ResourceDialog() = default;
455
456
459 template<class T>
460 const T* as() const {
461 static_assert(std::is_base_of<ResourceDialog, T>::value,
462 "Require ResourceDialog inheritance");
463 if (T::classof(this)) {
464 return static_cast<const T*>(this);
465 }
466 return nullptr;
467 }
468
469 friend LIEF_API std::ostream& operator<<(std::ostream& os, const ResourceDialog& dialog) {
470 os << dialog.to_string();
471 return os;
472 }
473
474 protected:
475 static ok_error_t parse_menu(ResourceDialog& dialog, BinaryStream& stream);
476 static ok_error_t parse_class(ResourceDialog& dialog, BinaryStream& stream);
477 static ok_error_t parse_class(ResourceDialog::Item& dialog, BinaryStream& stream);
478 static ok_error_t parse_title(ResourceDialog& dialog, BinaryStream& stream);
479 static ok_error_t parse_title(ResourceDialog::Item& dialog, BinaryStream& stream);
480 static ok_error_t parse_creation_data(ResourceDialog::Item& item, BinaryStream& stream);
481 TYPE type_ = TYPE::UNKNOWN;
482
483 uint32_t style_ = 0;
484 uint32_t extended_style_ = 0;
485
486 int16_t x_ = 0;
487 int16_t y_ = 0;
488 int16_t cx_ = 0;
489 int16_t cy_ = 0;
490
491 ordinal_or_str_t menu_;
492 ordinal_or_str_t window_class_;
493
494 std::u16string title_;
495};
496
501
502}
503}
504
509
510
511#endif
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
Class which represents a Data Node in the PE resources tree.
Definition ResourceData.hpp:33
This class represents an element of the dialog. It can be for instance, a button, or a caption.
Definition ResourceDialog.hpp:154
const ordinal_or_str_t & clazz() const
Window class of the control. This can be either: a string that specifies the name of a registered win...
Definition ResourceDialog.hpp:271
Item & cy(int16_t value)
Definition ResourceDialog.hpp:237
Item & y(int16_t value)
Definition ResourceDialog.hpp:235
friend std::ostream & operator<<(std::ostream &os, const Item &item)
Definition ResourceDialog.hpp:295
Item & cx(int16_t value)
Definition ResourceDialog.hpp:236
bool has(WINDOW_STYLES style) const
Check if this item has the given WINDOW_STYLES.
Definition ResourceDialog.hpp:193
WINDOW_CLASS
Definition ResourceDialog.hpp:163
@ BUTTON
Definition ResourceDialog.hpp:164
@ EDIT
Definition ResourceDialog.hpp:165
@ LIST_BOX
Definition ResourceDialog.hpp:167
@ COMBO_BOX
Definition ResourceDialog.hpp:169
@ SCROLL_BAR
Definition ResourceDialog.hpp:168
@ STATIC
Definition ResourceDialog.hpp:166
const ordinal_or_str_t & title() const
Title of the item which can be either: a string that specifies the initial text or an ordinal value o...
Definition ResourceDialog.hpp:278
Item & extended_style(uint32_t value)
Definition ResourceDialog.hpp:229
span< uint8_t > creation_data()
Definition ResourceDialog.hpp:287
virtual std::string to_string() const =0
Item & title(uint16_t ord)
Definition ResourceDialog.hpp:263
Item & operator=(Item &&)=default
int32_t id() const
The control identifier.
Definition ResourceDialog.hpp:188
Item(const Item &)=default
span< const uint8_t > creation_data() const
Creation data that is passed to the control's window procedure.
Definition ResourceDialog.hpp:283
uint32_t style() const
The style of the control. This can be a combination of WINDOW_STYLES or CONTROL_STYLES.
Definition ResourceDialog.hpp:174
std::vector< WINDOW_STYLES > window_styles() const
List of WINDOW_STYLES used by this item.
Item & clazz(uint16_t ord)
Definition ResourceDialog.hpp:252
int16_t cx() const
The width, in dialog box units, of the control.
Definition ResourceDialog.hpp:219
bool has(CONTROL_STYLES style) const
Check if this item has the given CONTROL_STYLES.
Definition ResourceDialog.hpp:198
uint32_t extended_style() const
The extended styles for a window. This member is not used to create controls in dialog boxes,...
Definition ResourceDialog.hpp:183
Item & style(uint32_t value)
Definition ResourceDialog.hpp:224
int16_t cy() const
The height, in dialog box units, of the control.
Definition ResourceDialog.hpp:222
Item & operator=(const Item &)=default
Item & x(int16_t value)
Definition ResourceDialog.hpp:234
Item & data(std::vector< uint8_t > creation_data)
Definition ResourceDialog.hpp:241
std::vector< CONTROL_STYLES > control_styles() const
List of CONTROL_STYLES used by this item.
Item & id(int32_t value)
Definition ResourceDialog.hpp:239
int16_t y() const
The y-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is al...
Definition ResourceDialog.hpp:216
Item & title(std::u16string value)
Definition ResourceDialog.hpp:257
int16_t x() const
The x-coordinate, in dialog box units, of the upper-left corner of the control. This coordinate is al...
Definition ResourceDialog.hpp:211
Item & clazz(std::u16string title)
Definition ResourceDialog.hpp:246
This class is the base class for either a regular (legacy) Dialog or an extended Dialog....
Definition ResourceDialog.hpp:41
ResourceDialog & window_class(std::u16string title)
Definition ResourceDialog.hpp:391
virtual std::string to_string() const =0
std::vector< WINDOW_STYLES > windows_styles_list() const
List of WINDOW_STYLES used by this dialog.
CONTROL_STYLES
From: https://learn.microsoft.com/en-us/windows/win32/controls/common-control-styles.
Definition ResourceDialog.hpp:134
@ VERT
Definition ResourceDialog.hpp:142
@ BOTTOM
Definition ResourceDialog.hpp:137
@ NODIVIDER
Definition ResourceDialog.hpp:141
@ NOPARENTALIGN
Definition ResourceDialog.hpp:139
@ ADJUSTABLE
Definition ResourceDialog.hpp:140
@ TOP
Definition ResourceDialog.hpp:135
@ NORESIZE
Definition ResourceDialog.hpp:138
@ NOMOVEX
Definition ResourceDialog.hpp:145
@ NOMOVEY
Definition ResourceDialog.hpp:136
WINDOW_EXTENDED_STYLES
From https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles.
Definition ResourceDialog.hpp:111
@ STATICEDGE
Definition ResourceDialog.hpp:129
@ ACCEPTFILES
Definition ResourceDialog.hpp:115
@ RIGHT
Definition ResourceDialog.hpp:123
@ LEFTSCROLLBAR
Definition ResourceDialog.hpp:126
@ RTLREADING
Definition ResourceDialog.hpp:125
@ WINDOWEDGE
Definition ResourceDialog.hpp:119
@ LEFT
Definition ResourceDialog.hpp:124
@ TRANSPARENT_STY
Definition ResourceDialog.hpp:116
@ DLGMODALFRAME
Definition ResourceDialog.hpp:112
@ TOPMOST
Definition ResourceDialog.hpp:114
@ APPWINDOW
Definition ResourceDialog.hpp:130
@ NOPARENTNOTIFY
Definition ResourceDialog.hpp:113
@ MDICHILD
Definition ResourceDialog.hpp:117
@ TOOLWINDOW
Definition ResourceDialog.hpp:118
@ CLIENTEDGE
Definition ResourceDialog.hpp:120
@ CONTROLPARENT
Definition ResourceDialog.hpp:128
ResourceDialog(ResourceDialog &&)=default
static dialogs_t parse(const ResourceData &node)
Parse dialogs from the given resource data node.
ResourceDialog & window_class(uint16_t ord)
Definition ResourceDialog.hpp:397
ResourceDialog(const ResourceDialog &)=default
const T * as() const
Helper to downcast a ResourceDialog into a ResourceDialogRegular or a ResourceDialogExtended.
Definition ResourceDialog.hpp:460
ResourceDialog & title(std::u16string value)
Definition ResourceDialog.hpp:402
ResourceDialog & title(const std::string &title)
friend std::ostream & operator<<(std::ostream &os, const ResourceDialog &dialog)
Definition ResourceDialog.hpp:469
ResourceDialog & menu(std::u16string title)
Definition ResourceDialog.hpp:380
DIALOG_STYLES
From: https://learn.microsoft.com/en-us/windows/win32/dlgbox/dialog-box-styles.
Definition ResourceDialog.hpp:70
@ NOIDLEMSG
Definition ResourceDialog.hpp:76
@ SETFOREGROUND
Definition ResourceDialog.hpp:77
@ NOFAILCREATE
Definition ResourceDialog.hpp:80
@ SHELLFONT
Definition ResourceDialog.hpp:85
@ MODALFRAME
Definition ResourceDialog.hpp:75
@ FIXEDSYS
Definition ResourceDialog.hpp:79
@ LOCALEDIT
Definition ResourceDialog.hpp:73
@ SETFONT
Definition ResourceDialog.hpp:74
@ ABSALIGN
Definition ResourceDialog.hpp:71
@ CONTEXTHELP
Definition ResourceDialog.hpp:84
@ CENTER
Definition ResourceDialog.hpp:82
@ CONTROL
Definition ResourceDialog.hpp:81
@ S3DLOOK
Definition ResourceDialog.hpp:78
@ SYSMODAL
Definition ResourceDialog.hpp:72
@ CENTERMOUSE
Definition ResourceDialog.hpp:83
int16_t cx() const
The width, in dialog box units, of the dialog box.
Definition ResourceDialog.hpp:360
bool has(WINDOW_EXTENDED_STYLES style) const
Check if the dialog used to given extended window style.
Definition ResourceDialog.hpp:420
uint32_t style() const
The style of the dialog box. This member can be a combination of window style values (such as WINDOW_...
Definition ResourceDialog.hpp:340
virtual std::unique_ptr< ResourceDialog > clone() const =0
bool has(WINDOW_STYLES style) const
Check if the dialog used to given window style.
Definition ResourceDialog.hpp:415
ResourceDialog & menu(uint16_t ord)
Definition ResourceDialog.hpp:386
ResourceDialog & extended_style(uint32_t value)
Definition ResourceDialog.hpp:370
ResourceDialog & operator=(ResourceDialog &&)=default
ResourceDialog & y(int16_t value)
Definition ResourceDialog.hpp:376
ResourceDialog & cx(int16_t value)
Definition ResourceDialog.hpp:377
TYPE
Enum for discriminating the kind of the Dialog (regular vs extended).
Definition ResourceDialog.hpp:64
@ EXTENDED
Definition ResourceDialog.hpp:66
@ UNKNOWN
Definition ResourceDialog.hpp:65
@ REGULAR
Definition ResourceDialog.hpp:66
const ordinal_or_str_t & menu() const
ordinal or name value of a menu resource.
Definition ResourceDialog.hpp:442
ResourceDialog & style(uint32_t value)
Definition ResourceDialog.hpp:365
uint32_t extended_style() const
The extended styles for a window. This member is not used to create dialog boxes, but applications th...
Definition ResourceDialog.hpp:347
std::vector< std::unique_ptr< ResourceDialog > > dialogs_t
Definition ResourceDialog.hpp:43
bool has(DIALOG_STYLES style) const
Check if the dialog used to given dialog style.
Definition ResourceDialog.hpp:410
WINDOW_STYLES
From: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles.
Definition ResourceDialog.hpp:89
@ VSCROLL
Definition ResourceDialog.hpp:102
@ DISABLED
Definition ResourceDialog.hpp:95
@ POPUP
Definition ResourceDialog.hpp:91
@ SYSMENU
Definition ResourceDialog.hpp:104
@ CAPTION
Definition ResourceDialog.hpp:99
@ VISIBLE
Definition ResourceDialog.hpp:94
@ CLIPCHILDREN
Definition ResourceDialog.hpp:97
@ MINIMIZE
Definition ResourceDialog.hpp:93
@ GROUP
Definition ResourceDialog.hpp:106
@ MAXIMIZE
Definition ResourceDialog.hpp:98
@ TABSTOP
Definition ResourceDialog.hpp:107
@ OVERLAPPED
Definition ResourceDialog.hpp:90
@ BORDER
Definition ResourceDialog.hpp:100
@ CLIPSIBLINGS
Definition ResourceDialog.hpp:96
@ CHILD
Definition ResourceDialog.hpp:92
@ DLGFRAME
Definition ResourceDialog.hpp:101
@ HSCROLL
Definition ResourceDialog.hpp:103
@ THICKFRAME
Definition ResourceDialog.hpp:105
int16_t x() const
The x-coordinate, in dialog box units, of the upper-left corner of the dialog box.
Definition ResourceDialog.hpp:353
ResourceDialog & x(int16_t value)
Definition ResourceDialog.hpp:375
ResourceDialog & operator=(const ResourceDialog &)=default
std::vector< WINDOW_EXTENDED_STYLES > windows_ext_styles_list() const
List of WINDOW_EXTENDED_STYLES used by this dialog.
std::string title_utf8() const
title of the dialog box
ResourceDialog & cy(int16_t value)
Definition ResourceDialog.hpp:378
virtual ~ResourceDialog()=default
int16_t y() const
The y-coordinate, in dialog box units, of the upper-left corner of the dialog box.
Definition ResourceDialog.hpp:357
int16_t cy() const
The height, in dialog box units, of the dialog box.
Definition ResourceDialog.hpp:363
static dialogs_t parse(const uint8_t *buffer, size_t size)
const ordinal_or_str_t & window_class() const
ordinal of a predefined system window class or name of a registered window class
Definition ResourceDialog.hpp:448
const std::u16string & title() const
title of the dialog box
Definition ResourceDialog.hpp:434
TYPE type() const
Definition ResourceDialog.hpp:333
std::vector< DIALOG_STYLES > styles_list() const
List of DIALOG_STYLES used by this dialog.
ResourceDialog(TYPE ty)
Definition ResourceDialog.hpp:327
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
@ not_found
Definition errors.hpp:25
tl::unexpected< lief_errors > make_error_code(lief_errors e)
Create an standard error code from lief_errors.
Definition errors.hpp:52
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(CODE_PAGES e)
@ T
Definition AcceleratorCodes.hpp:97
LIEF namespace.
Definition Abstract/Binary.hpp:40
result< ok_t > ok_error_t
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:109
tcb::span< ElementType, Extent > span
Definition span.hpp:22
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:75
This structure wraps either an ordinal value (uint16_t) or a string. The ordinal value should refer t...
Definition ResourceDialog.hpp:48
bool is_defined() const
Definition ResourceDialog.hpp:52
std::u16string string
Definition ResourceDialog.hpp:50
result< uint16_t > ordinal
Definition ResourceDialog.hpp:49
#define LIEF_API
Definition visibility.h:41