allow only shell links to single objects

svn path=/trunk/; revision=7719
This commit is contained in:
Martin Fuchs 2004-01-17 16:08:38 +00:00
parent acba5dbeef
commit 00a738fdfd
5 changed files with 5 additions and 5 deletions

View file

@ -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};

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);