Changeset 7359 for trunk/src/shell32/shlfolder.c
- Timestamp:
- Nov 16, 2001, 1:57:45 PM (24 years ago)
- File:
-
- 1 edited
-
trunk/src/shell32/shlfolder.c (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shlfolder.c
r7099 r7359 46 46 47 47 DEFAULT_DEBUG_CHANNEL(shell); 48 49 50 /****************************************************************************51 * local prototypes52 ****************************************************************************/53 54 DWORD _Optlink ODIN_ILFree (LPITEMIDLIST pidl);55 LPITEMIDLIST _Optlink ODIN_ILCombine (LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);56 LPITEMIDLIST _Optlink ODIN_ILClone (LPCITEMIDLIST pidl);57 LPITEMIDLIST _Optlink ODIN_ILCloneFirst (LPCITEMIDLIST pidl);58 LPITEMIDLIST _Optlink ODIN_ILGetNext (LPITEMIDLIST pidl);59 60 void _Optlink ODIN_SHFree (LPVOID x);61 LPVOID _Optlink ODIN_SHAlloc (DWORD len);62 48 63 49 … … 145 131 IShellFolder_Release(psfChild); 146 132 147 pidlTemp = ODIN_ILCombine(*pidlInOut, pidlOut);133 pidlTemp = ILCombine(*pidlInOut, pidlOut); 148 134 149 135 if (pidlOut) 150 ODIN_ILFree(pidlOut);151 } 152 153 ODIN_ILFree(*pidlInOut);136 ILFree(pidlOut); 137 } 138 139 ILFree(*pidlInOut); 154 140 *pidlInOut = pidlTemp; 155 141 … … 186 172 if (SUCCEEDED(hr)) 187 173 { 188 absPidl = ODIN_ILCombine (pidlRoot, pidlChild);174 absPidl = ILCombine (pidlRoot, pidlChild); 189 175 hr = IPersistFolder_Initialize(pPersistFolder, absPidl); 190 176 IPersistFolder_Release(pPersistFolder); 191 ODIN_SHFree(absPidl);177 SHFree(absPidl); 192 178 *ppvOut = pShellFolder; 193 179 } … … 213 199 pdump(pidl); 214 200 215 if ((pidlFirst = ODIN_ILCloneFirst(pidl)))201 if ((pidlFirst = ILCloneFirst(pidl))) 216 202 { 217 203 hr = IShellFolder_BindToObject(psf, pidlFirst, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); 218 204 if (SUCCEEDED(hr)) 219 205 { 220 pidlNext = ODIN_ILGetNext(pidl);206 pidlNext = ILGetNext(pidl); 221 207 222 208 hr = IShellFolder_GetDisplayNameOf(psfChild, pidlNext, dwFlags | SHGDN_INFOLDER, &strTemp); … … 228 214 IShellFolder_Release(psfChild); 229 215 } 230 ODIN_ILFree(pidlFirst);216 ILFree(pidlFirst); 231 217 } 232 218 … … 434 420 TRACE("-- destroyed IShellFolder(%p) was Desktopfolder\n",This); 435 421 } 436 if(This->absPidl) ODIN_SHFree(This->absPidl);437 if(This->sMyPath) ODIN_SHFree(This->sMyPath);422 if(This->absPidl) SHFree(This->absPidl); 423 if(This->sMyPath) SHFree(This->sMyPath); 438 424 HeapFree(GetProcessHeap(),0,This); 439 425 return 0; … … 544 530 int len; 545 531 546 sf->absPidl = ODIN_ILCombine(This->absPidl, pidl); /* build a absolute pidl */532 sf->absPidl = ILCombine(This->absPidl, pidl); /* build a absolute pidl */ 547 533 548 534 if (!_ILIsSpecialFolder(pidl)) /* only file system paths */ … … 555 541 556 542 dwSize += _ILSimpleGetText(pidl,NULL,0); /* add the size of our name*/ 557 sf->sMyPath = ODIN_SHAlloc(dwSize + 2); /* '\0' and backslash */543 sf->sMyPath = SHAlloc(dwSize + 2); /* '\0' and backslash */ 558 544 559 545 if(!sf->sMyPath) return NULL; … … 778 764 && SUCCEEDED(IShellFolder_QueryInterface(pShellFolder, &IID_IPersistFolder, (LPVOID*)&pPersistFolder))) 779 765 { 780 absPidl = ODIN_ILCombine (This->absPidl, pidl);766 absPidl = ILCombine (This->absPidl, pidl); 781 767 IPersistFolder_Initialize(pPersistFolder, absPidl); 782 768 IPersistFolder_Release(pPersistFolder); 783 ODIN_SHFree(absPidl);769 SHFree(absPidl); 784 770 } 785 771 else … … 790 776 else if(_ILIsFolder(pidl)) 791 777 { 792 LPITEMIDLIST pidltemp = ODIN_ILCloneFirst(pidl);778 LPITEMIDLIST pidltemp = ILCloneFirst(pidl); 793 779 pShellFolder = IShellFolder_Constructor(iface, pidltemp); 794 ODIN_ILFree(pidltemp);780 ILFree(pidltemp); 795 781 } 796 782 else … … 806 792 else 807 793 { 808 IShellFolder_BindToObject(pShellFolder, ODIN_ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);794 IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder); 809 795 IShellFolder_Release(pShellFolder); 810 796 *ppvOut = pSubFolder; … … 909 895 if (nReturn == 0) /* first pidl different ? */ 910 896 { 911 pidl1 = ODIN_ILGetNext(pidl1);897 pidl1 = ILGetNext(pidl1); 912 898 913 899 if (pidl1 && pidl1->mkid.cb) /* go deeper? */ 914 900 { 915 pidlTemp = ODIN_ILCloneFirst(pidl1);916 pidl2 = ODIN_ILGetNext(pidl2);901 pidlTemp = ILCloneFirst(pidl1); 902 pidl2 = ILGetNext(pidl2); 917 903 918 904 hr = IShellFolder_BindToObject(iface, pidlTemp, NULL, &IID_IShellFolder, (LPVOID*)&psf); … … 923 909 hr = ResultFromShort(nReturn); 924 910 } 925 ODIN_ILFree(pidlTemp);911 ILFree(pidlTemp); 926 912 } 927 913 else 928 914 { 929 pidl2 = ODIN_ILGetNext(pidl2);915 pidl2 = ILGetNext(pidl2); 930 916 if (pidl2 && pidl2->mkid.cb) /* go deeper on #2 ? */ 931 917 hr = ResultFromShort(-1); /* two different */ … … 1079 1065 else if (IsEqualIID(riid, &IID_IExtractIconA) && (cidl == 1)) 1080 1066 { 1081 pidl = ODIN_ILCombine(This->absPidl,apidl[0]);1067 pidl = ILCombine(This->absPidl,apidl[0]); 1082 1068 pObj = (LPUNKNOWN)IExtractIconA_Constructor( pidl ); 1083 ODIN_SHFree(pidl);1069 SHFree(pidl); 1084 1070 hr = S_OK; 1085 1071 } … … 1489 1475 pidlitem = SHSimpleIDListFromPathA(lpstrNewDir); 1490 1476 1491 pidl = ODIN_ILCombine(This->absPidl, pidlitem);1477 pidl = ILCombine(This->absPidl, pidlitem); 1492 1478 SHChangeNotifyA(SHCNE_MKDIR, SHCNF_IDLIST, pidl, NULL); 1493 ODIN_SHFree(pidl);1479 SHFree(pidl); 1494 1480 1495 1481 if (ppidlOut) *ppidlOut = pidlitem; … … 1554 1540 return E_FAIL; 1555 1541 } 1556 pidl = ODIN_ILCombine(This->absPidl, apidl[i]);1542 pidl = ILCombine(This->absPidl, apidl[i]); 1557 1543 SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL); 1558 ODIN_SHFree(pidl);1544 SHFree(pidl); 1559 1545 } 1560 1546 else if (_ILIsValue(apidl[i])) … … 1568 1554 return E_FAIL; 1569 1555 } 1570 pidl = ODIN_ILCombine(This->absPidl, apidl[i]);1556 pidl = ILCombine(This->absPidl, apidl[i]); 1571 1557 SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL); 1572 ODIN_SHFree(pidl);1558 SHFree(pidl); 1573 1559 } 1574 1560 … … 1612 1598 MESSAGE("would copy %s to %s\n", szSrcPath, szDstPath); 1613 1599 } 1614 ODIN_SHFree(pidl);1600 SHFree(pidl); 1615 1601 } 1616 1602 IPersistFolder2_Release(ppf2); … … 1821 1807 /* combine pidls */ 1822 1808 SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, &deskpidl); 1823 firstpidl = ODIN_ILCloneFirst(pidl);1824 completepidl = ODIN_ILCombine(deskpidl, firstpidl);1809 firstpidl = ILCloneFirst(pidl); 1810 completepidl = ILCombine(deskpidl, firstpidl); 1825 1811 1826 1812 pShellFolder = IShellFolder_Constructor(NULL, NULL); … … 1830 1816 IPersistFolder_Release(ppf); 1831 1817 } 1832 ODIN_ILFree(completepidl);1833 ODIN_ILFree(deskpidl);1834 ODIN_ILFree(firstpidl);1818 ILFree(completepidl); 1819 ILFree(deskpidl); 1820 ILFree(firstpidl); 1835 1821 } 1836 1822 … … 1841 1827 else /* go deeper */ 1842 1828 { 1843 IShellFolder_BindToObject(pShellFolder, ODIN_ILGetNext(pidl), NULL, riid, (LPVOID)&pSubFolder);1829 IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, riid, (LPVOID)&pSubFolder); 1844 1830 IShellFolder_Release(pShellFolder); 1845 1831 *ppvOut = pSubFolder; … … 2253 2239 if (!_ILIsDrive(pidl)) return E_INVALIDARG; 2254 2240 2255 pidltemp = ODIN_ILCloneFirst(pidl);2241 pidltemp = ILCloneFirst(pidl); 2256 2242 pShellFolder = IShellFolder_Constructor(iface, pidltemp); 2257 ODIN_ILFree(pidltemp);2243 ILFree(pidltemp); 2258 2244 } 2259 2245 … … 2264 2250 else /* go deeper */ 2265 2251 { 2266 IShellFolder_BindToObject(pShellFolder, ODIN_ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);2252 IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder); 2267 2253 IShellFolder_Release(pShellFolder); 2268 2254 *ppvOut = pSubFolder; … … 2677 2663 if(This->absPidl) 2678 2664 { 2679 ODIN_SHFree(This->absPidl);2665 SHFree(This->absPidl); 2680 2666 This->absPidl = NULL; 2681 2667 } 2682 2668 if(This->sMyPath) 2683 2669 { 2684 ODIN_SHFree(This->sMyPath);2670 SHFree(This->sMyPath); 2685 2671 This->sMyPath = NULL; 2686 2672 } … … 2692 2678 if (SHGetPathFromIDListA(pidl, sTemp)) 2693 2679 { 2694 This->sMyPath = ODIN_SHAlloc(strlen(sTemp)+1);2680 This->sMyPath = SHAlloc(strlen(sTemp)+1); 2695 2681 strcpy(This->sMyPath, sTemp); 2696 2682 }
Note:
See TracChangeset
for help on using the changeset viewer.
