[ui] disable initial update policy prompt if executable is called "rufus.exe"

This commit is contained in:
Pete Batard 2012-12-16 22:42:30 +00:00
parent 303f35d5f1
commit d01749004c
4 changed files with 40 additions and 13 deletions

View file

@ -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;