#include <windows.h>
#include <lmcons.h>
#include <wininet.h>
#include <stdio.h>
#pragma comment(lib,"wininet.lib")
void
WalkCache ()
{
BYTE byBuffer[20480];
LPINTERNET_CACHE_ENTRY_INFO lpInfo = LPINTERNET_CACHE_ENTRY_INFO
(byBuffer);
DWORD dwSize = sizeof (byBuffer);;
lpInfo->dwStructSize = sizeof (INTERNET_CACHE_ENTRY_INFO);
HANDLE h;
BOOL bSuccess = TRUE;
for (h = FindFirstUrlCacheEntryEx (NULL, 0,
URLCACHE_FIND_DEFAULT_FILTER,
0, lpInfo, &dwSize, 0, 0, 0);
h && bSuccess;
bSuccess = FindNextUrlCacheEntryEx (h, lpInfo, &dwSize, 0, 0, 0))
{
dwSize = sizeof (byBuffer);
printf ("%s/n", lpInfo->lpszSourceUrlName);
} FindCloseUrlCache (h);
}
int
main (int argc, char **argv)
{
WalkCache ();
return 0;
}
#include <lmcons.h>
#include <wininet.h>
#include <stdio.h>
#pragma comment(lib,"wininet.lib")
void
WalkCache ()
{
BYTE byBuffer[20480];
LPINTERNET_CACHE_ENTRY_INFO lpInfo = LPINTERNET_CACHE_ENTRY_INFO
(byBuffer);
DWORD dwSize = sizeof (byBuffer);;
lpInfo->dwStructSize = sizeof (INTERNET_CACHE_ENTRY_INFO);
HANDLE h;
BOOL bSuccess = TRUE;
for (h = FindFirstUrlCacheEntryEx (NULL, 0,
URLCACHE_FIND_DEFAULT_FILTER,
0, lpInfo, &dwSize, 0, 0, 0);
h && bSuccess;
bSuccess = FindNextUrlCacheEntryEx (h, lpInfo, &dwSize, 0, 0, 0))
{
dwSize = sizeof (byBuffer);
printf ("%s/n", lpInfo->lpszSourceUrlName);
} FindCloseUrlCache (h);
}
int
main (int argc, char **argv)
{
WalkCache ();
return 0;
}