// 获取路径
AnsiString strPath;
GetDlgItemText(EditCachePath, strPath);
strPath += "\\*.*";
//路径是: C:\\Documents and Settings\\Administrator\\Local Settings\\Temporary Internet Files\\*.*WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(strPath, &fd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
ListBoxFile->AddString(fd.cFileName);
} while (FindNextFile(hFind, &fd));
}结果居然是:
---------------------
.
..
Content.IE5
Content.MSO
Content.Word
desktop.ini
---------------------
Windows是不是在这里做了手脚?要怎么才能获取到全部的网页缓存文件呢?
你可以用1楼给的函数来查找缓存信息。
{
try
{ HANDLE hEntry;
LPINTERNET_CACHE_ENTRY_INFO lpCacheEntry = NULL;
DWORD dwEntrySize = 0; hEntry = FindFirstUrlCacheEntry(NULL, NULL, &dwEntrySize);
lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char[dwEntrySize];
hEntry = FindFirstUrlCacheEntry(NULL, lpCacheEntry, &dwEntrySize);
if(hEntry)
{
do
{
//(lpCacheEntry->lpszSourceUrlName); --- file name
dwEntrySize = 0;
FindNextUrlCacheEntry(hEntry, NULL, &dwEntrySize);
delete [] lpCacheEntry;
lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char[dwEntrySize];
}
while (FindNextUrlCacheEntry(hEntry, lpCacheEntry, &dwEntrySize));
}
要包含什么头文件或者LIB吗
为什么连接一直错误呢