求:读取网站访问记录。(已知相关函数)
各位兄弟:我不是搞C++的,对C++也了解不多。但是我现在碰到一个问题,很需要你们的帮助,如果您能给我提供帮助,我将感激不尽!!)
问题为:已知目录“C:\Documents and Settings\Administrator\Local Settings\History\” ,该目录下存在一个名字为“今天”的对象(这里暂且称为一级目录)。打开对象“今天”时我们可以看到“Internet 主机”列表(相对“今天”,这个可以作为“二级目录”),该列表中的每一个对象都保存了在某个网站访问过的网页。打开某个具体对象时,我们可以看到“Internet 地址”、“标题”和“上次访问时间”(相对“今天”,这个可以作为“三级目录”)。
问:如何获得:“Internet 主机”、“Internet 地址”、“标题”和“上次访问时间”。
(要求将这些内容写入文本文件,记录字段之间以空格隔开,每行一条记录。我需要源码和可运行程序,谢谢!)
相关函数:
try IUrlHistoryStg Interface
http://msdn.microsoft.com/workshop/networking/urlhist/iurlhistorystg/iurlhistory.asp
AddUrl Places the specified URL into the history. If the URL does not exist in the history, an entry is created in the history. If the URL does exist in the history, it is overwritten.
BindToObject Not currently implemented.
DeleteUrl Deletes all instances of the specified URL from the history.
EnumUrls Returns an interface to an enumerator of the history's visited links.
QueryUrl Queries the history and reports whether the URL passed as the pocsUrl parameter has been visited by the current user.
问题点数:20、回复次数:3Top
1 楼fangzhe()回复于 2006-06-04 12:00:50 得分 0
很抱歉地告诉你,你对C:\Documents and Settings\Administrator\Local Settings\History\目录结构的理解根本不对
IUrlHistoryStg也不可以达到目的Top
2 楼lisuzhi008(格桑)回复于 2006-06-04 21:07:09 得分 0
那你你能帮我吗。怎么理解那个目录呢?Top
3 楼fangzhe()回复于 2006-06-04 21:13:06 得分 0
你开个cmd进那个目录看看就知道了,和Windows Explorer里看到的完全不一样
这个问题理论上不是不可行,Windows Explorer不就能这样看吗?
但是我也不会Top




