Author: gschneider
Date: Sat Apr 17 22:02:12 2010
New Revision: 46907
URL:
http://svn.reactos.org/svn/reactos?rev=46907&view=rev
Log:
[SHELL32]
- Simplify checks for success of ShellExecuteEx, field hInst may be an unreliable
indicator according to
http://msdn.microsoft.com/en-us/library/bb759784%28v=VS.85%29.aspx
- Fixes folder options control panel opening twice
See issue #4910 for more details.
Modified:
trunk/reactos/dll/win32/shell32/shfldr_cpanel.c
trunk/reactos/dll/win32/shell32/shfldr_fonts.c
Modified: trunk/reactos/dll/win32/shell32/shfldr_cpanel.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_c…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shfldr_cpanel.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shfldr_cpanel.c [iso-8859-1] Sat Apr 17 22:02:12 2010
@@ -1298,8 +1298,8 @@
sei.hwnd = lpcmi->hwnd;
sei.nShow = SW_SHOWNORMAL;
sei.lpVerb = L"open";
- ShellExecuteExW(&sei);
- if (sei.hInstApp <= (HINSTANCE)32)
+
+ if (ShellExecuteExW(&sei) == FALSE)
return E_FAIL;
}
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_CREATELINK)) //FIXME
Modified: trunk/reactos/dll/win32/shell32/shfldr_fonts.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_f…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shfldr_fonts.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shfldr_fonts.c [iso-8859-1] Sat Apr 17 22:02:12 2010
@@ -979,8 +979,7 @@
pfont = _ILGetFontStruct(This->apidl);
sei.lpFile = pfont->szName + pfont->offsFile;
- ShellExecuteExW(&sei);
- if (sei.hInstApp <= (HINSTANCE)32)
+ if (ShellExecuteExW(&sei) == FALSE)
return E_FAIL;
}
else if (lpcmi->lpVerb == MAKEINTRESOURCEA(4))