三度网教程:是一个免费提供流行视频软件教程、在线学习分享的学习平台!

如何清空回收站

时间:2024-1-16作者:未知来源:三度网教程人气:


Procedure EmptyRecycleBin ;
Const
  SHERB_NOCONFIRMATION = $00000001 ;
  SHERB_NOPROGRESSUI   = $00000002 ;
  SHERB_NOSOUND        = $00000004 ;
Type
  TSHEmptyRecycleBin = function (Wnd : HWND;  
                                 pszRootPath : PChar;  
                                 dwFlags : DWORD
                       ) : HRESULT; stdcall ;
Var
  SHEmptyRecycleBin : TSHEmptyRecycleBin;  
  LibHandle         : THandle;
Begin  { EmptyRecycleBin }
  LibHandle := LoadLibrary(PChar('Shell32.dll')) ;
  if LibHandle <> 0 then
     @SHEmptyRecycleBin := GetProcAddress(LibHandle, 'SHEmptyRecycleBinA')
  else
  begin
     MessageDlg('Failed to load Shell32.dll.', mtError, [mbOK], 0);
     Exit;
  end;


  if @SHEmptyRecycleBin <> nil then
     SHEmptyRecycleBin(Application.Handle,    
                       nil,  
                       SHERB_NOCONFIRMATION or SHERB_NOPROGRESSUI or SHERB_NOSOUND);
  FreeLibrary(LibHandle);
  @SHEmptyRecycleBin := nil ;
end;  { EmptyRecycleBin } 

关键词:  如何清空回收站





Copyright © 2012-2018 三度网教程(http://www.3du8.cn) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版