Determine the location of the buffer file of IE and obtain the file

xiaoxiao2021-03-06  15

The project was added Wininet.lib going int WINAPI EnumerateCacheOld (HWND hX) {DWORD dwEntrySize; LPINTERNET_CACHE_ENTRY_INFO lpCacheEntry; DWORD MAX_CACHE_ENTRY_INFO_SIZE = 4096; HANDLE hCacheDir; int nCount = 0;

Senddlgitemmessage (HX, IDC_CacheList, LB_RESETCONTENT, 0, 0); setCursor (loadcursor (null, idc_wait);

DWENTRYSIZE = MAX_CACHE_ENTRY_INFO_SIZE; LPCACHEENTRY = (lpinternet_cache_entry_info) New char [dwenTrySize]; lpcacheentry-> dwstructsize = dwenTrySize;

Again:

if (! (hCacheDir = FindFirstUrlCacheEntry (NULL, lpCacheEntry, & dwEntrySize))) {delete [] lpCacheEntry; switch (GetLastError ()) {case ERROR_NO_MORE_ITEMS: char tempout [80]; sprintf (tempout, "The number of cache entries =% d / n ", nCount); MessageBox (hX, tempout," Cache Enumeration ", MB_OK); FindCloseUrlCache (hCacheDir); SetCursor (LoadCursor (NULL, IDC_ARROW)); return TRUE; break; case ERROR_INSUFFICIENT_BUFFER: lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char [dwEntrySize]; lpCacheEntry-> dwStructSize = dwEntrySize; goto again; break; default: ErrorOut (hX, GetLastError (), "FindNextUrlCacheEntry Init"); FindCloseUrlCache (hCacheDir); SetCursor (LoadCursor (NULL, IDC_ARROW)); Return false;}}

SendDlgItemMessage (hX, IDC_CacheList, LB_ADDSTRING, 0, (LPARAM) (lpCacheEntry-> lpszSourceUrlName)); nCount ; delete (lpCacheEntry); do {dwEntrySize = MAX_CACHE_ENTRY_INFO_SIZE; lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char [dwEntrySize]; lpCacheEntry-> dwStructSize = DWENTRYSIZE;

retry: if {delete [] lpCacheEntry; switch (GetLastError ()) {case ERROR_NO_MORE_ITEMS (FindNextUrlCacheEntry (hCacheDir, lpCacheEntry, & dwEntrySize)!): char tempout [80]; sprintf (tempout, "The number of cache entries =% d / n ", nCount); MessageBox (hX, tempout," Cache Enumeration ", MB_OK); FindCloseUrlCache (hCacheDir); return TRUE; break; case ERROR_INSUFFICIENT_BUFFER: lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char [dwEntrySize]; LPCachentry-> dwstructSize = dwenTrySize; goto retry; break; default: error (HX, getLastError (), "FindNextURLCACHEENTRY INIT"; findcloseurlcache (hcachedir); return false;}}

SendDlgItemMessage (hX, IDC_CacheList, LB_ADDSTRING, 0, (LPARAM) (lpCacheEntry-> lpszSourceUrlName)); nCount ; delete [] lpCacheEntry;} while (TRUE); SetCursor (LoadCursor (NULL, IDC_ARROW)); return TRUE;}

转载请注明原文地址:https://www.9cbs.com/read-46303.html

New Post(0)