get picture from internet

I want use CInternetSession CHttpConnection to get a picture from a web site, how can I get the img element by give a URL? I know how to get a file by name . but I don't know how to enum the file of a web site. How to resolve this problem.
I don't think there is an HTTP command to list the files at an address. You might have to access a webpage where there are links to all the images and parse it
I get the webpage ,and parse all the links .I only can parse it by find string like: http://***.jpg or others.

I use openURL to open a URL,it return success.
but when I call QueryInfo(HTTP_QUERY_CONTENT_LENGTH,dwFileLength);
I can not get the right dwFileLength.why?because of the protocol? or I use the function wrong?
Topic archived. No new replies allowed.