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);
}
查看全文
相关阅读:
用指针写线段树(维护乘法)
费用流——网络流板子
最小割板子题——[USACO5.4]奶牛的电信
数论——置换
NOIP2012 借教室
POJ1990 moofest
POJ2352 star
POJ2299 Ultra-QuickSort
CF498D Traffic Jams in the land
POJ2828 Buy Ticket
原文地址:https://www.cnblogs.com/cl1024cl/p/6204972.html
最新文章
1199: [HNOI2005]汤姆的游戏
1202: [HNOI2005]狡猾的商人
1198: [HNOI2006]军机调度
1200: [HNOI2005]木梳
1197: [HNOI2006]花仙子的魔法
1196: [HNOI2006]公路修建问题
Mahout
HADOOP高可用机制
Docker安装配置教程
tomcat安装部署
热门文章
云计算的三种服务模式:IaaS,PaaS和SaaS
Nginx教程
pig安装配置
azkaban(安装配置加实战)
hbase启动报错:Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
B1001 狼抓兔子 最小割
树形dp初步
求树的重心
动态规划---状压dp2
主席树板子
Copyright © 2011-2022 走看看