libexe(3)
π libexe(3) β the EXE library page, but make it cute π
Hey bestie! This is the libexe(3) page from the Library Functions Manual (section 3, if you're keeping track). It's all about libexe.h, the library for accessing the executable (EXE) format. Grab a strawberry π and let's go.
β¨ NAME β¨
libexe.h β Library to access the executable (EXE) format.
That's the name. That's the vibe. π
π¦ SYNOPSIS π¦
First, the include, because obviously:
#include <libexe.h>
π Support functions
const char *
libexe_get_version(void);
int
libexe_get_access_flags_read(void);
int
libexe_get_codepage(int *codepage, libexe_error_t **error);
int
libexe_set_codepage(int codepage, libexe_error_t **error);
int
libexe_check_file_signature(const char *filename,
libexe_error_t **error);
Available when compiled with wide character string support:
int
libexe_check_file_signature_wide(const wchar_t *filename,
libexe_error_t **error);
Available when compiled with libbfio support:
int
libexe_check_file_signature_file_io_handle(libbfio_handle_t *file_io_handle,
libexe_error_t **error);
π Notify functions
void
libexe_notify_set_verbose(int verbose);
int
libexe_notify_set_stream(FILE *stream, libexe_error_t **error);
int
libexe_notify_stream_open(const char *filename, libexe_error_t **error);
int
libexe_notify_stream_close(libexe_error_t **error);
π Error functions
void
libexe_error_free(libexe_error_t **error);
int
libexe_error_fprint(libexe_error_t *error, FILE *stream);
int
libexe_error_sprint(libexe_error_t *error, char *string, size_t size);
int
libexe_error_backtrace_fprint(libexe_error_t *error, FILE *stream);
int
libexe_error_backtrace_sprint(libexe_error_t *error, char *string,
size_t size);
π«Ά File functions
int
libexe_file_initialize(libexe_file_t **file, libexe_error_t **error);
int
libexe_file_free(libexe_file_t **file, libexe_error_t **error);
int
libexe_file_signal_abort(libexe_file_t *file, libexe_error_t **error);
int
libexe_file_open(libexe_file_t *file, const char *filename,
int access_flags, libexe_error_t **error);
int
libexe_file_close(libexe_file_t *file, libexe_error_t **error);
int
libexe_file_get_ascii_codepage(libexe_file_t *file, int *ascii_codepage,
libexe_error_t **error);
int
libexe_file_set_ascii_codepage(libexe_file_t *file, int ascii_codepage,
libexe_error_t **error);
int
libexe_file_get_number_of_sections(libexe_file_t *file,
int *number_of_sections, libexe_error_t **error);
int
libexe_file_get_section_by_index(libexe_file_t *file, int section_index,
libexe_section_t **section, libexe_error_t **error);
int
libexe_file_get_section_by_name(libexe_file_t *file, const char *string,
size_t string_length, libexe_section_t **section,
libexe_error_t **error);
Available when compiled with wide character string support:
int
libexe_file_open_wide(libexe_file_t *file, const wchar_t *filename,
int access_flags, libexe_error_t **error);
Available when compiled with libbfio support:
int
libexe_file_open_file_io_handle(libexe_file_t *file,
libbfio_handle_t *file_io_handle, int access_flags,
libexe_error_t **error);
πΈ Section functions
int
libexe_section_free(libexe_section_t **section, libexe_error_t **error);
int
libexe_section_get_name_size(libexe_section_t *section,
size_t *string_size, libexe_error_t **error);
int
libexe_section_get_name(libexe_section_t *section, char *string,
size_t string_size, libexe_error_t **error);
int
libexe_section_get_utf8_name_size(libexe_section_t *section,
size_t *utf8_string_size, libexe_error_t **error);
int
libexe_section_get_utf8_name(libexe_section_t *section,
uint8_t *utf8_string, size_t utf8_string_size,
libexe_error_t **error);
int
libexe_section_get_utf16_name_size(libexe_section_t *section,
size_t *utf16_string_size, libexe_error_t **error);
int
libexe_section_get_utf16_name(libexe_section_t *section,
uint16_t *utf16_string, size_t utf16_string_size,
libexe_error_t **error);
ssize_t
libexe_section_read_buffer(libexe_section_t *section, void *buffer,
size_t buffer_size, libexe_error_t **error);
ssize_t
libexe_section_read_buffer_at_offset(libexe_section_t *section,
void *buffer, size_t buffer_size, off64_t offset,
libexe_error_t **error);
off64_t
libexe_section_seek_offset(libexe_section_t *section, off64_t offset,
int whence, libexe_error_t **error);
int
libexe_section_get_offset(libexe_section_t *section, off64_t *offset,
libexe_error_t **error);
int
libexe_section_get_size(libexe_section_t *section, size64_t *size,
libexe_error_t **error);
int
libexe_section_get_start_offset(libexe_section_t *section,
off64_t *start_offset, libexe_error_t **error);
int
libexe_section_get_virtual_address(libexe_section_t *section,
uint32_t *virtual_address, libexe_error_t **error);
Available when compiled with libbfio support:
int
libexe_section_get_data_file_io_handle(libexe_section_t *section,
libbfio_handle_t **file_io_handle, libexe_error_t **error);
π DESCRIPTION π
libexe_get_version() is used to retrieve the library version. That's it β that's the function. It's giving "short and iconic" and we respect it. π
π₯ RETURN VALUES π₯
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values, see "libexe.h". No cap, that's where the real tea is. π΅
π ENVIRONMENT π
None.
π§ FILES π§
None.
π NOTES π
libexecan be compiled with wide character support (wchar_t).- To compile
libexewith wide character support use:
./configure --enable-wide-character-type=yes
or define _UNICODE or UNICODE during compilation.
LIBEXE_WIDE_CHARACTER_TYPEinlibexe/features.hcan be used to determine iflibexewas compiled with wide character support.
That's the whole notes section, bestie. Short, sweet, and very wchar_t coded. π«Ά
π BUGS π
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libexe/issues
π AUTHOR π
These man pages are generated from "libexe.h".
β COPYRIGHT β
Copyright (C) 2011-2021, Joachim Metz <joachim.metz@gmail.com>.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
π SEE ALSO π
the libexe.h include file
xoxo, libexe β April 14, 2019 β libexe(3) π
π¦ where this page comes from
- opensuse-leap 16.0: libexe-devel 20210424-bp160.1.14 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libexe-devel 20210424-bp160.1.14 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libexe-devel 20210424-bp160.1.14 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libexe-devel 20210424-bp160.1.14 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms