mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-24 19:54:25 -04:00
parent
7ff5b3ca6e
commit
d1eccbd107
6 changed files with 48 additions and 27 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue