Small optimization: Call MsgWaitForMultipleObjects() without any handle, instead of creating a "dummy" Event handle. Apparently it is allowed to call MsgWaitForMultipleObjects() with *zero* handles, although the documentation doesn't mention this. Tested on Windows 7, Windows XP and under Wine. Based on an idea by "justanotheranonymoususer".
ShellExecAsUser: Use the "fallback" mode also if the IShellDispatch method was chosen but failed.