libwrc(3)

NAME
libwrc.h - Library to access the Windows Resource Compiler (WRC) format

SYNOPSIS
#include <libwrc.h>

Support functions
const char *
libwrc_get_version(void);
int
libwrc_get_access_flags_read(void);
int
libwrc_get_codepage(int *codepage, libwrc_error_t **error);
int
libwrc_set_codepage(int codepage, libwrc_error_t **error);

Notify functions
void
libwrc_notify_set_verbose(int verbose);
int
libwrc_notify_set_stream(FILE *stream, libwrc_error_t **error);
int
libwrc_notify_stream_open(const char *filename, libwrc_error_t **error);
int
libwrc_notify_stream_close(libwrc_error_t **error);

Error functions
void
libwrc_error_free(libwrc_error_t **error);
int
libwrc_error_fprint(libwrc_error_t *error, FILE *stream);
int
libwrc_error_sprint(libwrc_error_t *error, char *string, size_t size);
int
libwrc_error_backtrace_fprint(libwrc_error_t *error, FILE *stream);
int
libwrc_error_backtrace_sprint(libwrc_error_t *error, char *string, size_t size);

Stream functions
int
libwrc_stream_initialize(libwrc_stream_t **stream, libwrc_error_t **error);
int
libwrc_stream_free(libwrc_stream_t **stream, libwrc_error_t **error);
int
libwrc_stream_signal_abort(libwrc_stream_t *stream, libwrc_error_t **error);
int
libwrc_stream_open(libwrc_stream_t *stream, const char *filename, int access_flags, libwrc_error_t **error);
int
libwrc_stream_close(libwrc_stream_t *stream, libwrc_error_t **error);
int
libwrc_stream_get_ascii_codepage(libwrc_stream_t *stream, int *ascii_codepage, libwrc_error_t **error);
int
libwrc_stream_set_ascii_codepage(libwrc_stream_t *stream, int ascii_codepage, libwrc_error_t **error);
int
libwrc_stream_get_virtual_address(libwrc_stream_t *stream, uint32_t *virtual_address, libwrc_error_t **error);
int
libwrc_stream_set_virtual_address(libwrc_stream_t *stream, uint32_t virtual_address, libwrc_error_t **error);
int
libwrc_stream_get_number_of_resources(libwrc_stream_t *stream, int *number_of_resources, libwrc_error_t **error);
int
libwrc_stream_get_resource(libwrc_stream_t *stream, int resource_index, libwrc_resource_t **resource, libwrc_error_t **error);
int
libwrc_stream_get_resource_by_identifier(libwrc_stream_t *stream, uint32_t identifier, libwrc_resource_t **resource, libwrc_error_t **error);
int
libwrc_stream_get_resource_by_type(libwrc_stream_t *stream, int type, libwrc_resource_t **resource, libwrc_error_t **error);
int
libwrc_stream_get_resource_by_utf8_name(libwrc_stream_t *stream, const uint8_t *utf8_string, size_t utf8_string_length, libwrc_resource_t **resource, libwrc_error_t **error);
int
libwrc_stream_get_resource_by_utf16_name(libwrc_stream_t *stream, const uint16_t *utf16_string, size_t utf16_string_length, libwrc_resource_t **resource, libwrc_error_t **error);

Available when compiled with wide character string support:
int
libwrc_stream_open_wide(libwrc_stream_t *stream, const wchar_t *filename, int access_flags, libwrc_error_t **error);

Available when compiled with libbfio support:
int
libwrc_stream_open_file_io_handle(libwrc_stream_t *stream, libbfio_handle_t *file_io_handle, int access_flags, libwrc_error_t **error);

Resource functions
int
libwrc_resource_free(libwrc_resource_t **resource, libwrc_error_t **error);
int
libwrc_resource_get_identifier(libwrc_resource_t *resource, uint32_t *identifier, libwrc_error_t **error);
int
libwrc_resource_get_type(libwrc_resource_t *resource, int *type, libwrc_error_t **error);
int
libwrc_resource_read(libwrc_resource_t *resource, libwrc_error_t **error);
int
libwrc_resource_get_number_of_languages(libwrc_resource_t *resource, int *number_of_languages, libwrc_error_t **error);
int
libwrc_resource_get_language_identifier(libwrc_resource_t *resource, int language_index, uint32_t *language_identifier, libwrc_error_t **error);

