Scroll to navigation

libhibr(3) Library Functions Manual libhibr(3)

NAME

libhibr.hLibrary to access the Windows Hibernation File (hiberfil.sys) format

SYNOPSIS

#include <libhibr.h>

Support functions
const char *
libhibr_get_version(void);

int
libhibr_get_access_flags_read(void);

int
libhibr_get_access_flags_read_write(void);

int
libhibr_get_access_flags_write(void);

int
libhibr_get_codepage(int *codepage, libhibr_error_t **error);

int
libhibr_set_codepage(int codepage, libhibr_error_t **error);

int
libhibr_check_file_signature(const char *filename, libhibr_error_t **error);

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

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

Notify functions
void
libhibr_notify_set_verbose(int verbose);

int
libhibr_notify_set_stream(FILE *stream, libhibr_error_t **error);

int
libhibr_notify_stream_open(const char *filename, libhibr_error_t **error);

int
libhibr_notify_stream_close(libhibr_error_t **error);

Error functions
void
libhibr_error_free(libhibr_error_t **error);

int
libhibr_error_fprint(libhibr_error_t *error, FILE *stream);

int
libhibr_error_sprint(libhibr_error_t *error, char *string, size_t size);

int
libhibr_error_backtrace_fprint(libhibr_error_t *error, FILE *stream);

int
libhibr_error_backtrace_sprint(libhibr_error_t *error, char *string, size_t size);

File functions
int
libhibr_file_initialize(libhibr_file_t **file, libhibr_error_t **error);

int
libhibr_file_free(libhibr_file_t **file, libhibr_error_t **error);

int
libhibr_file_signal_abort(libhibr_file_t *file, libhibr_error_t **error);

int
libhibr_file_open(libhibr_file_t *file, const char *filename, int access_flags, libhibr_error_t **error);

int
libhibr_file_close(libhibr_file_t *file, libhibr_error_t **error);

ssize_t
libhibr_file_read_buffer(libhibr_file_t *file, void *buffer, size_t buffer_size, libhibr_error_t **error);

ssize_t
libhibr_file_read_buffer_at_offset(libhibr_file_t *file, void *buffer, size_t buffer_size, off64_t offset, libhibr_error_t **error);

off64_t
libhibr_file_seek_offset(libhibr_file_t *file, off64_t offset, int whence, libhibr_error_t **error);

int
libhibr_file_get_offset(libhibr_file_t *file, off64_t *offset, libhibr_error_t **error);

int
libhibr_file_get_media_size(libhibr_file_t *file, size64_t *media_size, libhibr_error_t **error);

Available when compiled with wide character string support:
int
libhibr_file_open_wide(libhibr_file_t *file, const wchar_t *filename, int access_flags, libhibr_error_t **error);

Available when compiled with libbfio support:
int
libhibr_file_open_file_io_handle(libhibr_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libhibr_error_t **error);

DESCRIPTION

The () 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 "libhibr.h".

ENVIRONMENT

None

FILES

None

NOTES

libhibr can be compiled with wide character support (wchar_t).

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

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

BUGS

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

AUTHOR

These man pages are generated from "libhibr.h".

COPYRIGHT

Copyright (C) 2012-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 libhibr.h include file

September 20, 2019 libhibr