detect navigation stop / cancel

Hello

How can a BHO detect that a navigation has been cancelled / stopped ? I wasn't able to find this anywhere. Is there such a thing ?
Related: is there a way to identify a navigation ? Such as a function or something that returns a (long or string) unique navigation id. The main URL isn't enough since it can change many times during a navigation.

Regards
V. Sim.

[387 byte] By [VladSimionescu] at [2008-1-10]
# 1

Hi,

NavigateError.

Event NavigateError(pDisp As Object, URL, Frame, StatusCode, Cancel As Boolean)

StatusCode

OLECMDID_STOP

To all - for an updated list of OLECMD enums see

http://msdn2.microsoft.com/en-us/library/ms691264.aspx theres some nifty new ones there!

Regards.

IECUSTOMIZER at 2007-10-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...
# 2
Thanks.
Unfortunately it doesn't work. I don't receive the NavigateError event.
Let me explain the context in some detail:

The user navigates to a page, then at some point (before the DocumentComplete event) he presses Escape. The page stops loading. I want to know in the BHO that this has happened. I don't receive any NavigateError event in this scenario.
I work in C++, Visual Studio 6 which is prior to IE6. It shouldn't be a problem I think, because I do receive NavigationError events in other cases, when an actual navigation error has occured, such as if the URL was wrong. Note that the MSDN page for the event says: "This event fires before Internet Explorer displays an error page due to an error in navigation.". This is not my scenario. In my scenario, IE either displays the new page or the old one, depending on the moment at which Cancel was pressed.

see http://msdn2.microsoft.com/en-us/library/bb268221.aspx

Regards
V. Sim.

VladSimionescu at 2007-10-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...