[core] enable the direct provision of install.wim/install.esd for Windows To Go

* Also remove the use of 'unattend.xml' to disable the recovery environment (use bcdedit instead)
* Also some code cleanup and refactoring
This commit is contained in:
Pete Batard 2020-07-19 22:35:30 +01:00
parent 4617f91e3b
commit 34b1d8a3ca
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
12 changed files with 316 additions and 194 deletions

View file

@ -1130,6 +1130,26 @@ static __inline int _rmdirU(const char* dirname)
return ret;
}
static __inline BOOL MoveFileU(const char* lpExistingFileName, const char* lpNewFileName)
{
wconvert(lpExistingFileName);
wconvert(lpNewFileName);
BOOL ret = MoveFileW(wlpExistingFileName, wlpNewFileName);
wfree(lpNewFileName);
wfree(lpExistingFileName);
return ret;
}
static __inline BOOL MoveFileExU(const char* lpExistingFileName, const char* lpNewFileName, DWORD dwFlags)
{
wconvert(lpExistingFileName);
wconvert(lpNewFileName);
BOOL ret = MoveFileExW(wlpExistingFileName, wlpNewFileName, dwFlags);
wfree(lpNewFileName);
wfree(lpExistingFileName);
return ret;
}
// The following expects PropertyBuffer to contain a single Unicode string
static __inline BOOL SetupDiGetDeviceRegistryPropertyU(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
DWORD Property, PDWORD PropertyRegDataType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize)