]> wimlib.net Git - wimlib/blob - include/wimlib/win32.h
c8be8c80f8345f0d6a7dfa88e963a7990e763037
[wimlib] / include / wimlib / win32.h
1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
3
4 #ifndef __WIN32__
5 #  error "This header is for Win32 only"
6 #endif
7
8 #include "wimlib/callback.h"
9 #include "wimlib/types.h"
10
11 struct wim_lookup_table_entry;
12
13 extern int
14 read_winnt_file_prefix(const struct wim_lookup_table_entry *lte, u64 size,
15                        consume_data_callback_t cb, void *cb_ctx);
16
17 extern int
18 read_win32_encrypted_file_prefix(const struct wim_lookup_table_entry *lte,
19                                  u64 size,
20                                  consume_data_callback_t cb,
21                                  void *cb_ctx);
22
23 extern int
24 win32_global_init(int init_flags);
25
26 extern void
27 win32_global_cleanup(void);
28
29 extern int
30 fsync(int fd);
31
32 extern unsigned
33 win32_get_number_of_processors(void);
34
35 extern u64
36 win32_get_avail_memory(void);
37
38 extern tchar *
39 realpath(const tchar *path, tchar *resolved_path);
40
41 extern int
42 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
43
44 extern int
45 win32_truncate_replacement(const tchar *path, off_t size);
46
47 extern int
48 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
49
50 extern FILE *
51 win32_open_logfile(const wchar_t *path);
52
53 extern ssize_t
54 pread(int fd, void *buf, size_t count, off_t offset);
55
56 extern ssize_t
57 pwrite(int fd, const void *buf, size_t count, off_t offset);
58
59 #endif /* _WIMLIB_WIN32_H */