Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: The history for the current day (Today) is not cleared when you programmatically clear the history in Internet Explorer 6 SP1 or a later version


View products that this article applies to.

Symptoms

When you programmatically clear the history by using the ClearHistory method in one of the versions of Microsoft Internet Explorer 6 that is listed in the "Applies to" section, the history for the current day (Today) is not cleared.

↑ Back to the top


Cause

This problem may occur when Microsoft Windows Explorer holds a reference to a Today history item. For example, this problem may occur if a My Computer folder or an intranet share folder is listed in the history for Today.

Note History items are stored in the following location on the hard disk drive:
C:\Documents and Settings\UserName\Local Settings\History

↑ Back to the top


Resolution

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Microsoft Internet Explorer 6 Service Pack 1 (SP1) for Microsoft Windows 98 and Microsoft Windows Millennium Edition
   Date         Time   Version         Size       File name     
   ----------------------------------------------------------
   13-May-2005  18:59  6.0.2800.1660   1,338,368  Shdocvw.dll
Microsoft Internet Explorer 6 Service Pack 1 (SP1) for Microsoft Windows XP and Microsoft Windows 2000
   Date         Time   Version        Size       File name     
   ---------------------------------------------------------
   13-May-2005  18:59  6.0.2800.1660  1,338,368  Shdocvw.dll
Microsoft Internet Explorer 6 Service Pack 2 (SP2) for Microsoft Windows XP
   Date         Time   Version        Size       File name     
   ---------------------------------------------------------
   13-May-2005  16:42  6.0.2900.2676  1,485,312  Shdocvw.dll

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Steps to reproduce the problem

  1. In Internet Explorer, open several Web pages on different Web sites over a period of several days.
  2. Create a console program that uses the following code example.
    #include "stdafx.h"
    #include <windows.h>
    #include <shlguid.h>	// Needed for CLSID_CUrlHistory
    #include <urlhist.h>	// Needed for IUrlHistoryStg2 and IID_IUrlHistoryStg2
    
    int main(int argc, char* argv[])
    {
    	IUrlHistoryStg2* pHistory;  // We need this interface to clear the history.
    	HRESULT hr;
    	DWORD cRef;
    
    	CoInitialize(NULL);
    
    	// Load the correct Class and request IUrlHistoryStg2
    	hr = CoCreateInstance(CLSID_CUrlHistory, NULL, CLSCTX_INPROC_SERVER, 
    IID_IUrlHistoryStg2, reinterpret_cast<void **>(&pHistory));
    
    	if (SUCCEEDED(hr))
    	{
    		// Clear the Internet Explorer history.
    		hr = pHistory->ClearHistory();
    	}
    
    	cRef = pHistory->Release();
    
    	CoUninitialize();
    
    	return 0;
    }
    
  3. Build and then run the program.

    If you view the History folder in Microsoft Windows Explorer, all the history entries except for the Today history will be cleared.

↑ Back to the top


More information

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

↑ Back to the top


Keywords: KB897169, kbhotfixserver, kbbug, kbfix, kbautomation, kbautohotfix

↑ Back to the top

Article Info
Article ID : 897169
Revision : 5
Created on : 8/29/2007
Published on : 8/29/2007
Exists online : False
Views : 442