Michael Jung : shell32: Support for CLSID_ShellFSFolder in unixfs.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 17 09:29:32 CST 2006
Module: wine
Branch: refs/heads/master
Commit: db7a3a352e9e50c946f2539370ef0f6910bc423c
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=db7a3a352e9e50c946f2539370ef0f6910bc423c
Author: Michael Jung <mjung at iss.tu-darmstadt.de>
Date: Tue Jan 17 15:58:52 2006 +0100
shell32: Support for CLSID_ShellFSFolder in unixfs.
---
dlls/shell32/shell32_main.h | 1 +
dlls/shell32/shfldr_unixfs.c | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index b51aef7..908ac28 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -96,6 +96,7 @@ HRESULT WINAPI UnixFolder_Constructor(IU
HRESULT WINAPI UnixDosFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
+HRESULT WINAPI ShellFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
extern HRESULT CPanel_GetIconLocationW(LPITEMIDLIST, LPWSTR, UINT, int*);
HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index c898e67..417c55e 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1494,13 +1494,21 @@ static HRESULT WINAPI UnixFolder_IPersis
/* Find the UnixFolderClass root */
while (current->mkid.cb) {
- if (_ILIsSpecialFolder(current) && IsEqualIID(This->m_pCLSID, _ILGetGUIDPointer(current)))
+ if ((_ILIsDrive(current) && IsEqualCLSID(This->m_pCLSID, &CLSID_ShellFSFolder)) ||
+ (_ILIsSpecialFolder(current) && IsEqualCLSID(This->m_pCLSID, _ILGetGUIDPointer(current))))
+ {
break;
+ }
current = ILGetNext(current);
}
if (current && current->mkid.cb) {
- if (IsEqualIID(&CLSID_MyDocuments, _ILGetGUIDPointer(current))) {
+ if (_ILIsDrive(current)) {
+ WCHAR wszDrive[4] = { '?', ':', '\\', 0 };
+ wszDrive[0] = (WCHAR)*_ILGetTextPointer(current);
+ if (!UNIXFS_get_unix_path(wszDrive, szBasePath))
+ return E_FAIL;
+ } else if (IsEqualIID(&CLSID_MyDocuments, _ILGetGUIDPointer(current))) {
WCHAR wszMyDocumentsPath[MAX_PATH];
if (!SHGetSpecialFolderPathW(0, wszMyDocumentsPath, CSIDL_PERSONAL, FALSE))
return E_FAIL;
@@ -2122,6 +2130,11 @@ HRESULT WINAPI MyDocuments_Constructor(I
return CreateUnixFolder(pUnkOuter, riid, ppv, &CLSID_MyDocuments);
}
+HRESULT WINAPI ShellFSFolder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) {
+ TRACE("(pUnkOuter=%p, riid=%p, ppv=%p)\n", pUnkOuter, riid, ppv);
+ return CreateUnixFolder(pUnkOuter, riid, ppv, &CLSID_ShellFSFolder);
+}
+
/******************************************************************************
* UnixSubFolderIterator
*
More information about the wine-cvs
mailing list