本文介绍了如何获取Internet Explorer的下载历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以获取IE的下载历史记录?
Is there any way to get Downloads history of IE?
我们从downloads.sqlite文件中获取Firefox的下载历史记录,并从history.sqlite文件中获取Chrome的下载历史记录.
We get Downloads history of Firefox from downloads.sqlite file and we get download history of Chrome from history.sqlite file.
但是如何在IE中查找?
But how to find out in IE?
推荐答案
尝试以下代码段:
public class InternetExplorer
{
// List of URL objects
public List<URL> URLs { get; set; }
public IEnumerable<URL> GetHistory()
{
// Initiate main object
UrlHistoryWrapperClass urlhistory = new UrlHistoryWrapperClass();
// Enumerate URLs in History
UrlHistoryWrapperClass.STATURLEnumerator enumerator =
urlhistory.GetEnumerator();
// Iterate through the enumeration
while (enumerator.MoveNext())
{
// Obtain URL and Title
string url = enumerator.Current.URL.Replace('\'', ' ');
// In the title, eliminate single quotes to avoid confusion
string title = string.IsNullOrEmpty(enumerator.Current.Title)
? enumerator.Current.Title.Replace('\'', ' ') : "";
// Create new entry
URL U = new URL(url, title, "Internet Explorer");
// Add entry to list
URLs.Add(U);
}
// Optional
enumerator.Reset();
// Clear URL History
urlhistory.ClearHistory();
return URLs;
}
}
参考文献:
这篇关于如何获取Internet Explorer的下载历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!