Nikolay Sivov : shell32: Export lowlevel PIDL manipulation calls by name too.

Alexandre Julliard julliard at winehq.org
Wed May 26 11:49:08 CDT 2010


Module: wine
Branch: master
Commit: 45d6329cbb681914219d6752881b94b67974e68d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=45d6329cbb681914219d6752881b94b67974e68d

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed May 26 03:01:15 2010 +0400

shell32: Export lowlevel PIDL manipulation calls by name too.

---

 dlls/shell32/pidl.c            |   13 +++++++------
 dlls/shell32/shell32.spec      |   32 ++++++++++++++++----------------
 dlls/shell32/tests/shlfolder.c |   28 ++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 22 deletions(-)

diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 6f4b082..dffa2bd 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -833,7 +833,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
 }
 
 /*************************************************************************
- * ILAppend                  [SHELL32.154]
+ * ILAppendID                [SHELL32.154]
  *
  * Adds the single ItemID item to the ItemIDList indicated by pidl.
  * If bEnd is FALSE, inserts the item in the front of the list,
@@ -847,26 +847,27 @@ LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
  * NOTES
  *  Destroys the passed in idlist! (???)
  */
-LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd)
+LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST pidl, LPCSHITEMID item, BOOL bEnd)
 {
     LPITEMIDLIST idlRet;
+    LPCITEMIDLIST itemid = (LPCITEMIDLIST)item;
 
     WARN("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd);
 
     pdump (pidl);
-    pdump (item);
+    pdump (itemid);
 
     if (_ILIsDesktop(pidl))
     {
-        idlRet = ILClone(item);
+        idlRet = ILClone(itemid);
         SHFree (pidl);
         return idlRet;
     }
 
     if (bEnd)
-        idlRet = ILCombine(pidl, item);
+        idlRet = ILCombine(pidl, itemid);
     else
-        idlRet = ILCombine(item, pidl);
+        idlRet = ILCombine(itemid, pidl);
 
     SHFree(pidl);
     return idlRet;
diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec
index c398f92..f913872 100644
--- a/dlls/shell32/shell32.spec
+++ b/dlls/shell32/shell32.spec
@@ -13,17 +13,17 @@
   11 stub -noname PifMgr_SetProperties
   13 stub -noname PifMgr_CloseProperties
   15 stdcall -noname ILGetDisplayName(ptr ptr)
-  16 stdcall -noname ILFindLastID(ptr)
-  17 stdcall -noname ILRemoveLastID(ptr)
-  18 stdcall -noname ILClone(ptr)
-  19 stdcall -noname ILCloneFirst(ptr)
+  16 stdcall -ordinal ILFindLastID(ptr)
+  17 stdcall -ordinal ILRemoveLastID(ptr)
+  18 stdcall -ordinal ILClone(ptr)
+  19 stdcall -ordinal ILCloneFirst(ptr)
   20 stdcall -noname ILGlobalClone(ptr)
-  21 stdcall -noname ILIsEqual(ptr ptr)
-  23 stdcall -noname ILIsParent(ptr ptr long)
-  24 stdcall -noname ILFindChild(ptr ptr)
-  25 stdcall -noname ILCombine(ptr ptr)
+  21 stdcall -ordinal ILIsEqual(ptr ptr)
+  23 stdcall -ordinal ILIsParent(ptr ptr long)
+  24 stdcall -ordinal ILFindChild(ptr ptr)
+  25 stdcall -ordinal ILCombine(ptr ptr)
   26 stdcall -noname ILLoadFromStream(ptr ptr)
-  27 stdcall -noname ILSaveToStream(ptr ptr)
+  27 stdcall -ordinal ILSaveToStream(ptr ptr)
   28 stdcall -noname SHILCreateFromPath(ptr ptr ptr) SHILCreateFromPathAW
   29 stdcall -noname PathIsRoot(ptr) PathIsRootAW
   30 stdcall -noname PathBuildRoot(ptr long) PathBuildRootAW
@@ -141,12 +141,12 @@
  149 stdcall -noname SHFind_InitMenuPopup(long long long long)
 
  151 stdcall -noname SHLoadOLE(long)
- 152 stdcall -noname ILGetSize(ptr)
- 153 stdcall -noname ILGetNext(ptr)
- 154 stdcall -noname ILAppend(long long long)
- 155 stdcall -noname ILFree(ptr)
+ 152 stdcall -ordinal ILGetSize(ptr)
+ 153 stdcall -ordinal ILGetNext(ptr)
+ 154 stdcall -ordinal ILAppendID(long long long)
+ 155 stdcall -ordinal ILFree(ptr)
  156 stdcall -noname ILGlobalFree(ptr)
- 157 stdcall -noname ILCreateFromPath(ptr) ILCreateFromPathAW
+ 157 stdcall -ordinal ILCreateFromPath(ptr) ILCreateFromPathAW
  158 stdcall -noname PathGetExtension(str long long) PathGetExtensionAW
  159 stdcall -noname PathIsDirectory(ptr) PathIsDirectoryAW
  160 stub SHNetConnectionDialog
@@ -178,8 +178,8 @@
  186 stdcall -noname ILGetDisplayNameEx(ptr ptr ptr long)
  187 stub ILGetPseudoNameW
  188 stdcall -noname ShellDDEInit(long)
- 189 stdcall -noname ILCreateFromPathA(str)
- 190 stdcall -noname ILCreateFromPathW(wstr)
+ 189 stdcall -ordinal ILCreateFromPathA(str)
+ 190 stdcall -ordinal ILCreateFromPathW(wstr)
  191 stdcall -noname SHUpdateImageA(str long long long)
  192 stdcall -noname SHUpdateImageW(wstr long long long)
  193 stdcall -noname SHHandleUpdateImage(ptr)
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index f63bf6e..d0055d4 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -60,6 +60,7 @@ static void init_function_pointers(void)
 {
     HMODULE hmod;
     HRESULT hr;
+    void *ptr;
 
     hmod = GetModuleHandleA("shell32.dll");
 
@@ -81,6 +82,33 @@ static void init_function_pointers(void)
     MAKEFUNC_ORD(ILFree, 155);
 #undef MAKEFUNC_ORD
 
+    /* test named exports */
+    ptr = GetProcAddress(hmod, "ILFree");
+    ok(broken(ptr == 0) || ptr != 0, "expected named export for ILFree\n");
+    if (ptr)
+    {
+#define TESTNAMED(f) \
+    ptr = (void*)GetProcAddress(hmod, #f); \
+    ok(ptr != 0, "expected named export for " #f "\n");
+
+        TESTNAMED(ILAppendID);
+        TESTNAMED(ILClone);
+        TESTNAMED(ILCloneFirst);
+        TESTNAMED(ILCombine);
+        TESTNAMED(ILCreateFromPath);
+        TESTNAMED(ILCreateFromPathA);
+        TESTNAMED(ILCreateFromPathW);
+        TESTNAMED(ILFindChild);
+        TESTNAMED(ILFindLastID);
+        TESTNAMED(ILGetNext);
+        TESTNAMED(ILGetSize);
+        TESTNAMED(ILIsEqual);
+        TESTNAMED(ILIsParent);
+        TESTNAMED(ILRemoveLastID);
+        TESTNAMED(ILSaveToStream);
+#undef TESTNAMED
+    }
+
     hmod = GetModuleHandleA("shlwapi.dll");
     pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW");
 




More information about the wine-cvs mailing list