?
Solved

Make a my own ie cache direcory?

Posted on 1998-09-07
4
Medium Priority
?
599 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 400 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

Independent Software Vendors: 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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

770 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