Shell32QueryRecycleBin Method

Retrieves the accumulated size of the Recycle Bin and the number of items in it, for a specified drive.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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 = "SHQueryRecycleBin", 
	CharSet = CharSet.Unicode)]
public static bool QueryRecycleBin(
	string rootPath,
	ref SHQueryRBInfo refQueryRBInfo
)

Parameters

rootPath  String
The address of a null-terminated string of maximum length MAX_PATH to contain 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 (C:\Windows\System32\).

refQueryRBInfo  SHQueryRBInfo
The address of a SHQueryRBInfo structure that receives the Recycle Bin information.

The SizeOfStruct member of the structure must be set to the size of the structure before calling this API.

Return Value

Boolean
if operation succeeds, otherwise.

Remarks

See Also