使用C ++删除Internet Explorer 8历史记录,Cookie,缓存和密码 [英] Delete Internet Explorer 8 History, Cookies, Cache and Passwords with C++

查看:246
本文介绍了使用C ++删除Internet Explorer 8历史记录,Cookie,缓存和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式删除Internet Explorer 8的历史记录,Cookie,缓存和密码



更多,我需要默默地做:-(没有任何弹出窗口,我不能使用

  RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2 

启动进度窗口对话框。



我试图从CreateProcess函数with startInfoParams

  siStartupInfo.dwFlags = STARTF_USESHOWWINDOW; 
siStartupInfo.wShowWindow = SW_HIDE;

但它没有帮助,似乎Inetcpl.cpl运行不同步,并启动它自己的线程显示窗口。 p>

有没有人知道实现这个的方法?



谢谢。

您可以使用 FindFirstUrlCacheEntry() FindNextUrlCacheEntry() DeleteUrlCacheEntry()可从Internet临时文件缓存中删除URL和文件。



c $ c> FindFirstUrlCacheEntryEx()和 FindNextUrlCacheEntryEx()枚举Cache,History和Cookies条目,但 DeleteUrlCacheEntry )仅适用于缓存条目。我不知道从历史和Cookie中删除条目的正确方法。你可以在 INTERNET_CACHE_ENTRY_INFO 结构体中报告的文件中调用 DeleteFile()存在。或者也可以使用 InternetSetCookie / Ex()来覆盖已过期的新时间戳记的现有Cookie数据。



我没有任何线索,如果可以可编程地操作密码列表。


i need programmatically delete Internet Explorer 8 History, Cookies, Cache and Passwords

More than that i need to do it silently :-( without any popup window , so I can't use

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

coz it's starting the progress window dialog.

I've tried to run this from CreateProcess function with startInfoParams

siStartupInfo.dwFlags = STARTF_USESHOWWINDOW;
siStartupInfo.wShowWindow = SW_HIDE;

but it doesn't helped , coz it seems like Inetcpl.cpl running asynchronious , and starting it's own thread that show the window.

Does anyone know the way to implement this ?

Thanks.

解决方案

You can use FindFirstUrlCacheEntry(), FindNextUrlCacheEntry(), and DeleteUrlCacheEntry() to remove URLs and files from the Temporary Internet Files cache.

You can use FindFirstUrlCacheEntryEx() and FindNextUrlCacheEntryEx() to enumerate Cache, History, and Cookies entries, but DeleteUrlCacheEntry() only works for Cache entries. I don't know the correct way to delete entries from the History and Cookies. You might be able to just get away with calling DeleteFile() on the filename reported in the INTERNET_CACHE_ENTRY_INFO struct, if one is present. Or maybe use InternetSetCookie/Ex() to overwrite the existing cookie data with a new timestamp that is expired.

I have no clue if it is possible to manipulate the Password list programmably.

这篇关于使用C ++删除Internet Explorer 8历史记录,Cookie,缓存和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