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);
}
查看全文
相关阅读:
(三)Java秒杀项目之实现秒杀功能
多模块环境下修改包名Rename directory与Rename package
pom.xml标签页名称
mac终端命令
@Select 数据表的字段与实体类的属性值
Markedown换行
链表问题-不开辟新空间
Java机器学习框架(1)【待完成】
奇妙的算法【3】- 贪心算法【待完成】
奇妙的算法【2】- 韩信点兵问题优化
原文地址:https://www.cnblogs.com/cl1024cl/p/6204972.html
最新文章
设计模式之动态代理(JDK代理)
代理模式之静态代理
JVM基础
Java 堆内存 新生代 (转)
MySQL基础知识-安装MySQL
Redis---List
注册后5秒钟跳转首页
java中循环删除list中元素的方法
判断1个对象所有属性是否为空. 可以使用反射机制实现 .
Integer之常用方法
热门文章
组合索引
boot、cloud
匹配Luhn算法:可用于检测银行卡卡号
使用JAVA如何对图片进行格式检查以及安全检查处理
阿里云Linux服务器购买、配置
i.js
Maven下载安装测试
Idea中新建maven项目的目录结构
SpringBoot项目打成Jar包时运行
(四)Java秒杀项目之JMeter压测
Copyright © 2011-2022 走看看