.Dd June 26, 2026 .Dt LIBQCOW 3 .Os .Sh NAME .Nm libqcow.h .Nd Library to access the QEMU Copy-On-Write (QCOW) image file format .Sh SYNOPSIS .In libqcow.h .Pp Support functions .nf .Ft const char * .Fo libqcow_get_version .Fa "void" .Fc .fi .nf .Ft int .Fo libqcow_get_access_flags_read .Fa "void" .Fc .fi .nf .Ft int .Fo libqcow_get_access_flags_read_write .Fa "void" .Fc .fi .nf .Ft int .Fo libqcow_get_access_flags_write .Fa "void" .Fc .fi .nf .Ft int .Fo libqcow_get_codepage .Fa "int *codepage" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_set_codepage .Fa "int codepage" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_check_file_signature .Fa "const char *filename" .Fa "libqcow_error_t **error" .Fc .fi .Pp Available when compiled with wide character string support: .nf .Ft int .Fo libqcow_check_file_signature_wide .Fa "const wchar_t *filename" .Fa "libqcow_error_t **error" .Fc .fi .Pp Available when compiled with libbfio support: .nf .Ft int .Fo libqcow_check_file_signature_file_io_handle .Fa "libbfio_handle_t *bfio_handle" .Fa "libqcow_error_t **error" .Fc .fi .Pp Notify functions .nf .Ft void .Fo libqcow_notify_set_verbose .Fa "int verbose" .Fc .fi .nf .Ft int .Fo libqcow_notify_set_stream .Fa "FILE *stream" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_notify_stream_open .Fa "const char *filename" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_notify_stream_close .Fa "libqcow_error_t **error" .Fc .fi .Pp Error functions .nf .Ft void .Fo libqcow_error_free .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_error_fprint .Fa "libqcow_error_t *error" .Fa "FILE *stream" .Fc .fi .nf .Ft int .Fo libqcow_error_sprint .Fa "libqcow_error_t *error" .Fa "char *string" .Fa "size_t size" .Fc .fi .nf .Ft int .Fo libqcow_error_backtrace_fprint .Fa "libqcow_error_t *error" .Fa "FILE *stream" .Fc .fi .nf .Ft int .Fo libqcow_error_backtrace_sprint .Fa "libqcow_error_t *error" .Fa "char *string" .Fa "size_t size" .Fc .fi .Pp File functions .nf .Ft int .Fo libqcow_file_initialize .Fa "libqcow_file_t **file" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_free .Fa "libqcow_file_t **file" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_signal_abort .Fa "libqcow_file_t *file" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_open .Fa "libqcow_file_t *file" .Fa "const char *filename" .Fa "int access_flags" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_close .Fa "libqcow_file_t *file" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_is_locked .Fa "libqcow_file_t *file" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft ssize_t .Fo libqcow_file_read_buffer .Fa "libqcow_file_t *file" .Fa "void *buffer" .Fa "size_t buffer_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft ssize_t .Fo libqcow_file_read_buffer_at_offset .Fa "libqcow_file_t *file" .Fa "void *buffer" .Fa "size_t buffer_size" .Fa "off64_t offset" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft off64_t .Fo libqcow_file_seek_offset .Fa "libqcow_file_t *file" .Fa "off64_t offset" .Fa "int whence" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_offset .Fa "libqcow_file_t *file" .Fa "off64_t *offset" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_set_parent_file .Fa "libqcow_file_t *file" .Fa "libqcow_file_t *parent_file" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_format_version .Fa "libqcow_file_t *file" .Fa "uint32_t *format_version" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_encryption_method .Fa "libqcow_file_t *file" .Fa "uint32_t *encryption_method" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_set_keys .Fa "libqcow_file_t *file" .Fa "const uint8_t *key" .Fa "size_t key_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_set_utf8_password .Fa "libqcow_file_t *file" .Fa "const uint8_t *utf8_string" .Fa "size_t utf8_string_length" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_set_utf16_password .Fa "libqcow_file_t *file" .Fa "const uint16_t *utf16_string" .Fa "size_t utf16_string_length" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_media_size .Fa "libqcow_file_t *file" .Fa "size64_t *media_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_utf8_backing_filename_size .Fa "libqcow_file_t *file" .Fa "size_t *utf8_string_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_utf8_backing_filename .Fa "libqcow_file_t *file" .Fa "uint8_t *utf8_string" .Fa "size_t utf8_string_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_utf16_backing_filename_size .Fa "libqcow_file_t *file" .Fa "size_t *utf16_string_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_utf16_backing_filename .Fa "libqcow_file_t *file" .Fa "uint16_t *utf16_string" .Fa "size_t utf16_string_size" .Fa "libqcow_error_t **error" .Fc .fi .nf .Ft int .Fo libqcow_file_get_number_of_snapshots .Fa "libqcow_file_t *file" .Fa "int *number_of_snapshots" .Fa "libqcow_error_t **error" .Fc .fi .Pp Available when compiled with wide character string support: .nf .Ft int .Fo libqcow_file_open_wide .Fa "libqcow_file_t *file" .Fa "const wchar_t *filename" .Fa "int access_flags" .Fa "libqcow_error_t **error" .Fc .fi .Pp Available when compiled with libbfio support: .nf .Ft int .Fo libqcow_file_open_file_io_handle .Fa "libqcow_file_t *file" .Fa "libbfio_handle_t *file_io_handle" .Fa "int access_flags" .Fa "libqcow_error_t **error" .Fc .fi .Sh DESCRIPTION The .Fn libqcow_get_version function is used to retrieve the library version. .Sh RETURN VALUES Most of the functions return NULL or \-1 on error, dependent on the return \ type. For the actual return values see .In libqcow.h . .Sh ENVIRONMENT None .Sh FILES None .Sh NOTES libqcow can be compiled with wide character support (wchar_t). .sp To compile libqcow with wide character support use: .Ar ./configure --enable-wide-character-type or define: .Ar _UNICODE or .Ar UNICODE during compilation. .sp .Ar LIBQCOW_WIDE_CHARACTER_TYPE in libqcow/features.h can be used to determine if libqcow was compiled with \ wide character support. .Sh SEE ALSO .In libqcow.h .Sh AUTHORS .An Joachim Metz .Sh BUGS Please report bugs of any kind on the project issue tracker: \ https://github.com/libyal/libqcow/issues .Sh COPYRIGHT Copyright (C) 2010-2026, Joachim Metz . .sp This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A \ PARTICULAR PURPOSE.