https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4e721f780e72bc7a0c780…
commit 4e721f780e72bc7a0c780a477b76b7f09126c145
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sun Feb 23 10:47:48 2020 -0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Feb 23 17:47:48 2020 +0100
[SHELL32] Fix unneeded error Popup with Git for Windows. (#1854)
* Fix unnecessary error popup when installing Git for Windows.
* Add reasons for return value of 42.
---
dll/win32/shell32/shlexec.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp
index 099a964c93e..3feab9c2ff6 100644
--- a/dll/win32/shell32/shlexec.cpp
+++ b/dll/win32/shell32/shlexec.cpp
@@ -1080,6 +1080,22 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start,
WCHAR* ddeexec
TRACE("Couldn't launch\n");
goto error;
}
+ /* if ddeexec is NULL, then we just need to exit here */
+ if (ddeexec == NULL)
+ {
+ TRACE("Exiting because ddeexec is NULL. ret=42.\n");
+ /* See
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-she… */
+ /* for reason why we use 42 here and also "Shell32_apitest
ShellExecuteW" regression test */
+ return 42;
+ }
+ /* if ddeexec is 'empty string', then we just need to exit here */
+ if (wcscmp(ddeexec, L"") == 0)
+ {
+ TRACE("Exiting because ddeexec is 'empty string'.
ret=42.\n");
+ /* See
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-she… */
+ /* for reason why we use 42 here and also "Shell32_apitest
ShellExecuteW" regression test */
+ return 42;
+ }
hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL);
if (!hConv)
{