libfwsi(3)
β¨ NAME β¨
okay so bestie, welcome to the β¨iconicβ¨ manual for libfwsi.h β a library that gives you access to the Windows Shell Item format π
that's the whole name section. we ate. periodt. π
π¦ SYNOPSIS π¦
first things first, you gotta pull her in:
#include <libfwsi.h>
and then it's just a whole buffet of function groups. let's do this by category, no skipping, i promised π
π Support functions
the "hey what version are you" corner π«Ά
const char *
libfwsi_get_version(void);
π Notify functions
the yelling-into-the-void-but-politely section. verbose? stream? we got her π¬
void
libfwsi_notify_set_verbose(int verbose);
int
libfwsi_notify_set_stream(FILE *stream, libfwsi_error_t **error);
int
libfwsi_notify_stream_open(const char *filename,
libfwsi_error_t **error);
int
libfwsi_notify_stream_close(libfwsi_error_t **error);
π Error functions
when things go wrong (and bestie, they do), this is your little support group. free her, print her, sprint her, backtrace her π
void
libfwsi_error_free(libfwsi_error_t **error);
int
libfwsi_error_fprint(libfwsi_error_t *error, FILE *stream);
int
libfwsi_error_sprint(libfwsi_error_t *error, char *string, size_t size);
int
libfwsi_error_backtrace_fprint(libfwsi_error_t *error, FILE *stream);
int
libfwsi_error_backtrace_sprint(libfwsi_error_t *error, char *string,
size_t size);
π Item list functions
a list! of items!! the polycule of data structures honestly π«Ά
int
libfwsi_item_list_initialize(libfwsi_item_list_t **item_list,
libfwsi_error_t **error);
int
libfwsi_item_list_free(libfwsi_item_list_t **item_list,
libfwsi_error_t **error);
int
libfwsi_item_list_copy_from_byte_stream(libfwsi_item_list_t *item_list,
const uint8_t *byte_stream, size_t byte_stream_size,
int ascii_codepage, libfwsi_error_t **error);
int
libfwsi_item_list_get_data_size(libfwsi_item_list_t *item_list,
size_t *data_size, libfwsi_error_t **error);
int
libfwsi_item_list_get_number_of_items(libfwsi_item_list_t *item_list,
int *number_of_items, libfwsi_error_t **error);
int
libfwsi_item_list_get_item(libfwsi_item_list_t *item_list,
int item_index, libfwsi_item_t **item, libfwsi_error_t **error);
π Item functions
the main character of this whole library, no cap. types! signatures! extension blocks! she has RANGE π
int
libfwsi_item_initialize(libfwsi_item_t **item, libfwsi_error_t **error);
int
libfwsi_item_free(libfwsi_item_t **item, libfwsi_error_t **error);
int
libfwsi_item_copy_from_byte_stream(libfwsi_item_t *item,
const uint8_t *byte_stream, size_t byte_stream_size,
int ascii_codepage, libfwsi_error_t **error);
int
libfwsi_item_get_type(libfwsi_item_t *item, int *type,
libfwsi_error_t **error);
int
libfwsi_item_get_class_type(libfwsi_item_t *item, uint8_t *class_type,
libfwsi_error_t **error);
int
libfwsi_item_get_signature(libfwsi_item_t *item, uint32_t *signature,
libfwsi_error_t **error);
int
libfwsi_item_get_data_size(libfwsi_item_t *item, size_t *data_size,
libfwsi_error_t **error);
int
libfwsi_item_get_delegate_folder_identifier(libfwsi_item_t *item,
uint8_t *guid_data, size_t guid_data_size, libfwsi_error_t **error);
int
libfwsi_item_get_number_of_extension_blocks(libfwsi_item_t *item,
int *number_of_extension_blocks, libfwsi_error_t **error);
int
libfwsi_item_get_extension_block(libfwsi_item_t *item,
int extension_block_index,
libfwsi_extension_block_t **extension_block,
libfwsi_error_t **error);
π§ Root folder item functions
yes she gets her own little spotlight, she's special like that β¨
int
libfwsi_root_folder_get_shell_folder_identifier(libfwsi_item_t *root_folder,
uint8_t *guid_data, size_t guid_data_size, libfwsi_error_t **error);
π₯ Volume item functions
names! in utf8 AND utf16! identifiers! shell folder identifiers! she brought the whole fam π
int
libfwsi_volume_get_utf8_name_size(libfwsi_item_t *volume,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_volume_get_utf8_name(libfwsi_item_t *volume,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_volume_get_utf16_name_size(libfwsi_item_t *volume,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_volume_get_utf16_name(libfwsi_item_t *volume,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
int
libfwsi_volume_get_identifier(libfwsi_item_t *volume,
uint8_t *guid_data, size_t guid_data_size, libfwsi_error_t **error);
int
libfwsi_volume_get_shell_folder_identifier(libfwsi_item_t *volume,
uint8_t *guid_data, size_t guid_data_size, libfwsi_error_t **error);
πΈ File entry item functions
sizes, times, attribute flags, and yes, both utf8 and utf16 names, because of course ποΈ
int
libfwsi_file_entry_get_file_size(libfwsi_item_t *file_entry,
uint32_t *file_size, libfwsi_error_t **error);
int
libfwsi_file_entry_get_modification_time(libfwsi_item_t *file_entry,
uint32_t *fat_date_time, libfwsi_error_t **error);
int
libfwsi_file_entry_get_file_attribute_flags(libfwsi_item_t *file_entry,
uint32_t *file_attribute_flags, libfwsi_error_t **error);
int
libfwsi_file_entry_get_utf8_name_size(libfwsi_item_t *file_entry,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_file_entry_get_utf8_name(libfwsi_item_t *file_entry,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_file_entry_get_utf16_name_size(libfwsi_item_t *file_entry,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_file_entry_get_utf16_name(libfwsi_item_t *file_entry,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
π«Ά Network location item functions
locations! descriptions! comments! miss girl has a LOT to say and honestly? respect π£οΈ
int
libfwsi_network_location_get_utf8_location_size(libfwsi_item_t *network_location,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_network_location_get_utf8_location(libfwsi_item_t *network_location,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_network_location_get_utf16_location_size(libfwsi_item_t *network_location,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_network_location_get_utf16_location(libfwsi_item_t *network_location,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
int
libfwsi_network_location_get_utf8_description_size(libfwsi_item_t *network_location,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_network_location_get_utf8_description(libfwsi_item_t *network_location,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_network_location_get_utf16_description_size(libfwsi_item_t *network_location,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_network_location_get_utf16_description(libfwsi_item_t *network_location,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
int
libfwsi_network_location_get_utf8_comments_size(libfwsi_item_t *network_location,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_network_location_get_utf8_comments(libfwsi_item_t *network_location,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_network_location_get_utf16_comments_size(libfwsi_item_t *network_location,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_network_location_get_utf16_comments(libfwsi_item_t *network_location,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
π Compressed folder functions
zipped, zipped, hooray π names only, but in two encodings naturally
int
libfwsi_compressed_folder_get_utf8_name_size(libfwsi_item_t *compressed_folder,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_compressed_folder_get_utf8_name(libfwsi_item_t *compressed_folder,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_compressed_folder_get_utf16_name_size(libfwsi_item_t *compressed_folder,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_compressed_folder_get_utf16_name(libfwsi_item_t *compressed_folder,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
β Control panel category functions
one (1) function. she's lowkey but she's doing her best π
int
libfwsi_control_panel_category_get_identifier(libfwsi_item_t *control_panel_category,
uint32_t *identifier, libfwsi_error_t **error);
π Control panel item functions
also just the one, but with a guid. you know the vibe π
int
libfwsi_control_panel_item_get_identifier(libfwsi_item_t *control_panel_item,
uint8_t *guid_data, size_t guid_data_size, libfwsi_error_t **error);
π Users property view functions
known folder identifiers, property store sizes, and copying that property store data around like it's gossip πΈ
int
libfwsi_users_property_view_get_known_folder_identifier(libfwsi_item_t *users_property_view,
uint8_t *guid_data, size_t guid_data_size, libfwsi_error_t **error);
int
libfwsi_users_property_view_get_property_store_data_size(libfwsi_item_t *users_property_view,
size_t *data_size, libfwsi_error_t **error);
int
libfwsi_users_property_view_copy_property_store_data(libfwsi_item_t *users_property_view,
uint8_t *data, size_t data_size, libfwsi_error_t **error);
π§΅ Extension block functions
free her, signature her, size her. short and sweet, no notes π«‘
int
libfwsi_extension_block_free(libfwsi_extension_block_t **extension_block,
libfwsi_error_t **error);
int
libfwsi_extension_block_get_signature(libfwsi_extension_block_t *extension_block,
uint32_t *signature, libfwsi_error_t **error);
int
libfwsi_extension_block_get_data_size(libfwsi_extension_block_t *extension_block,
size_t *data_size, libfwsi_error_t **error);
π File entry extension functions
times! references! long names! localized names! this girl is THOROUGH and honestly we're obsessed π
int
libfwsi_file_entry_extension_get_creation_time(libfwsi_extension_block_t *file_entry_extension,
uint32_t *fat_date_time, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_access_time(libfwsi_extension_block_t *file_entry_extension,
uint32_t *fat_date_time, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_file_reference(libfwsi_extension_block_t *file_entry_extension,
uint64_t *file_reference, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf8_long_name_size(libfwsi_extension_block_t *file_entry_extension,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf8_long_name(libfwsi_extension_block_t *file_entry_extension,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf16_long_name_size(libfwsi_extension_block_t *file_entry_extension,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf16_long_name(libfwsi_extension_block_t *file_entry_extension,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf8_localized_name_size(libfwsi_extension_block_t *file_entry_extension,
size_t *utf8_string_size, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf8_localized_name(libfwsi_extension_block_t *file_entry_extension,
uint8_t *utf8_string, size_t utf8_string_size,
libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf16_localized_name_size(libfwsi_extension_block_t *file_entry_extension,
size_t *utf16_string_size, libfwsi_error_t **error);
int
libfwsi_file_entry_extension_get_utf16_localized_name(libfwsi_extension_block_t *file_entry_extension,
uint16_t *utf16_string, size_t utf16_string_size,
libfwsi_error_t **error);
Shell folder identifier functions π
const char *
libfwsi_shell_folder_identifier_get_name(const uint8_t *shell_folder_identifier);
πΈ DESCRIPTION πΈ
okay so the libfwsi_get_version() function? bestie, its whole entire job is to hand you back the library version. that's it. that's the function. it's giving "I have one task and I do it flawlessly." π
β¨ RETURN VALUES β¨
so most of these functions will hit you with NULL or -1 when something goes wrong β which one you get depends on the return type, obvi. and if you actually wanna know the real, specific return values for each function? go read "libfwsi.h", because that's where they live. no cap. π
π«Ά ENVIRONMENT π«Ά
None
like... genuinely nothing. no env vars are reading your vibe. it's a clean slate. π§
π FILES π
None
nope, no files either. nothing to see here, moving on. π
π BUGS π
found a bug? first of all, rude of the bug. second of all, please report bugs of any kind on the project issue tracker:
https://github.com/libyal/libfwsi/issues
any kind, bestie. don't be shy. they wanna know. π
π AUTHOR π
These man pages are generated from "libfwsi.h".
(so basically the header file is the main character here and the man pages are just its content, slaying in a different format. iconic.) β¨
π COPYRIGHT π
Copyright (C) 2010-2024, 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.
β οΈ not "a little warranty". NO warranty. zero. none. not even the fancy ones. read the source before you trust it with your whole entire heart, okay? π
π SEE ALSO π
- the
libfwsi.hinclude file β go read it, for real, it's where all the actual return values are hiding π¦
and that's a wrap on part 2, bestie!! π this page came to you from libfwsi, dated April 17, 2024, and it lives in section libfwsi(3) of your friendly neighborhood man pages. now go forth and parse some shell items. periodt. π
πΈβ¨
π¦ where this page comes from
- debian trixie: libfwsi-dev 20240423-1 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libfwsi-devel 20240423-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfwsi-devel 20240423-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfwsi-devel 20240423-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfwsi-devel 20240423-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- ubuntu questing: libfwsi-dev 20240423-1
- ubuntu resolute: libfwsi-dev 20240423-1build1 Β· LGPL-3.0-or-later
- ubuntu stonking: libfwsi-dev 20240423-1build1 Β· 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