楼主 发表于： 2000-02-26 23:34:00
#1 得分：0 回复于： 2000-02-27 00:05:00
#2 得分：0 回复于： 2000-02-27 14:54:00
#3 得分：50 回复于： 2000-02-27 14:58:00
This article was contributed by Peter Sun.
Do you want to have a feature (in your own application) of "Clear History" like IE5 does in its "Internet Options"?
Here is how you can do it. It's not documented, but I have tested it and it works, with VC++ 6.0 and Win98/NT.
// Delete all items in History folder
IUrlHistoryStg2* pUrlHistoryStg2 = NULL;
HRESULT hr = CoCreateInstance(CLSID_CUrlHistory,
NULL, CLSCTX_INPROC, IID_IUrlHistoryStg2,
hr = pUrlHistoryStg2->ClearHistory();