50extern const LPCTSTR sCFSTR_SHELLIDLIST;
51#undef CFSTR_SHELLIDLIST
52#define CFSTR_SHELLIDLIST sCFSTR_SHELLIDLIST
56#define NOVTABLE __declspec(novtable)
67#define COMExceptionBase _com_error
123 LOG(CURRENT_CONTEXT.getStackTrace());
132 LOG(CURRENT_CONTEXT.getStackTrace());
141 LOG(CURRENT_CONTEXT.getStackTrace());
150 LOG(CURRENT_CONTEXT.getStackTrace());
161#define THROW_EXCEPTION(hr) throw COMException(hr, __FILE__, __LINE__)
162#define CHECKERROR(hr) ((void)(FAILED(hr)? THROW_EXCEPTION(hr): 0))
185#if (_WIN32_WINNT>=0x0400) || defined(_WIN32_DCOM)
288 operator T const *()
const
508template<
typename BASE,
typename OBJ>
557 typedef IShellFolderPtr
super;
567 bool empty()
const {
return !
operator bool();}
571#define IShellLinkPtr IShellLinkWPtr
573#define IShellLinkPtr IShellLinkAPtr
579 typedef IShellLinkPtr
super;
587 bool empty()
const {
return !
operator bool();}
626#define path_from_pidl path_from_pidlW
628#define path_from_pidl path_from_pidlA
638#define ILGetSize ILGetSize_local
642#define CFSTR_FILENAMEW TEXT("FileNameW")
644#define CFSTR_FILENAME CFSTR_FILENAMEW
661 CONTEXT(
"ShellPath::ShellPath(IShellFolder*, LPCWSTR)");
671 OBJ_CONTEXT(
"ShellPath::ShellPath(LPCWSTR)",
path);
681 CONTEXT(
"ShellPath::ShellPath(IShellFolder*, LPCSTR)");
694 CONTEXT(
"ShellPath::ShellPath(LPCSTR)");
849 CONTEXT(
"ShellPath::get_folder()");
858#if defined(__WINE__) && defined(NONAMELESSUNION)
859#define UNION_MEMBER(x) DUMMYUNIONNAME.##x
861#define UNION_MEMBER(x) x
868#define StrRet StrRetW
871#define StrRet StrRetA
1049 CONTEXT(
"ShellItemEnumerator::ShellItemEnumerator()");
1066 if (
_stgm.hGlobal) {
1077 fetc.cfFormat = CF_IDLIST;
1079 fetc.dwAspect = DVASPECT_CONTENT;
1081 fetc.tymed = TYMED_HGLOBAL;
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Retrieval of file system paths of ShellPath objects.
TCHAR _fullpath[MAX_PATH]
FileSysShellPath(const ShellPath &o)
STDMETHODIMP_(ULONG) AddRef()
STDMETHODIMP_(ULONG) Release()
IComSrvBase(REFIID uuid_base)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define WideCharToMultiByte
#define MultiByteToWideChar
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat GLfloat h
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 flag
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
LPVOID Alloc([in] SIZE_T cb)
void Free([in] LPVOID pv)
#define memcpy(s1, s2, n)
static IParseDisplayName ParseDisplayName
static ULONG WINAPI AddRef(IStream *iface)
#define IsEqualIID(riid1, riid2)
ShellFolder & GetDesktopFolder()
HRESULT name_from_pidl(IShellFolder *folder, LPCITEMIDLIST pidl, LPTSTR buffer, int len, SHGDNF flags)
UINT ILGetSize_local(LPCITEMIDLIST pidl)
HRESULT ShellFolderContextMenu(IShellFolder *shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST *ppidl, int x, int y, CtxMenuInterfaces &cm_ifs)
HRESULT path_from_pidlA(IShellFolder *folder, LPCITEMIDLIST pidl, LPSTR buffer, int len)
HRESULT path_from_pidlW(IShellFolder *folder, LPCITEMIDLIST pidl, LPWSTR buffer, int len)
void CheckError(HRESULT hr)
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
#define CFSTR_SHELLIDLIST
#define SHBrowseForFolder
#define SHGetPathFromIDList
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
COM ExceptionBase class as replacement for _com_error.
COMExceptionBase(HRESULT hr)
LPCTSTR ErrorMessage() const
Exception with context information.
COMException(HRESULT hr, const String &obj, const char *file, int line)
COMException(HRESULT hr, const String &obj)
COMException(HRESULT hr, const char *file, int line)
caching of desktop ShellFolder object
We use a common IMalloc object for all shell memory allocations.
Shell folder path of the desktop.
Shell folder of the desktop.
ExtContextMenuHandlerT(HWND hwnd, const PARA &info)
CtxMenuInterfaces _cm_ifs
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
ExtContextMenuHandlerT(HWND hwnd)
Browse dialog operating on shell namespace.
FolderBrowser(HWND owner, UINT flags, LPCTSTR title, LPCITEMIDLIST root=0)
TCHAR _displayname[MAX_PATH]
IComSrvQI(REFIID uuid_base)
STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv)
OLE initialisation for drag drop support.
HRESULT GetData(IDataObject *selection)
wrapper class for COM interface pointers
SIfacePtr & operator=(T *p)
void operator=(SIfacePtr const &o)
const T * operator->() const
HRESULT QueryInterface(REFIID riid, I *p)
SIfacePtr(const SIfacePtr &o)
SIfacePtr(IUnknown *unknown, REFIID riid)
HRESULT CreateInstance(REFIID clsid, REFIID riid)
wrapper template class for pointers to shell objects managed by IMalloc
T const * operator->() const
SShellPtr(const SShellPtr &)
const T & operator*() const
void operator=(SShellPtr const &)
IShellFolder smart pointer.
String get_name(LPCITEMIDLIST pidl, SHGDNF flags=SHGDN_NORMAL) const
void attach(IShellFolder *parent, LPCITEMIDLIST pidl)
SIfacePtr< IShellFolder > super
IShellLink smart pointer.
ShellLinkPtr(IShellLink *p)
SIfacePtr< IShellLink > super
wrapper class for IMalloc with usage of common allocator
static CommonShellMalloc s_cmn_shell_malloc
wrapper class for item ID lists
ShellPath create_absolute_pidl(LPCITEMIDLIST parent_pidl) const
friend bool operator<(const ShellPath &a, const ShellPath &b)
SShellPtr< ITEMIDLIST > super
void assign(LPCITEMIDLIST pidl, size_t size)
ShellPath(IShellFolder *folder, LPCSTR path)
void operator=(const ShellPath &o)
void GetUIObjectOf(REFIID riid, LPVOID *ppvOut, HWND hWnd=0, ShellFolder &sf=GetDesktopFolder())
void operator=(const SHITEMID &o)
void split(ShellPath &parent, ShellPath &obj) const
void assign(LPCITEMIDLIST pidl)
void operator=(ITEMIDLIST *p)
ShellPath(const ShellPath &o)
ShellFolder get_folder(IShellFolder *parent)
ShellPath(IShellFolder *folder, LPCWSTR path)
void operator+=(const SHITEMID &o)
ShellPath(LPCITEMIDLIST p)
ShellPath(LPITEMIDLIST p)
file system path of special folder
TCHAR _fullpath[MAX_PATH]
Retrieval of special shell folder paths.
SpecialFolderPath(int folder, HWND hwnd)
Retrieval of special shell folder.
SpecialFolder(int folder, HWND hwnd)
easy retrieval of multi byte strings out of STRRET structures
void GetString(const SHITEMID &shiid, LPSTR b, int l)
easy retrieval of wide char strings out of STRRET structures
void GetString(const SHITEMID &shiid, LPWSTR b, int l)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define RegisterClipboardFormat