Author: janderwald
Date: Tue Aug 26 01:24:33 2008
New Revision: 35659
URL:
http://svn.reactos.org/svn/reactos?rev=35659&view=rev
Log:
- Add a small hack for executing shortcuts to cpl files
- Remove unneeded CLSID_UnixFolder registration
- Fix Bitbucket, Nethood shell folder registration attributes
Modified:
trunk/reactos/dll/win32/shell32/regsvr.c
trunk/reactos/dll/win32/shell32/shelllink.c
Modified: trunk/reactos/dll/win32/shell32/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/regsvr.c…
==============================================================================
--- trunk/reactos/dll/win32/shell32/regsvr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/regsvr.c [iso-8859-1] Tue Aug 26 01:24:33 2008
@@ -626,8 +626,8 @@
NULL,
"shell32.dll",
"Apartment",
- SHELLFOLDER_ATTRIBUTES,
- SFGAO_FOLDER,
+ SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
+ SFGAO_FOLDER|SFGAO_HASPROPSHEET,
0,
NULL,
NULL,
@@ -674,17 +674,19 @@
"shell32.dll",
"Apartment",
},
- { &CLSID_UnixFolder,
- "/",
+ { &CLSID_FolderShortcut,
+ "Foldershortcut",
0,
NULL,
"shell32.dll",
"Apartment",
- SHELLFOLDER_WANTSFORPARSING
- },
- { &CLSID_UnixDosFolder,
- "/",
- 0,
+ SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
+ SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_LINK,
+ SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR
+ },
+ { &CLSID_MyDocuments,
+ "My Documents",
+ IDS_PERSONAL,
NULL,
"shell32.dll",
"Apartment",
@@ -692,33 +694,13 @@
SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER,
SFGAO_FILESYSTEM
},
- { &CLSID_FolderShortcut,
- "Foldershortcut",
- 0,
+ { &CLSID_RecycleBin,
+ "Trash",
+ IDS_RECYCLEBIN_FOLDER_NAME,
NULL,
"shell32.dll",
"Apartment",
SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
- SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_LINK,
- SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR
- },
- { &CLSID_MyDocuments,
- "My Documents",
- IDS_PERSONAL,
- NULL,
- "shell32.dll",
- "Apartment",
- SHELLFOLDER_WANTSFORPARSING|SHELLFOLDER_ATTRIBUTES|SHELLFOLDER_CALLFORATTRIBUTES,
- SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER,
- SFGAO_FILESYSTEM
- },
- { &CLSID_RecycleBin,
- "Trash",
- IDS_RECYCLEBIN_FOLDER_NAME,
- NULL,
- "shell32.dll",
- "Apartment",
- SHELLFOLDER_ATTRIBUTES,
SFGAO_FOLDER|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET,
0,
NULL,
Modified: trunk/reactos/dll/win32/shell32/shelllink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelllin…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] Tue Aug 26 01:24:33 2008
@@ -2512,7 +2512,7 @@
mii.fType = MFT_STRING;
if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii ))
return E_FAIL;
- This->iIdOpen = 0;
+ This->iIdOpen = 1;
return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id );
}
@@ -2788,7 +2788,8 @@
ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici )
{
IShellLinkImpl *This = impl_from_IContextMenu(iface);
- static const WCHAR szOpen[] = { 'O','p','e','n',0 };
+ static const WCHAR szOpen[] = { 'o','p','e','n',0 };
+ static const WCHAR szCplOpen[] = {
'c','p','l','o','p','e','n',0 };
SHELLEXECUTEINFOW sei;
HWND hwnd = NULL; /* FIXME: get using interface set from IObjectWithSite */
LPWSTR args = NULL;
@@ -2800,16 +2801,12 @@
if ( lpici->cbSize < sizeof (CMINVOKECOMMANDINFO) )
return E_INVALIDARG;
- if ( lpici->lpVerb != MAKEINTRESOURCEA(This->iIdOpen) )
- {
- ERR("Unknown id %d != %d\n", (INT)lpici->lpVerb, This->iIdOpen
);
- return E_INVALIDARG;
- }
-
r = IShellLinkW_Resolve( (IShellLinkW*)&(This->lpvtblw), hwnd, 0 );
if ( FAILED( r ) )
+ {
+ TRACE("failed to resolve component with error 0x%08x", r);
return r;
-
+ }
if ( This->sComponent )
{
path = shelllink_get_msi_component_path( This->sComponent );
@@ -2847,10 +2844,15 @@
sei.fMask = SEE_MASK_UNICODE | (lpici->fMask &
(SEE_MASK_NOASYNC|SEE_MASK_ASYNCOK|SEE_MASK_FLAG_NO_UI));
sei.lpFile = path;
sei.nShow = This->iShowCmd;
- sei.lpIDList = This->pPidl;
sei.lpDirectory = This->sWorkDir;
sei.lpParameters = args;
sei.lpVerb = szOpen;
+
+ // HACK for ShellExecuteExW
+ if (!wcsstr(This->sPath, L".cpl"))
+ sei.lpVerb = szOpen;
+ else
+ sei.lpVerb = szCplOpen;
if( ShellExecuteExW( &sei ) )
r = S_OK;