SHEmptyRecycleBin function Null safety shell32

int SHEmptyRecycleBin(
  1. int hwnd,
  2. Pointer<Utf16> pszRootPath,
  3. int dwFlags
)

Empties the Recycle Bin on the specified drive.

SHSTDAPI SHEmptyRecycleBinW(
  HWND    hwnd,
  LPCWSTR pszRootPath,
  DWORD   dwFlags
);

Implementation

int SHEmptyRecycleBin(int hwnd, Pointer<Utf16> pszRootPath, int dwFlags) {
  final _SHEmptyRecycleBin = _shell32.lookupFunction<
      Int32 Function(IntPtr hwnd, Pointer<Utf16> pszRootPath, Uint32 dwFlags),
      int Function(int hwnd, Pointer<Utf16> pszRootPath,
          int dwFlags)>('SHEmptyRecycleBinW');
  return _SHEmptyRecycleBin(hwnd, pszRootPath, dwFlags);
}