URLHIST Interfaces
The Header-file Urlhist.h is translated to delphi and included in TUrlHistory Component. Here is a short description of the interfaces:
StatUrl
Staturl contains information about the enumerated entry in Urlhistory. CbSize: Size of StatUrl structure. pwcsTitel : Pointer to a 0-terminated string containing the titel. ftLastVisited : Date/time the page was last visited. Even if it only was read from cache. ftLastUpdated: Date/time the page was last actually read. ftExpires: Date/time the page will be deletes from urlhistory. dwFlags:
To convert url and title to strings, you can use
To convert FILETIME to TDateTime:
|
||||||||||||||||||||||||||
IEnumStatUrl
Clone: Creates a duplicate enumerator containing the same enumeration state as the current one. Returns S_OK if successful, or E_POINTER if ppEnum is an invalid pointer. ppEnum duplicate of the enumerator.
Next: Retrieves the specified number of staturl records in the enumeration sequence. Returns one of the following values:
Reset: Resets the enumeration sequence to the beginning. Returns S_OK if successful. This method affects the return value of the next call to the IEnumStatUrl.Next method.
Skip: Skips a specified number of Call objects in the enumeration sequence. Returns one of the following values:
This method affects the return value of the next call to the IEnumStatUrl.Next method.
SetFilter:
SetFilter('http://',0) retrieves only entries starting with 'http.//'. IUrlHistoryStgThis interface manages Internet Explorer history for the current user.
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. IE/Webbrowser call this function when a document is loaded. Ex: AddUrl(PWideChar('http://www.microsoft.com'), PWidechar('Microsoft Corporation',0); Flags: not implemented
Not Implemented.
DeleteUrl: Delete a url from the history folder. DeleteUrl(PWideChar('http://www.microsoft.com'),0); Flags: not implemented.
QueryUrl: QueryUrl is called whenever the IE/Webbrowser wants to know if a
links has been visited before. That means a call for every link
on a page about to be displayed, so the color of link (visited/not
visited) can be determined.
EnumUrls: Returns an instance of IEnumStatUrl:
IUrlHistoryStg2
AddUrlAndNotify: Not Implemented
ClearHistory: Deletes all entries in history.
The webbrowser makes a QueryInterface on IOleClientSite to get the
IServiceProvider Interface. The IServiceProvider is an interface that
gives you a way to obtain other interfaces that are related to the
objet but not directly. Then webbrowser call
IServiceProvider.QueryService(SID_STopLevelBrowser, IID_IUrlHistoryStg,
UrlHist) to get IUrlHistoryStg interface.
|