/// <summary>Gets the stats about the specified recycle bin.</summary> /// /// <param name="path">The path of the recycle bin</param> /// <returns>The info about the recycle bin on success, otherwise null.</returns> public RecycleBinInfo GetRecycleBinInfo(string path) { //return ui.Invoke(() => { SHRecycleBinInfo rbInfo = new SHRecycleBinInfo { cbSize = SHRecycleBinInfo.CBSize, }; if (!SHQueryRecycleBin(path, ref rbInfo)) { return(new RecycleBinInfo(path, rbInfo.i64NumItems, rbInfo.i64Size)); } return(null); //}); }
public static extern bool SHQueryRecycleBin( string pszRootPath, ref SHRecycleBinInfo pSHQueryRBInfo);