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界面版
动手动脑1002
动手动脑1001
动手动脑0930
动手动脑0929
Java Web学习-0823
Java Web学习-0822
Java Web学习-0821
原文地址:https://www.cnblogs.com/cl1024cl/p/6204972.html
最新文章
每日进度总结13(每日日报98)
beforeEach
队列queue 先进先出
5网页性能优化
4ajax
js-bom
js-web-api
js补充
0前端面试总纲
2js考点和面试题
热门文章
03单例模式
sqli-lab 通关指南:Less 7
sqli-lab 通关指南:Less 13 ~ 16
sqli-lab 通关指南:Less 11、12
sqli-lab 通关指南:Less 9、10
sqli-lab 通关指南:Less 5、6、8
网络技术:子网划分
sqli-lab 通关指南:Less 1 ~ 4
网络技术:IP 编址
渐进法分析冒泡/选择排序法时间复杂度
Copyright © 2011-2022 走看看