mfc >> Please i need Help.. ( HOW delete a record from internet explorer 's history)

by bertrand doradoux » Mon, 24 Jan 2005 18:20:32 GMT

Hi

(Sorry for my very bad english)

I try to delete a record from Internet explorer' history in Visual c++,
and i found this sample code on the microsoft web site

USES_CONVERSION;
CoInitialize(NULL);

IUrlHistoryStg2* pUrlHistoryStg2 = NULL;
HRESULT hr = CoCreateInstance(CLSID_CUrlHistory,NULL, CLSCTX_INPROC,
IID_IUrlHistoryStg2,(void**)&pUrlHistoryStg2);

IEnumSTATURL* pEnumURL;
hr = pUrlHistoryStg2->EnumUrls(&pEnumURL);

STATURL suURL;
ULONG pceltFetched;
suURL.cbSize = sizeof(suURL);
hr = pEnumURL->Reset();

while((hr = pEnumURL->Next(1, &suURL, &pceltFetched)) == S_OK)
{
hr = pUrlHistoryStg2->DeleteUrl(suURL.pwcsUrl, 0);
printf("\"%s\" deleted.\n", W2T(suURL.pwcsUrl));
}

pEnumURL->Release();
pUrlHistoryStg2->Release();
CoUninitialize();


But when i execute this code the fonction pUrlHistoryStg2->DeleteUrl(...)
has no effect.

Please have you a solution ?







Similar Threads

1. Please i need Help.. ( HOW delete a record from internet explorer 's history)

2. trouble deleting history recorded by internet explorer

from the tool bar, view, history option, on the left hand 
side a list of everything you have done on your computer 
is recorded. I do not want everything recorded. so i have 
2 questions
1) how do you delete everything that is already stored?
2)how do you turn of the record button, if there is one, 
so your internet explorer does not record or log 
everything you do.

things i have done, in internet options, i have changed 
the days of history to 0, so the problem only ly's with 
the current day i am working with. i have deteled files 
and cleared history and deleted cookies. all that does 
not work. it worked at one point, but it doesnt work 
anymore, can anyone please help. THANKS A MILLION

3. Please i need Help.. ( HOW to delete a record from internet explorer 's history)

4. Unable to delete history items Windows Explorer History (not IE History)

I have some old history items that I can see via Windows Explorer's
history, but I cannot delete them. Note: these are recently opened
documents visible in the Windows Explorer history (*NOT* URLs visible
in IE's history).

I've brought up the history panel in Explorer, I select view 'By Most
Visited'. I right-click the item to be deleted, select delete, get a
confirmation prompt, answer in the affirmative. But the item never gets
deleted or moved to recycle bin. Yet no error message is displayed.

I'm logged in as Administrator on a standalone W2K Pro machine.

Perhaps a related issue, or important clue, is that I do not see ANY
history items in the other views ('By Date', 'By Site', 'By Order
Visited Today'). I only see history items if I select the view 'By Most
Visited'.

[btw what is the the difference between IE History and Windows Explorer
History? Is IE history stored within Explorer history?]

Thanks,
-Bob
 Andover, MA

5. Internet Explorer Question - Please help - CSharp/C#

6. Internet Explorer History

HI all
I want to delete Internet Explorer's history , for this using method
ClearHistory  of IUrlHistoryStg2 interface.
the code that i am using is as follows

 HRESULT  hRes;
 IUrlHistoryStg2* pUrlHistoryStg2 = NULL;
 CoInitialize(NULL);

  hRes  =  CoCreateInstance(CLSID_CUrlHistory, NULL,
   CLSCTX_INPROC_SERVER, IID_IUrlHistoryStg2,
   (void**)&pUrlHistoryStg2);

  if(SUCCEEDED(hRes))
  {
  hRes =  pUrlHistoryStg2 -> ClearHistory();
  }
  MessageBox("History is Cleaned");


here the function succeeded bu does not clear the history.

Please suggest me how to clear history of Internet Explorer.

Thanks


7. Toolbar plugin for Internet Explorer (need some help)

8. Internet Explorer History help needed

I've been having a problem with my Internet Explorer 
browser lately.  I'm running IE v.6.0 in a Windows XP 
system, and there's never been any problems, but starting 
a few days ago, I've been unable to clear my history of 
viewed websites.  Traditionally, every night I've always 
cleared my history just to free up a little space by 
going to Tools/Internet Options/ and under the "General" 
tab, selecting "Clear History".  However, now the history 
still remains even after I click the clear history 
button.  Cookies and other files are still deleting as 
they should, but my history remains.  How can I remedy 
this problem?  Thank you for your help.