zoukankan
html css js c++ java
用API获取IE缓存文件
//
using system.runtime.interopservices;
[structlayout(layoutkind.sequential, charset
=
charset.auto)]
public
struct
internet_cache_entry_info
...
{
public
int
dwstructsize;
public
intptr lpszsourceurlname;
public
intptr lpszlocalfilename;
public
int
cacheentrytype;
public
int
dwusecount;
public
int
dwhitrate;
public
int
dwsizelow;
public
int
dwsizehigh;
public
filetime lastmodifiedtime;
public
filetime expiretime;
public
filetime lastaccesstime;
public
filetime lastsynctime;
public
intptr lpheaderinfo;
public
int
dwheaderinfosize;
public
intptr lpszfileextension;
public
int
dwexemptdelta;
}
[dllimport(
"
wininet.dll
"
, setlasterror
=
true
, charset
=
charset.auto)]
public
static
extern
intptr findfirsturlcacheentry([marshalas(unmanagedtype.lptstr)]
string
urlsearchpattern, intptr lpfirstcacheentryinfo,
ref
int
lpdwfirstcacheentryinfobuffersize);
[dllimport(
"
wininet.dll
"
, setlasterror
=
true
, charset
=
charset.auto)]
public
static
extern
bool
geturlcacheentryinfo( [marshalas(unmanagedtype.lptstr)]
string
lpszurlname, intptr lpcacheentryinfo,
ref
int
lpdwcacheentryinfobuffersize );
public
static
string
getcatchfilename(
string
url)
...
{
int
nneeded
=
0
, nbufsize;
intptr buf;
findfirsturlcacheentry(
null
, intptr.zero,
ref
nneeded );
nbufsize
=
nneeded; buf
=
marshal.allochglobal( nbufsize );
geturlcacheentryinfo(url,buf,
ref
nneeded);
internet_cache_entry_info cacheitem;
geturlcacheentryinfo(url,buf,
ref
nneeded);
cacheitem
=
(internet_cache_entry_info) marshal.ptrtostructure( buf,
typeof
(internet_cache_entry_info) );
string
res
=
marshal.ptrtostringauto(cacheitem.lpszlocalfilename);
return
(res);
}
查看全文
相关阅读:
初识Activity
贝叶斯公式由浅入深大讲解—AI基础算法入门【转】
jz2440使用openjtag+openocd+eclipse调试【学习笔记】
win10下搭建jz2440v3(arm s3c2440)开发及gdb调试环境【转】
Eclipse安装zylin[转]
Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用【转】
如何退出minicom【学习笔记】
Python Matplotlib简易教程【转】
anacoda的spyder在调用matplotlib的时候无法显示动画效果【学习笔记】
Spyder如何在弹出框绘图【转】
原文地址:https://www.cnblogs.com/cl1024cl/p/6204972.html
最新文章
RAC 某节点不可用时,对应VIP是否可用
11gRAC报错CRS-4535, CRS-4000解决
Oracle 11.2.0.4 DataGuard 环境打PSU,OJVM PSU补丁快速参考
Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考
Oracle Database Server 'TNS Listener'远程数据投毒漏洞(CVE-2012-1675)解决
Troubleshooting:重新安装Vertica建库后无法启动
杀戮天使(Angels of Death)无删减版 高清下载
刀剑神域 第三季 高清下载
妖精的尾巴 高清下载
东京食尸鬼 第四季 高清下载
热门文章
吴晓波财经私房课02 美国挑起贸易战的目的:干掉老二
GDUT决赛题解
Android中XML文件的序列化生成与解析
final修饰符的三种使用场景
最佳eclipse字体推荐(个人觉得)
13:在O(1)时间删除单链表节点
面试不是意味着给解决方式,有时候我们也应该质疑问题
Odoo9.0模块开发全流程
leetcode笔记:Word Ladder
CSS 布局模型
Copyright © 2011-2022 走看看