libregf(3)

NAME
libregf.h - Library to access the Windows NT Registry File (REGF) format

SYNOPSIS
#include <libregf.h>

Support functions
const char *
libregf_get_version(void);
int
libregf_get_access_flags_read(void);
int
libregf_get_codepage(int *codepage, libregf_error_t **error);
int
libregf_set_codepage(int codepage, libregf_error_t **error);
int
libregf_check_file_signature(const char *filename, libregf_error_t **error);

Available when compiled with wide character string support:
int
libregf_check_file_signature_wide(const wchar_t *filename, libregf_error_t **error);

Available when compiled with libbfio support:
int
libregf_check_file_signature_file_io_handle(libbfio_handle_t *bfio_handle, libregf_error_t **error);

Notify functions
void
libregf_notify_set_verbose(int verbose);
int
libregf_notify_set_stream(FILE *stream, libregf_error_t **error);
int
libregf_notify_stream_open(const char *filename, libregf_error_t **error);
int
libregf_notify_stream_close(libregf_error_t **error);

Error functions
void
libregf_error_free(libregf_error_t **error);
int
libregf_error_fprint(libregf_error_t *error, FILE *stream);
int
libregf_error_sprint(libregf_error_t *error, char *string, size_t size);
int
libregf_error_backtrace_fprint(libregf_error_t *error, FILE *stream);
int
libregf_error_backtrace_sprint(libregf_error_t *error, char *string, size_t size);

File functions
int
libregf_file_initialize(libregf_file_t **file, libregf_error_t **error);
int
libregf_file_free(libregf_file_t **file, libregf_error_t **error);
int
libregf_file_signal_abort(libregf_file_t *file, libregf_error_t **error);
int
libregf_file_open(libregf_file_t *file, const char *filename, int access_flags, libregf_error_t **error);
int
libregf_file_close(libregf_file_t *file, libregf_error_t **error);
int
libregf_file_is_corrupted(libregf_file_t *file, libregf_error_t **error);
int
libregf_file_get_ascii_codepage(libregf_file_t *file, int *ascii_codepage, libregf_error_t **error);
int
libregf_file_set_ascii_codepage(libregf_file_t *file, int ascii_codepage, libregf_error_t **error);
int
libregf_file_get_format_version(libregf_file_t *file, uint32_t *major_version, uint32_t *minor_version, libregf_error_t **error);
int
libregf_file_get_type(libregf_file_t *file, uint32_t *file_type, libregf_error_t **error);
int
libregf_file_get_root_key(libregf_file_t *file, libregf_key_t **key, libregf_error_t **error);
int
libregf_file_get_key_by_utf8_path(libregf_file_t *file, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **key, libregf_error_t **error);
int
libregf_file_get_key_by_utf16_path(libregf_file_t *file, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **key, libregf_error_t **error);

Available when compiled with wide character string support:
int
libregf_file_open_wide(libregf_file_t *file, const wchar_t *filename, int access_flags, libregf_error_t **error);

Available when compiled with libbfio support:
int
libregf_file_open_file_io_handle(libregf_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libregf_error_t **error);

Key functions
int
libregf_key_free(libregf_key_t **key, libregf_error_t **error);
int
libregf_key_is_corrupted(libregf_key_t *key, libregf_error_t **error);
int
libregf_key_get_offset(libregf_key_t *key, off64_t *offset, libregf_error_t **error);
int
libregf_key_get_name_size(libregf_key_t *key, size_t *name_size, libregf_error_t **error);
int
libregf_key_get_name(libregf_key_t *key, uint8_t *name, size_t name_size, libregf_error_t **error);
int
libregf_key_get_utf8_name_size(libregf_key_t *key, size_t *utf8_string_size, libregf_error_t **error);
int
libregf_key_get_utf8_name(libregf_key_t *key, uint8_t *utf8_string, size_t utf8_string_size, libregf_error_t **error);
int
libregf_key_get_utf16_name_size(libregf_key_t *key, size_t *utf16_string_size, libregf_error_t **error);
int
libregf_key_get_utf16_name(libregf_key_t *key, uint16_t *utf16_string, size_t utf16_string_size, libregf_error_t **error);
int
libregf_key_get_class_name_size(libregf_key_t *key, size_t *class_name_size, libregf_error_t **error);
int
libregf_key_get_class_name(libregf_key_t *key, uint8_t *class_name, size_t class_name_size, libregf_error_t **error);
int
libregf_key_get_utf8_class_name_size(libregf_key_t *key, size_t *utf8_string_size, libregf_error_t **error);
int
libregf_key_get_utf8_class_name(libregf_key_t *key, uint8_t *utf8_string, size_t utf8_string_size, libregf_error_t **error);
int
libregf_key_get_utf16_class_name_size(libregf_key_t *key, size_t *utf16_string_size, libregf_error_t **error);
int
libregf_key_get_utf16_class_name(libregf_key_t *key, uint16_t *utf16_string, size_t utf16_string_size, libregf_error_t **error);
int
libregf_key_get_last_written_time(libregf_key_t *key, uint64_t *filetime, libregf_error_t **error);
int
libregf_key_get_security_descriptor_size(libregf_key_t *key, size_t *security_descriptor_size, libregf_error_t **error);
int
libregf_key_get_security_descriptor(libregf_key_t *key, uint8_t *security_descriptor, size_t security_descriptor_size, libregf_error_t **error);
int
libregf_key_get_number_of_values(libregf_key_t *key, int *number_of_values, libregf_error_t **error);
int
libregf_key_get_value(libregf_key_t *key, int value_index, libregf_value_t **value, libregf_error_t **error);
int
libregf_key_get_value_by_utf8_name(libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_value_t **value, libregf_error_t **error);
int
libregf_key_get_value_by_utf16_name(libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_value_t **value, libregf_error_t **error);
int
libregf_key_get_number_of_sub_keys(libregf_key_t *key, int *number_of_sub_keys, libregf_error_t **error);
int
libregf_key_get_sub_key(libregf_key_t *key, int sub_key_index, libregf_key_t **sub_key, libregf_error_t **error);
int
libregf_key_get_sub_key_by_utf8_name(libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **sub_key, libregf_error_t **error);
int
libregf_key_get_sub_key_by_utf8_path(libregf_key_t *key, const uint8_t *utf8_string, size_t utf8_string_length, libregf_key_t **sub_key, libregf_error_t **error);
int
libregf_key_get_sub_key_by_utf16_name(libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **sub_key, libregf_error_t **error);
int
libregf_key_get_sub_key_by_utf16_path(libregf_key_t *key, const uint16_t *utf16_string, size_t utf16_string_length, libregf_key_t **sub_key, libregf_error_t **error);

