This component was born out of frustration, since I wasn't able to connect to an existing instance of Internet Explorer AND catch the events it fires. There must be a better way to do it, let me know if you have figured it out. I use timers.
EIdNotFound = class(Exception);
TShellWindow = class
id : integer;
handle : HWND;
LocationURL : String;
LocationName : String;
IEHandle : IWebBrowser2;
end;
TOnAddedEntry = procedure (Sender : TObject; ShellWindow : TShellWindow; Str : String) of object;Str is in the form ID:URL:TITLE:TIME, and it is added at the end of the LoggedChanges Property, and the delimiter, in this example :, is set through the Delimiter PropertyTOnChangedNumber = procedure (Sender : TObject; Number : Integer) of object;
Fired whenever an instance of Internet Explorer is closed or opened. Number is the current number of opened instances
LoggingDirs : Boolean Delimiter : Char
Active : boolean
LoggedChanges (runtime) : TStrings WindowList : TList (runtime) function GetShellWindowOnId(Id : integer) : TShellWindow;
OnAddedEntry : TOnAddedEntry;
OnChangedNumber : TOnChangedNumber;