]> wimlib.net Git - wimlib/blobdiff - include/wimlib/win32_common.h
Windows: improved error messages
[wimlib] / include / wimlib / win32_common.h
index 7cd991ed9ad753113da5cf4d6793279f720beffd..f27a2d71be285a634185de1d0ba263a73656e370 100644 (file)
@@ -1,26 +1,22 @@
 #ifndef _WIMLIB_WIN32_COMMON_H
 #define _WIMLIB_WIN32_COMMON_H
 
+#include <ntstatus.h>
 #include <windows.h>
+#include <winternl.h>
+
 #ifdef ERROR
 #  undef ERROR
 #endif
-
 #include "wimlib/types.h"
 #include "wimlib/win32.h"
 
-#include <ntstatus.h>
-#include <winternl.h>
-
 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,
@@ -157,4 +153,19 @@ typedef struct _FILE_FS_PERSISTENT_VOLUME_INFORMATION {
 extern int
 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 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 */