|
|
Windows Registry: 1. Open Borland C++ Builder. 2. Place a Button on the form. 3. Place a Memo on the form and make its width at least 300 and height at least 150 with scrollbars. 4. Double click Button1. 5. Type the following red code in the button function: //This is what the Button1 function should look like: void __fastcall TForm1::Button1Click(TObject *Sender) { int i = 0; int nLength; int nCounter = 0; HKEY hkey = NULL; char szTmpStr[255]; char szUrl[256]; char szValue[256]; Memo1->Clear(); strcpy(szTmpStr, "Software\\Microsoft\\Internet Explorer\\TypedURLs\\"); RegOpenKeyEx(HKEY_CURRENT_USER, szTmpStr, NULL, KEY_ALL_ACCESS, &hkey); for(i = 1; i < 2000; i++) { nLength = sizeof(szValue); strcpy(szUrl, ""); sprintf(szUrl, "url%d", i); { Memo1->Lines->Add(szValue); { nCounter = 1; } nCounter++; } else break; } RegCloseKey(hkey); } //--------------------------------------------------------------------------- 6. Run the program, click Button1. The Memo1 will be filled with any address you might have typed into Internet Explorers address bar. Note: nothing will appear in the box if you've never typed anything into the address bar of Internet Explorer. So if you know you have not, you may want to before trying this program. To delete the typed entries use this code in the for loop: if(RegDeleteValue(hkey, szUrl) != ERROR_SUCCESS) break; |