internet explorer history
-
Hi - How can I enumerate the internet explorer history items? Windows explorer seems to manage...? I enumerated all the objects in the shell namespace, but where the history should be, I get : e0000077:[5] History e0000077:[6] History.IE5 40400177:[7] index.dat 40400177:[7] desktop.ini 70400177:[7] MSHist012000052220000529 40400177:[8] index.dat 70400177:[7] MSHist012000052920000605 40400177:[8] index.dat 70400177:[7] MSHist012000060520000606 40400177:[8] index.dat 70400177:[7] MSHist012000060620000607 40400177:[8] index.dat 70400177:[7] MSHist012000060720000608 40400177:[8] index.dat 70400177:[7] MSHist012000060820000609 40400177:[8] index.dat 70400177:[7] MSHist012000060920000610 40400177:[8] index.dat 70400177:[7] MSHist012000061020000611 40400177:[8] index.dat 70400177:[7] MSHist012000061120000612 40400177:[8] index.dat 40400177:[6] desktop.ini Cheers, Charlie.
-
Hi - How can I enumerate the internet explorer history items? Windows explorer seems to manage...? I enumerated all the objects in the shell namespace, but where the history should be, I get : e0000077:[5] History e0000077:[6] History.IE5 40400177:[7] index.dat 40400177:[7] desktop.ini 70400177:[7] MSHist012000052220000529 40400177:[8] index.dat 70400177:[7] MSHist012000052920000605 40400177:[8] index.dat 70400177:[7] MSHist012000060520000606 40400177:[8] index.dat 70400177:[7] MSHist012000060620000607 40400177:[8] index.dat 70400177:[7] MSHist012000060720000608 40400177:[8] index.dat 70400177:[7] MSHist012000060820000609 40400177:[8] index.dat 70400177:[7] MSHist012000060920000610 40400177:[8] index.dat 70400177:[7] MSHist012000061020000611 40400177:[8] index.dat 70400177:[7] MSHist012000061120000612 40400177:[8] index.dat 40400177:[6] desktop.ini Cheers, Charlie.
Look up FindFirstUrlCacheEntry() and the related functions. Here's some code for a console app that prints all history item to stdout. The history view you see in Explorer is generated by a namespace extension.
#define WIN32_LEAN_AND_MEAN
#include <afxwin.h>
#include <tchar.h>
#include <wininet.h>
#include <iostream>using namespace std;
int main(int argc, char* argv[])
{
HANDLE hFind;
BYTE byBuffer[16384];
INTERNET_CACHE_ENTRY_INFO* pInfo = (INTERNET_CACHE_ENTRY_INFO*) &byBuffer[0];
DWORD dwSize = sizeof(byBuffer);pInfo->dwStructSize = sizeof(INTERNET\_CACHE\_ENTRY\_INFO); hFind = FindFirstUrlCacheEntry ( \_T("visited:"), pInfo, &dwSize ); if ( NULL != hFind ) { do { cout << "lpstrSourceUrlName = " << pInfo->lpszSourceUrlName << endl << "Times visited = " << pInfo->dwHitRate << endl << "Last time visited = "; CTime t ( pInfo->LastAccessTime ); cout << (LPCTSTR) t.Format( "%b %d, %Y at %H:%M:%S" ) << endl << endl; dwSize = sizeof(byBuffer); } while ( FindNextUrlCacheEntry ( hFind, pInfo, &dwSize )); FindCloseUrlCache ( hFind ); } return 0;
}