如何取得浏览器的历史记录,读取为字符窜形式

huing 2007-03-08 04:02:03
就是读取到以后如何列出来(读取文件夹以后出现的是什么昨天、今天之类的), 如何列出所有浏览过的地址,就像IE History Manager(http://www.cleanersoft.com/iehistory/iehistory.htm)作的那样
...全文
797 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
huing 2007-03-13
  • 打赏
  • 举报
回复
这个方法还是有些问题的,而且得到的结果不仅仅是历史,还包括一些cache里的东西。
具体的我已经找到了
http://www.codeproject.com/csharp/ponta.asp?df=100&forumid=67589&exp=0&select=897325
这个是取到所有历史纪录的。
RexZheng 2007-03-13
  • 打赏
  • 举报
回复
既然2005用这个API实现,说明这应该是最合适的实现方法了
RexZheng 2007-03-13
  • 打赏
  • 举报
回复
我提供的方法是2005的内部实现,原本就有的API方法, dotnet出现之前就有了的
RexZheng 2007-03-12
  • 打赏
  • 举报
回复
http://www.xfbbs.com/ArticleShow/84/Article_Show_24841.html
http://www.ccwblog.cn/ylsun/post/20061120/13258.htm


.net 2.0中的autocomplete正是通过此方法实现的,2.0中实现的原型

private void SetAutoComplete(bool reset, bool recreate)
{
if (base.IsHandleCreated && (this.childEdit != null))
{
if (this.AutoCompleteMode != AutoCompleteMode.None)
{
if ((!this.fromHandleCreate && recreate) && base.IsHandleCreated)
{
AutoCompleteMode autoCompleteMode = this.AutoCompleteMode;
this.autoCompleteMode = AutoCompleteMode.None;
base.RecreateHandle();
this.autoCompleteMode = autoCompleteMode;
}
if (this.AutoCompleteSource == AutoCompleteSource.CustomSource)
{
if (this.AutoCompleteCustomSource != null)
{
if (this.AutoCompleteCustomSource.Count == 0)
{
int flags = -1610612736;
SafeNativeMethods.SHAutoComplete(new HandleRef(this, this.childEdit.Handle), flags);
}
else if (this.stringSource != null)
{
this.stringSource.RefreshList(this.GetStringsForAutoComplete(this.AutoCompleteCustomSource));
}
else
{
this.stringSource = new StringSource(this.GetStringsForAutoComplete(this.AutoCompleteCustomSource));
if (!this.stringSource.Bind(new HandleRef(this, this.childEdit.Handle), (int) this.AutoCompleteMode))
{
throw new ArgumentException(SR.GetString("AutoCompleteFailure"));
}
}
}
}
else if (this.AutoCompleteSource == AutoCompleteSource.ListItems)
{
if (this.DropDownStyle == ComboBoxStyle.DropDownList)
{
int flags = -1610612736;
SafeNativeMethods.SHAutoComplete(new HandleRef(this, this.childEdit.Handle), flags);
}
else if (this.itemsCollection != null)
{
if (this.itemsCollection.Count == 0)
{
int flags = -1610612736;
SafeNativeMethods.SHAutoComplete(new HandleRef(this, this.childEdit.Handle), flags);
}
else if (this.stringSource != null)
{
this.stringSource.RefreshList(this.GetStringsForAutoComplete(this.Items));
}
else
{
this.stringSource = new StringSource(this.GetStringsForAutoComplete(this.Items));
if (!this.stringSource.Bind(new HandleRef(this, this.childEdit.Handle), (int) this.AutoCompleteMode))
{
throw new ArgumentException(SR.GetString("AutoCompleteFailureListItems"));
}
}
}
}
else
{
try
{
int num4 = 0;
if (this.AutoCompleteMode == AutoCompleteMode.Suggest)
{
num4 |= -1879048192;
}
if (this.AutoCompleteMode == AutoCompleteMode.Append)
{
num4 |= 0x60000000;
}
if (this.AutoCompleteMode == AutoCompleteMode.SuggestAppend)
{
num4 |= 0x10000000;
num4 |= 0x40000000;
}
SafeNativeMethods.SHAutoComplete(new HandleRef(this, this.childEdit.Handle), ((int) this.AutoCompleteSource) | num4);
}
catch (SecurityException)
{
}
}
}
else if (reset)
{
int flags = -1610612736;
SafeNativeMethods.SHAutoComplete(new HandleRef(this, this.childEdit.Handle), flags);
}
}
}


huing 2007-03-12
  • 打赏
  • 举报
回复
AutoCompleteSource好像是2005特有的, 2003怎么获取呢?
huing 2007-03-12
  • 打赏
  • 举报
回复
希望下班前解决
huing 2007-03-12
  • 打赏
  • 举报
回复
up
huing 2007-03-12
  • 打赏
  • 举报
回复
AutoCompleteMode 不是还是2.0的?
楼上的这个方法还是说明2005的吧
WeiWY 2007-03-10
  • 打赏
  • 举报
回复
textBox1.AutoCompleteSource = AutoCompleteSource.HistoryList
huing 2007-03-09
  • 打赏
  • 举报
回复
hongyelzg(风中过客) ( ) 信誉:100 Blog 2007-03-09 12:21:29 得分: 0


不需要这么复杂,有一个com可以实现这种功能


哪一个??请指点一下,谢谢
hongyelzg 2007-03-09
  • 打赏
  • 举报
回复
不需要这么复杂,有一个com可以实现这种功能
RexZheng 2007-03-09
  • 打赏
  • 举报
回复
设置combobox的AutoCompleteSource属性就行
RexZheng 2007-03-09
  • 打赏
  • 举报
回复
2005中不用这么麻烦
王集鹄 2007-03-09
  • 打赏
  • 举报
回复
System.Reflection.Pointer
我的调试环境是2005
Pointer声明在System.Reflection命名空间

你可以这样调试
Pointer -> IntPtr
null -> IntPtr.Zero
huing 2007-03-09
  • 打赏
  • 举报
回复
Pointer是指指针?
需要设置使用不安全代码?
还是需要引用某一个DLL

我这里编译不过阿
huing 2007-03-09
  • 打赏
  • 举报
回复
up
王集鹄 2007-03-08
  • 打赏
  • 举报
回复
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential)]
public class INTERNET_CACHE_ENTRY_INFOW
{
public uint dwStructSize;
public string lpszSourceUrlName;
public string lpszLocalFileName;
public uint CacheEntryType;
public uint dwUseCount;
public uint dwHitRate;
public uint dwSizeLow;
public uint dwSizeHigh;
public FILETIME LastModifiedTime;
public FILETIME ExpireTime;
public FILETIME LastAccessTime;
public FILETIME LastSyncTime;
public IntPtr lpHeaderInfo;
public uint dwHeaderInfoSize;
public string lpszFileExtension;
public uint dwReserved; //union uint dwExemptDelta;
}

