[ros-diffs] [cwittich] 44080: fix ILCreateControlPanel and ILCreatePrinters

cwittich at svn.reactos.org cwittich at svn.reactos.org
Tue Nov 10 21:35:07 CET 2009


Author: cwittich
Date: Tue Nov 10 21:35:07 2009
New Revision: 44080

URL: http://svn.reactos.org/svn/reactos?rev=44080&view=rev
Log:
fix ILCreateControlPanel and ILCreatePrinters

Modified:
    trunk/reactos/dll/win32/shell32/pidl.c

Modified: trunk/reactos/dll/win32/shell32/pidl.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/pidl.c?rev=44080&r1=44079&r2=44080&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/pidl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/pidl.c [iso-8859-1] Tue Nov 10 21:35:07 2009
@@ -138,6 +138,9 @@
     return SUCCEEDED(ret);
 }
 
+/*************************************************************************
+ * ILGetDisplayNameEx        [SHELL32.186]
+ */
 BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type)
 {
     TRACE_(shell)("%p %p %p %d\n", psf, pidl, path, type);
@@ -1367,14 +1370,31 @@
 
 LPITEMIDLIST _ILCreateControlPanel(void)
 {
-    LPITEMIDLIST ret = NULL;
-    LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer);
+    LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL;
 
     TRACE("()\n");
-
     if (parent)
     {
-        LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_ControlPanel);
+        LPITEMIDLIST cpl = _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel);
+
+        if (cpl)
+        {
+            ret = ILCombine(parent, cpl);
+            SHFree(cpl);
+        }
+        SHFree(parent);
+    }
+    return ret;
+}
+
+LPITEMIDLIST _ILCreatePrinters(void)
+{
+    LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL;
+
+    TRACE("()\n");
+    if (parent)
+    {
+        LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_Printers);
 
         if (printers)
         {
@@ -1384,13 +1404,6 @@
         SHFree(parent);
     }
     return ret;
-
-    return _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel);
-}
-
-LPITEMIDLIST _ILCreatePrinters(void)
-{
-    return _ILCreateGuid(PT_YAGUID, &CLSID_Printers);
 }
 
 LPITEMIDLIST _ILCreateNetwork(void)




More information about the Ros-diffs mailing list