zoukankan      html  css  js  c++  java
  • 清空回收站

    /// <summary>
            /// Empties the Recycle Bin on the specified drive.
            /// </summary>
            /// <param name="hwnd">A handle to the parent window of any dialog boxes that might be displayed during the operation. This parameter can be NULL.</param>
            /// <param name="pszRootPath">The address of a null-terminated string of maximum length MAX_PATH that contains the path of the root drive on which the Recycle Bin is located. This parameter can contain the address of a string formatted with the drive, folder, and subfolder names, for example c:windowssystem. It can also contain an empty string or NULL. If this value is an empty string or NULL, all Recycle Bins on all drives will be emptied.</param>
            /// <param name="dwFlags">SHERB</param>
            /// <returns>If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
            [DllImport("shell32.dll")]
            private static extern int SHEmptyRecycleBin(IntPtr hwnd, string pszRootPath, SHERB dwFlags);
    
     public enum SHERB:int
        { 
            /// <summary>
            /// No dialog box confirming the deletion of the objects will be displayed.
            /// </summary>
            SHERB_NOCONFIRMATION =1,
            /// <summary>
            /// No dialog box indicating the progress will be displayed.
            /// </summary>
            SHERB_NOPROGRESSUI=2,
            /// <summary>
            /// No sound will be played when the operation is complete.
            /// </summary>
            SHERB_NOSOUND =4 
        }
  • 相关阅读:
    Python 重定向 响应头
    经典案例:如何优化Oracle使用DBlink的SQL语句
    django 文件上传
    mysite下的url 映射到news下的视图
    django 只允许POST或者GET
    云端的SRE发展与实践
    django 捕获url
    django 在自己app下编写自定义sql
    对偶学习及其在机器翻译中的应用
    对偶学习及其在机器翻译中的应用
  • 原文地址:https://www.cnblogs.com/wjshan0808/p/4233769.html
Copyright © 2011-2022 走看看