Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

SHQUERYRBINFO (Structures)
 
.
Summary
Contains information about the recycle bin

C# Definition:

[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SHQUERYRBINFO
{
    public int cbSize;
    public long i64Size;
    public long i64NumItems;
}

Example code

using System;
using System.Runtime.InteropServices;

public class Class1
{
    [DllImport("shell32.dll")] public static extern int SHQueryRecycleBin(string pszRootPath, ref SHQUERYRBINFO pSHQueryRBInfo);

     [StructLayout(LayoutKind.Sequential, Pack = 1)]
     public struct SHQUERYRBINFO
     {
        public int cbSize;
        public long i64Size;
        public long i64NumItems;
     }

     [STAThread]
     static void Main(string[] args)
     {
        SHQUERYRBINFO shrb = new SHQUERYRBINFO();
        shrb.cbSize = Marshal.SizeOf(typeof(SHQUERYRBINFO));
        SHQueryRecycleBin(String.Empty,ref shrb);

        Console.WriteLine("Recycle bin number: " + shrb.i64NumItems.ToString());
        Console.WriteLine("Recylce bin size: " + shrb.i64Size.ToString());
     }
}

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions