libolecf(3)
π libolecf(3) π
okay so bestie, welcome to libolecf β a library that lets you open up the Object Linking and Embedding (OLE) Compound File (CF) format. yes THAT format. the one every old-timey Office doc is secretly made of. this is the Library Functions Manual for it, and we're gonna go through every single function together. no skimming, no skipping, i got you. π«Ά
πΈ LIBRARY πΈ
library βlibolecfβ π
β¨ SYNOPSIS β¨
#include <libolecf.h>
π Support functions π
const char *
libolecf_get_version(void);
uint8_t
libolecf_get_access_flags_read(void);
int
libolecf_get_codepage(int *codepage, libolecf_error_t **error);
int
libolecf_set_codepage(int codepage, libolecf_error_t **error);
int
libolecf_check_file_signature(const char *filename, libolecf_error_t **error);
Available when compiled with wide character string support:
int
libolecf_check_file_signature_wide(const wchar_t *filename, libolecf_error_t **error);
Available when compiled with libbfio support:
int
libolecf_check_file_signature_file_io_handle(libbfio_handle_t *file_io_handle, libolecf_error_t **error);
π Notify functions π
void
libolecf_notify_set_verbose(int verbose);
int
libolecf_notify_set_stream(FILE *stream, libolecf_error_t **error);
int
libolecf_notify_stream_open(const char *filename, libolecf_error_t **error);
int
libolecf_notify_stream_close(libolecf_error_t **error);
π Error functions π
void
libolecf_error_free(libolecf_error_t **error);
int
libolecf_error_fprint(libolecf_error_t *error, FILE *stream);
int
libolecf_error_sprint(libolecf_error_t *error, char *string, size_t size);
int
libolecf_error_backtrace_fprint(libolecf_error_t *error, FILE *stream);
int
libolecf_error_backtrace_sprint(libolecf_error_t *error, char *string, size_t size);
π File functions π
int
libolecf_file_initialize(libolecf_file_t **file, libolecf_error_t **error);
int
libolecf_file_free(libolecf_file_t **file, libolecf_error_t **error);
int
libolecf_file_signal_abort(libolecf_file_t *file, libolecf_error_t **error);
int
libolecf_file_open(libolecf_file_t *file, const char *filename, int access_flags, libolecf_error_t **error);
int
libolecf_file_close(libolecf_file_t *file, libolecf_error_t **error);
int
libolecf_file_get_sector_size(libolecf_file_t *file, size32_t *sector_size, libolecf_error_t **error);
int
libolecf_file_get_short_sector_size(libolecf_file_t *file, size32_t *short_sector_size, libolecf_error_t **error);
int
libolecf_file_get_ascii_codepage(libolecf_file_t *file, int *ascii_codepage, libolecf_error_t **error);
int
libolecf_file_set_ascii_codepage(libolecf_file_t *file, int ascii_codepage, libolecf_error_t **error);
int
libolecf_file_get_format_version(libolecf_file_t *file, uint16_t *major_version, uint16_t *minor_version, libolecf_error_t **error);
int
libolecf_file_get_number_of_unallocated_blocks(libolecf_file_t *file, int *number_of_unallocated_blocks, libolecf_error_t **error);
int
libolecf_file_get_unallocated_block(libolecf_file_t *file, int unallocated_block_index, off64_t *offset, size64_t *size, libolecf_error_t **error);
int
libolecf_file_get_root_item(libolecf_file_t *file, libolecf_item_t **root_item, libolecf_error_t **error);
int
libolecf_file_get_item_by_utf8_path(libolecf_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libolecf_item_t **item, libolecf_error_t **error);
int
libolecf_file_get_item_by_utf16_path(libolecf_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libolecf_item_t **item, libolecf_error_t **error);
Available when compiled with wide character string support:
int
libolecf_file_open_wide(libolecf_file_t *file, const wchar_t *filename, int access_flags, libolecf_error_t **error);
Available when compiled with libbfio support:
int
libolecf_file_open_file_io_handle(libolecf_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libolecf_error_t **error);
π§ Item functions π§
int
libolecf_item_free(libolecf_item_t **item, libolecf_error_t **error);
int
libolecf_item_get_type(libolecf_item_t *item, uint8_t *type, libolecf_error_t **error);
int
libolecf_item_get_utf8_name_size(libolecf_item_t *item, size_t *utf8_string_size, libolecf_error_t **error);
int
libolecf_item_get_utf8_name(libolecf_item_t *item, uint8_t *utf8_string, size_t utf8_string_size, libolecf_error_t **error);
int
libolecf_item_get_utf16_name_size(libolecf_item_t *item, size_t *utf16_string_size, libolecf_error_t **error);
int
libolecf_item_get_utf16_name(libolecf_item_t *item, uint16_t *utf16_string, size_t utf16_string_size, libolecf_error_t **error);
int
libolecf_item_get_size(libolecf_item_t *item, uint32_t *size, libolecf_error_t **error);
int
libolecf_item_get_creation_time(libolecf_item_t *item, uint64_t *filetime, libolecf_error_t **error);
int
libolecf_item_get_modification_time(libolecf_item_t *item, uint64_t *filetime, libolecf_error_t **error);
int
libolecf_item_get_number_of_sub_items(libolecf_item_t *item, int *number_of_sub_items, libolecf_error_t **error);
int
libolecf_item_get_sub_item(libolecf_item_t *item, int sub_item_index, libolecf_item_t **sub_item, libolecf_error_t **error);
int
libolecf_item_get_sub_item_by_utf8_name(libolecf_item_t *item, const uint8_t *utf8_string, size_t utf8_string_length, libolecf_item_t **sub_item, libolecf_error_t **error);
int
libolecf_item_get_sub_item_by_utf16_name(libolecf_item_t *item, const uint16_t *utf16_string, size_t utf16_string_length, libolecf_item_t **sub_item, libolecf_error_t **error);
int
libolecf_item_get_sub_item_by_utf8_path(libolecf_item_t *item, const uint8_t *utf8_string, size_t utf8_string_length, libolecf_item_t **sub_item, libolecf_error_t **error);
int
libolecf_item_get_sub_item_by_utf16_path(libolecf_item_t *item, const uint16_t *utf16_string, size_t utf16_string_length, libolecf_item_t **sub_item, libolecf_error_t **error);
π Stream functions π
ssize_t
libolecf_stream_read_buffer(libolecf_item_t *stream, uint8_t *buffer, size_t size, libolecf_error_t **error);
off64_t
libolecf_stream_seek_offset(libolecf_item_t *stream, off64_t offset, int whence, libolecf_error_t **error);
int
libolecf_stream_get_offset(libolecf_item_t *stream, off64_t *offset, libolecf_error_t **error);
π Property set stream functions π
int
libolecf_property_set_stream_get_set(libolecf_item_t *property_set_stream, libolecf_property_set_t **property_set, libolecf_error_t **error);
π Property set functions π
int
libolecf_property_set_free(libolecf_property_set_t **property_set, libolecf_error_t **error);
int
libolecf_property_set_get_class_identifier(libolecf_property_set_t *property_set, uint8_t *guid_data, size_t guid_data_size, libolecf_error_t **error);
int
libolecf_property_set_get_number_of_sections(libolecf_property_set_t *property_set, int *number_of_sections, libolecf_error_t **error);
int
libolecf_property_set_get_section_by_index(libolecf_property_set_t *property_set, int section_index, libolecf_property_section_t **property_section, libolecf_error_t **error);
π¦ Property section functions π¦
int
libolecf_property_section_free(libolecf_property_section_t **property_section, libolecf_error_t **error);
int
libolecf_property_section_get_class_identifier(libolecf_property_section_t *property_section, uint8_t *guid_data, size_t guid_data_size, libolecf_error_t **error);
int
libolecf_property_section_get_number_of_properties(libolecf_property_section_t *property_section, int *number_of_properties, libolecf_error_t **error);
int
libolecf_property_section_get_property_by_index(libolecf_property_section_t *property_section, int property_index, libolecf_property_value_t **property_value, libolecf_error_t **error);
π Property value functions π
int
libolecf_property_value_free(libolecf_property_value_t **property_value, libolecf_error_t **error);
int
libolecf_property_value_get_identifier(libolecf_property_value_t *property_value, uint32_t *identifier, libolecf_error_t **error);
int
libolecf_property_value_get_value_type(libolecf_property_value_t *property_value, uint32_t *value_type, libolecf_error_t **error);
int
libolecf_property_value_get_data_size(libolecf_property_value_t *property_value, size_t *data_size, libolecf_error_t **error);
int
libolecf_property_value_get_data(libolecf_property_value_t *property_value, uint8_t *data, size_t data_size, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_boolean(libolecf_property_value_t *property_value, uint8_t *value_boolean, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_16bit_integer(libolecf_property_value_t *property_value, uint16_t *value_16bit, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_32bit_integer(libolecf_property_value_t *property_value, uint32_t *value_32bit, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_64bit_integer(libolecf_property_value_t *property_value, uint64_t *value_64bit, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_filetime(libolecf_property_value_t *property_value, uint64_t *filetime, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_utf8_string_size(libolecf_property_value_t *property_value, size_t *utf8_string_size, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_utf8_string(libolecf_property_value_t *property_value, uint8_t *utf8_string, size_t utf8_string_size, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_utf16_string_size(libolecf_property_value_t *property_value, size_t *utf16_string_size, libolecf_error_t **error);
int
libolecf_property_value_get_data_as_utf16_string(libolecf_property_value_t *property_value, uint16_t *utf16_string, size_t utf16_string_size, libolecf_error_t **error);
π DESCRIPTION π
ok so listen. the libolecf_get_version() function is used to retrieve the library version. that's it. that's the whole description. she's simple, she's iconic. π
π RETURN VALUES π
most of the functions return NULL or -1 on error, dependent on the return type. ngl it depends on what type you're getting back. for the actual return values, go look at "libolecf.h". iykyk. π
π± ENVIRONMENT π±
None
like literally nothing. no env vars. not a single one. periodt.
ποΈ FILES ποΈ
None
no files either bestie. she's self-contained. π«Ά
π NOTES π
libolecf allows to be compiled with wide character support (wchar_t). β¨
to compile libolecf with wide character support use: ./configure --enable-wide-character-type=yes or define: _UNICODE or UNICODE during compilation.
LIBOLECF_WIDE_CHARACTER_TYPE in libolecf/features.h can be used to determine if libolecf was compiled with wide character support. π΅οΈββοΈ
π BUGS π
please report bugs of any kind on the project issue tracker: https://github.com/libyal/libolecf/issues
do NOT be shy about it. they want to know. it's giving community. π
π©βπ» AUTHOR π©βπ»
these man pages are generated from "libolecf.h". (not hand-written by a teenage girl, shocking, i know π)
βοΈ COPYRIGHT βοΈ
Copyright (C) 2008-2018, 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.
fr fr read that twice. no warranty. none. zero. nada. π«
π SEE ALSO π
- the
libolecf.hinclude file
and that's the whole page bestie!! π
β¨ this was the libolecf man page, from source/version libolecf, dated January 29, 2017 β section 3, <pink>libolecf(3)</pink>. now go read a compound file and slay. ππ¦π
π¦ where this page comes from
- debian bookworm: libolecf-dev 20181231-2+b2 Β· LGPL-3.0-or-later
- debian trixie: libolecf-dev 20181231-3 Β· LGPL-3.0-or-later
- ubuntu jammy: libolecf-dev 20181231-2build1 Β· LGPL-3.0-or-later
- ubuntu noble: libolecf-dev 20181231-2.1build2 Β· LGPL-3.0-or-later
- ubuntu questing: libolecf-dev 20181231-3
- ubuntu resolute: libolecf-dev 20181231-4build1 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms