32 { CLSID_MyComputer,
"sysdm.cpl", 0x50 },
33 { CLSID_NetworkPlaces,
"ncpa.cpl", 0x58 },
34 { CLSID_Internet,
"inetcpl.cpl", 0x68 },
47 return cidl == 0 || (cidl == 1 && apidl &&
_ILIsEmpty(apidl[0]));
52 if (pidl && pidl->mkid.cb == 2 + 2 +
sizeof(
CLSID) && pidl->mkid.abID[0] ==
PT_GUID)
53 return (
const CLSID*)(&pidl->mkid.abID[2]);
73 DWORD attrs = (pdwAttributes ? *pdwAttributes : 0) | SFGAO_STREAM;
76 CComPtr<IShellFolder> psfDesktop;
80 CComPtr<IBindCtx> pBindCtx;
84 BIND_OPTS BindOps = {
sizeof(BindOps) };
86 pBindCtx->SetBindOptions(&BindOps);
87 hr = psfDesktop->ParseDisplayName(hwndOwner, pBindCtx,
89 pchEaten, ppidl, &attrs);
102 CComHeapPtr<ITEMIDLIST> pidlLocation;
109 CComPtr<IShellFolder> psfFolder;
113 CComHeapPtr<ITEMIDLIST> pidlNew;
114 hr = psfFolder->ParseDisplayName(hwndOwner, pbc,
pch, pchEaten, &pidlNew, &attrs);
117 hr = SHILCombine(pidlLocation, pidlNew, ppidl);
132 *ppidl = pidlLocation.Detach();
147 *pdwAttributes = attrs;
163 DWORD *pdwAttributes)
217 SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
218 SFGAO_STORAGEANCESTOR | SFGAO_HASPROPSHEET | SFGAO_STORAGE;
220 SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET |
221 SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_CANLINK;
223 SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET |
224 SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_CANLINK;
248 &CLSID_ShellFSFolder,
256 &CLSID_ShellFSFolder,
291 int cLen =
wcslen(szFileName);
308 DWORD *pdwAttributes)
313 CComHeapPtr<ITEMIDLIST> pidlParent;
315 WCHAR wch = *lpszDisplayName;
316 if (((
L'A' <= wch && wch <=
L'Z') || (
L'a' <= wch && wch <=
L'z')) &&
317 (lpszDisplayName[1] ==
L':'))
334 CComPtr<IShellFolder> pParentFolder;
337 CComHeapPtr<ITEMIDLIST> pidlChild;
338 HRESULT hr = pParentFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName,
339 pchEaten, &pidlChild, pdwAttributes);
343 *ppidl =
ILCombine(pidlParent, pidlChild);
365 CComPtr<IShellFolder> psfDesktop;
371 return psfDesktop->ParseDisplayName(hwndOwner, pbc,
szPath, pchEaten, ppidl,
399 WARN(
"We don't support 'ms-shell-rooted:' and 'ms-shell-idlist:' schemes\n");
425 DWORD *pdwAttributes)
427 TRACE (
"(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
428 this, hwndOwner, pbc, lpszDisplayName,
debugstr_w(lpszDisplayName),
429 pchEaten, ppidl, pdwAttributes);
436 if (!lpszDisplayName)
439 if (!*lpszDisplayName)
445 if (lpszDisplayName[0] ==
':' && lpszDisplayName[1] ==
':')
447 return m_regFolder->ParseDisplayName(hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl,
457 CComHeapPtr<ITEMIDLIST> pidlAlias;
461 *ppidl = pidlAlias.Detach();
465 TRACE (
"(%p)->(-- ret=0x%08x)\n",
this,
hr);
478 BIND_OPTS BindOps = {
sizeof(BindOps) };
482 BindOps.grfMode &= ~STGM_CREATE;
484 pbc->SetBindOptions(&BindOps);
510 pbc->SetBindOptions(&BindOps);
519 TRACE (
"(%p)->(-- ret=0x%08x)\n",
this,
hr);
529 CComPtr<IEnumIDList> pRegEnumerator;
530 CComPtr<IEnumIDList> pDesktopEnumerator;
531 CComPtr<IEnumIDList> pCommonDesktopEnumerator;
536 ERR(
"EnumObjects for reg folder failed\n");
540 ERR(
"EnumObjects for desktop fs folder failed\n");
544 ERR(
"EnumObjects for shared desktop fs folder failed\n");
546 return ShellObjectCreatorInit<CDesktopFolderEnum>(
m_regFolder,
dwFlags, pRegEnumerator, pDesktopEnumerator,
562 CComPtr<IShellFolder2> psf;
567 return psf->BindToObject(pidl, pbcReserved,
riid, ppvOut);
579 FIXME (
"(%p)->(pidl=%p,%p,%s,%p) stub\n",
591 bool bIsDesktopFolder1, bIsDesktopFolder2;
593 if (!pidl1 || !pidl2)
595 ERR(
"Got null pidl pointer (%Ix %p %p)!\n",
lParam, pidl1, pidl2);
601 if (bIsDesktopFolder1 || bIsDesktopFolder2)
620 TRACE (
"(%p)->(hwnd=%p,%s,%p)\n",
639 dcm.
hwnd = hwndOwner;
652 CComPtr<CDesktopFolderViewCB> sfviewcb;
661 TRACE (
"-- (%p)->(interface=%p)\n",
this, ppvOut);
675 TRACE(
"(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
676 this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
689 for (
UINT i = 0;
i < cidl; ++
i)
700 CComPtr<IShellFolder2> psf;
705 psf->GetAttributesOf(1, &apidl[
i], rgfInOut);
708 ERR(
"Got an unknown pidl type!!!\n");
712 *rgfInOut &= ~SFGAO_VALIDATE;
714 TRACE(
"-- result=0x%08x\n", *rgfInOut);
742 TRACE (
"(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
752 CComPtr<IShellFolder2> psf;
757 return psf->GetUIObjectOf(hwndOwner, cidl, apidl,
riid, prgfInOut, ppvOut);
785 dcm.
hwnd = hwndOwner;
807 CComPtr<IShellFolder> psfChild;
812 return psfChild->CreateViewObject(
NULL,
riid, ppvOut);
821 TRACE (
"(%p)->hr=0x%08x\n",
this,
hr);
833 TRACE (
"(%p)->(pidl=%p,0x%08x,%p)\n",
this, pidl,
dwFlags, strRet);
852 CComPtr<IShellFolder2> psf;
857 return psf->GetDisplayNameOf(pidl,
dwFlags, strRet);
879 CComPtr<IShellFolder2> psf;
884 return psf->SetNameOf(hwndOwner, pidl,
lpName,
dwFlags, pPidlOut);
889 FIXME (
"(%p)\n",
this);
895 FIXME (
"(%p)\n",
this);
901 TRACE (
"(%p)\n",
this);
914 TRACE (
"(%p)\n",
this);
937 FIXME (
"(%p)\n",
this);
965 CComPtr<IShellFolder2> psf;
970 hr = psf->GetDetailsOf(pidl, iColumn, psd);
979 FIXME (
"(%p)\n",
this);
985 TRACE (
"(%p)\n",
this);
990 *lpClassId = CLSID_ShellDesktop;
997 TRACE (
"(%p)->(%p)\n",
this, pidl);
1007 TRACE (
"(%p)->(%p)\n",
this, pidl);
1046 enum { Uninitialized = 0, NotHosted, IsHosted };
1055 const CLSID* pClsid;
1059 LPCWSTR SubKey = NewStart ?
L"HideDesktopIcons\\NewStartPanel" :
L"HideDesktopIcons\\ClassicStartMenu";
1088 TRACE(
"-- %p->(%p)\n",psf, *psf);
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
static const REGFOLDERINFO g_RegFolderInfo
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
HRESULT WINAPI IEParseDisplayNameWithBCW(DWORD codepage, LPCWSTR lpszDisplayName, LPBC pbc, LPITEMIDLIST *ppidl)
static const DWORD dwMyComputerAttributes
static const CLSID * IsRegItem(PCUITEMID_CHILD pidl)
BOOL SHELL32_IsShellFolderNamespaceItemHidden(LPCWSTR SubKey, REFCLSID Clsid)
static const REGFOLDERINFO g_RegFolderInfo
static BOOL IsSelf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
static const DWORD dwDesktopAttributes
static DWORD dwMyNetPlacesAttributes
int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll)
static const REQUIREDREGITEM g_RequiredItems[]
static HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
HRESULT CRegFolder_CreateInstance(PREGFOLDERINITDATA pInit, LPCITEMIDLIST pidlRoot, REFIID riid, void **ppv)
struct mke2fs_defaults settings[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
HRESULT WINAPI Initialize(IShellFolder *pRegFolder, SHCONTF dwFlags, IEnumIDList *pRegEnumerator, IEnumIDList *pDesktopEnumerator, IEnumIDList *pCommonDesktopEnumerator)
bool IsProgmanHostedBrowser()
STDMETHOD() MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) override
IShellView * m_pShellView
STDMETHOD() ShouldShow(IShellFolder *psf, PCIDLIST_ABSOLUTE pidlFolder, PCUITEMID_CHILD pidlItem) override
STDMETHOD() GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override
CComPtr< IShellFolder2 > m_SharedDesktopFSFolder
STDMETHOD() BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
HRESULT WINAPI FinalConstruct()
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidl) override
STDMETHOD() GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override
STDMETHOD() CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override
STDMETHOD() GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) override
STDMETHOD() SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override
STDMETHOD() GetDefaultSearchGUID(GUID *pguid) override
STDMETHOD() CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() MapColumnToSCID(UINT column, SHCOLUMNID *pscid) override
STDMETHOD() GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
STDMETHOD() BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() CallBack(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam) override
HRESULT _GetSFFromPidl(LPCITEMIDLIST pidl, IShellFolder2 **psf)
CComPtr< IShellFolder2 > m_DesktopFSFolder
STDMETHODIMP HttpUrlParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
STDMETHOD() ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override
STDMETHOD() GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override
STDMETHOD() GetCurFolder(PIDLIST_ABSOLUTE *pidl) override
STDMETHOD() GetClassID(CLSID *lpClassId) override
STDMETHOD() EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override
STDMETHOD() EnumSearches(IEnumExtraSearch **ppenum) override
STDMETHOD() GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override
CComPtr< IShellFolder2 > m_regFolder
STDMETHODIMP ShellUrlParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
STDMETHOD() GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut) override
HRESULT _ParseDisplayNameByParent(HWND hwndOwner, LPBC pbc, LPOLESTR pszPath, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
static HRESULT GetColumnDetails(UINT iColumn, SHELLDETAILS &sd)
HRESULT AppendItemsFromEnumerator(IEnumIDList *pEnum)
static HRESULT GetDefaultFSColumnState(UINT iColumn, SHCOLSTATEF &csFlags)
static HRESULT GetFSColumnDetails(UINT iColumn, SHELLDETAILS &sd)
void pdump(LPCITEMIDLIST pidl)
const char * shdebugstr_guid(const struct _GUID *id)
#define DFM_MERGECONTEXTMENU
#define DFM_INVOKECOMMAND
BOOL WINAPI _ILIsPidlSimple(LPCITEMIDLIST pidl)
#define FAILED_UNEXPECTEDLY(hr)
#define SHELL_ExecuteControlPanelCPL(hwnd, cpl)
EXTERN_C INT Shell_ParseSpecialFolder(_In_ LPCWSTR pszStart, _Out_ LPWSTR *ppch, _Out_ INT *pcch)
HRESULT SHGetNameAndFlagsW(_In_ LPCITEMIDLIST pidl, _In_ DWORD dwFlags, _Out_opt_ LPWSTR pszText, _In_ UINT cchBuf, _Inout_opt_ DWORD *pdwAttributes)
BOOL BindCtx_ContainsObject(_In_ IBindCtx *pBindCtx, _In_ LPCWSTR pszName)
HRESULT SHIsFileSysBindCtx(_In_ IBindCtx *pBindCtx, _Out_opt_ WIN32_FIND_DATAW *pFindData)
BOOL Shell_FailForceReturn(_In_ HRESULT hr)
EXTERN_C HRESULT SHBindToObject(_In_opt_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ REFIID riid, _Out_ void **ppvObj)
HRESULT SHELL32_DefaultContextMenuCallBack(IShellFolder *psf, IDataObject *pdo, UINT msg)
HRESULT Shell_TranslateIDListAlias(_In_ LPCITEMIDLIST pidl, _In_ HANDLE hToken, _Out_ LPITEMIDLIST *ppidlAlias, _In_ DWORD dwFlags)
BOOL SHSkipJunctionBinding(_In_ IBindCtx *pbc, _In_ CLSID *pclsid)
LPVOID WINAPI SHAlloc(SIZE_T len)
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
BOOL WINAPI SHGetSpecialFolderPathW(HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate)
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
HRESULT WINAPI ParseURLW(LPCWSTR x, PARSEDURLW *y)
BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT GetCurrentInfo([out] LPFOLDERSETTINGS lpfs)
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define ERROR_FILE_NOT_FOUND
static DWORD DWORD void LPSTR DWORD cch
static const struct access_res create[16]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
interface IBindCtx * LPBC
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
const GUID IID_IDataObject
#define PathAddBackslashW
LPITEMIDLIST _ILCreateMyComputer(void)
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
LPITEMIDLIST _ILCreateDesktop(void)
BOOL _ILIsSpecialFolder(LPCITEMIDLIST pidl)
LPITEMIDLIST _ILCreateNetwork(void)
BOOL _ILIsFolder(LPCITEMIDLIST pidl)
BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
BOOL _ILIsNetHood(LPCITEMIDLIST pidl)
BOOL _ILIsValue(LPCITEMIDLIST pidl)
DWORD _ILSimpleGetTextW(LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize)
static BOOL _ILIsEmpty(LPCITEMIDLIST pidl)
#define IsEqualIID(riid1, riid2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define CSIDL_FLAG_CREATE
#define MAKE_COMPARE_HRESULT(x)
#define SHELL_GetSetting(pss, ssf, field)
#define IS_SHGDN_DESKTOPABSOLUTEPARSING(flags)
HRESULT SHELL32_GetDisplayNameOfChild(IShellFolder2 *psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
void AddFSClassKeysToArray(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, HKEY *array, UINT *cKeys)
LSTATUS AddClsidKeyToArray(REFCLSID clsid, HKEY *array, UINT *cKeys)
LSTATUS AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
void WINAPI _InsertMenuItemW(HMENU hmenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState)
#define CSIDL_COMMON_DESKTOPDIRECTORY
_In_ int _In_ BOOL bCreate
#define CSIDL_DESKTOPDIRECTORY
#define DFM_CMD_PROPERTIES
@ URL_SCHEME_MSSHELLROOTED
@ URL_SCHEME_MSSHELLIDLIST
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
#define INVALID_FILE_ATTRIBUTES
#define GetFileAttributes
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_PATH_NOT_FOUND
#define HRESULT_FROM_WIN32(x)
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MAKEINTRESOURCEW(i)
#define IID_PPV_ARG(Itype, ppType)