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);
}
查看全文
相关阅读:
JMM、asifserial语义、happensbefore模型
jvm内存溢出实践
垃圾回收和GC算法
jvm运行时数据区域
实现加锁的消费者和生产者模型
jvm监控工具小结
HotSpot对象
java常用垃圾收集器
字面量, 符号引用与直接引用
常用线程安全的队列
原文地址:https://www.cnblogs.com/cl1024cl/p/6204972.html
最新文章
我的程序里
解决启动Distributed Transaction Coordinator服务出错的问题
XP命令集
神的回帖
Oracle数据库监听配置
卖程序的小女孩
理解oracle中连接和会话
win7常见问题汇总
[C++ 平时小练习] 写一个函数gene 用于输出正整数的全部因子,例如当k=126时,如下格式输出126=2*3*3*7
[算法小练习]求两个数的最大公约数
热门文章
关于 C#脚本,error CS1010: Newline in constant 的解决方法
java 去除List重复元素
实现路由器无线接收另一个路由器无线信号搭建网络
[Java学习从零开始] 之Log4j学习
ASP.NET中 Web网站与Web应用程序的区别
js中map()是否改变原数组
使用ant构建android工程
IE主页被修改问题的解决方案
关于datetime2精度的研究
通过wmi对UUID的获取
Copyright © 2011-2022 走看看