1、IUrlHistoryStg、IUrlHistoryStg2(IUrlHistoryStg2接口继承自IUrlHistoryStg)
2、IEnumSTATURL
下面接口信息摘自MSDN

This interface manages Microsoft Internet Explorer history for the current user.
IUrlHistoryStg Members
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.
Interface Information
Stock Implementation shdocvw.dll Custom Implementation No Inherits from IUnknown Header and IDL files urlhist.h, urlhist.idl Minimum availability Internet Explorer 5.5 Minimum operating systems Millennium, Windows 2000

This interface provides additional features for managing the user's history.
IUrlHistoryStg2 Members
AddUrlAndNotify Provides an advanced method of adding a URL to the history. ClearHistory Clears history on a per-user basis.
Interface Information
Stock Implementation shdocvw.dll Custom Implementation No Inherits from IUrlHistoryStg Header and IDL files urlhist.h, urlhist.idl Minimum availability Internet Explorer 5.5 Minimum operating systems Millennium, Windows 2000

This interface enumerates the items in the history cache.
IEnumSTATURL Members
Clone Not currently implemented. Next Searches the history for any URL that matches the search pattern and copies it to the specified buffer. Reset Resets the enumerator interface so that it begins enumerating at the beginning of the history. SetFilter IEnumSTATURL::Next compares the specified URL with each URL in the history list to find matches. IEnumSTATURL::Next then copies the list of matches to a buffer. This method is used to specify the URL to compare. Skip Not currently implemented.
Interface Information
Stock Implementation shdocvw.dll Custom Implementation No Inherits from IUnknown Header and IDL files urlhist.h, urlhist.idl Minimum availability Internet Explorer 5.5 Minimum operating systems Millennium, Windows 2000
二、用到的接口中的相关方法:
1、IUrlHistoryStg::EnumUrls









2、IEnumSTATURL::Next





其中结构STATURL定义如下
Contains statistics about a URL. This structure is filled by Microsoft Internet Explorer during calls to IUrlHistoryStg::QueryUrl and IEnumSTATURL::Next.
Syntax
typedef struct _STATURL ...{
DWORD cbSize;
LPWSTR pwcsUrl;
LPWSTR pwcsTitle;
FILETIME ftLastVisited;
FILETIME ftLastUpdated;
FILETIME ftExpires;
DWORD dwFlags;
} STATURL, * LPSTATURL;
Members
cbSize
DWORD that should be set to sizeof (STATURL).
pwcsUrl
The specified URL.The calling function must free this parameter. Set this parameter to STATURL_QUERYFLAG_NOURL if no URL is specified.
pwcsTitle
The title of the Web page, as contained in the title tags. This calling application must free this parameter. Set this parameter to STATURL_QUERYFLAG_NOTITLE if no Web page is specified.
ftLastVisited
The last time the user visited this page.
ftLastUpdated
The last time the page was updated.
ftExpires
The expiry date of the Web page ' s content.
dwFlags
DWORD that can be either STATURL_QUERYFLAG_ISCACHED or STATURL_QUERYFLAG_TOPLEVEL.
三、代码实现(VC6.0+Windows XP)










































