diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index cc5293ffbb9..7fee56536f0 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -135,6 +135,28 @@ LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl) return newpidl; } +/************************************************************************* + * ILGlobalClone [SHELL32.97] + * + */ +LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl) +{ DWORD len; + LPITEMIDLIST newpidl; + + if (!pidl) + return NULL; + + len = ILGetSize(pidl); + newpidl = (LPITEMIDLIST)pCOMCTL32_Alloc(len); + if (newpidl) + memcpy(newpidl,pidl,len); + + TRACE(pidl,"pidl=%p newpidl=%p\n",pidl, newpidl); + pdump(pidl); + + return newpidl; +} + /************************************************************************* * ILIsEqual [SHELL32.21] * @@ -394,12 +416,26 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL32 bEnd) * allocated by SHMalloc allocator * exported by ordinal */ -DWORD WINAPI ILFree(LPVOID pidl) +DWORD WINAPI ILFree(LPITEMIDLIST pidl) { TRACE(pidl,"(pidl=0x%08lx)\n",(DWORD)pidl); + if (!pidl) - return 0; + return FALSE; + return SHFree(pidl); } +/************************************************************************* + * ILGlobalFree [SHELL32.156] + * + */ +DWORD WINAPI ILGlobalFree( LPITEMIDLIST pidl) +{ TRACE(pidl,"%p\n",pidl); + + if (!pidl) + return FALSE; + + return pCOMCTL32_Free (pidl); +} /************************************************************************* * ILCreateFromPath [SHELL32.157] * diff --git a/relay32/shell32.spec b/relay32/shell32.spec index 42beee14c2a..1c86019bdf1 100644 --- a/relay32/shell32.spec +++ b/relay32/shell32.spec @@ -25,7 +25,7 @@ init Shell32LibMain 17 stdcall ILRemoveLastID(ptr) ILRemoveLastID 18 stdcall ILClone(ptr) ILClone 19 stdcall ILCloneFirst (ptr) ILCloneFirst - 20 stub ILGlobalClone@4 + 20 stdcall ILGlobalClone (ptr) ILGlobalClone 21 stdcall ILIsEqual (ptr ptr) ILIsEqual 22 stdcall Control_RunDLL(long long long long) Control_RunDLL # exported by name 23 stdcall ILIsParent (long long long) ILIsParent @@ -160,8 +160,8 @@ init Shell32LibMain 152 stdcall ILGetSize(ptr) ILGetSize 153 stdcall ILGetNext(ptr) ILGetNext 154 stdcall ILAppend (long long long) ILAppend - 155 stdcall ILFree(ptr) ILFree - 156 stub ILGlobalFree + 155 stdcall ILFree (ptr) ILFree + 156 stdcall ILGlobalFree (ptr) ILGlobalFree 157 stdcall ILCreateFromPath (ptr) ILCreateFromPath 158 stdcall PathGetExtension(str long long) PathGetExtension32AW 159 stub PathIsDirectory