1 #ifndef _WIMLIB_WIN32_COMMON_H
2 #define _WIMLIB_WIN32_COMMON_H
9 #include "wimlib/types.h"
10 #include "wimlib/win32.h"
13 #ifdef ENABLE_ERROR_MESSAGES
15 win32_error(DWORD err_code);
18 win32_error(DWORD err_code)
24 set_errno_from_GetLastError(void);
27 win32_path_is_root_of_drive(const wchar_t *path);
30 win32_error_to_errno(DWORD err_code);
33 win32_get_vol_flags(const wchar_t *path, unsigned *vol_flags_ret,
34 bool *supports_SetFileShortName_ret);
37 win32_open_existing_file(const wchar_t *path, DWORD dwDesiredAccess);
40 win32_open_file_data_only(const wchar_t *path);
43 extern HANDLE (WINAPI *win32func_FindFirstStreamW)(LPCWSTR lpFileName,
44 STREAM_INFO_LEVELS InfoLevel,
45 LPVOID lpFindStreamData,
49 extern BOOL (WINAPI *win32func_FindNextStreamW)(HANDLE hFindStream,
50 LPVOID lpFindStreamData);
53 extern BOOL (WINAPI *win32func_CreateSymbolicLinkW)(const wchar_t *lpSymlinkFileName,
54 const wchar_t *lpTargetFileName,
58 windows_version_is_at_least(unsigned major, unsigned minor);
60 #define running_on_windows_xp_or_later() \
61 windows_version_is_at_least(5, 1)
63 #define running_on_windows_vista_or_later() \
64 windows_version_is_at_least(6, 0)
66 #define running_on_windows_7_or_later() \
67 windows_version_is_at_least(6, 1)
71 #endif /* _WIMLIB_WIN32_COMMON_H */