用DELPHI代码的方式清理cookies,如何实现,比较急,高分送出。分不够,再给加,顶者有分
解决方案 »
- delphi隐藏运行QQ程序
- 怎样让程序跳到前端显示?
- 各位高手,请给我一个用ClientDataSet动态创建lookup字段的示例代码。
- Delphi怎么设置日期格式,如Sunday,November 27,2005?
- 执行存储过程出错
- same question ?
- ********著名关心结贴率爱国人士者Ghyghost给大家送分了************
- 请问怎样调用这样一个过程,在线等待,解决给分,希望关注!!
- idtcpclient的Disconnect()错误怎么解决
- 基本上等于白送分的问题
- 求助:第一次来这里,请教几个问题,大家帮帮忙!
- delpji中有没有什么变量,它的值能动态的被保存
CMD下:
DEL/Q "C:\Documents and Settings\<用户名>\Cookies用winexec吧!
shlobj;{$R *.dfm}function GetSpecialFolder(const CSIDL : integer) : string;
var
RecPath : PAnsiChar;
begin
RecPath := StrAlloc(MAX_PATH);
try
FillChar(RecPath^,MAX_PATH,0);
if SHGetSpecialFolderPath(0,RecPath,CSIDL,false) then begin
result := RecPath;
end else result := '';
finally
StrDispose(RecPath);
end;
end;procedure DelFiles(const Directory: string);
var
DirInfo: TSearchRec;
Finder: Integer;
Dir: string;
begin
Dir := Directory;
Finder := FindFirst(Dir+'\*.*', FaAnyfile, DirInfo);
while Finder = 0 do
begin
DeleteFile(PChar(Dir+'\'+DirInfo.Name));
Finder := FindNext(DirInfo);
end;
FindClose(DirInfo);
end;procedure TForm1.BtnDelCookiesClick(Sender: TObject);
begin
DelFiles(GetSpecialFolder(CSIDL_COOKIES));
end;结贴 sanmaotuo(老冯) (100)、