Solved

Make a my own ie cache direcory?

Posted on 1998-09-07
4
588 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 65
Macro to save highlighted rows as a separate file 5 41
string initialization in java 11 110
mapAB Challlenge 35 126
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now