RtlDosPathNameToNtPathName_U_WithStatus() is not available on Windows XP.
PRTLP_CURDIR_REF CurDirRef;
} RTL_RELATIVE_NAME_U, *PRTL_RELATIVE_NAME_U;
+extern BOOLEAN (WINAPI *func_RtlDosPathNameToNtPathName_U)
+ (IN PCWSTR DosName,
+ OUT PUNICODE_STRING NtName,
+ OUT PCWSTR *PartName,
+ OUT PRTL_RELATIVE_NAME_U RelativeName);
+
extern NTSTATUS (WINAPI *func_RtlDosPathNameToNtPathName_U_WithStatus)
(IN PCWSTR DosName,
OUT PUNICODE_STRING NtName,
/* Open handle to the target directory (possibly creating it). */
- status = (*func_RtlDosPathNameToNtPathName_U_WithStatus)(ctx->common.target,
- &ctx->target_ntpath,
- NULL, NULL);
+ if (func_RtlDosPathNameToNtPathName_U_WithStatus) {
+ status = (*func_RtlDosPathNameToNtPathName_U_WithStatus)(ctx->common.target,
+ &ctx->target_ntpath,
+ NULL, NULL);
+ } else {
+ if ((*func_RtlDosPathNameToNtPathName_U)(ctx->common.target,
+ &ctx->target_ntpath,
+ NULL, NULL))
+ status = STATUS_SUCCESS;
+ else
+ status = STATUS_NO_MEMORY;
+ }
if (!NT_SUCCESS(status)) {
if (status == STATUS_NO_MEMORY) {
return WIMLIB_ERR_NOMEM;
DWORD (WINAPI *func_RtlNtStatusToDosError)(NTSTATUS status);
+BOOLEAN (WINAPI *func_RtlDosPathNameToNtPathName_U)
+ (IN PCWSTR DosName,
+ OUT PUNICODE_STRING NtName,
+ OUT PCWSTR *PartName,
+ OUT PRTL_RELATIVE_NAME_U RelativeName);
+
NTSTATUS (WINAPI *func_RtlDosPathNameToNtPathName_U_WithStatus)
(IN PCWSTR DosName,
OUT PUNICODE_STRING NtName,
DLL_SYM(NtClose, true),
DLL_SYM(RtlNtStatusToDosError, true),
DLL_SYM(RtlCreateSystemVolumeInformationFolder, false),
- DLL_SYM(RtlDosPathNameToNtPathName_U_WithStatus, true),
+ DLL_SYM(RtlDosPathNameToNtPathName_U, true),
+ DLL_SYM(RtlDosPathNameToNtPathName_U_WithStatus, false), /* Not present on XP */
{NULL, NULL},
},
};