Value functions
int
libregf_value_free(libregf_value_t **value, libregf_error_t **error);
int
libregf_value_is_corrupted(libregf_value_t *value, libregf_error_t **error);
int
libregf_value_get_offset(libregf_value_t *value, off64_t *offset, libregf_error_t **error);
int
libregf_value_get_name_size(libregf_value_t *value, size_t *name_size, libregf_error_t **error);
int
libregf_value_get_name(libregf_value_t *value, uint8_t *name, size_t name_size, libregf_error_t **error);
int
libregf_value_get_utf8_name_size(libregf_value_t *value, size_t *utf8_string_size, libregf_error_t **error);
int
libregf_value_get_utf8_name(libregf_value_t *value, uint8_t *utf8_string, size_t utf8_string_size, libregf_error_t **error);
int
libregf_value_get_utf16_name_size(libregf_value_t *value, size_t *utf16_string_size, libregf_error_t **error);
int
libregf_value_get_utf16_name(libregf_value_t *value, uint16_t *utf16_string, size_t utf16_string_size, libregf_error_t **error);
int
libregf_value_get_value_type(libregf_value_t *value, uint32_t *value_type, libregf_error_t **error);
int
libregf_value_get_value_data_size(libregf_value_t *value, size_t *value_data_size, libregf_error_t **error);
int
libregf_value_get_value_data(libregf_value_t *value, uint8_t *value_data, size_t value_data_size, libregf_error_t **error);
int
libregf_value_get_value_32bit(libregf_value_t *value, uint32_t *value_32bit, libregf_error_t **error);
int
libregf_value_get_value_64bit(libregf_value_t *value, uint64_t *value_64bit, libregf_error_t **error);
int
libregf_value_get_value_utf8_string_size(libregf_value_t *value, size_t *utf8_string_size, libregf_error_t **error);
int
libregf_value_get_value_utf8_string(libregf_value_t *value, uint8_t *utf8_string, size_t utf8_string_size, libregf_error_t **error);
int
libregf_value_get_value_utf16_string_size(libregf_value_t *value, size_t *utf16_string_size, libregf_error_t **error);
int
libregf_value_get_value_utf16_string(libregf_value_t *value, uint16_t *utf16_string, size_t utf16_string_size, libregf_error_t **error);
int
libregf_value_get_value_binary_data_size(libregf_value_t *value, size_t *size, libregf_error_t **error);
int
libregf_value_get_value_binary_data(libregf_value_t *value, uint8_t *binary_data, size_t size, libregf_error_t **error);
int
libregf_value_get_value_multi_string(libregf_value_t *value, libregf_multi_string_t **multi_string, libregf_error_t **error);

Multi string functions
int
libregf_multi_string_free(libregf_multi_string_t **multi_string, libregf_error_t **error);
int
libregf_multi_string_get_number_of_strings(libregf_multi_string_t *multi_string, int *number_of_strings, libregf_error_t **error);
int
libregf_multi_string_get_utf8_string_size(libregf_multi_string_t *multi_string, int string_index, size_t *utf8_string_size, libregf_error_t **error);
int
libregf_multi_string_get_utf8_string(libregf_multi_string_t *multi_string, int string_index, uint8_t *utf8_string, size_t utf8_string_size, libregf_error_t **error);
int
libregf_multi_string_get_utf16_string_size(libregf_multi_string_t *multi_string, int string_index, size_t *utf16_string_size, libregf_error_t **error);
int
libregf_multi_string_get_utf16_string(libregf_multi_string_t *multi_string, int string_index, uint16_t *utf16_string, size_t utf16_string_size, libregf_error_t **error);

DESCRIPTION
The libregf_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 "libregf.h".

ENVIRONMENT
None

FILES
None

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

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

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

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

AUTHOR
These man pages are generated from "libregf.h".

COPYRIGHT
Copyright (C) 2009-2020, 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 libregf.h include file