SHQueryRecycleBin function shell32

void SHQueryRecycleBin(
  1. PCWSTR? pszRootPath,
  2. Pointer<SHQUERYRBINFO> pSHQueryRBInfo
)

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

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/shellapi/nf-shellapi-shqueryrecyclebinw.

Implementation

@pragma('vm:prefer-inline')
void SHQueryRecycleBin(
  PCWSTR? pszRootPath,
  Pointer<SHQUERYRBINFO> pSHQueryRBInfo,
) {
  final hr$ = HRESULT(
    _SHQueryRecycleBin(pszRootPath ?? nullptr, pSHQueryRBInfo),
  );
  if (hr$.isError) throw WindowsException(hr$);
}