1 #ifndef _WIMLIB_WIN32_COMMON_H
2 #define _WIMLIB_WIN32_COMMON_H
9 #include "wimlib/types.h"
10 #include "wimlib/win32.h"
13 set_errno_from_GetLastError(void);
16 set_errno_from_win32_error(DWORD err);
20 set_errno_from_nt_status(DWORD status);
24 win32_path_is_root_of_drive(const wchar_t *path);
27 win32_get_vol_flags(const wchar_t *path, unsigned *vol_flags_ret,
28 bool *supports_SetFileShortName_ret);
31 win32_open_existing_file(const wchar_t *path, DWORD dwDesiredAccess);
34 win32_open_file_data_only(const wchar_t *path);
37 extern HANDLE (WINAPI *win32func_FindFirstStreamW)(LPCWSTR lpFileName,
38 STREAM_INFO_LEVELS InfoLevel,
39 LPVOID lpFindStreamData,
43 extern BOOL (WINAPI *win32func_FindNextStreamW)(HANDLE hFindStream,
44 LPVOID lpFindStreamData);
47 extern BOOL (WINAPI *win32func_CreateSymbolicLinkW)(const wchar_t *lpSymlinkFileName,
48 const wchar_t *lpTargetFileName,
52 windows_version_is_at_least(unsigned major, unsigned minor);
54 #define running_on_windows_xp_or_later() \
55 windows_version_is_at_least(5, 1)
57 #define running_on_windows_vista_or_later() \
58 windows_version_is_at_least(6, 0)
60 #define running_on_windows_7_or_later() \
61 windows_version_is_at_least(6, 1)
65 #endif /* _WIMLIB_WIN32_COMMON_H */