From 00a738fdfdce09e4ef014d81ad3019d52b0967d3 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sat, 17 Jan 2004 16:08:38 +0000 Subject: [PATCH] allow only shell links to single objects svn path=/trunk/; revision=7719 --- reactos/lib/shell32/classes.c | 2 +- reactos/lib/shell32/shfldr_desktop.c | 2 +- reactos/lib/shell32/shfldr_fs.c | 2 +- reactos/lib/shell32/shfldr_mycomp.c | 2 +- reactos/lib/shell32/shlcpanel.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/lib/shell32/classes.c b/reactos/lib/shell32/classes.c index 88697904c19..21f75721238 100644 --- a/reactos/lib/shell32/classes.c +++ b/reactos/lib/shell32/classes.c @@ -114,7 +114,7 @@ BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL b } -BOOL HCR_GetExecuteCommandW(HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len) +BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ) { static const WCHAR swShell[] = {'\\','s','h','e','l','l','\\',0}; static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0}; diff --git a/reactos/lib/shell32/shfldr_desktop.c b/reactos/lib/shell32/shfldr_desktop.c index cefbe3fd078..81c31a9dc80 100644 --- a/reactos/lib/shell32/shfldr_desktop.c +++ b/reactos/lib/shell32/shfldr_desktop.c @@ -429,7 +429,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl >= 1)) { + && (cidl == 1)) { pidl = ILCombine (This->pidlRoot, apidl[0]); hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); SHFree (pidl); diff --git a/reactos/lib/shell32/shfldr_fs.c b/reactos/lib/shell32/shfldr_fs.c index 086f399afe6..4346e1f82bb 100644 --- a/reactos/lib/shell32/shfldr_fs.c +++ b/reactos/lib/shell32/shfldr_fs.c @@ -575,7 +575,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl >= 1)) { + && (cidl == 1)) { pidl = ILCombine (This->pidlRoot, apidl[0]); hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); SHFree (pidl); diff --git a/reactos/lib/shell32/shfldr_mycomp.c b/reactos/lib/shell32/shfldr_mycomp.c index c37402a7f21..6c24f87b019 100644 --- a/reactos/lib/shell32/shfldr_mycomp.c +++ b/reactos/lib/shell32/shfldr_mycomp.c @@ -406,7 +406,7 @@ ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl >= 1)) { + && (cidl == 1)) { pidl = ILCombine (This->pidlRoot, apidl[0]); hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); SHFree (pidl); diff --git a/reactos/lib/shell32/shlcpanel.c b/reactos/lib/shell32/shlcpanel.c index 655052def4c..7baee8d4c30 100644 --- a/reactos/lib/shell32/shlcpanel.c +++ b/reactos/lib/shell32/shlcpanel.c @@ -397,7 +397,7 @@ ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, SHFree(pidl); hr = S_OK; } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - &&(cidl >= 1)) { + && (cidl == 1)) { pidl = ILCombine(This->pidlRoot, apidl[0]); hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); SHFree(pidl);