Manifest resource functions
int
libwrc_manifest_get_utf8_string_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_manifest_get_utf8_string(libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_manifest_get_utf16_string_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_manifest_get_utf16_string(libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);

Message-table resource functions
int
libwrc_message_table_get_number_of_messages(libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_messages, libwrc_error_t **error);
int
libwrc_message_table_get_identifier(libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint32_t *message_identifier, libwrc_error_t **error);
int
libwrc_message_table_get_utf8_string_size(libwrc_resource_t *resource, uint32_t language_identifier, int message_index, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_message_table_get_utf8_string(libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_message_table_get_utf16_string_size(libwrc_resource_t *resource, uint32_t language_identifier, int message_index, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_message_table_get_utf16_string(libwrc_resource_t *resource, uint32_t language_identifier, int message_index, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);

MUI resource functions
int
libwrc_mui_get_file_type(libwrc_resource_t *resource, uint32_t language_identifier, uint32_t *file_type, libwrc_error_t **error);
int
libwrc_mui_get_utf8_main_name_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_main_name(libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_main_name_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_main_name(libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_mui_name_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_mui_name(libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_mui_name_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_mui_name(libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_language_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_language(libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_language_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_language(libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_fallback_language_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf8_fallback_language(libwrc_resource_t *resource, uint32_t language_identifier, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_fallback_language_size(libwrc_resource_t *resource, uint32_t language_identifier, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_mui_get_utf16_fallback_language(libwrc_resource_t *resource, uint32_t language_identifier, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);

String resource functions
int
libwrc_string_get_number_of_strings(libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_strings, libwrc_error_t **error);
int
libwrc_string_get_identifier(libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint32_t *string_identifier, libwrc_error_t **error);
int
libwrc_string_get_utf8_string_size(libwrc_resource_t *resource, uint32_t language_identifier, int string_index, size_t *utf8_string_size, libwrc_error_t **error);
int
libwrc_string_get_utf8_string(libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libwrc_error_t **error);
int
libwrc_string_get_utf16_string_size(libwrc_resource_t *resource, uint32_t language_identifier, int string_index, size_t *utf16_string_size, libwrc_error_t **error);
int
libwrc_string_get_utf16_string(libwrc_resource_t *resource, uint32_t language_identifier, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libwrc_error_t **error);

Version resource functions
int
libwrc_version_get_file_version(libwrc_resource_t *resource, uint32_t language_identifier, uint64_t *version, libwrc_error_t **error);
int
libwrc_version_get_product_version(libwrc_resource_t *resource, uint32_t language_identifier, uint64_t *version, libwrc_error_t **error);

WEVT_TEMPLATE resource functions
int
libwrc_wevt_template_get_number_of_providers(libwrc_resource_t *resource, uint32_t language_identifier, int *number_of_providers, libwrc_error_t **error);
int
libwrc_wevt_template_get_provider(libwrc_resource_t *resource, uint32_t language_identifier, int provider_index, libwrc_wevt_provider_t **provider, libwrc_error_t **error);
int
libwrc_wevt_template_get_provider_by_identifier(libwrc_resource_t *resource, uint32_t language_identifier, const uint8_t *provider_identifier, size_t provider_identifier_size, libwrc_wevt_provider_t **provider, libwrc_error_t **error);

WEVT_TEMPLATE provider functions
int
libwrc_wevt_provider_free(libwrc_wevt_provider_t **provider, libwrc_error_t **error);
int
libwrc_wevt_provider_get_number_of_events(libwrc_wevt_provider_t *provider, int *number_of_events, libwrc_error_t **error);
int
libwrc_wevt_provider_get_event(libwrc_wevt_provider_t *provider, int event_index, libwrc_wevt_event_t **event, libwrc_error_t **error);
int
libwrc_wevt_provider_get_event_by_identifier(libwrc_wevt_provider_t *provider, uint32_t event_identifier, libwrc_wevt_event_t **event, libwrc_error_t **error);

WEVT_TEMPLATE channel functions
int
libwrc_wevt_channel_free(libwrc_wevt_channel_t **channel, libwrc_error_t **error);

WEVT_TEMPLATE event functions
int
libwrc_wevt_event_free(libwrc_wevt_event_t **event, libwrc_error_t **error);
int
libwrc_wevt_event_get_identifier(libwrc_wevt_event_t *event, uint32_t *identifier, libwrc_error_t **error);
int
libwrc_wevt_event_get_message_identifier(libwrc_wevt_event_t *event, uint32_t *message_identifier, libwrc_error_t **error);

WEVT_TEMPLATE keyword functions
int
libwrc_wevt_keyword_free(libwrc_wevt_keyword_t **keyword, libwrc_error_t **error);

WEVT_TEMPLATE level functions
int
libwrc_wevt_level_free(libwrc_wevt_level_t **level, libwrc_error_t **error);

WEVT_TEMPLATE map functions
int
libwrc_wevt_map_free(libwrc_wevt_map_t **map, libwrc_error_t **error);

WEVT_TEMPLATE opcode functions
int
libwrc_wevt_opcode_free(libwrc_wevt_opcode_t **opcode, libwrc_error_t **error);

WEVT_TEMPLATE task functions
int
libwrc_wevt_task_free(libwrc_wevt_task_t **task, libwrc_error_t **error);

WEVT_TEMPLATE template definition functions
int
libwrc_wevt_template_definition_free(libwrc_wevt_template_definition_t **template_definition, libwrc_error_t **error);

DESCRIPTION
The libwrc_get_version() function is used to retrieve the library version.

RETURN VALUES
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libwrc.h".

ENVIRONMENT
None

FILES
None

NOTES
libwrc can be compiled with wide character support (wchar_t).

To compile libwrc with wide character support use: ./configure --enable-wide-character-type=yes or define: _UNICODE or UNICODE during compilation.

LIBWRC_WIDE_CHARACTER_TYPE in libwrc/features.h can be used to determine if libwrc was compiled with wide character support.

BUGS
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libwrc/issues

AUTHOR
These man pages are generated from "libwrc.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 libwrc.h include file