NVDA no longer becomes unusable when interacting with a protected process such as 1Password (#18948)
Summary of the issue:
During the conversion to 64 bit, the ctypes definition of WaitForSingleObject was tightened up. This caused related errors in NVDA previously hidden to be surfaced, such as continuing to keep an appModule alive with an invalid process handle. this was addressed.
However, a similar issue was also surfaced where although we successfully open a process, asking for the SYNCHRONIZE access right, once we go to check if the process is dead by calling WaitforSingleObject(handle, 0) this fails with access denied. We never actually got the SYNCHRONIZE access right.
This is most serious when trying to interact with 1Password, where it becomes totally unusable and NVDA continuously torws the error:
File "appModuleHandler.pyc", line 622, in _get_isAlive
File "winKernel.pyc", line 344, in waitForSingleObject
PermissionError: [WinError 5] Access is denied.
This error is also randomly seen from time to time when alt tabbing between windows. There may be another protected Windows process which happens to be noticed by NVDA.
Description of user facing changes:
NVDA no longer becomes unusable when interacting with a protected process.