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);
}
查看全文
相关阅读:
Winform—C#读写config配置文件
C# 中Web.config文件的读取与写入
Redis配置文件详解
三层架构之泛型抽象
Linq To Sql语法及实例大全
junit单元测试(keeps the bar green to keeps the code clean)
观 GT Java语言管理系统的感悟
java考核完的心得
15个C++项目列表
C++文件操作(fstream)
原文地址:https://www.cnblogs.com/cl1024cl/p/6204972.html
最新文章
20145231 《信息安全系统设计基础》期中总结
20145231 20145205 《信息安全系统设计基础》实验一 开发环境的熟悉
20145231《信息安全系统设计基础》第7周学习总结
20145231熊梓宏《信息安全系统设计基础》第六周学习总结
20145231《信息安全系统设计基础》第五周学习总结
20145231《信息安全系统设计基础》第三周学习总结
20145231熊梓宏《信息安全系统设计基础》第二周学习总结
20145231熊梓宏《信息安全系统设计基础》第1周学习总结
游记「CSP-S2020游记」
题解「SPOJ8093 JZPGYZ
热门文章
题解「CF547E Mike and Friends」
总结「二次剩余」
总结「李超线段树」
题解「Luogu3970 [TJOI2014]上升子序列」
题解「Luogu1099 树网的核」
题解「Luogu5251 [LnOI2019]第二代图灵机」
题解「Luogu5665 划分」
基于IPagedList 的 Asp.Net MVC 分页
C#基础 类、结构、抽象类、接口的相关概念
WebService存储过程显示分页、查询
Copyright © 2011-2022 走看看