Ignore:
Timestamp:
Nov 16, 2001, 1:57:45 PM (24 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shlfolder.c

    r7099 r7359  
    4646
    4747DEFAULT_DEBUG_CHANNEL(shell);
    48 
    49 
    50 /****************************************************************************
    51  * local prototypes
    52  ****************************************************************************/
    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);
    6248
    6349
     
    145131          IShellFolder_Release(psfChild);
    146132
    147           pidlTemp = ODIN_ILCombine(*pidlInOut, pidlOut);
     133          pidlTemp = ILCombine(*pidlInOut, pidlOut);
    148134
    149135          if (pidlOut)
    150             ODIN_ILFree(pidlOut);
    151         }
    152 
    153         ODIN_ILFree(*pidlInOut);
     136            ILFree(pidlOut);
     137        }
     138
     139        ILFree(*pidlInOut);
    154140        *pidlInOut = pidlTemp;
    155141
     
    186172          if (SUCCEEDED(hr))
    187173          {
    188             absPidl = ODIN_ILCombine (pidlRoot, pidlChild);
     174            absPidl = ILCombine (pidlRoot, pidlChild);
    189175            hr = IPersistFolder_Initialize(pPersistFolder, absPidl);
    190176            IPersistFolder_Release(pPersistFolder);
    191             ODIN_SHFree(absPidl);
     177            SHFree(absPidl);
    192178            *ppvOut = pShellFolder;
    193179          }
     
    213199        pdump(pidl);
    214200       
    215         if ((pidlFirst = ODIN_ILCloneFirst(pidl)))
     201        if ((pidlFirst = ILCloneFirst(pidl)))
    216202        {
    217203          hr = IShellFolder_BindToObject(psf, pidlFirst, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
    218204          if (SUCCEEDED(hr))
    219205          {
    220             pidlNext = ODIN_ILGetNext(pidl);
     206            pidlNext = ILGetNext(pidl);
    221207
    222208            hr = IShellFolder_GetDisplayNameOf(psfChild, pidlNext, dwFlags | SHGDN_INFOLDER, &strTemp);
     
    228214            IShellFolder_Release(psfChild);
    229215          }
    230           ODIN_ILFree(pidlFirst);
     216          ILFree(pidlFirst);
    231217        }
    232218
     
    434420            TRACE("-- destroyed IShellFolder(%p) was Desktopfolder\n",This);
    435421          }
    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);
    438424          HeapFree(GetProcessHeap(),0,This);
    439425          return 0;
     
    544530          int len;
    545531
    546           sf->absPidl = ODIN_ILCombine(This->absPidl, pidl);    /* build a absolute pidl */
     532          sf->absPidl = ILCombine(This->absPidl, pidl); /* build a absolute pidl */
    547533
    548534          if (!_ILIsSpecialFolder(pidl))                                /* only file system paths */
     
    555541
    556542            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 */
    558544
    559545            if(!sf->sMyPath) return NULL;
     
    778764             && SUCCEEDED(IShellFolder_QueryInterface(pShellFolder, &IID_IPersistFolder, (LPVOID*)&pPersistFolder)))
    779765            {
    780               absPidl = ODIN_ILCombine (This->absPidl, pidl);
     766              absPidl = ILCombine (This->absPidl, pidl);
    781767              IPersistFolder_Initialize(pPersistFolder, absPidl);
    782768              IPersistFolder_Release(pPersistFolder);
    783               ODIN_SHFree(absPidl);
     769              SHFree(absPidl);
    784770            }
    785771            else
     
    790776        else if(_ILIsFolder(pidl))
    791777        {
    792           LPITEMIDLIST pidltemp = ODIN_ILCloneFirst(pidl);
     778          LPITEMIDLIST pidltemp = ILCloneFirst(pidl);
    793779          pShellFolder = IShellFolder_Constructor(iface, pidltemp);
    794           ODIN_ILFree(pidltemp);
     780          ILFree(pidltemp);
    795781        }
    796782        else
     
    806792        else
    807793        {
    808           IShellFolder_BindToObject(pShellFolder, ODIN_ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);
     794          IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);
    809795          IShellFolder_Release(pShellFolder);
    810796          *ppvOut = pSubFolder;
     
    909895            if (nReturn == 0)                           /* first pidl different ? */
    910896            {
    911               pidl1 = ODIN_ILGetNext(pidl1);
     897              pidl1 = ILGetNext(pidl1);
    912898
    913899              if (pidl1 && pidl1->mkid.cb)              /* go deeper? */       
    914900              {
    915                 pidlTemp = ODIN_ILCloneFirst(pidl1);
    916                 pidl2 = ODIN_ILGetNext(pidl2);
     901                pidlTemp = ILCloneFirst(pidl1);
     902                pidl2 = ILGetNext(pidl2);
    917903       
    918904                hr = IShellFolder_BindToObject(iface, pidlTemp, NULL, &IID_IShellFolder, (LPVOID*)&psf);
     
    923909                  hr = ResultFromShort(nReturn);
    924910                }
    925                 ODIN_ILFree(pidlTemp);
     911                ILFree(pidlTemp);
    926912              }
    927913              else
    928914              {
    929                 pidl2 = ODIN_ILGetNext(pidl2);
     915                pidl2 = ILGetNext(pidl2);
    930916                if (pidl2 && pidl2->mkid.cb)            /* go deeper on #2 ? */
    931917                    hr = ResultFromShort(-1);           /* two different */
     
    10791065          else if (IsEqualIID(riid, &IID_IExtractIconA) && (cidl == 1))
    10801066          {
    1081             pidl = ODIN_ILCombine(This->absPidl,apidl[0]);
     1067            pidl = ILCombine(This->absPidl,apidl[0]);
    10821068            pObj = (LPUNKNOWN)IExtractIconA_Constructor( pidl );
    1083             ODIN_SHFree(pidl);
     1069            SHFree(pidl);
    10841070            hr = S_OK;
    10851071          }
     
    14891475          pidlitem = SHSimpleIDListFromPathA(lpstrNewDir);
    14901476
    1491           pidl = ODIN_ILCombine(This->absPidl, pidlitem);
     1477          pidl = ILCombine(This->absPidl, pidlitem);
    14921478          SHChangeNotifyA(SHCNE_MKDIR, SHCNF_IDLIST, pidl, NULL);
    1493           ODIN_SHFree(pidl);
     1479          SHFree(pidl);
    14941480
    14951481          if (ppidlOut) *ppidlOut = pidlitem;
     
    15541540              return E_FAIL;
    15551541            }
    1556             pidl = ODIN_ILCombine(This->absPidl, apidl[i]);
     1542            pidl = ILCombine(This->absPidl, apidl[i]);
    15571543            SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL);
    1558             ODIN_SHFree(pidl);
     1544            SHFree(pidl);
    15591545          }
    15601546          else if (_ILIsValue(apidl[i]))
     
    15681554              return E_FAIL;
    15691555            }
    1570             pidl = ODIN_ILCombine(This->absPidl, apidl[i]);
     1556            pidl = ILCombine(This->absPidl, apidl[i]);
    15711557            SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL);
    1572             ODIN_SHFree(pidl);
     1558            SHFree(pidl);
    15731559          }
    15741560
     
    16121598              MESSAGE("would copy %s to %s\n", szSrcPath, szDstPath);
    16131599            }
    1614             ODIN_SHFree(pidl);
     1600            SHFree(pidl);
    16151601          }
    16161602          IPersistFolder2_Release(ppf2);
     
    18211807          /* combine pidls */
    18221808          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);
    18251811
    18261812          pShellFolder = IShellFolder_Constructor(NULL, NULL);
     
    18301816            IPersistFolder_Release(ppf);
    18311817          }
    1832           ODIN_ILFree(completepidl);
    1833           ODIN_ILFree(deskpidl);
    1834           ODIN_ILFree(firstpidl);
     1818          ILFree(completepidl);
     1819          ILFree(deskpidl);
     1820          ILFree(firstpidl);
    18351821        }
    18361822       
     
    18411827        else                            /* go deeper */
    18421828        {
    1843           IShellFolder_BindToObject(pShellFolder, ODIN_ILGetNext(pidl), NULL, riid, (LPVOID)&pSubFolder);
     1829          IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, riid, (LPVOID)&pSubFolder);
    18441830          IShellFolder_Release(pShellFolder);
    18451831          *ppvOut = pSubFolder;
     
    22532239          if (!_ILIsDrive(pidl)) return E_INVALIDARG;
    22542240
    2255           pidltemp = ODIN_ILCloneFirst(pidl);
     2241          pidltemp = ILCloneFirst(pidl);
    22562242          pShellFolder = IShellFolder_Constructor(iface, pidltemp);
    2257           ODIN_ILFree(pidltemp);
     2243          ILFree(pidltemp);
    22582244        }
    22592245
     
    22642250        else                            /* go deeper */
    22652251        {
    2266           IShellFolder_BindToObject(pShellFolder, ODIN_ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);
     2252          IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);
    22672253          IShellFolder_Release(pShellFolder);
    22682254          *ppvOut = pSubFolder;
     
    26772663        if(This->absPidl)
    26782664        {
    2679           ODIN_SHFree(This->absPidl);
     2665          SHFree(This->absPidl);
    26802666          This->absPidl = NULL;
    26812667        }
    26822668        if(This->sMyPath)
    26832669        {
    2684           ODIN_SHFree(This->sMyPath);
     2670          SHFree(This->sMyPath);
    26852671          This->sMyPath = NULL;
    26862672        }
     
    26922678        if (SHGetPathFromIDListA(pidl, sTemp))
    26932679        {
    2694           This->sMyPath = ODIN_SHAlloc(strlen(sTemp)+1);
     2680          This->sMyPath = SHAlloc(strlen(sTemp)+1);
    26952681          strcpy(This->sMyPath, sTemp);
    26962682        }
Note: See TracChangeset for help on using the changeset viewer.