]> wimlib.net Git - wimlib/blobdiff - include/wimlib/win32_common.h
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / include / wimlib / win32_common.h
index df8b0cb7703df650d6d089d4631d2457e9b3cfc5..46faf6ac6dd086059f1822af18b117c9ffcf9f7c 100644 (file)
@@ -30,7 +30,9 @@ typedef struct _RTL_RELATIVE_NAME_U {
        PRTLP_CURDIR_REF CurDirRef;
 } RTL_RELATIVE_NAME_U, *PRTL_RELATIVE_NAME_U;
 
-#define FSCTL_SET_PERSISTENT_VOLUME_STATE 0x90238
+#ifndef FSCTL_SET_PERSISTENT_VOLUME_STATE
+#define FSCTL_SET_PERSISTENT_VOLUME_STATE \
+       CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 142, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define PERSISTENT_VOLUME_STATE_SHORT_NAME_CREATION_DISABLED 0x00000001
 
@@ -40,6 +42,7 @@ typedef struct _FILE_FS_PERSISTENT_VOLUME_INFORMATION {
        ULONG Version;
        ULONG Reserved;
 } FILE_FS_PERSISTENT_VOLUME_INFORMATION, *PFILE_FS_PERSISTENT_VOLUME_INFORMATION;
+#endif /* FSCTL_SET_PERSISTENT_VOLUME_STATE */
 
 /* ntdll functions  */
 
@@ -95,6 +98,31 @@ NtSetSecurityObject(IN HANDLE Handle,
                     IN SECURITY_INFORMATION SecurityInformation,
                     IN PSECURITY_DESCRIPTOR SecurityDescriptor);
 
+NTSTATUS
+NTAPI
+NtOpenSymbolicLinkObject(PHANDLE LinkHandle,
+                        ACCESS_MASK DesiredAccess,
+                        POBJECT_ATTRIBUTES ObjectAttributes);
+
+NTSTATUS
+NTAPI
+NtQueryEaFile(IN HANDLE FileHandle,
+             OUT PIO_STATUS_BLOCK IoStatusBlock,
+             OUT PVOID Buffer,
+             IN ULONG Length,
+             IN BOOLEAN ReturnSingleEntry,
+             IN PVOID EaList OPTIONAL,
+             IN ULONG EaListLength,
+             IN PULONG EaIndex OPTIONAL,
+             IN BOOLEAN RestartScan);
+
+NTSTATUS
+NTAPI
+NtSetEaFile(IN HANDLE FileHandle,
+           OUT PIO_STATUS_BLOCK IoStatusBlock,
+           OUT PVOID Buffer,
+           IN ULONG Length);
+
 /* Dynamically loaded ntdll functions */
 
 extern NTSTATUS (WINAPI *func_RtlDosPathNameToNtPathName_U_WithStatus)
@@ -108,28 +136,28 @@ extern NTSTATUS (WINAPI *func_RtlCreateSystemVolumeInformationFolder)
 
 /* Other utility functions */
 
-extern int
+int
 win32_path_to_nt_path(const wchar_t *win32_path, UNICODE_STRING *nt_path);
 
-extern int
+int
 win32_get_drive_path(const wchar_t *file_path, wchar_t drive_path[7]);
 
-extern bool
+bool
 win32_try_to_attach_wof(const wchar_t *drive);
 
-extern void
-win32_warning(DWORD err, const wchar_t *format, ...) _cold_attribute;
+void __attribute__((cold))
+win32_warning(DWORD err, const wchar_t *format, ...);
 
-extern void
-win32_error(DWORD err, const wchar_t *format, ...) _cold_attribute;
+void __attribute__((cold))
+win32_error(DWORD err, const wchar_t *format, ...);
 
-extern void
-winnt_warning(NTSTATUS status, const wchar_t *format, ...) _cold_attribute;
+void __attribute__((cold))
+winnt_warning(NTSTATUS status, const wchar_t *format, ...);
 
-extern void
-winnt_error(NTSTATUS status, const wchar_t *format, ...) _cold_attribute;
+void __attribute__((cold))
+winnt_error(NTSTATUS status, const wchar_t *format, ...);
 
-extern NTSTATUS
+NTSTATUS
 winnt_fsctl(HANDLE h, u32 code, const void *in, u32 in_size,
            void *out, u32 out_size_avail, u32 *actual_out_size_ret);