1ZIP_SOURCE_WIN32HANDL... BSD Library Functions Manual ZIP_SOURCE_WIN32HANDL...
2
4 zip_source_win32handle, zip_source_win32handle_create — create data
5 source from a Windows file handle
6
8 libzip (-lzip)
9
11 #include <zip.h>
12
13 zip_source_t *
14 zip_source_win32handle(zip_t *archive, HANDLE h, zip_uint64_t start,
15 zip_int64_t len);
16
17 zip_source_t *
18 zip_source_win32handle_create(HANDLE h, zip_uint64_t start,
19 zip_int64_t len, zip_error_t *error);
20
22 The functions zip_source_win32handle() and
23 zip_source_win32handle_create() create a zip source from a Windows file
24 handle. They open fname and read len bytes from offset start from it.
25 If len is 0 or -1, the whole file (starting from start) is used.
26
27 If the file supports seek, the source can be used to open a zip archive
28 from.
29
30 The file is opened and read when the data from the source is used, usu‐
31 ally by zip_close() or zip_open_from_source().
32
34 Upon successful completion, the created source is returned. Otherwise,
35 NULL is returned and the error code in archive or error is set to indi‐
36 cate the error.
37
39 zip_source_w32handle() and zip_source_w32handle_create() fail if:
40
41 [ZIP_ER_INVAL] fname, start, or len are invalid.
42
43 [ZIP_ER_MEMORY] Required memory could not be allocated.
44
45 [ZIP_ER_OPEN] Opening fname failed.
46
48 libzip(3), zip_file_add(3), zip_file_replace(3), zip_source(3),
49 zip_source_win32a(3), zip_source_win32w(3)
50
52 zip_source_win32handle() and zip_source_win32handle_create() were added
53 in libzip 1.0.
54
56 Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
57
58BSD December 18, 2017 BSD