reactos/dll/win32/shell32/CShellLink.h

228 lines
10 KiB
C
Raw Normal View History

/*
*
* Copyright 1997 Marcus Meissner
* Copyright 1998 Juergen Schmied
* Copyright 2005 Mike McCormack
* Copyright 2009 Andrew Hill
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
* Copyright 2017 Hermes Belusca-Maito
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#ifndef _SHELLLINK_H_
#define _SHELLLINK_H_
class CShellLink :
public CComCoClass<CShellLink, &CLSID_ShellLink>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IShellLinkA,
public IShellLinkW,
public IPersistStream,
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
public IPersistFile,
public IShellExtInit,
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
public IContextMenu, // Technically it should be IContextMenu3 (inherits from IContextMenu2 and IContextMenu)
public IDropTarget,
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
// public IQueryInfo,
public IShellLinkDataList,
public IExtractIconA,
public IExtractIconW,
// public IExtractImage2, // Inherits from IExtractImage
// public IPersistPropertyBag,
// public IServiceProvider,
// public IFilter,
public IObjectWithSite,
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
// public ICustomizeInfoTip,
public IShellPropSheetExt
{
public:
/* Link file formats */
#include "pshpack1.h"
struct volume_info
{
DWORD type;
DWORD serial;
WCHAR label[12]; /* assume 8.3 */
};
#include "poppack.h"
private:
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
/* Cached link header */
SHELL_LINK_HEADER m_Header;
/* Cached data set according to m_Header.dwFlags (SHELL_LINK_DATA_FLAGS) */
LPITEMIDLIST m_pPidl;
/* Link tracker information */
LPWSTR m_sPath;
volume_info volume;
LPWSTR m_sDescription;
LPWSTR m_sPathRel;
LPWSTR m_sWorkDir;
LPWSTR m_sArgs;
LPWSTR m_sIcoPath;
BOOL m_bRunAs;
BOOL m_bDirty;
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
LPDBLIST m_pDBList; /* Optional data block list (in the extra data section) */
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
/* Pointers to strings inside Logo3/Darwin info blocks, cached for debug info purposes only */
LPWSTR sProduct;
LPWSTR sComponent;
LPWSTR m_sLinkPath;
INT m_iIdOpen; /* ID of the "Open" entry in the context menu */
CComPtr<IUnknown> m_site;
CComPtr<IDropTarget> m_DropTarget;
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
VOID Reset();
HRESULT GetAdvertiseInfo(LPWSTR *str, DWORD dwSig);
HRESULT SetAdvertiseInfo(LPCWSTR str);
HRESULT WriteAdvertiseInfo(LPCWSTR string, DWORD dwSig);
HRESULT SetTargetFromPIDLOrPath(LPCITEMIDLIST pidl, LPCWSTR pszFile);
public:
CShellLink();
~CShellLink();
static INT_PTR CALLBACK SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
// IPersistFile
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pclsid);
virtual HRESULT STDMETHODCALLTYPE IsDirty();
virtual HRESULT STDMETHODCALLTYPE Load(LPCOLESTR pszFileName, DWORD dwMode);
virtual HRESULT STDMETHODCALLTYPE Save(LPCOLESTR pszFileName, BOOL fRemember);
virtual HRESULT STDMETHODCALLTYPE SaveCompleted(LPCOLESTR pszFileName);
virtual HRESULT STDMETHODCALLTYPE GetCurFile(LPOLESTR *ppszFileName);
// IPersistStream
// virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pclsid);
// virtual HRESULT STDMETHODCALLTYPE IsDirty();
virtual HRESULT STDMETHODCALLTYPE Load(IStream *stm);
virtual HRESULT STDMETHODCALLTYPE Save(IStream *stm, BOOL fClearDirty);
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
// IShellLinkA
virtual HRESULT STDMETHODCALLTYPE GetPath(LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags);
virtual HRESULT STDMETHODCALLTYPE GetIDList(LPITEMIDLIST *ppidl);
virtual HRESULT STDMETHODCALLTYPE SetIDList(LPCITEMIDLIST pidl);
virtual HRESULT STDMETHODCALLTYPE GetDescription(LPSTR pszName, INT cchMaxName);
virtual HRESULT STDMETHODCALLTYPE SetDescription(LPCSTR pszName);
virtual HRESULT STDMETHODCALLTYPE GetWorkingDirectory(LPSTR pszDir, INT cchMaxPath);
virtual HRESULT STDMETHODCALLTYPE SetWorkingDirectory(LPCSTR pszDir);
virtual HRESULT STDMETHODCALLTYPE GetArguments(LPSTR pszArgs, INT cchMaxPath);
virtual HRESULT STDMETHODCALLTYPE SetArguments(LPCSTR pszArgs);
virtual HRESULT STDMETHODCALLTYPE GetHotkey(WORD *pwHotkey);
virtual HRESULT STDMETHODCALLTYPE SetHotkey(WORD wHotkey);
virtual HRESULT STDMETHODCALLTYPE GetShowCmd(INT *piShowCmd);
virtual HRESULT STDMETHODCALLTYPE SetShowCmd(INT iShowCmd);
virtual HRESULT STDMETHODCALLTYPE GetIconLocation(LPSTR pszIconPath, INT cchIconPath, INT *piIcon);
virtual HRESULT STDMETHODCALLTYPE SetIconLocation(LPCSTR pszIconPath, INT iIcon);
virtual HRESULT STDMETHODCALLTYPE SetRelativePath(LPCSTR pszPathRel, DWORD dwReserved);
virtual HRESULT STDMETHODCALLTYPE Resolve(HWND hwnd, DWORD fFlags);
virtual HRESULT STDMETHODCALLTYPE SetPath(LPCSTR pszFile);
// IShellLinkW
virtual HRESULT STDMETHODCALLTYPE GetPath(LPWSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags);
// virtual HRESULT STDMETHODCALLTYPE GetIDList(LPITEMIDLIST *ppidl);
// virtual HRESULT STDMETHODCALLTYPE SetIDList(LPCITEMIDLIST pidl);
virtual HRESULT STDMETHODCALLTYPE GetDescription(LPWSTR pszName, INT cchMaxName);
virtual HRESULT STDMETHODCALLTYPE SetDescription(LPCWSTR pszName);
virtual HRESULT STDMETHODCALLTYPE GetWorkingDirectory(LPWSTR pszDir, INT cchMaxPath);
virtual HRESULT STDMETHODCALLTYPE SetWorkingDirectory(LPCWSTR pszDir);
virtual HRESULT STDMETHODCALLTYPE GetArguments(LPWSTR pszArgs, INT cchMaxPath);
virtual HRESULT STDMETHODCALLTYPE SetArguments(LPCWSTR pszArgs);
// virtual HRESULT STDMETHODCALLTYPE GetHotkey(WORD *pwHotkey);
// virtual HRESULT STDMETHODCALLTYPE SetHotkey(WORD wHotkey);
// virtual HRESULT STDMETHODCALLTYPE GetShowCmd(INT *piShowCmd);
// virtual HRESULT STDMETHODCALLTYPE SetShowCmd(INT iShowCmd);
virtual HRESULT STDMETHODCALLTYPE GetIconLocation(LPWSTR pszIconPath, INT cchIconPath, INT *piIcon);
virtual HRESULT STDMETHODCALLTYPE SetIconLocation(LPCWSTR pszIconPath, INT iIcon);
virtual HRESULT STDMETHODCALLTYPE SetRelativePath(LPCWSTR pszPathRel, DWORD dwReserved);
// virtual HRESULT STDMETHODCALLTYPE Resolve(HWND hwnd, DWORD fFlags);
virtual HRESULT STDMETHODCALLTYPE SetPath(LPCWSTR pszFile);
// IShellLinkDataList
virtual HRESULT STDMETHODCALLTYPE AddDataBlock(void *pDataBlock);
virtual HRESULT STDMETHODCALLTYPE CopyDataBlock(DWORD dwSig, void **ppDataBlock);
virtual HRESULT STDMETHODCALLTYPE RemoveDataBlock(DWORD dwSig);
virtual HRESULT STDMETHODCALLTYPE GetFlags(DWORD *pdwFlags);
virtual HRESULT STDMETHODCALLTYPE SetFlags(DWORD dwFlags);
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
// IExtractIconA
virtual HRESULT STDMETHODCALLTYPE Extract(PCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, PSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags);
// IExtractIconW
virtual HRESULT STDMETHODCALLTYPE Extract(PCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, PWSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags);
// IShellExtInit
virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
// IContextMenu
virtual HRESULT STDMETHODCALLTYPE QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
virtual HRESULT STDMETHODCALLTYPE InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
virtual HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax);
// IShellPropSheetExt
virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
virtual HRESULT STDMETHODCALLTYPE ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam);
// IObjectWithSite
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *punk);
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID iid, void **ppvSite);
// IDropTarget
virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect);
virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect);
virtual HRESULT STDMETHODCALLTYPE DragLeave();
virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect);
DECLARE_REGISTRY_RESOURCEID(IDR_SHELLLINK)
DECLARE_NOT_AGGREGATABLE(CShellLink)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CShellLink)
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
COM_INTERFACE_ENTRY_IID(IID_IShellLinkA, IShellLinkA)
COM_INTERFACE_ENTRY_IID(IID_IShellLinkW, IShellLinkW)
COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistFile)
COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile)
COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) // Technically it should be IContextMenu3
COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
// COM_INTERFACE_ENTRY_IID(IID_IQueryInfo, IQueryInfo)
COM_INTERFACE_ENTRY_IID(IID_IShellLinkDataList, IShellLinkDataList)
COM_INTERFACE_ENTRY_IID(IID_IExtractIconA, IExtractIconA)
COM_INTERFACE_ENTRY_IID(IID_IExtractIconW, IExtractIconW)
// COM_INTERFACE_ENTRY_IID(IID_IExtractImage2, IExtractImage2)
// COM_INTERFACE_ENTRY_IID(IID_IPersistPropertyBag, IPersistPropertyBag)
// COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
// COM_INTERFACE_ENTRY_IID(IID_IFilter, IFilter)
COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
[SHELL32]: CShellLink fixups Part 2: - Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32. - Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock. - Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks. - This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve - Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve Some of the fixes are inspired from a patch by Katayama Hirofumi MZ. - Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation(). - Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c. - In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...). - More fixes... - ... and a lot of documentation added in the code for you! CORE-12682 svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
// COM_INTERFACE_ENTRY_IID(IID_ICustomizeInfoTip, ICustomizeInfoTip)
COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
END_COM_MAP()
};
#endif /* _SHELLLINK_H_ */