#ifndef SHELLBROWSE_H #define SHELLBROWSE_H /////////////////////////////////////////////////////////////////////// // NOTE: all of this is copied (shamefully) from MSDN. /////////////////////////////////////////////////////////////////////// #define ILSkip(pidl, cb) ((LPITEMIDLIST)(((BYTE*)(pidl))+cb)) #define ILNext(pidl) ILSkip(pidl, (pidl)->mkid.cb) // Retrieves the UIObject interface for the specified full PIDL HRESULT SHGetUIObjectFromFullPIDL(LPCITEMIDLIST pidl, HWND hwnd, REFIID riid, void **ppv); HRESULT SHILClone(LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl); // Get the target PIDL for a folder PIDL. This deals with cases where a folder // is an alias to a real folder, folder shortcuts, etc. HRESULT SHGetTargetFolderIDList(LPCITEMIDLIST pidlFolder, LPITEMIDLIST *ppidl); // Get the target folder for a folder PIDL. This deals with cases where a folder // is an alias to a real folder, folder shortcuts, the My Documents folder, etc. HRESULT SHGetTargetFolderPath(LPCITEMIDLIST pidlFolder, LPWSTR pszPath, UINT cchPath); #endif