Changeset 7014


Ignore:
Timestamp:
Oct 11, 2001, 4:33:03 AM (24 years ago)
Author:
phaller
Message:

.

Location:
trunk/src/shell32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/shell32/pidl.c

    r7012 r7014  
    5050LPITEMIDLIST _Optlink ODIN_ILClone  (LPCITEMIDLIST pidl);
    5151DWORD        _Optlink ODIN_ILGetSize(LPITEMIDLIST pidl);
     52
     53void         _Optlink ODIN_SHFree   (LPVOID x);
     54LPVOID       _Optlink ODIN_SHAlloc  (DWORD len);
     55
    5256
    5357
     
    230234   
    231235  len = ODIN_ILGetSize(pidl);
    232   newpidl = (LPITEMIDLIST)SHAlloc(len);
     236  newpidl = (LPITEMIDLIST)ODIN_SHAlloc(len);
    233237  if (newpidl)
    234238    memcpy(newpidl,pidl,len);
     
    256260        {
    257261          len = pidl->mkid.cb; 
    258           pidlNew = (LPITEMIDLIST) SHAlloc (len+2);
     262          pidlNew = (LPITEMIDLIST) ODIN_SHAlloc (len+2);
    259263          if (pidlNew)
    260264          {
     
    287291
    288292        if (*ppPidl)
    289         { SHFree(*ppPidl);
     293        { ODIN_SHFree(*ppPidl);
    290294          *ppPidl = NULL;
    291295        }
     
    294298
    295299        if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead)))
    296         { *ppPidl = SHAlloc (wLen);
     300        { *ppPidl = ODIN_SHAlloc (wLen);
    297301          if (SUCCEEDED(IStream_Read(pStream, *ppPidl , wLen, &dwBytesRead)))
    298302          { ret = S_OK;
    299303          }
    300304          else
    301           { SHFree(*ppPidl);
     305          { ODIN_SHFree(*ppPidl);
    302306            *ppPidl = NULL;
    303307          }
     
    306310        /* we are not yet fully compatible */
    307311        if (!pcheck(*ppPidl))
    308         { SHFree(*ppPidl);
     312        { ODIN_SHFree(*ppPidl);
    309313          *ppPidl = NULL;
    310314        }
     
    636640        len1  = ODIN_ILGetSize(pidl1)-2;
    637641        len2  = ODIN_ILGetSize(pidl2);
    638         pidlNew  = SHAlloc(len1+len2);
     642        pidlNew  = ODIN_SHAlloc(len1+len2);
    639643
    640644        if (pidlNew)
     
    765769           idlRet = ODIN_ILClone(item);
    766770           if (pidl)
    767              SHFree (pidl);
     771             ODIN_SHFree (pidl);
    768772           return idlRet;
    769773        }
     
    778782        }
    779783
    780         SHFree(pidl);
     784        ODIN_SHFree(pidl);
    781785        return idlRet;
    782786}
     
    794798  if(!pidl)
    795799    return FALSE;
    796   SHFree(pidl);
     800  ODIN_SHFree(pidl);
    797801  return TRUE;
    798802}
     
    11891193            ILFree (pidlChild);
    11901194
    1191           SHFree (pidlParent);
     1195          ODIN_SHFree (pidlParent);
    11921196          if (psf) IShellFolder_Release(psf);
    11931197        }
     
    13991403        }
    14001404
    1401         if(!(pidlOut = SHAlloc(uSize + 2))) return NULL;
     1405        if(!(pidlOut = ODIN_SHAlloc(uSize + 2))) return NULL;
    14021406        ZeroMemory(pidlOut, uSize + 2);
    14031407        pidlOut->mkid.cb = uSize;
     
    19301934        if(apidl)
    19311935        {
    1932           for(i = 0; i < cidl; i++) SHFree(apidl[i]);
    1933           SHFree(apidl);
     1936          for(i = 0; i < cidl; i++) ODIN_SHFree(apidl[i]);
     1937          ODIN_SHFree(apidl);
    19341938        }
    19351939}
     
    19431947{
    19441948        int i;
    1945         LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST));
     1949        LPITEMIDLIST * apidldest = (LPITEMIDLIST*)ODIN_SHAlloc(cidl * sizeof(LPITEMIDLIST));
    19461950        if(!apidlsrc) return NULL;
    19471951
     
    19601964{
    19611965        int i;
    1962         LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
     1966        LPITEMIDLIST * dst = (LPITEMIDLIST*)ODIN_SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
    19631967
    19641968        if(!dst) return NULL;
  • TabularUnified trunk/src/shell32/shellord.c

    r6810 r7014  
    66 *           1998 Jürgen Schmied
    77 */
     8
     9/****************************************************************************
     10 * includes
     11 ****************************************************************************/
     12
     13#include <odin.h>
     14#include <os2sel.h>
     15#include <odinwrap.h>
     16
     17ODINDEBUGCHANNEL(SHELL32-SHELLORD)
     18
     19
    820#include <string.h>
    921#include <stdio.h>
     
    89101 *
    90102 */
    91 BOOL WINAPI GetFileNameFromBrowse(
    92         HWND hwndOwner,
    93         LPSTR lpstrFile,
    94         DWORD nMaxFile,
    95         LPCSTR lpstrInitialDir,
    96         LPCSTR lpstrDefExt,
    97         LPCSTR lpstrFilter,
    98         LPCSTR lpstrTitle)
     103ODINFUNCTION7(BOOL, GetFileNameFromBrowse,
     104              HWND, hwndOwner,
     105              LPSTR, lpstrFile,
     106              DWORD, nMaxFile,
     107              LPCSTR, lpstrInitialDir,
     108              LPCSTR, lpstrDefExt,
     109              LPCSTR, lpstrFilter,
     110              LPCSTR, lpstrTitle)
    99111{
    100112        FIXME("(%04x,%s,%ld,%s,%s,%s,%s):stub.\n",
     
    314326 */
    315327#define MEM_DEBUG 0
    316 void WINAPI SHFree(LPVOID x)
     328
     329ODINPROCEDURE1(SHFree,
     330               LPVOID, x)
    317331{
    318332#if MEM_DEBUG
     
    343357 *     exported by ordinal
    344358 */
    345 LPVOID WINAPI SHAlloc(DWORD len)
     359ODINFUNCTION1(LPVOID, SHAlloc,
     360              DWORD, len)
    346361{
    347362        LPBYTE ret;
  • TabularUnified trunk/src/shell32/shlfolder.c

    r7012 r7014  
    4444LPITEMIDLIST _Optlink ODIN_ILClone      (LPCITEMIDLIST pidl);
    4545LPITEMIDLIST _Optlink ODIN_ILCloneFirst (LPCITEMIDLIST pidl);
     46LPITEMIDLIST _Optlink ODIN_ILGetNext    (LPITEMIDLIST pidl);
     47
     48void         _Optlink ODIN_SHFree   (LPVOID x);
     49LPVOID       _Optlink ODIN_SHAlloc  (DWORD len);
    4650
    4751
     
    173177            hr = IPersistFolder_Initialize(pPersistFolder, absPidl);
    174178            IPersistFolder_Release(pPersistFolder);
    175             SHFree(absPidl);
     179            ODIN_SHFree(absPidl);
    176180            *ppvOut = pShellFolder;
    177181          }
     
    202206          if (SUCCEEDED(hr))
    203207          {
    204             pidlNext = ILGetNext(pidl);
     208            pidlNext = ODIN_ILGetNext(pidl);
    205209
    206210            hr = IShellFolder_GetDisplayNameOf(psfChild, pidlNext, dwFlags | SHGDN_INFOLDER, &strTemp);
     
    418422            TRACE("-- destroyed IShellFolder(%p) was Desktopfolder\n",This);
    419423          }
    420           if(This->absPidl) SHFree(This->absPidl);
    421           if(This->sMyPath) SHFree(This->sMyPath);
     424          if(This->absPidl) ODIN_SHFree(This->absPidl);
     425          if(This->sMyPath) ODIN_SHFree(This->sMyPath);
    422426          HeapFree(GetProcessHeap(),0,This);
    423427          return 0;
     
    539543
    540544            dwSize += _ILSimpleGetText(pidl,NULL,0);            /* add the size of our name*/
    541             sf->sMyPath = SHAlloc(dwSize + 2);                  /* '\0' and backslash */
     545            sf->sMyPath = ODIN_SHAlloc(dwSize + 2);                     /* '\0' and backslash */
    542546
    543547            if(!sf->sMyPath) return NULL;
     
    765769              IPersistFolder_Initialize(pPersistFolder, absPidl);
    766770              IPersistFolder_Release(pPersistFolder);
    767               SHFree(absPidl);
     771              ODIN_SHFree(absPidl);
    768772            }
    769773            else
     
    10661070            pidl = ODIN_ILCombine(This->absPidl,apidl[0]);
    10671071            pObj = (LPUNKNOWN)IExtractIconA_Constructor( pidl );
    1068             SHFree(pidl);
     1072            ODIN_SHFree(pidl);
    10691073            hr = S_OK;
    10701074          }
     
    14761480          pidl = ODIN_ILCombine(This->absPidl, pidlitem);
    14771481          SHChangeNotifyA(SHCNE_MKDIR, SHCNF_IDLIST, pidl, NULL);
    1478           SHFree(pidl);
     1482          ODIN_SHFree(pidl);
    14791483
    14801484          if (ppidlOut) *ppidlOut = pidlitem;
     
    15411545            pidl = ODIN_ILCombine(This->absPidl, apidl[i]);
    15421546            SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL);
    1543             SHFree(pidl);
     1547            ODIN_SHFree(pidl);
    15441548          }
    15451549          else if (_ILIsValue(apidl[i]))
     
    15551559            pidl = ODIN_ILCombine(This->absPidl, apidl[i]);
    15561560            SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL);
    1557             SHFree(pidl);
     1561            ODIN_SHFree(pidl);
    15581562          }
    15591563
     
    15971601              MESSAGE("would copy %s to %s\n", szSrcPath, szDstPath);
    15981602            }
    1599             SHFree(pidl);
     1603            ODIN_SHFree(pidl);
    16001604          }
    16011605          IPersistFolder2_Release(ppf2);
     
    26622666        if(This->absPidl)
    26632667        {
    2664           SHFree(This->absPidl);
     2668          ODIN_SHFree(This->absPidl);
    26652669          This->absPidl = NULL;
    26662670        }
    26672671        if(This->sMyPath)
    26682672        {
    2669           SHFree(This->sMyPath);
     2673          ODIN_SHFree(This->sMyPath);
    26702674          This->sMyPath = NULL;
    26712675        }
     
    26772681        if (SHGetPathFromIDListA(pidl, sTemp))
    26782682        {
    2679           This->sMyPath = SHAlloc(strlen(sTemp)+1);
     2683          This->sMyPath = ODIN_SHAlloc(strlen(sTemp)+1);
    26802684          strcpy(This->sMyPath, sTemp);
    26812685        }
Note: See TracChangeset for help on using the changeset viewer.