Saving Image from IHTMLDocument2/HTTPWebResponse

masterapi

New member
Joined
Dec 5, 2011
Messages
1
Programming Experience
10+
Hello,

I'm having an issue saving an image from an IHTMLDocument2 obtained by a HTTPWebResponse. Here's what I'm working with.

I'm using a POST method to pass variables to a website. That website then generates a response from a database, including both data and an image. I'm able to extract all of the data I need from the response but I can't get the image.

Here's the problem. When the server sends a response, it places the image in a temporary folder and it is only valid for the one time the data is sent. So when I try and download it from the SRC URL, it is no longer there and generates an error. I haven't had any luck with drawing the image from a stream reader either.

Anyone have any ideas on what might help?
 
Presumably the first response is a page containing an <img> tag and a URL. Are you making the first request for the page and the second request for the image within the same session?
 
Back
Top