Changeset 7014
- Timestamp:
- Oct 11, 2001, 4:33:03 AM (24 years ago)
- Location:
- trunk/src/shell32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/shell32/pidl.c ¶
r7012 r7014 50 50 LPITEMIDLIST _Optlink ODIN_ILClone (LPCITEMIDLIST pidl); 51 51 DWORD _Optlink ODIN_ILGetSize(LPITEMIDLIST pidl); 52 53 void _Optlink ODIN_SHFree (LPVOID x); 54 LPVOID _Optlink ODIN_SHAlloc (DWORD len); 55 52 56 53 57 … … 230 234 231 235 len = ODIN_ILGetSize(pidl); 232 newpidl = (LPITEMIDLIST) SHAlloc(len);236 newpidl = (LPITEMIDLIST)ODIN_SHAlloc(len); 233 237 if (newpidl) 234 238 memcpy(newpidl,pidl,len); … … 256 260 { 257 261 len = pidl->mkid.cb; 258 pidlNew = (LPITEMIDLIST) SHAlloc (len+2);262 pidlNew = (LPITEMIDLIST) ODIN_SHAlloc (len+2); 259 263 if (pidlNew) 260 264 { … … 287 291 288 292 if (*ppPidl) 289 { SHFree(*ppPidl);293 { ODIN_SHFree(*ppPidl); 290 294 *ppPidl = NULL; 291 295 } … … 294 298 295 299 if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead))) 296 { *ppPidl = SHAlloc (wLen);300 { *ppPidl = ODIN_SHAlloc (wLen); 297 301 if (SUCCEEDED(IStream_Read(pStream, *ppPidl , wLen, &dwBytesRead))) 298 302 { ret = S_OK; 299 303 } 300 304 else 301 { SHFree(*ppPidl);305 { ODIN_SHFree(*ppPidl); 302 306 *ppPidl = NULL; 303 307 } … … 306 310 /* we are not yet fully compatible */ 307 311 if (!pcheck(*ppPidl)) 308 { SHFree(*ppPidl);312 { ODIN_SHFree(*ppPidl); 309 313 *ppPidl = NULL; 310 314 } … … 636 640 len1 = ODIN_ILGetSize(pidl1)-2; 637 641 len2 = ODIN_ILGetSize(pidl2); 638 pidlNew = SHAlloc(len1+len2);642 pidlNew = ODIN_SHAlloc(len1+len2); 639 643 640 644 if (pidlNew) … … 765 769 idlRet = ODIN_ILClone(item); 766 770 if (pidl) 767 SHFree (pidl);771 ODIN_SHFree (pidl); 768 772 return idlRet; 769 773 } … … 778 782 } 779 783 780 SHFree(pidl);784 ODIN_SHFree(pidl); 781 785 return idlRet; 782 786 } … … 794 798 if(!pidl) 795 799 return FALSE; 796 SHFree(pidl);800 ODIN_SHFree(pidl); 797 801 return TRUE; 798 802 } … … 1189 1193 ILFree (pidlChild); 1190 1194 1191 SHFree (pidlParent);1195 ODIN_SHFree (pidlParent); 1192 1196 if (psf) IShellFolder_Release(psf); 1193 1197 } … … 1399 1403 } 1400 1404 1401 if(!(pidlOut = SHAlloc(uSize + 2))) return NULL;1405 if(!(pidlOut = ODIN_SHAlloc(uSize + 2))) return NULL; 1402 1406 ZeroMemory(pidlOut, uSize + 2); 1403 1407 pidlOut->mkid.cb = uSize; … … 1930 1934 if(apidl) 1931 1935 { 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); 1934 1938 } 1935 1939 } … … 1943 1947 { 1944 1948 int i; 1945 LPITEMIDLIST * apidldest = (LPITEMIDLIST*) SHAlloc(cidl * sizeof(LPITEMIDLIST));1949 LPITEMIDLIST * apidldest = (LPITEMIDLIST*)ODIN_SHAlloc(cidl * sizeof(LPITEMIDLIST)); 1946 1950 if(!apidlsrc) return NULL; 1947 1951 … … 1960 1964 { 1961 1965 int i; 1962 LPITEMIDLIST * dst = (LPITEMIDLIST*) SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));1966 LPITEMIDLIST * dst = (LPITEMIDLIST*)ODIN_SHAlloc(cida->cidl * sizeof(LPITEMIDLIST)); 1963 1967 1964 1968 if(!dst) return NULL; -
TabularUnified trunk/src/shell32/shellord.c ¶
r6810 r7014 6 6 * 1998 Jürgen Schmied 7 7 */ 8 9 /**************************************************************************** 10 * includes 11 ****************************************************************************/ 12 13 #include <odin.h> 14 #include <os2sel.h> 15 #include <odinwrap.h> 16 17 ODINDEBUGCHANNEL(SHELL32-SHELLORD) 18 19 8 20 #include <string.h> 9 21 #include <stdio.h> … … 89 101 * 90 102 */ 91 BOOL WINAPI GetFileNameFromBrowse( 92 HWNDhwndOwner,93 LPSTRlpstrFile,94 DWORDnMaxFile,95 LPCSTRlpstrInitialDir,96 LPCSTRlpstrDefExt,97 LPCSTRlpstrFilter,98 LPCSTRlpstrTitle)103 ODINFUNCTION7(BOOL, GetFileNameFromBrowse, 104 HWND, hwndOwner, 105 LPSTR, lpstrFile, 106 DWORD, nMaxFile, 107 LPCSTR, lpstrInitialDir, 108 LPCSTR, lpstrDefExt, 109 LPCSTR, lpstrFilter, 110 LPCSTR, lpstrTitle) 99 111 { 100 112 FIXME("(%04x,%s,%ld,%s,%s,%s,%s):stub.\n", … … 314 326 */ 315 327 #define MEM_DEBUG 0 316 void WINAPI SHFree(LPVOID x) 328 329 ODINPROCEDURE1(SHFree, 330 LPVOID, x) 317 331 { 318 332 #if MEM_DEBUG … … 343 357 * exported by ordinal 344 358 */ 345 LPVOID WINAPI SHAlloc(DWORD len) 359 ODINFUNCTION1(LPVOID, SHAlloc, 360 DWORD, len) 346 361 { 347 362 LPBYTE ret; -
TabularUnified trunk/src/shell32/shlfolder.c ¶
r7012 r7014 44 44 LPITEMIDLIST _Optlink ODIN_ILClone (LPCITEMIDLIST pidl); 45 45 LPITEMIDLIST _Optlink ODIN_ILCloneFirst (LPCITEMIDLIST pidl); 46 LPITEMIDLIST _Optlink ODIN_ILGetNext (LPITEMIDLIST pidl); 47 48 void _Optlink ODIN_SHFree (LPVOID x); 49 LPVOID _Optlink ODIN_SHAlloc (DWORD len); 46 50 47 51 … … 173 177 hr = IPersistFolder_Initialize(pPersistFolder, absPidl); 174 178 IPersistFolder_Release(pPersistFolder); 175 SHFree(absPidl);179 ODIN_SHFree(absPidl); 176 180 *ppvOut = pShellFolder; 177 181 } … … 202 206 if (SUCCEEDED(hr)) 203 207 { 204 pidlNext = ILGetNext(pidl);208 pidlNext = ODIN_ILGetNext(pidl); 205 209 206 210 hr = IShellFolder_GetDisplayNameOf(psfChild, pidlNext, dwFlags | SHGDN_INFOLDER, &strTemp); … … 418 422 TRACE("-- destroyed IShellFolder(%p) was Desktopfolder\n",This); 419 423 } 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); 422 426 HeapFree(GetProcessHeap(),0,This); 423 427 return 0; … … 539 543 540 544 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 */ 542 546 543 547 if(!sf->sMyPath) return NULL; … … 765 769 IPersistFolder_Initialize(pPersistFolder, absPidl); 766 770 IPersistFolder_Release(pPersistFolder); 767 SHFree(absPidl);771 ODIN_SHFree(absPidl); 768 772 } 769 773 else … … 1066 1070 pidl = ODIN_ILCombine(This->absPidl,apidl[0]); 1067 1071 pObj = (LPUNKNOWN)IExtractIconA_Constructor( pidl ); 1068 SHFree(pidl);1072 ODIN_SHFree(pidl); 1069 1073 hr = S_OK; 1070 1074 } … … 1476 1480 pidl = ODIN_ILCombine(This->absPidl, pidlitem); 1477 1481 SHChangeNotifyA(SHCNE_MKDIR, SHCNF_IDLIST, pidl, NULL); 1478 SHFree(pidl);1482 ODIN_SHFree(pidl); 1479 1483 1480 1484 if (ppidlOut) *ppidlOut = pidlitem; … … 1541 1545 pidl = ODIN_ILCombine(This->absPidl, apidl[i]); 1542 1546 SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL); 1543 SHFree(pidl);1547 ODIN_SHFree(pidl); 1544 1548 } 1545 1549 else if (_ILIsValue(apidl[i])) … … 1555 1559 pidl = ODIN_ILCombine(This->absPidl, apidl[i]); 1556 1560 SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL); 1557 SHFree(pidl);1561 ODIN_SHFree(pidl); 1558 1562 } 1559 1563 … … 1597 1601 MESSAGE("would copy %s to %s\n", szSrcPath, szDstPath); 1598 1602 } 1599 SHFree(pidl);1603 ODIN_SHFree(pidl); 1600 1604 } 1601 1605 IPersistFolder2_Release(ppf2); … … 2662 2666 if(This->absPidl) 2663 2667 { 2664 SHFree(This->absPidl);2668 ODIN_SHFree(This->absPidl); 2665 2669 This->absPidl = NULL; 2666 2670 } 2667 2671 if(This->sMyPath) 2668 2672 { 2669 SHFree(This->sMyPath);2673 ODIN_SHFree(This->sMyPath); 2670 2674 This->sMyPath = NULL; 2671 2675 } … … 2677 2681 if (SHGetPathFromIDListA(pidl, sTemp)) 2678 2682 { 2679 This->sMyPath = SHAlloc(strlen(sTemp)+1);2683 This->sMyPath = ODIN_SHAlloc(strlen(sTemp)+1); 2680 2684 strcpy(This->sMyPath, sTemp); 2681 2685 }
Note:
See TracChangeset
for help on using the changeset viewer.