]> wimlib.net Git - wimlib/blob - include/wimlib/win32.h
win32_capture.c: More improvements
[wimlib] / include / wimlib / win32.h
1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
3
4 #ifdef __WIN32__
5
6 #include "wimlib/callback.h"
7 #include "wimlib/types.h"
8 #include <direct.h>
9 #include <windef.h>
10
11 struct wim_lookup_table_entry;
12 struct iovec;
13
14 extern int
15 read_winnt_file_prefix(const struct wim_lookup_table_entry *lte, u64 size,
16                        consume_data_callback_t cb, void *cb_ctx);
17
18 extern int
19 read_win32_encrypted_file_prefix(const struct wim_lookup_table_entry *lte,
20                                  u64 size,
21                                  consume_data_callback_t cb,
22                                  void *cb_ctx);
23
24
25 extern int
26 win32_global_init(int init_flags);
27
28 extern void
29 win32_global_cleanup(void);
30
31 extern int
32 fsync(int fd);
33
34 extern unsigned
35 win32_get_number_of_processors(void);
36
37 extern u64
38 win32_get_avail_memory(void);
39
40 extern tchar *
41 realpath(const tchar *path, tchar *resolved_path);
42
43 typedef enum {
44         CODESET
45 } nl_item;
46
47 extern int
48 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
49
50 extern int
51 win32_truncate_replacement(const tchar *path, off_t size);
52
53 extern int
54 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
55
56 extern int
57 win32_get_file_and_vol_ids(const wchar_t *path, u64 *ino_ret, u64 *dev_ret);
58
59 extern ssize_t
60 pread(int fd, void *buf, size_t count, off_t offset);
61
62 extern ssize_t
63 pwrite(int fd, const void *buf, size_t count, off_t offset);
64
65 extern ssize_t
66 writev(int fd, const struct iovec *iov, int iovcnt);
67
68 #endif /* __WIN32__ */
69
70 #endif /* _WIMLIB_WIN32_H */