mirror of
https://github.com/reactos/reactos.git
synced 2025-01-15 18:43:27 +00:00
[BROWSEUI][SDK] Half-implement CShellBrowser::GetPropertyBag (#5635)
- Implement CShellBrowser::GetPropertyBag a little by using SHGetViewStatePropertyBag. - Add SHGetPathFromIDListWrapW prototype to <shlwapi_undoc.h>. CORE-9283
This commit is contained in:
parent
8dbb800358
commit
4814dfea01
2 changed files with 23 additions and 1 deletions
|
@ -2387,12 +2387,33 @@ HRESULT STDMETHODCALLTYPE CShellBrowser::QueryService(REFGUID guidService, REFII
|
|||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static BOOL _ILIsNetworkPlace(LPCITEMIDLIST pidl)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
return SHGetPathFromIDListWrapW(pidl, szPath) && PathIsUNCW(szPath);
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CShellBrowser::GetPropertyBag(long flags, REFIID riid, void **ppvObject)
|
||||
{
|
||||
if (ppvObject == NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*ppvObject = NULL;
|
||||
return E_NOTIMPL;
|
||||
|
||||
LPITEMIDLIST pidl;
|
||||
HRESULT hr = GetPidl(&pidl);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return E_FAIL;
|
||||
|
||||
// FIXME: pidl for Internet etc.
|
||||
|
||||
if (_ILIsNetworkPlace(pidl))
|
||||
flags |= SHGVSPB_ROAM;
|
||||
|
||||
hr = SHGetViewStatePropertyBag(pidl, L"Shell", flags, riid, ppvObject);
|
||||
|
||||
ILFree(pidl);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CShellBrowser::GetTypeInfoCount(UINT *pctinfo)
|
||||
|
|
|
@ -276,6 +276,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich);
|
|||
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich);
|
||||
VOID WINAPI FixSlashesAndColonW(LPWSTR);
|
||||
BOOL WINAPI PathIsValidCharW(WCHAR c, DWORD dwClass);
|
||||
BOOL WINAPI SHGetPathFromIDListWrapW(LPCITEMIDLIST pidl, LPWSTR pszPath);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
Loading…
Reference in a new issue