2011-07-28 15:54:22 +00:00
|
|
|
#include "precomp.h"
|
2024-05-21 22:06:46 +00:00
|
|
|
#ifndef SHCIDS_CANONICALONLY
|
|
|
|
#define SHCIDS_CANONICALONLY 0x10000000L
|
|
|
|
#endif
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
|
|
|
|
void *operator new(size_t size)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
return LocalAlloc(LMEM_ZEROINIT, size);
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void operator delete(void *p)
|
|
|
|
{
|
2013-04-28 08:42:22 +00:00
|
|
|
LocalFree(p);
|
[browseui, shell32, explorer_new, include]
- Convert browseui to C++/ATL. As part of this, classes in browseui and now registered with .rgs files.
- Add AddressBand, AddressEditBox, BandProxy, BaseBar, BaseBarSite, BrandBand, InternetToolbar, ShellBrowser, ToolsBand, and TravelLog.
- Add stub implementations of commonbrowser, globalfoldersettings, and regtreeoptions.
- Clean up some msvc compile problems in a few files.
- Reorganize some headers to make them better match the Platform SDK.
- Move InlineIsEqualGUID to guiddef.h.
- Create new header files shlguid_undoc.h, shlobj_undoc.h, and shlwapi_undoc.h to hold undocumented types, functions, and GUIDs.
- Move some undocumented definitions declared in explorer_new/todo.h and undoc.h to new headers.
- Rename a few interfaces in explorer_new to the correct name
- Add definition of RBSTR_CHANGERECT to commctrl.h
- IDeskBarClient inherits from IOleWindow, not IUnknown
- HMONITOR was declared in both dxsdk/axextend.idl and wine/wined3d.idl, but not in wtypes.idl where it belongs
- Added Init and Term to CComModule
- Thanks to encoded for solving the browseui linking problem!
svn path=/trunk/; revision=43872
2009-10-31 14:25:45 +00:00
|
|
|
}
|
2015-04-30 21:48:26 +00:00
|
|
|
|
2015-08-22 00:17:15 +00:00
|
|
|
void operator delete(void *p, UINT_PTR)
|
2015-04-30 21:48:26 +00:00
|
|
|
{
|
|
|
|
LocalFree(p);
|
|
|
|
}
|
2024-05-21 22:06:46 +00:00
|
|
|
|
|
|
|
HRESULT SHELL_GetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl)
|
|
|
|
{
|
|
|
|
#if DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA && 0 // FIXME: SHELL32 not ready yet
|
|
|
|
return SHGetIDListFromObject(punk, ppidl);
|
|
|
|
#else
|
|
|
|
HRESULT hr;
|
|
|
|
IPersistFolder2 *pf2;
|
|
|
|
if (SUCCEEDED(hr = punk->QueryInterface(IID_PPV_ARG(IPersistFolder2, &pf2))))
|
|
|
|
{
|
|
|
|
hr = pf2->GetCurFolder(ppidl);
|
|
|
|
pf2->Release();
|
|
|
|
}
|
|
|
|
IPersistIDList *pil;
|
|
|
|
if (FAILED(hr) && SUCCEEDED(hr = punk->QueryInterface(IID_PPV_ARG(IPersistIDList, &pil))))
|
|
|
|
{
|
|
|
|
hr = pil->GetIDList(ppidl);
|
|
|
|
pil->Release();
|
|
|
|
}
|
|
|
|
return hr;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT SHELL_CompareAbsoluteIDs(LPARAM lParam, PCIDLIST_ABSOLUTE a, PCIDLIST_ABSOLUTE b)
|
|
|
|
{
|
|
|
|
IShellFolder *psf;
|
|
|
|
HRESULT hr = SHGetDesktopFolder(&psf);
|
|
|
|
if (FAILED(hr))
|
|
|
|
return hr;
|
|
|
|
hr = psf->CompareIDs(lParam, a, b);
|
|
|
|
psf->Release();
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SHELL_IsEqualAbsoluteID(PCIDLIST_ABSOLUTE a, PCIDLIST_ABSOLUTE b)
|
|
|
|
{
|
|
|
|
return !SHELL_CompareAbsoluteIDs(SHCIDS_CANONICALONLY, a, b);
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL SHELL_IsVerb(IContextMenu *pcm, UINT_PTR idCmd, LPCWSTR Verb)
|
|
|
|
{
|
|
|
|
HRESULT hr;
|
|
|
|
WCHAR wide[MAX_PATH];
|
|
|
|
if (SUCCEEDED(hr = pcm->GetCommandString(idCmd, GCS_VERBW, NULL, (LPSTR)wide, _countof(wide))))
|
|
|
|
return !lstrcmpiW(wide, Verb);
|
|
|
|
|
|
|
|
CHAR ansi[_countof(wide)], buf[MAX_PATH];
|
|
|
|
if (SHUnicodeToAnsi(Verb, buf, _countof(buf)))
|
|
|
|
{
|
|
|
|
if (SUCCEEDED(hr = pcm->GetCommandString(idCmd, GCS_VERBA, NULL, ansi, _countof(ansi))))
|
|
|
|
return !lstrcmpiA(ansi, buf);
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|