Recycle bin functions!

To query recycle bin information call ShQueryRecycleBin!

An e.g.

[sourcecode language=’cpp’]void GetchMeRecycleBinInfo()
{
   SHQUERYRBINFO RecycleBinInfo = { 0 };
   RecycleBinInfo.cbSize = sizeof( RecycleBinInfo ); // Tell size of structure
   VERIFY( SHQueryRecycleBin( _T( “C:” ), NULL ) == S_OK ); // Get recycle bin info

// Display information
   CString csRecycleBinInfo;
   csRecycleBinInfo.Format( _T( ” Recycle bin size: %I64d, Recycle bin item count: %I64d” ), RecycleBinInfo.i64Size, RecycleBinInfo.i64NumItems );
   MessageBox( NULL, csRecycleBinInfo, _T( “Recycle bin” ), MB_OK | MB_ICONINFORMATION );
}// End GetchMeRecycleBinInfo

// To empty a recycle bin call ShEmptyRecycleBin!
if( MessageBox ( NULL, _T( “Empty recycle bin?” ), _T( “Question” ), MB_OK | MB_YESNO ) == IDYES )
{
// If second parameter i.e. drive, is empty then recycle bins on all drives
// will be emptied, last parameter takes some flags, look up MSDN for details,
// pretty easy ones!
   SHEmptyRecycleBin( NULL, NULL, 0 );
}[/sourcecode]

Appreciate your comments...