Jay Yang : explorer: Try ShellExecute if the parameter isn't a directory.
Alexandre Julliard
julliard at winehq.org
Tue Aug 30 12:48:39 CDT 2011
Module: wine
Branch: master
Commit: c268c40fdf0ecf904769ad2e7fba23884f967c1e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c268c40fdf0ecf904769ad2e7fba23884f967c1e
Author: Jay Yang <jkelleyy at gmail.com>
Date: Mon Aug 29 04:15:00 2011 -0400
explorer: Try ShellExecute if the parameter isn't a directory.
---
programs/explorer/Makefile.in | 2 +-
programs/explorer/explorer.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/programs/explorer/Makefile.in b/programs/explorer/Makefile.in
index 6fe3fae..d317570 100644
--- a/programs/explorer/Makefile.in
+++ b/programs/explorer/Makefile.in
@@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_UNICODE_MACROS
MODULE = explorer.exe
APPMODE = -mwindows -municode
IMPORTS = rpcrt4 user32 gdi32 advapi32
-DELAYIMPORTS = comctl32 shell32 ole32
+DELAYIMPORTS = comctl32 shell32 ole32 shlwapi
C_SRCS = \
appbar.c \
diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c
index 9ada5d2..35080a3 100644
--- a/programs/explorer/explorer.c
+++ b/programs/explorer/explorer.c
@@ -32,6 +32,7 @@
#include <windows.h>
#include <shobjidl.h>
#include <shlobj.h>
+#include <shlwapi.h>
#include <commoncontrols.h>
#include <commctrl.h>
@@ -755,6 +756,9 @@ int WINAPI wWinMain(HINSTANCE hinstance,
WINE_ERR("Could not initialize COM\n");
ExitProcess(EXIT_FAILURE);
}
+ if(parameters.root[0] && !PathIsDirectoryW(parameters.root))
+ if(ShellExecuteW(NULL,NULL,parameters.root,NULL,NULL,SW_SHOWDEFAULT) > (HINSTANCE)32)
+ ExitProcess(EXIT_SUCCESS);
init_info.dwSize = sizeof(INITCOMMONCONTROLSEX);
init_info.dwICC = ICC_USEREX_CLASSES | ICC_BAR_CLASSES | ICC_COOL_CLASSES;
if(!InitCommonControlsEx(&init_info))
More information about the wine-cvs
mailing list