mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[ui] disable initial update policy prompt if executable is called "rufus.exe"
This commit is contained in:
parent
303f35d5f1
commit
d01749004c
4 changed files with 40 additions and 13 deletions
|
@ -337,7 +337,7 @@ static __inline BOOL GetTextExtentPointU(HDC hdc, const char* lpString, LPSIZE l
|
|||
|
||||
static __inline DWORD GetCurrentDirectoryU(DWORD nBufferLength, char* lpBuffer)
|
||||
{
|
||||
DWORD ret = 0, err = ERROR_INVALID_DATA;
|
||||
DWORD ret = 0, err = ERROR_INVALID_DATA;
|
||||
walloc(lpBuffer, nBufferLength);
|
||||
ret = GetCurrentDirectoryW(nBufferLength, wlpBuffer);
|
||||
err = GetLastError();
|
||||
|
@ -349,6 +349,20 @@ static __inline DWORD GetCurrentDirectoryU(DWORD nBufferLength, char* lpBuffer)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static __inline DWORD GetModuleFileNameU(HMODULE hModule, char* lpFilename, DWORD nSize)
|
||||
{
|
||||
DWORD ret = 0, err = ERROR_INVALID_DATA;
|
||||
walloc(lpFilename, nSize);
|
||||
ret = GetModuleFileNameW(hModule, wlpFilename, nSize);
|
||||
err = GetLastError();
|
||||
if ((ret != 0) && ((ret = wchar_to_utf8_no_alloc(wlpFilename, lpFilename, nSize)) == 0)) {
|
||||
err = GetLastError();
|
||||
}
|
||||
wfree(lpFilename);
|
||||
SetLastError(err);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __inline DWORD GetFullPathNameU(const char* lpFileName, DWORD nBufferLength, char* lpBuffer, char** lpFilePart)
|
||||
{
|
||||
DWORD ret = 0, err = ERROR_INVALID_DATA;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue