mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
allow only shell links to single objects
svn path=/trunk/; revision=7719
This commit is contained in:
parent
acba5dbeef
commit
00a738fdfd
5 changed files with 5 additions and 5 deletions
|
@ -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 swShell[] = {'\\','s','h','e','l','l','\\',0};
|
||||||
static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0};
|
static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0};
|
||||||
|
|
|
@ -429,7 +429,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
|
||||||
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
|
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
|
||||||
hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
|
hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
|
||||||
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
||||||
&& (cidl >= 1)) {
|
&& (cidl == 1)) {
|
||||||
pidl = ILCombine (This->pidlRoot, apidl[0]);
|
pidl = ILCombine (This->pidlRoot, apidl[0]);
|
||||||
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
|
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
|
||||||
SHFree (pidl);
|
SHFree (pidl);
|
||||||
|
|
|
@ -575,7 +575,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface,
|
||||||
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
|
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
|
||||||
hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
|
hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
|
||||||
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
||||||
&& (cidl >= 1)) {
|
&& (cidl == 1)) {
|
||||||
pidl = ILCombine (This->pidlRoot, apidl[0]);
|
pidl = ILCombine (This->pidlRoot, apidl[0]);
|
||||||
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
|
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
|
||||||
SHFree (pidl);
|
SHFree (pidl);
|
||||||
|
|
|
@ -406,7 +406,7 @@ ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface,
|
||||||
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
|
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
|
||||||
hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
|
hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
|
||||||
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
||||||
&& (cidl >= 1)) {
|
&& (cidl == 1)) {
|
||||||
pidl = ILCombine (This->pidlRoot, apidl[0]);
|
pidl = ILCombine (This->pidlRoot, apidl[0]);
|
||||||
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
|
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
|
||||||
SHFree (pidl);
|
SHFree (pidl);
|
||||||
|
|
|
@ -397,7 +397,7 @@ ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface,
|
||||||
SHFree(pidl);
|
SHFree(pidl);
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
|
||||||
&&(cidl >= 1)) {
|
&& (cidl == 1)) {
|
||||||
pidl = ILCombine(This->pidlRoot, apidl[0]);
|
pidl = ILCombine(This->pidlRoot, apidl[0]);
|
||||||
hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj);
|
hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj);
|
||||||
SHFree(pidl);
|
SHFree(pidl);
|
||||||
|
|
Loading…
Reference in a new issue