Skip to content

Latest commit

 

History

History
125 lines (83 loc) · 3.91 KB

nf-shellapi-shemptyrecyclebinw.md

File metadata and controls

125 lines (83 loc) · 3.91 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name req.apiset
NF:shellapi.SHEmptyRecycleBinW
SHEmptyRecycleBinW function (shellapi.h)
Empties the Recycle Bin on the specified drive. (Unicode)
SHERB_NOCONFIRMATION
SHERB_NOPROGRESSUI
SHERB_NOSOUND
SHEmptyRecycleBin
SHEmptyRecycleBin function [Windows Shell]
SHEmptyRecycleBinW
_win32_SHEmptyRecycleBin
shell.SHEmptyRecycleBin
shellapi/SHEmptyRecycleBin
shellapi/SHEmptyRecycleBinW
shell\SHEmptyRecycleBin.htm
shell
c3995be7-bc8b-4e1f-8ef6-fdf4c0a75720
12/05/2018
SHERB_NOCONFIRMATION, SHERB_NOPROGRESSUI, SHERB_NOSOUND, SHEmptyRecycleBin, SHEmptyRecycleBin function [Windows Shell], SHEmptyRecycleBinA, SHEmptyRecycleBinW, _win32_SHEmptyRecycleBin, shell.SHEmptyRecycleBin, shellapi/SHEmptyRecycleBin, shellapi/SHEmptyRecycleBinA, shellapi/SHEmptyRecycleBinW
shellapi.h
Windows
Windows 2000 Professional, Windows XP [desktop apps only]
Windows 2000 Server [desktop apps only]
SHEmptyRecycleBinW (Unicode) and SHEmptyRecycleBinA (ANSI)
Shell32.lib
Shell32.dll (version 4.71 or later)
Windows
19H1
SHEmptyRecycleBinW
shellapi/SHEmptyRecycleBinW
c++
APIRef
kbSyntax
DllExport
Shell32.dll
Ext-MS-Win-Shell-Shell32-L1-2-2.dll
SHEmptyRecycleBin
SHEmptyRecycleBinA
SHEmptyRecycleBinW
ext-ms-win-shell-shell32-l1-2-2 (introduced in Windows 10, version 10.0.14393)

SHEmptyRecycleBinW function

-description

Empties the Recycle Bin on the specified drive.

-parameters

-param hwnd [in, optional]

Type: HWND

A handle to the parent window of any dialog boxes that might be displayed during the operation. This parameter can be NULL.

-param pszRootPath [in, optional]

Type: LPCTSTR

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 NULL. If this value is an empty string or NULL, all Recycle Bins on all drives will be emptied.

-param dwFlags

Type: DWORD

One or more of the following values.

SHERB_NOCONFIRMATION

No dialog box confirming the deletion of the objects will be displayed.

SHERB_NOPROGRESSUI

No dialog box indicating the progress will be displayed.

SHERB_NOSOUND

No sound will be played when the operation is complete.

- dwFlags.SHERB_NOCONFIRMATION

No dialog box confirming the deletion of the objects will be displayed.

- dwFlags.SHERB_NOPROGRESSUI

No dialog box indicating the progress will be displayed.

- dwFlags.SHERB_NOSOUND

No sound will be played when the operation is complete.

-returns

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-see-also

SHQueryRecycleBin

-remarks

Note

The shellapi.h header defines SHEmptyRecycleBin as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.