Added DISABLE_DISPATCH_DELAY option to disable extra delay in COM message dispatching function.
Some more code refactoring.
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.
ShellExecAsUser: Fixed regression in previous commit.