X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fwin32_common.h;h=0e2db43884392be2d7052bab22c27faba5d257ee;hp=e5317b614be2b4e861a0caca77a5ae3ae161e078;hb=0ae7e5538476723feb14f07a478b92210e24a21b;hpb=965c28d0cce2e43df3c38b47c78204b1c33c313d diff --git a/include/wimlib/win32_common.h b/include/wimlib/win32_common.h index e5317b61..0e2db438 100644 --- a/include/wimlib/win32_common.h +++ b/include/wimlib/win32_common.h @@ -1,26 +1,16 @@ #ifndef _WIMLIB_WIN32_COMMON_H #define _WIMLIB_WIN32_COMMON_H +#include #include +#include + #ifdef ERROR # undef ERROR #endif - #include "wimlib/types.h" #include "wimlib/win32.h" -#include -#include - -extern void -set_errno_from_GetLastError(void); - -extern void -set_errno_from_win32_error(DWORD err); - -extern void -set_errno_from_nt_status(NTSTATUS status); - /* ntdll functions */ extern NTSTATUS (WINAPI *func_NtCreateFile)(PHANDLE FileHandle, @@ -35,6 +25,10 @@ extern NTSTATUS (WINAPI *func_NtCreateFile)(PHANDLE FileHandle, PVOID EaBuffer, ULONG EaLength); +#ifndef FILE_OPENED +# define FILE_OPENED 0x00000001 +#endif + extern NTSTATUS (WINAPI *func_NtOpenFile) (PHANDLE FileHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, @@ -160,4 +154,19 @@ win32_path_to_nt_path(const wchar_t *win32_path, UNICODE_STRING *nt_path); extern int win32_get_drive_path(const wchar_t *file_path, wchar_t drive_path[7]); +extern bool +win32_try_to_attach_wof(const wchar_t *drive); + +extern void +win32_warning(DWORD err, const wchar_t *format, ...) _cold_attribute; + +extern void +win32_error(DWORD err, const wchar_t *format, ...) _cold_attribute; + +extern void +winnt_warning(NTSTATUS status, const wchar_t *format, ...) _cold_attribute; + +extern void +winnt_error(NTSTATUS status, const wchar_t *format, ...) _cold_attribute; + #endif /* _WIMLIB_WIN32_COMMON_H */