| 1 |
.Dd December 12, 2020 |
| 2 |
.Dt libvhdi 3 |
| 3 |
.Os libvhdi |
| 4 |
.Sh NAME |
| 5 |
.Nm libvhdi.h |
| 6 |
.Nd Library to access the Virtual Hard Disk (VHD) image format |
| 7 |
.Sh SYNOPSIS |
| 8 |
.In libvhdi.h |
| 9 |
.Pp |
| 10 |
Support functions |
| 11 |
.Ft const char * |
| 12 |
.Fn libvhdi_get_version "void" |
| 13 |
.Ft int |
| 14 |
.Fn libvhdi_get_access_flags_read "void" |
| 15 |
.Ft int |
| 16 |
.Fn libvhdi_get_access_flags_read_write "void" |
| 17 |
.Ft int |
| 18 |
.Fn libvhdi_get_access_flags_write "void" |
| 19 |
.Ft int |
| 20 |
.Fn libvhdi_get_codepage "int *codepage" "libvhdi_error_t **error" |
| 21 |
.Ft int |
| 22 |
.Fn libvhdi_set_codepage "int codepage" "libvhdi_error_t **error" |
| 23 |
.Ft int |
| 24 |
.Fn libvhdi_check_file_signature "const char *filename" "libvhdi_error_t **error" |
| 25 |
.Pp |
| 26 |
Available when compiled with wide character string support: |
| 27 |
.Ft int |
| 28 |
.Fn libvhdi_check_file_signature_wide "const wchar_t *filename" "libvhdi_error_t **error" |
| 29 |
.Pp |
| 30 |
Available when compiled with libbfio support: |
| 31 |
.Ft int |
| 32 |
.Fn libvhdi_check_file_signature_file_io_handle "libbfio_handle_t *file_io_handle" "libvhdi_error_t **error" |
| 33 |
.Pp |
| 34 |
Notify functions |
| 35 |
.Ft void |
| 36 |
.Fn libvhdi_notify_set_verbose "int verbose" |
| 37 |
.Ft int |
| 38 |
.Fn libvhdi_notify_set_stream "FILE *stream" "libvhdi_error_t **error" |
| 39 |
.Ft int |
| 40 |
.Fn libvhdi_notify_stream_open "const char *filename" "libvhdi_error_t **error" |
| 41 |
.Ft int |
| 42 |
.Fn libvhdi_notify_stream_close "libvhdi_error_t **error" |
| 43 |
.Pp |
| 44 |
Error functions |
| 45 |
.Ft void |
| 46 |
.Fn libvhdi_error_free "libvhdi_error_t **error" |
| 47 |
.Ft int |
| 48 |
.Fn libvhdi_error_fprint "libvhdi_error_t *error" "FILE *stream" |
| 49 |
.Ft int |
| 50 |
.Fn libvhdi_error_sprint "libvhdi_error_t *error" "char *string" "size_t size" |
| 51 |
.Ft int |
| 52 |
.Fn libvhdi_error_backtrace_fprint "libvhdi_error_t *error" "FILE *stream" |
| 53 |
.Ft int |
| 54 |
.Fn libvhdi_error_backtrace_sprint "libvhdi_error_t *error" "char *string" "size_t size" |
| 55 |
.Pp |
| 56 |
File functions |
| 57 |
.Ft int |
| 58 |
.Fn libvhdi_file_initialize "libvhdi_file_t **file" "libvhdi_error_t **error" |
| 59 |
.Ft int |
| 60 |
.Fn libvhdi_file_free "libvhdi_file_t **file" "libvhdi_error_t **error" |
| 61 |
.Ft int |
| 62 |
.Fn libvhdi_file_signal_abort "libvhdi_file_t *file" "libvhdi_error_t **error" |
| 63 |
.Ft int |
| 64 |
.Fn libvhdi_file_open "libvhdi_file_t *file" "const char *filename" "int access_flags" "libvhdi_error_t **error" |
| 65 |
.Ft int |
| 66 |
.Fn libvhdi_file_close "libvhdi_file_t *file" "libvhdi_error_t **error" |
| 67 |
.Ft ssize_t |
| 68 |
.Fn libvhdi_file_read_buffer "libvhdi_file_t *file" "void *buffer" "size_t buffer_size" "libvhdi_error_t **error" |
| 69 |
.Ft ssize_t |
| 70 |
.Fn libvhdi_file_read_buffer_at_offset "libvhdi_file_t *file" "void *buffer" "size_t buffer_size" "off64_t offset" "libvhdi_error_t **error" |
| 71 |
.Ft off64_t |
| 72 |
.Fn libvhdi_file_seek_offset "libvhdi_file_t *file" "off64_t offset" "int whence" "libvhdi_error_t **error" |
| 73 |
.Ft int |
| 74 |
.Fn libvhdi_file_get_offset "libvhdi_file_t *file" "off64_t *offset" "libvhdi_error_t **error" |
| 75 |
.Ft int |
| 76 |
.Fn libvhdi_file_set_parent_file "libvhdi_file_t *file" "libvhdi_file_t *parent_file" "libvhdi_error_t **error" |
| 77 |
.Pp |
| 78 |
Available when compiled with wide character string support: |
| 79 |
.Ft int |
| 80 |
.Fn libvhdi_file_open_wide "libvhdi_file_t *file" "const wchar_t *filename" "int access_flags" "libvhdi_error_t **error" |
| 81 |
.Pp |
| 82 |
Available when compiled with libbfio support: |
| 83 |
.Ft int |
| 84 |
.Fn libvhdi_file_open_file_io_handle "libvhdi_file_t *file" "libbfio_handle_t *file_io_handle" "int access_flags" "libvhdi_error_t **error" |
| 85 |
.Pp |
| 86 |
Meta data functions |
| 87 |
.Ft int |
| 88 |
.Fn libvhdi_file_get_file_type "libvhdi_file_t *file" "int *file_type" "libvhdi_error_t **error" |
| 89 |
.Ft int |
| 90 |
.Fn libvhdi_file_get_format_version "libvhdi_file_t *file" "uint16_t *major_version" "uint16_t *minor_version" "libvhdi_error_t **error" |
| 91 |
.Ft int |
| 92 |
.Fn libvhdi_file_get_disk_type "libvhdi_file_t *file" "uint32_t *disk_type" "libvhdi_error_t **error" |
| 93 |
.Ft int |
| 94 |
.Fn libvhdi_file_get_media_size "libvhdi_file_t *file" "size64_t *media_size" "libvhdi_error_t **error" |
| 95 |
.Ft int |
| 96 |
.Fn libvhdi_file_get_bytes_per_sector "libvhdi_file_t *file" "uint32_t *bytes_per_sector" "libvhdi_error_t **error" |
| 97 |
.Ft int |
| 98 |
.Fn libvhdi_file_get_identifier "libvhdi_file_t *file" "uint8_t *guid_data" "size_t guid_data_size" "libvhdi_error_t **error" |
| 99 |
.Ft int |
| 100 |
.Fn libvhdi_file_get_parent_identifier "libvhdi_file_t *file" "uint8_t *guid_data" "size_t guid_data_size" "libvhdi_error_t **error" |
| 101 |
.Ft int |
| 102 |
.Fn libvhdi_file_get_utf8_parent_filename_size "libvhdi_file_t *file" "size_t *utf8_string_size" "libvhdi_error_t **error" |
| 103 |
.Ft int |
| 104 |
.Fn libvhdi_file_get_utf8_parent_filename "libvhdi_file_t *file" "uint8_t *utf8_string" "size_t utf8_string_size" "libvhdi_error_t **error" |
| 105 |
.Ft int |
| 106 |
.Fn libvhdi_file_get_utf16_parent_filename_size "libvhdi_file_t *file" "size_t *utf16_string_size" "libvhdi_error_t **error" |
| 107 |
.Ft int |
| 108 |
.Fn libvhdi_file_get_utf16_parent_filename "libvhdi_file_t *file" "uint16_t *utf16_string" "size_t utf16_string_size" "libvhdi_error_t **error" |
| 109 |
.Sh DESCRIPTION |
| 110 |
The |
| 111 |
.Fn libvhdi_get_version |
| 112 |
function is used to retrieve the library version. |
| 113 |
.Sh RETURN VALUES |
| 114 |
Most of the functions return NULL or \-1 on error, dependent on the return type. |
| 115 |
For the actual return values see "libvhdi.h". |
| 116 |
.Sh ENVIRONMENT |
| 117 |
None |
| 118 |
.Sh FILES |
| 119 |
None |
| 120 |
.Sh NOTES |
| 121 |
libvhdi can be compiled with wide character support (wchar_t). |
| 122 |
.sp |
| 123 |
To compile libvhdi with wide character support use: |
| 124 |
.Ar ./configure --enable-wide-character-type=yes |
| 125 |
or define: |
| 126 |
.Ar _UNICODE |
| 127 |
or |
| 128 |
.Ar UNICODE |
| 129 |
during compilation. |
| 130 |
.sp |
| 131 |
.Ar LIBVHDI_WIDE_CHARACTER_TYPE |
| 132 |
in libvhdi/features.h can be used to determine if libvhdi was compiled with wide character support. |
| 133 |
.Sh BUGS |
| 134 |
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libvhdi/issues |
| 135 |
.Sh AUTHOR |
| 136 |
These man pages are generated from "libvhdi.h". |
| 137 |
.Sh COPYRIGHT |
| 138 |
Copyright (C) 2012-2025, Joachim Metz <[email protected]>. |
| 139 |
.sp |
| 140 |
This is free software; see the source for copying conditions. |
| 141 |
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 142 |
.Sh SEE ALSO |
| 143 |
the libvhdi.h include file |