473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Image retrieval in IE's browser cache (Win32)

For background on this problem, see:
http://support.microsoft.com/kb/q249232/

I essentially get a IHTMLWindow2 object, IHTMLDocument2 object, etc..
from an HWND of an internet explorer process. You can think of it as
"hooking", but it probably isn't true hooking since I'm not altering
any normal calls with my own.

Now, I got some image recognition code I want to use with some browser
input. I don't want to use URLDownloadToFile(); because of a nasty
little server protection I'm faced with: The webserver deletes the
image after its downloaded!

This means I only get ONE shot at the file, and URLDownloadToFile()
generates a separate access attempt (after Internet Explorer's access
attempt) -- which won't work for my .... very specializationed
situation. The image will be gone.

However, IE should still have the image in cache, or in RAM, or
wherever it is when it blits to the screen in my browser frame. :) I
searched my Temporary Internet Files and didn't find it there...

What I need to do is find the name of a function to fetch that little
image out of IE and save it to disk.

The closest I came to was something like this:

CComPtr<IHTMLDocument2> spDoc2;
VARIANT sVar;
VARIANT_BOOL bUnused;
BSTR bstrCommand;

sVar.vt = VT_BSTR;
sVar.bstrVal = ::SysAllocString(L"C:\\file.test");
bstrCommand = ::SysAllocString(L"SaveAs");
spWin2->get_document(&spDoc2);
spDoc2->execCommand(bstrCommand, VARIANT_FALSE, sVar, &bUnused);
::SysFreeString(sVar.bstrVal);
::SysFreeString(sCmd.bstrVal);
--

However, god bless Microsoft, SaveAs.... doesn't work =-) They admit
it so in MSDN KB244757.

I am willing to try orthodox or unorthodox solutions alike. Some
function names or DLL names of things I could use are proably what I'm
looking for.

However, if anyone knows if I could make a memory pointer and start
walking up the address space to umm... grab... the data from IE's,
memory, that should work as well :)

Nov 22 '05 #1
2 1934
ad**********@gmail.com wrote:
[completely OT redacted]


Standard C++ knows nothing about IHTMLWindow, HWND, CComPtr, VARIANT,
or IE.

Please ask in a newsgroup topical to Microsoft Windows.

The group microsoft.public.vc.language comes to mind.
Nov 22 '05 #2
Thanks Red, that is the one I was looking for.

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Donjuan | last post by:
Hi all I have trouble with tracking whether my image file is loaded. i use DHTML to change my image. HERE is the code: <img name="someimage" src="1.jpg"...
6
by: Akshay Sen | last post by:
..Net Frmaework 1.1, IE5.5+, IE settings ->Check for never versions of stored pages for "Every visit to the page" Question: I have used web control Image button. Sometimes the button (I mean...
4
by: Jake | last post by:
Does cookieless session state (with the sessionid embedded into the url) interfere with the browser's retrieval of cached images from one session to the next? Does the sessionid embedded into the...
17
by: santel_helvis | last post by:
Hi All, Could anyone tell me how to rotate the image in javascript. Which concepts I should concentrate to rotate the image
9
by: klausklausenator | last post by:
Hi all, I have a php-generated webpage with images. My problem is: the Internet Explorer cannot calculate the correct image size. Because of this the images are not cached. So everytime a user...
6
by: Mark Denardo | last post by:
I created a Web Image "<asp:Image ID="Image1" ..." that my code behind set to a certain image file say image1.jpg =Image1.ImageUrl = "<rel_path>/image1.jpg"; which set the image ok, but then I...
4
by: Vertuas | last post by:
Hi All, Is there a way to get PHP to change the mime type for a file sent to a browser. I need my website viewers to be able to click a link to directly download and save an image, rather...
3
by: kayahr | last post by:
Hi there, I have a strange problem in Internet Explorer (IE6 and IE7). I'm writing a JavaScript application which allows the user to edit a photo composition. So when the user selects a photo then...
8
by: Edward Diener | last post by:
Is there a way in Javascript, or perhaps in HTML, to force a browser to re-render an image on an HTML page after a round-trip between the client and the server ? In my particular case, the image...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.