8#define _ATL_NO_EXCEPTIONS
13#define IShellFolder_GetDisplayNameOf _disabled_IShellFolder_GetDisplayNameOf_
14#define IShellFolder_ParseDisplayName _disabled_IShellFolder_ParseDisplayName_
15#define IShellFolder_CompareIDs _disabled_IShellFolder_CompareIDs_
27#undef IShellFolder_GetDisplayNameOf
28#undef IShellFolder_ParseDisplayName
29#undef IShellFolder_CompareIDs
31#define SHLWAPI_ISHELLFOLDER_HELPERS
36#ifndef FAILED_UNEXPECTEDLY
37#define FAILED_UNEXPECTEDLY FAILED
60 CMINVOKECOMMANDINFOEX
info = {
sizeof(
info), fCMIC,
hWnd, pszVerb };
80 hr = pCM->QueryContextMenu(hMenu, 0, 1,
MAXSHORT, fCMF | CMF_DEFAULTONLY);
91 info.fMask |= CMF_OPTIMIZEFORINVOKE;
95 info.fMask |= CMIC_MASK_UNICODE;
96 info.lpVerbW = wideverb;
101 hr = pCM->QueryContextMenu(hMenu, 0, 1,
MAXSHORT, fCMF);
110 info.fMask |= CMIC_MASK_FLAG_NO_UI;
115 info.fMask |= CMIC_MASK_UNICODE;
116 info.lpDirectoryW = pwszDir;
121 hr = pCM->InvokeCommand((LPCMINVOKECOMMANDINFO)&
info);
182 hr = pShellFolder->GetUIObjectOf(
hWnd, 1, &pidl, IID_IContextMenu,
NULL, (
void**)&pCM);
185 fCMIC |= CMIC_MASK_FLAG_LOG_USAGE;
227 TRACE(
"(%s, 0x%lX, %p)\n",
debugstr_w(pszPath), dwWhich, pdwFileAttributes);
229 if (pdwFileAttributes)
240 if (pdwFileAttributes)
245 if (pdwFileAttributes)
266 { SHGDN_FOREDITING, SHGDN_NORMAL, SFGDNO_RETRYALWAYS },
267 { SHGDN_FORADDRESSBAR, SHGDN_NORMAL, SFGDNO_RETRYALWAYS },
268 { SHGDN_NORMAL, SHGDN_FORPARSING, SFGDNO_RETRYALWAYS },
269 { SHGDN_FORPARSING, SHGDN_NORMAL, SFGDNO_RETRYWITHFORPARSING },
270 { SHGDN_INFOLDER, SHGDN_NORMAL, SFGDNO_RETRYALWAYS },
290 TRACE(
"(%p)->(%p, 0x%lX, %p, 0x%lX)\n", psf, pidl,
uFlags,
lpName, dwRetryFlags);
296 dwRetryFlags |= SFGDNO_RETRYALWAYS;
298 if ((
uFlags & SHGDN_FORPARSING) == 0)
299 dwRetryFlags |= SFGDNO_RETRYWITHFORPARSING;
305 if (!(dwRetryFlags &
pData->dwRetryFlags))
312 hr = psf->GetDisplayNameOf(pidl, uNewFlags,
lpName);
338 ULONG dummy1, dummy2;
340 TRACE(
"(%p)->(%p, %p, %s, %p, %p, %p)\n", psf, hwndOwner, pbcReserved,
341 debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes);
346 pdwAttributes = &dummy1;
358 return psf->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten,
359 ppidl, pdwAttributes);
375 TRACE(
"(%p, %p, %p, %p)\n", psf,
lParam, pidl1, pidl2);
382 lParam &= SHCIDS_COLUMNMASK;
387 return psf->CompareIDs(
lParam, pidl1, pidl2);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
static const WCHAR version[]
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
DWORD WINAPI SHAnsiToUnicode(LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
INT WINAPI SHUnicodeToAnsi(LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen)
EXTERN_C HRESULT WINAPI SHInvokeCommandOnContextMenu(_In_opt_ HWND hWnd, _In_opt_ IUnknown *pUnk, _In_ IContextMenu *pCM, _In_ UINT fCMIC, _In_opt_ LPCSTR pszVerb)
EXTERN_C HRESULT WINAPI SHInvokeCommandWithFlagsAndSite(_In_opt_ HWND hWnd, _In_opt_ IUnknown *pUnk, _In_ IShellFolder *pShellFolder, _In_ LPCITEMIDLIST pidl, _In_ UINT fCMIC, _In_opt_ LPCSTR pszVerb)
EXTERN_C HRESULT WINAPI SHInvokeCommandOnContextMenuEx(_In_opt_ HWND hWnd, _In_opt_ IUnknown *pUnk, _In_ IContextMenu *pCM, _In_ UINT fCMIC, _In_ UINT fCMF, _In_opt_ LPCSTR pszVerb, _In_opt_ LPCWSTR pwszDir)
EXTERN_C BOOL WINAPI IContextMenu_Invoke(_In_ IContextMenu *pContextMenu, _In_ HWND hwnd, _In_ LPCSTR lpVerb, _In_ UINT uFlags)
static const RETRY_DATA g_RetryData[]
static HRESULT SHInvokeCommandOnContextMenuInternal(_In_opt_ HWND hWnd, _In_opt_ IUnknown *pUnk, _In_ IContextMenu *pCM, _In_ UINT fCMIC, _In_ UINT fCMF, _In_opt_ LPCSTR pszVerb, _In_opt_ LPCWSTR pwszDir, _In_ bool ForceQCM)
#define FAILED_UNEXPECTEDLY
#define IShellFolder_ParseDisplayName
#define IShellFolder_CompareIDs
static WORD GetVersionMajorMinor()
BOOL WINAPI PathFileExistsDefExtAndAttributesW(_Inout_ LPWSTR pszPath, _In_ DWORD dwWhich, _Out_opt_ LPDWORD pdwFileAttributes)
#define IShellFolder_GetDisplayNameOf
static BOOL SHLWAPI_IsBogusHRESULT(HRESULT hr)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
interface IBindCtx * LPBC
DWORD WINAPI GetVersion()
#define _WIN32_WINNT_WIN7
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
#define INVALID_FILE_ATTRIBUTES
HMENU WINAPI CreatePopupMenu(void)
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
#define IS_INTRESOURCE(i)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define MAKEINTRESOURCEA(i)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MAKEINTRESOURCEW(i)