#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);
-#ifdef WITH_NTDLL
extern void
-set_errno_from_nt_status(DWORD status);
-#endif
+set_errno_from_nt_status(NTSTATUS status);
extern bool
win32_path_is_root_of_drive(const wchar_t *path);
const wchar_t *lpTargetFileName,
DWORD dwFlags);
+/* ntdll functions */
+
+extern NTSTATUS (WINAPI *func_NtQueryInformationFile)(HANDLE FileHandle,
+ PIO_STATUS_BLOCK IoStatusBlock,
+ PVOID FileInformation,
+ ULONG Length,
+ FILE_INFORMATION_CLASS FileInformationClass);
+
+extern NTSTATUS (WINAPI *func_NtQuerySecurityObject)(HANDLE handle,
+ SECURITY_INFORMATION SecurityInformation,
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ ULONG Length,
+ PULONG LengthNeeded);
+
+extern NTSTATUS (WINAPI *func_NtQueryDirectoryFile) (HANDLE FileHandle,
+ HANDLE Event,
+ PIO_APC_ROUTINE ApcRoutine,
+ PVOID ApcContext,
+ PIO_STATUS_BLOCK IoStatusBlock,
+ PVOID FileInformation,
+ ULONG Length,
+ FILE_INFORMATION_CLASS FileInformationClass,
+ BOOLEAN ReturnSingleEntry,
+ PUNICODE_STRING FileName,
+ BOOLEAN RestartScan);
+
+
+extern NTSTATUS (WINAPI *func_NtSetSecurityObject)(HANDLE Handle,
+ SECURITY_INFORMATION SecurityInformation,
+ PSECURITY_DESCRIPTOR SecurityDescriptor);
+
+extern DWORD (WINAPI *func_RtlNtStatusToDosError)(NTSTATUS status);
+
+extern NTSTATUS (WINAPI *func_RtlCreateSystemVolumeInformationFolder)
+ (PCUNICODE_STRING VolumeRootPath);
+
+
extern bool
windows_version_is_at_least(unsigned major, unsigned minor);