redirecting image download in mshtml
-
Hello ! I have some experience with com/webbrowser/mshtml. Recently I run into a very interesting problem, and after spending some days on it(no success) I decided to try geting some answers from other programmers. So: I wrote a simple browser helper object. On a machine without internet access, when detecting BeforeNavigate2 event, I redirect navigation. For example, if the user enters http://www.google.com, i redirect to http://mygateway/page.aspx?url="http://www.google.com". This works fine, the problem is I can't redirect the location of the objects in the document (objects; images; flash; etc), and the page can not load them. I couldn't find an event that fires when a resource download begins, and a mechanism for redirecting these downloads. (please note that implementing a download manager dows not solve this problem; dm objects are invoked only when the user explicitly selects "download targer..." from the context menu for example). Please let me know if you have any ideas ( is it possible ? is it not ? a source for more info -> i've already read all I could find in msdn and microsoft on this topic and got no answer ). I don't need specific code / code samples, I only need a hint on how to do it. I'm not interested in parsing the html code and modifying the links. pages may contain flash/applets, and i can't parse them to change the links. I need browser redirection. As soon as I'll solve this problem, I'll post the project (no mfc; no atl; just pure C++/Com). All the best, psangeljg ps. I did find a solution, but it's not what I want. I figured that mshtml uses wininet (wininet.dll) to access the resources. I could write my own wininet.dll that calls the actual wininet.dll, changing the urls. However, I try to avoid this soultion, since wininet.dll varies with the os version. Performance is also important.