]> wimlib.net Git - wimlib/blob - include/wimlib/win32.h
resource reading cleanups
[wimlib] / include / wimlib / win32.h
1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
3
4 #ifdef __WIN32__
5
6 #include "wimlib/types.h"
7
8 struct blob_descriptor;
9 struct read_blob_callbacks;
10
11 extern int
12 read_winnt_stream_prefix(const struct blob_descriptor *blob, u64 size,
13                          const struct read_blob_callbacks *cbs);
14
15 extern int
16 read_win32_encrypted_file_prefix(const struct blob_descriptor *blob,
17                                  u64 size,
18                                  const struct read_blob_callbacks *cbs);
19
20 extern int
21 win32_global_init(int init_flags);
22
23 extern void
24 win32_global_cleanup(void);
25
26 extern int
27 fsync(int fd);
28
29 extern tchar *
30 realpath(const tchar *path, tchar *resolved_path);
31
32 extern int
33 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
34
35 extern int
36 win32_truncate_replacement(const tchar *path, off_t size);
37
38 extern int
39 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
40
41 extern FILE *
42 win32_open_logfile(const wchar_t *path);
43
44 extern ssize_t
45 pread(int fd, void *buf, size_t count, off_t offset);
46
47 extern ssize_t
48 pwrite(int fd, const void *buf, size_t count, off_t offset);
49
50 #endif /* __WIN32__ */
51
52 #endif /* _WIMLIB_WIN32_H */