[DllImport("wininet.dll")]
public static extern IntPtr FindFirstUrlCacheEntryEx(

string lpszUrlSearchPattern,
uint dwFlags,
uint dwFilter,
Int64 GroupId,
IntPtr lpFirstCacheEntryInfo,
ref uint lpdwFirstCacheEntryInfoBufferSize,
Pointer lpGroupAttributes,
Pointer pcbGroupAttributes,
Pointer lpReserved
);

[DllImport("wininet.dll")]
public static extern bool FindCloseUrlCache(IntPtr hEnumHandle);

[DllImport("wininet.dll")]
public static extern bool FindNextUrlCacheEntryEx(
IntPtr hEnumHandle,
IntPtr lpFirstCacheEntryInfo,
ref uint lpdwFirstCacheEntryInfoBufferSize,
Pointer lpGroupAttributes,
Pointer pcbGroupAttributes,
Pointer lpReserved);

public uint NORMAL_CACHE_ENTRY = 0x00000001;

private void button4_Click(object sender, EventArgs e)
{
IntPtr vHandle;
INTERNET_CACHE_ENTRY_INFOW vInternetCacheEntryInfo = new INTERNET_CACHE_ENTRY_INFOW();
uint vFirstCacheEntryInfoBufferSize = 0;
FindFirstUrlCacheEntryEx(null, 0, NORMAL_CACHE_ENTRY, 0, (IntPtr)null,
ref vFirstCacheEntryInfoBufferSize, null, null, null);
IntPtr vBuffer = Marshal.AllocHGlobal((int)vFirstCacheEntryInfoBufferSize);
vHandle = FindFirstUrlCacheEntryEx(null, 0, NORMAL_CACHE_ENTRY, 0,
vBuffer, ref vFirstCacheEntryInfoBufferSize,
null, null, null);
while (vHandle != null)
{
Marshal.PtrToStructure(vBuffer, vInternetCacheEntryInfo);
richTextBox1.AppendText(vInternetCacheEntryInfo.lpszSourceUrlName + "\r\n");
Marshal.FreeCoTaskMem(vBuffer);

FindNextUrlCacheEntryEx(vHandle, (IntPtr)null, ref vFirstCacheEntryInfoBufferSize,
null, null, null);
vBuffer = Marshal.AllocHGlobal((int)vFirstCacheEntryInfoBufferSize);
if (!FindNextUrlCacheEntryEx(vHandle, vBuffer,
ref vFirstCacheEntryInfoBufferSize, null, null, null)) break;
}
Marshal.FreeCoTaskMem(vBuffer);
}
内容概要:本文针对无刷直流电机驱动的电子机械制动(EMB)执行器,建立了考虑Stribeck摩擦特性的非线性耦合动力学模型,并在Simulink环境中完成了系统级仿真分析。研究综合集成了电机动力学、齿轮传动机构与制动执行机构的动力学特性,构建了高保真的机电一体化系统模型。重点引入Stribeck摩擦模型以精确描述低速工况下执行器内部存在的静摩擦、粘滞摩擦与库仑摩擦之间的过渡行为,有效提升了系统在启停、反向运动等瞬态过程中的动态响应仿真精度。通过多工况仿真验证了模型的有效性,能够准确反映摩擦引起的爬行、滞后与定位误差等非线性现象,为EMB系统的高性能控制算法设计(如摩擦补偿、滑模控制)与结构优化提供了高可信度的仿真平台。; 适合人群:从事汽车电子制动系统、电机驱动控制、机电系统建模与仿真研究的研究生、科研人员及工程技术人员,需具备扎实的机械动力学、自动控制理论基础和MATLAB/Simulink仿真能力。; 使用场景及目标:①用于高精度电子机械制动系统的设计验证与性能预测;②为消除摩擦非线性影响的先进控制策略(如自适应控制、智能控制)提供精确的被控对象模型;③深入探究Stribeck摩擦等非线性因素对系统动态性能(如响应延迟、稳态误差)的作用机理; 阅读建议:读者应结合提供的Simulink模型文件,深入剖析Stribeck摩擦模块的数学实现与参数辨识方法,建议通过改变输入指令(如阶跃、正弦)和负载条件进行对比仿真,以直观理解非线性摩擦对系统动态特性的影响。

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