
This code can be modified to display the number of files/folders in the folder. E.g., Regsvr32 c:\DirSize.DLL, if the DLL is present in C. If demo project is downloaded, then unzip the DLL and register it using the command "regsvr32 ". Well, if you build the project, you need not do anything, since the IDE automatically registers the DLL. To build this project, you must install Microsoft Platform SDK, or click here to download SHLOBJ.h. This class adds one more column to the Details view, which displays the consolidated folder size. Using this interface, one can customize the Explorer's Details view. This class implements the Shell interface called IColumnProvider. (I did not do anything to sort, it is done by Explorer. We also have the facility to sort according to the folder size. Using this DLL, one can view the folder size as one of the columns of the Explorer as shown in the image.

In day to day life, when one wants to know the size of a folder, (s)he has to right click on the folder name and has to choose the Properties.
