diff options
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Dlgcode.c | 16 | ||||
-rw-r--r-- | src/Common/Random.c | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 7b3d2d45..2c707f5d 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -14549,3 +14549,6 @@ static bool RunAsDesktopUser( - SetThreadToken (NULL, NULL); + if (!SetThreadToken(NULL, NULL)) + { + goto cleanup; + } @@ -14635,3 +14638,6 @@ cleanup: if (hThreadToken) CloseHandle(hThreadToken); - RevertToSelf (); + + if (!RevertToSelf()) + return false; + if (!retval) @@ -15043,3 +15049,3 @@ BOOL GenericDropTarget::Register(HWND hWnd) if(NULL == hWnd) - return E_FAIL; + return FALSE; @@ -15264,3 +15270,3 @@ DWORD PasswordEditDropTarget::GotEnter(void) if (hChild && GetClassName (hChild, szClassName, ARRAYSIZE (szClassName)) && (0 == _tcsicmp (szClassName, _T("EDIT"))) - && (dwStyles = GetWindowLong (hChild, GWL_STYLE)) && !(dwStyles & ES_NUMBER) + && (dwStyles = GetWindowLongPtr (hChild, GWL_STYLE)) && !(dwStyles & ES_NUMBER) && (maxLen = (int) SendMessage (hChild, EM_GETLIMITTEXT, 0, 0)) && (maxLen == MAX_PASSWORD || maxLen == MAX_LEGACY_PASSWORD) @@ -15289,3 +15295,3 @@ void PasswordEditDropTarget::GotDrop(CLIPFORMAT format) if (hChild && GetClassName (hChild, szClassName, ARRAYSIZE (szClassName)) && (0 == _tcsicmp (szClassName, _T("EDIT"))) - && (dwStyles = GetWindowLong (hChild, GWL_STYLE)) && !(dwStyles & ES_NUMBER) + && (dwStyles = GetWindowLongPtr (hChild, GWL_STYLE)) && !(dwStyles & ES_NUMBER) && (maxLen = (int) SendMessage (hChild, EM_GETLIMITTEXT, 0, 0)) && (maxLen == MAX_PASSWORD || maxLen == MAX_LEGACY_PASSWORD) diff --git a/src/Common/Random.c b/src/Common/Random.c index c44c69d7..d5c09848 100644 --- a/src/Common/Random.c +++ b/src/Common/Random.c @@ -874,3 +874,3 @@ BOOL FastPoll (void) memoryStatus.dwLength = sizeof (MEMORYSTATUS); - GlobalMemoryStatus (&memoryStatus); + GlobalMemoryStatusEx (&memoryStatus); RandaddBuf ((unsigned char *) &memoryStatus, sizeof (MEMORYSTATUS)); |