[togo] fix bcdboot errors

* Closes #558
This commit is contained in:
Pete Batard 2015-08-22 23:23:08 +01:00
parent 7ff5b3ca6e
commit d1eccbd107
6 changed files with 48 additions and 27 deletions

View file

@ -433,6 +433,20 @@ static __inline UINT GetSystemDirectoryU(char* lpBuffer, UINT uSize)
return ret;
}
static __inline UINT GetSystemWindowsDirectoryU(char* lpBuffer, UINT uSize)
{
UINT ret = 0, err = ERROR_INVALID_DATA;
walloc(lpBuffer, uSize);
ret = GetSystemWindowsDirectoryW(wlpBuffer, uSize);
err = GetLastError();
if ((ret != 0) && ((ret = wchar_to_utf8_no_alloc(wlpBuffer, lpBuffer, uSize)) == 0)) {
err = GetLastError();
}
wfree(lpBuffer);
SetLastError(err);
return ret;
}
static __inline DWORD GetTempPathU(DWORD nBufferLength, char* lpBuffer)
{
DWORD ret = 0, err = ERROR_INVALID_DATA;