Shell32EmptyRecycleBin(SafeHandle, String, SHEmptyRecycleBinFlags) Method
Empties the Recycle Bin on the specified drive.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", EntryPoint = "SHEmptyRecycleBin",
CharSet = CharSet.Unicode)]
public static bool EmptyRecycleBin(
SafeHandle hWnd = null,
string rootPath = "",
SHEmptyRecycleBinFlags flags =
)
<DllImportAttribute("Shell32.dll", EntryPoint := "SHEmptyRecycleBin",
CharSet := CharSet.Unicode>]
Public Shared Function EmptyRecycleBin (
Optional hWnd As SafeHandle = Nothing,
Optional rootPath As String = "",
Optional flags As SHEmptyRecycleBinFlags =
) As Boolean
Dim hWnd As SafeHandle
Dim rootPath As String
Dim flags As SHEmptyRecycleBinFlags
Dim returnValue As Boolean
returnValue = Shell32.EmptyRecycleBin(hWnd,
rootPath, flags)
public:
[DllImportAttribute(L"Shell32.dll", EntryPoint = L"SHEmptyRecycleBin",
CharSet = CharSet::Unicode)]
static bool EmptyRecycleBin(
SafeHandle^ hWnd = nullptr,
String^ rootPath = L"",
SHEmptyRecycleBinFlags flags =
)
[<DllImportAttribute("Shell32.dll", EntryPoint = "SHEmptyRecycleBin",
CharSet = CharSet.Unicode)>]
static member EmptyRecycleBin :
?hWnd : SafeHandle *
?rootPath : string *
?flags : SHEmptyRecycleBinFlags
(* Defaults:
let _hWnd = defaultArg hWnd null
let _rootPath = defaultArg rootPath ""
let _flags = defaultArg flags
*)
-> bool
No code example is currently available or this language may not be supported.
- hWnd SafeHandle (Optional)
-
A handle to the parent window of any dialog boxes that might be displayed during the operation.
This parameter can be .
- rootPath String (Optional)
-
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:\windows\system\'.
It can also contain an empty string or .
If this value is an empty string or , all Recycle Bins on all drives will be emptied.
- flags SHEmptyRecycleBinFlags (Optional)
-
Specifies the Recycle bin behavior, this parameter can be one or more flags.
Boolean if operation succeeds,
otherwise.