请问,如何用 Delphi 清除 Ie 的 历史纪录?(6分)

  • 主题发起人 主题发起人 Tempter
  • 开始时间 开始时间
T

Tempter

Unregistered / Unconfirmed
GUEST, unregistred user!
<br><br>如何用 Delphi 清除 Ie 的 历史纪录?<br><br>请指教一下,谢谢了~
 
知道IE的历史纪录在注册表中的位置吗?
 
Documents and Settings/Administrator/Local Settings/History<br>呵呵
 
HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/TypedURLs
 
把注册表的那堆垃圾 干掉,我记不住那里,不过你可以找一个去注册表里searching。<br>没必要记那么多。
 
各位大侠,是不是只需要 干掉 注册表里的键值就可以了?这样好像只能删除“地址”栏里的<br>记录吧!我是想清除“历史”记录啊? <br><br>
 
可以用WinINet里的函索来实现。<br>清除Cookies,可以用以下函数:<br>procedure TMainForm.DeleteCooikes();<br>var<br>&nbsp; lpEntryInfo: PInternetCacheEntryInfo;<br>&nbsp; hHistoryDir: LongWord;<br>&nbsp; dwEntrySize: LongWord;<br>&nbsp; dwLastError: LongWord;<br>begin<br>&nbsp; Screen.Cursor := crHourGlass;<br>&nbsp; try<br>&nbsp; &nbsp; dwEntrySize := 0;<br>&nbsp; &nbsp; FindFirstUrlCacheEntry(nil, TInternetCacheEntryInfo(nil^), dwEntrySize);<br>&nbsp; &nbsp; GetMem(lpEntryInfo, dwEntrySize);<br>&nbsp; &nbsp; try<br>&nbsp; &nbsp; &nbsp; hHistoryDir := FindFirstUrlCacheEntry(nil, lpEntryInfo^, dwEntrySize);<br>&nbsp; &nbsp; &nbsp; if (hHistoryDir &lt;&gt; 0) then<br>&nbsp; &nbsp; &nbsp; &nbsp; if lpEntryInfo^.CacheEntryType = (lpEntryInfo^.CacheEntryType or COOKIE_CACHE_ENTRY) then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );<br>&nbsp; &nbsp; finally<br>&nbsp; &nbsp; &nbsp; &nbsp; DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );<br>&nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; repeat<br>&nbsp; &nbsp; &nbsp; dwEntrySize := 0;<br>&nbsp; &nbsp; &nbsp; FindNextUrlCacheEntry(hHistoryDir, TInternetCacheEntryInfo(nil^), dwEntrySize);<br>&nbsp; &nbsp; &nbsp; dwLastError := GetLastError();<br><br>&nbsp; &nbsp; &nbsp; if (GetLastError = ERROR_INSUFFICIENT_BUFFER) then<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; GetMem(lpEntryInfo, dwEntrySize);<br>&nbsp; &nbsp; &nbsp; &nbsp; try<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (FindNextUrlCacheEntry(hHistoryDir, lpEntryInfo^, dwEntrySize)) then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (lpEntryInfo^.CacheEntryType = (lpEntryInfo^.CacheEntryType or COOKIE_CACHE_ENTRY)) then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );<br>&nbsp; &nbsp; &nbsp; &nbsp; finally<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FreeMem(lpEntryInfo);<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; until ((dwLastError = ERROR_NO_MORE_ITEMS) or (dwLastError = ERROR_INVALID_PARAMETER));<br>&nbsp; finally<br>&nbsp; &nbsp; Screen.Cursor := crDefault;<br>&nbsp; end;<br>end;<br><br>
 
历史 在你的那个什么temp..... 什么的下面<br>也去把他干掉。
 
WinINet函数具体如何用?偶不会呀~ 教教我吧~
 
我给出的是清除Cookies的程序,History和Cache的程序类似!
 
那就将浏览器的临时文件夹和历史记录文件夹统统干掉。
 
to yoku:<br>&nbsp; 小弟很菜,说具体点吧~<br><br>to luckhacker:<br>&nbsp; 如何 干掉 ?好像不容易啊~
 
因为我开发的程序只需要清除Cookies,所以只研究了清除Cookies。<br>仔细看我的程序,方法就在那儿。
 
to yoku;<br>&nbsp; &nbsp;小弟看了好一会儿,里面的很多函数都没用过…… -_-;;; <br>还请这为大哥明示~<br>
 
有人知道吗?帮帮小弟吧~急用啊~
 
http://www.euromind.com/iedelphi/index.htm
 
ie的历史记录是保存在一个系统目录中的,操作系统还维护着一个索引文件,里面记录了internet网址等
 
先创建注册表类的实例,在修改注册表<br>restemp:tregis;<br>HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/TypedURLs &nbsp;<br>置于如何操作,在大富翁上搜索以下就行了<br>很多例子<br>
 
ha ha...狂晕。。。删除那个相应的目录重建最方便,也适合你,嘻嘻。[:)]
 
后退
顶部