1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
4 #include "wimlib_internal.h"
7 extern void win32_release_capture_privileges();
8 extern void win32_acquire_capture_privileges();
10 extern void win32_release_restore_privileges();
11 extern void win32_acquire_restore_privileges();
13 extern int win32_build_dentry_tree(struct wim_dentry **root_ret,
14 const mbchar *root_disk_path,
15 struct wim_lookup_table *lookup_table,
16 struct wim_security_data *sd,
17 const struct capture_config *config,
19 wimlib_progress_func_t progress_func,
22 extern int win32_read_file(const mbchar *filename, void *handle, u64 offset,
23 size_t size, void *buf);
24 extern void *win32_open_file_readonly(const void *path_utf16);
25 extern void win32_close_file(void *handle);
27 #ifdef ENABLE_ERROR_MESSAGES
28 extern void win32_error(u32 err);
30 # define win32_error(err)
33 #define FNM_PATHNAME 0x1
35 extern int fnmatch(const mbchar *pattern, const mbchar *string, int flags);
37 extern int win32_do_apply_dentry(const mbchar *output_path,
38 size_t output_path_len,
39 struct wim_dentry *dentry,
40 struct apply_args *args);
42 extern int win32_do_apply_dentry_timestamps(const mbchar *output_path,
43 size_t output_path_len,
44 const struct wim_dentry *dentry,
45 const struct apply_args *args);
47 extern int fsync(int fd);
49 extern unsigned win32_get_number_of_processors();
51 extern mbchar *realpath(const mbchar *path, mbchar *resolved_path);
53 /* Microsoft's swprintf() violates the C standard and they require programmers
54 * to do this weird define to get the correct function. */
55 #define swprintf _snwprintf
57 /* Use Microsoft's weird _mkdir() function instead of mkdir() */
58 #define mkdir(name, mode) _mkdir(name)
60 #endif /* _WIMLIB_WIN32_H */