向高手求救! ( 积分: 100 )

  • 主题发起人 主题发起人 泊杨林
  • 开始时间 开始时间

泊杨林

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么实现删除IE临时文件夹中的文件,而且IE临时文件夹是可以移动的?[?]
 
怎么实现删除IE临时文件夹中的文件,而且IE临时文件夹是可以移动的?[?]
 
C:/Documents and Settings/Administrator/Local Settings/Temporary Internet Files<br>中的文件?
 
看这个网址:<br>http://www.euromind.com/iedelphi/iecache.htm<br>他的 DeleteEntry ...
 
uese<br> &nbsp;WinInet;<br><br>procedure DeleteIECache; //清理IE缓存<br>var<br> &nbsp;lpEntryInfo: PInternetCacheEntryInfo;<br> &nbsp;hCacheDir: LongWord;<br> &nbsp;dwEntrySize: LongWord;<br> &nbsp;cachefile: string;<br> &nbsp;i: integer;<br> &nbsp;cancheqqlist: TStringList;<br>begin<br> &nbsp;cancheqqlist := TStringList.Create;<br> &nbsp;cancheqqlist.Clear;<br> &nbsp;dwEntrySize := 0;<br> &nbsp;FindFirstUrlCacheEntry(nil, TInternetCacheEntryInfo(nil^), dwEntrySize);<br> &nbsp;GetMem(lpEntryInfo, dwEntrySize);<br> &nbsp;if dwEntrySize &gt; 0 then<br> &nbsp; &nbsp;lpEntryInfo^.dwStructSize := dwEntrySize;<br> &nbsp;hCacheDir := FindFirstUrlCacheEntry(nil, lpEntryInfo^, dwEntrySize);<br> &nbsp;if hCacheDir &lt;&gt; 0 then<br> &nbsp;begin<br> &nbsp; &nbsp;repeat<br> &nbsp; &nbsp; &nbsp;if (lpEntryInfo^.CacheEntryType) and (NORMAL_CACHE_ENTRY) = NORMAL_CACHE_ENTRY then<br> &nbsp; &nbsp; &nbsp; &nbsp;cachefile := pchar(lpEntryInfo^.lpszSourceUrlName);<br> &nbsp; &nbsp; &nbsp;cancheqqlist.Add(cachefile);<br> &nbsp; &nbsp; &nbsp;for i := 0 to cancheqqlist.Count - 1 do<br> &nbsp; &nbsp; &nbsp; &nbsp;DeleteUrlCacheEntry(pchar(cancheqqlist.Strings)); //'执行删除<br> &nbsp; &nbsp; &nbsp;FreeMem(lpEntryInfo, dwEntrySize);<br> &nbsp; &nbsp; &nbsp;dwEntrySize := 0;<br> &nbsp; &nbsp; &nbsp;FindNextUrlCacheEntry(hCacheDir, TInternetCacheEntryInfo(nil^), dwEntrySize);<br> &nbsp; &nbsp; &nbsp;GetMem(lpEntryInfo, dwEntrySize);<br> &nbsp; &nbsp; &nbsp;if dwEntrySize &gt; 0 then<br> &nbsp; &nbsp; &nbsp; &nbsp;lpEntryInfo^.dwStructSize := dwEntrySize;<br> &nbsp; &nbsp;until not FindNextUrlCacheEntry(hCacheDir, lpEntryInfo^, dwEntrySize);<br> &nbsp;end;<br> &nbsp;FreeMem(lpEntryInfo, dwEntrySize);<br> &nbsp;FindCloseUrlCache(hCacheDir);<br> &nbsp;cancheqqlist.Free;<br>end;
 
那么实现删除IE的地址栏也是用这样的方法吗?可否给源码!
 
后退
顶部