Solved

Make a my own ie cache direcory?

Posted on 1998-09-07
4
595 Views
Last Modified: 2013-11-20
I am using IE web control in my application to access some local HTML or remote URL.

When I browse to a certain Local *.html page or remote URL, the file is cached with all its *.gif, *.ocx,...etc in ie catche directories.

I want to do the followings:
1. Get a list (name and physical location on the local HDD)of all these cached files for (only) the currently browsed page.
2. Copy these files to my own cache directory.

Any idea how can I do that with or without webbrowser control. Is there a sample code or class for doing that?

Thanks for the help.

0
Comment
Question by:kawa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1321851
WinInet API has the following cache functions.

The following persistent URL cache functions allow an application to access and manipulate information stored in the cache. Function  Description  
CommitUrlCacheEntry  Caches data in the specified file in the cache storage and associates it with the given URL.  
CreateUrlCacheEntry  Allocates the requested cache storage and creates a local file name for saving the cache entry corresponding to the source name.  
CreateUrlCacheGroup  Generates a cache group identification.  
DeleteUrlCacheEntry  Removes the file associated with the source name from the cache, if the file exists.  
DeleteUrlCacheGroup  Releases a GROUPID and any associated state in the cache index file.  
FindCloseUrlCache  Closes the specified enumeration handle.  
FindFirstUrlCacheEntry  Begins the enumeration of the cache.  
FindFirstUrlCacheEntryEx  Begins a filtered enumeration of the cache.  
FindNextUrlCacheEntry  Retrieves the next entry in the cache.  
FindNextUrlCacheEntryEx  Retrieves the next entry in a filtered cache enumeration.  
GetUrlCacheEntryInfo  Retrieves information about a cache entry.  
GetUrlCacheEntryInfoEx  Searches for the URL after translating any cached redirections that would be applied in offline mode by HttpSendRequest.  
ReadUrlCacheEntryStream  Reads the cached data from a stream that has been opened using RetrieveUrlCacheEntryStream.  
RetrieveUrlCacheEntryFile  Retrieves a cache entry from the cache in the form of a file.  
RetrieveUrlCacheEntryStream  Provides the most efficient and implementation-independent way of accessing the cache data.  
SetUrlCacheEntryGroup  Adds or removes entries from a cache group.  
SetUrlCacheEntryInfo  Sets the specified members of the INTERNET_CACHE_ENTRY_INFO structure.  
UnlockUrlCacheEntryFile  Unlocks the cache entry that was locked while the file was retrieved for use from the cache.  
UnlockUrlCacheEntryStream  Closes the stream that has been retrieved using RetrieveUrlCacheEntryStream.  

You can get the source URLs and local filenames in the cache by using these functions.
0
 

Author Comment

by:kawa
ID: 1321852
Thanks. That seems to be what I am looking for.

However it is a big subject for my humble level. Is there any pointer to an example that is using these functions?
The documentations on VC++ are not clear for me.

0
 
LVL 23

Expert Comment

by:chensu
ID: 1321853
Unfortunately, there is no sample. These functions are quite straightforward. It is not difficult to use. I agree that the documentations are not clear. You may have to do some experiments.

Good luck!
0
 

Author Comment

by:kawa
ID: 1321854
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question