Solution to Delete Temporary Internet Files in IE 6
Posted by divesh4u
on 06/09/2006 07:25am
You can do this by following steps:
You can type simpely in header
#pragma comment(lib, "wininet.lib")
In the your Project in VC++ 6.0
Go to Project -> Settings -> Links
In the Object/Library Modules type: Wininet.lib
It will definately work.
Divesh K. Jain
How does it work?
Posted by WorldNet
on 10/03/2006 03:53pm
Are you going to use a NOTEPAD to use this code? Thanks
I tried to use your code in order to read the content of a dynamic web page (written in PHP), which always has a different content. I used your Clear Histoy code and it works, but this function doesn't work... I get the following erros:
--------------------Configuration: HS_VC - Win32 Debug--------------------
HS_VCDlg.obj : error LNK2001: unresolved external symbol __imp__FindCloseUrlCache@4
HS_VCDlg.obj : error LNK2001: unresolved external symbol __imp__DeleteUrlCacheEntry@4
HS_VCDlg.obj : error LNK2001: unresolved external symbol __imp__FindNextUrlCacheEntryA@12
HS_VCDlg.obj : error LNK2001: unresolved external symbol __imp__FindFirstUrlCacheEntryA@12
Debug/HS_VC.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
HS_VC.exe - 5 error(s), 0 warning(s)
I'm using IE 6.0 ... under Windows XP with VC++ 6.0. This code is only for IE5??? Why it doesn't work for me ??? It's really strange...
Posted by divesh4u
on 06/09/2006 07:34am
Look at my Topic
Solution To Delete
Temporary Internet Files in IE 6
How to recognise the file extension of cached items in the Internet Temporary Files folder ?
Posted by Legacy
on 01/15/2004 12:00am
Originally posted by:
I am making a programme that is expected to be able to fetch the pictures files in the Internet Temporary Files folder, such as .jpg and .gif etc. My thoughts is to use winInet API to recognise each cacheEntry's extension, if it is .jpg or .gif then do the further manipulation.
The CacheEntry variable is definded as:
LPINTERNET_CACHE_ENTRY_INFO lpCacheEntry = NULL;
In a loop, when each item is fetched by FindNextUrlCacheEntry , and then I wish to use lpCacheEntry -> lpszFileExtension to find out the extension of the cached entry. The problem is lpCacheEntry -> lpszFileExtension seems cannot contain some extention like "jpg" or "gif", (but I found no prolem with "htm" or "css" etc.)so I cannot use something like:
if (lpCacheEntry -> lpszFileExtension is "jpg") then do....
This is exactly what I need to do. But I need to do it as part of a larger C# app. I've been trying to set up the DLLImport stuff to call the wininet dll from C#. Works for some of the simplier calls in winint - like InternetGetConnectedState.
Where I'm stumped is how to declare the functions and structures for calls to FindFirstUrlCacheEntry and such. The memory allocation and such makes this not nearly as straight forward.
Has anyone done this for C#?
How do u do this in C#
Posted by saravanan_article
on 01/30/2006 11:22pm
this is exactly what i need to do but these things need to be do in C#. Please post the code.
I am trying to create a DLL from this clear temp files program using Visual Studio .NET and I get a lot of errors like:
error C2061: syntax error : identifier 'HINTERNET'
error C2059: syntax error : ';'
error C2061: syntax error : identifier 'DWORD'
more than 100 errors.
I have included the following at the start of the file:
#pragma comment(lib, "WinInet.lib")
Here is the command I use to create the dll:
cl -I -LD ClearTempFile.c -Fecookie.dll