34#define IDM_UNDOCKCOMPUTER 410
35#define IDM_TASKBARANDSTARTMENU 413
36#define IDM_LASTSTARTMENU_SEPARATOR 450
37#define IDM_DOCUMENTS 501
38#define IDM_HELPANDSUPPORT 503
39#define IDM_PROGRAMS 504
40#define IDM_CONTROLPANEL 505
41#define IDM_SHUTDOWN 506
42#define IDM_FAVORITES 507
43#define IDM_SETTINGS 508
44#define IDM_PRINTERSANDFAXES 510
46#define IDM_SYNCHRONIZE 553
47#define IDM_NETWORKCONNECTIONS 557
48#define IDM_DISCONNECT 5000
49#define IDM_SECURITY 5001
60 public CComObjectRootEx<CComMultiThreadModelNoCS>,
143#ifdef TEST_TRACKPOPUPMENU_SUBMENUS
163 if (bAdd || bSetText)
168 ERR(
"SHGetSpecialFolderLocation failed\n");
193 L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
194 pszName,
FALSE, bDefault);
242 CComHeapPtr<ITEMIDLIST> pidlFolder;
243 CComPtr<IShellFolder> psfDesktop;
244 CComPtr<IShellFolder> pShellFolder;
276 CComPtr<IShellMenu> pShellMenu;
282 hr = pShellMenu->Initialize(
this, 0, ANCESTORDEFAULT, SMINIT_VERTICAL);
308 ERR(
"CreateRecentMenu failed\n");
310 hr = pShellMenu->SetMenu(hMenu,
NULL, SMSET_BOTTOM);
372 TRACE(
"csidl: 0x%X\n", csidl);
375 FIXME(
"This CSIDL %d wrongly opens My Computer. CORE-19477\n", csidl);
377 CComHeapPtr<ITEMIDLIST> pidl;
380 CComPtr<IShellFolder> pSF;
386 return pSF->GetUIObjectOf(
NULL, 1, &pidlChild, IID_IContextMenu,
NULL, pv);
417 ERR(
"SHGetSpecialFolderPathW failed\n");
424 ERR(
"SHGetSpecialFolderPathW failed\n");
493 CComPtr<IShellFolder> psfDesktop;
511 CComPtr<IShellFolder> psfUserStartMenu;
512 CComPtr<IShellFolder> psfCommonStartMenu;
513 CComPtr<IAugmentedShellFolder> pasf;
515 *ppsfStartMenu =
NULL;
520 WARN(
"Failed to get the USER start menu folder. Trying to run with just the COMMON one.\n");
526 TRACE(
"COMMON start menu obtained.\n");
528 ILFree(pidlCommonStartMenu);
538 WARN(
"Failed to get the COMMON start menu folder. Will use only the USER contents.\n");
540 ILFree(pidlUserStartMenu);
544 TRACE(
"Both COMMON and USER statr menu folders obtained, merging them...\n");
557 *ppsfStartMenu = psfUserStartMenu.Detach();
558 ILFree(pidlCommonStartMenu);
559 ILFree(pidlUserStartMenu);
563 hr = pasf->AddNameSpace(
NULL, psfUserStartMenu, pidlUserStartMenu, 0xFF00);
567 hr = pasf->AddNameSpace(
NULL, psfCommonStartMenu, pidlCommonStartMenu, 0);
574 ILFree(pidlCommonStartMenu);
575 ILFree(pidlUserStartMenu);
594 CComPtr<IShellMenu> pShellMenu;
595 CComPtr<IBandSite> pBandSite;
596 CComPtr<IDeskBar> pDeskBar;
603 CComPtr<IShellFolder> psfPrograms;
617 CComObject<CShellMenuCallback> *
pCallback;
618 hr = CComObject<CShellMenuCallback>::CreateInstance(&
pCallback);
623 pCallback->Initialize(pShellMenu, pBandSite, pDeskBar);
625 hr = pShellMenu->Initialize(
pCallback, (
UINT) -1, 0, SMINIT_TOPLEVEL | SMINIT_VERTICAL);
638 WARN(
"USER Programs folder not found\n");
645 CComPtr<IShellFolder> psfParent;
653 hr = psfParent->GetDisplayNameOf(pcidlPrograms, SHGDN_FORPARSING | SHGDN_INFOLDER, &
str);
658 ILFree(pidlProgramsAbsolute);
670 hr =
pCallback->_SetProgramsFolder(psfPrograms, pidlPrograms);
674 hr = pShellMenu->SetShellFolder(psf,
NULL,
NULL, SMSET_TOP);
678 hr = pDeskBar->SetClient(pBandSite);
682 hr = pBandSite->AddBand(pShellMenu);
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
#define FAILED_UNEXPECTEDLY(hr)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
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 IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
FxPnpStateCallbackInfo * pCallback
EXTERN_C INT WINAPI Shell_GetCachedImageIndex(LPCWSTR szPath, INT nIndex, UINT bSimulateDoc)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
HRESULT ParseDisplayName([in] HWND hwndOwner, [in] LPBC pbcReserved, [in, string] LPOLESTR lpszDisplayName, [out] ULONG *pchEaten, [out] PIDLIST_RELATIVE *ppidl, [in, out, unique] ULONG *pdwAttributes)
HRESULT CompareIDs([in] LPARAM lParam, [in] PCUIDLIST_RELATIVE pidl1, [in] PCUIDLIST_RELATIVE pidl2)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
#define DECLARE_NOT_AGGREGATABLE(x)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
void WINAPI ILFree(LPITEMIDLIST pidl)
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
#define IsEqualIID(riid1, riid2)
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
#define SHGFI_DISPLAYNAME
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
#define CSIDL_MYDOCUMENTS
#define CSIDL_COMMON_STARTMENU
#define CSIDL_COMMON_PROGRAMS
DWORD WINAPI SHRestricted(RESTRICTIONS rest)
#define IDI_SHELL_MY_DOCUMENTS
#define IDI_SHELL_SEARCH1
#define IDI_SHELL_FAVOTITES
#define IDI_SHELL_MY_PICTURES
#define IDI_SHELL_TSKBAR_STARTMENU
#define IDI_SHELL_PRINTER2
#define IDI_SHELL_PROGRAMS_FOLDER1
#define IDI_SHELL_CONTROL_PANEL1
#define IDI_SHELL_LOGOFF1
#define IDI_SHELL_RECENT_DOCUMENTS1
#define IDI_SHELL_SHUTDOWN1
#define IDI_SHELL_NETWORK_CONNECTIONS2
#define IDI_SHELL_CONTROL_PANEL
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
WCHAR szDisplayName[MAX_PATH]
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
HMENU WINAPI CreatePopupMenu(void)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI CreateMenu(void)
BOOL WINAPI SetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define IID_PPV_ARG(Itype, ppType)