5
A
回答
3
难道你不能只搜索C:\Documents and Settings\user\Local Settings\Temporary Internet Files
文件中的'cookie'文件吗?
这里的Win32调用来获取文件夹:
BOOL SHGetSpecialFolderPath(
HWND hwndOwner,
LPTSTR lpszPath,
int nFolder,
BOOL fCreate
);
通CSIDL_COOKIES
作为nFolder
参数。
查看此链接出A Cleanup API for Windows。
您可以通过FindFirstUrlCacheEntry
,FindNextUrlCacheEntry
和DeleteUrlCacheEntry
函数删除缓存的cookie。您可以将'cookie:'作为第一个参数(LPCTSTR lpszUrlSearchPattern
)传递给FindFirstUrlCacheEntry
。
+0
这是一个非常非常丑陋的解决方法。理论上可以删除文件,但在运行Internet Explorer时不会注意到这一点。正确的方法是使用API(正如Daniel所回答的那样) – Elmue 2016-01-26 02:23:35
5
其实我懂了!
在Windows API,你有一个函数来创建一个名为InternetSetCookie
饼干,并且你使用这样的:
InternetSetCookie("http://teste.com", NULL, "name = value; expires = Sat,01-Jan-2020 00:00:00 GMT");
但是,如果你想删除cookie,而不是创建它,你只需要设置到期场地方在过去,像这样的:在Managing Cookies它
InternetSetCookie("http://teste.com", NULL, "name = value; expires = Sat,01-Jan-2000 00:00:00 GMT");
更多信息。
相关问题
- 1. 以编程方式读取Internet Explorer cookies
- 2. 如何以编程方式清除cookie?
- 3. Internet Explorer能否以编程方式使用Socks代理?
- 4. 以编程方式清除cookie
- 5. 如何以编程方式更改Internet Explorer搜索助手?
- 6. Internet Explorer:如何以编程方式刷新html布局?
- 7. 如何使用JS(Internet Explorer)以编程方式下载文件
- 8. 如何以编程方式检测Internet Explorer已关闭?
- 9. Spring Security:如何以编程方式清除“记住我”cookie?
- 10. 如何以编程方式禁用cookie
- 11. 以编程方式更改Internet Explorer设置
- 12. 以编程方式停用Internet Explorer中的功能
- 13. 清理Cookie无论Internet Explorer的测试与硒2 PHP的webdriver
- 14. 如何以编程方式禁用Internet Explorer(8)中的安全警告?
- 15. 如何在Internet Explorer 7中禁用Cookie?
- 16. 如何以编程方式调用Eclipse清理配置文件?
- 17. 如何以编程方式清理RAM可可?
- 18. 如何以编程方式触发清理?
- 19. 如何以编程方式清理ColdFusion cfquery参数?
- 20. PHP,会话Cookie和Internet Explorer
- 21. Internet Explorer中的Cookie问题
- 22. Internet Explorer Iframe Cookie问题
- 23. Windows8 Internet Explorer快捷方式
- 24. 如何编程设置为浏览器模式在Internet Explorer
- 25. 以编程方式获取.ASPXAUTH cookie值
- 26. 以编程方式将受信任的站点添加到Internet Explorer中
- 27. 以编程方式在Internet Explorer中设置浏览器语言环境
- 28. 以编程方式读取Java在Internet Explorer中打开的网页
- 29. 以编程方式在外部Internet Explorer实例中填写Web窗体
- 30. 以编程方式将网站添加到Internet Explorer的可信站点区域?
Acute我正在寻找一个Windows API函数解决方案。但我会在VB6中使用它。 – 2009-02-04 18:05:06