[PATCH] Added SHParseDisplayName function

Paul paulvgenderen at gmail.com
Sun Mar 16 12:22:46 CDT 2008


---
 dlls/shell32/pidl.c       |   26 ++++++++++++++++++++++++++
 dlls/shell32/shell32.spec |    1 +
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index e369574..cf7de38 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -1314,6 +1314,32 @@ HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl,
REFIID riid, LPVOID *ppv, LPCI
     return hr;
 }
 
+/*************************************************************************
+ *    SHParseDisplayName        [shell version 6.0]
+ */
+HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc,
LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
+{
+    IShellFolder    * psfDesktop;
+    HRESULT         hr=E_FAIL;
+    ULONG           dwAttr=sfgaoIn;
+
+    if (!pszName || !ppidl || !psfgaoOut)
+        return E_INVALIDARG;
+
+    hr = SHGetDesktopFolder(&psfDesktop);
+    if (FAILED(hr))
+        return hr;
+
+    hr = IShellFolder_ParseDisplayName(psfDesktop, (HWND)NULL, pbc,
pszName, (ULONG *)NULL, ppidl, &dwAttr);
+
+    IShellFolder_Release(psfDesktop);
+
+    if (SUCCEED(hr))
+        *psfgaoOut = dwAttr;
+
+    return hr;
+}
+
 /**************************************************************************
  *
  *        internal functions
diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec
index 6c0d7d8..6435f38 100644
--- a/dlls/shell32/shell32.spec
+++ b/dlls/shell32/shell32.spec
@@ -432,3 +432,4 @@
 @ stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW
 @ stdcall StrStrW(wstr wstr) shlwapi.StrStrW
 @ stub WOWShellExecute
+@ stdcall SHParseDisplayName(wstr ptr ptr long ptr)
-- 
1.5.3.6





More information about the wine-patches mailing list