如何编程清除IE的自动完成的内容?(100分)

  • 主题发起人 主题发起人 chinasea
  • 开始时间 开始时间
C

chinasea

Unregistered / Unconfirmed
GUEST, unregistred user!
以及表单中的内容
 
qbtxx
在窗体的Create中加入如下代码 8-)
动行程序 OK!
var
lpEntryInfo : PInternetCacheEntryInfo;
hCacheDir : LongWord;
dwEntrySize : LongWord;
dwLastError : LongWord;
Begin
dwEntrySize := 0;
FindFirstUrlCacheEntry( NIL, TInternetCacheEntryInfo( NIL^ ), dwEntrySize );
GetMem( lpEntryInfo, dwEntrySize );
hCacheDir := FindFirstUrlCacheEntry( NIL, lpEntryInfo^, dwEntrySize );
If ( hCacheDir <> 0 ) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );
FreeMem( lpEntryInfo );
Repeat
dwEntrySize := 0;
FindNextUrlCacheEntry( hCacheDir, TInternetCacheEntryInfo( NIL^ ), dwEntrySize );
dwLastError := GetLastError();
If ( GetLastError = ERROR_INSUFFICIENT_BUFFER ) Then Begin
GetMem( lpEntryInfo, dwEntrySize );
If ( FindNextUrlCacheEntry( hCacheDir, lpEntryInfo^, dwEntrySize ) ) Then
DeleteUrlCacheEntry( lpEntryInfo^.lpszSourceUrlName );
FreeMem(lpEntryInfo);
End;
Until ( dwLastError = ERROR_NO_MORE_ITEMS );
Application.MessageBox('清除IE临时文件成功!','网络工具箱', MB_ICONINFORMATION+MB_OK)
end;
 
后退
顶部