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 (897169)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 6 (SP1)
  • Microsoft Internet Explorer 6.0 Service Pack 2

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.

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

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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

STATUS

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

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.

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


Modification Type:MajorLast Reviewed:5/15/2006
Keywords:kbAutomation kbfix kbbug kbHotfixServer kbmsccsearch kbpubtypekc KB897169 kbAudDeveloper kbAudEndUser