Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to get the number of files in recycle bin and the size of recycle bin Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
18-Oct-03
Category
System
Language
Delphi 5.x
Views
158
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			 Author: Vimil Saju

How to get the number of files in recycle bin and the size of recycle bin 

Answer:

To get the number files in the recycle bin, you have to use the function 
SHQueryRecycleBin. this function is available in the shell32 module. This function 
is supported in Win98 or above. 

The function declarartion is as shown below 
1   
2   function SHQueryRecycleBin(pszrtootpath: pchar; QUERYRBINFO: pshqueryrbinfo): 
3   integer;
4     stdcall;
5     external 'shell32' name 'SHQueryRecycleBinA';


The SHQUERYBINFO Structure is as follows 

6   type
7     SHQUERYRBINFO = packed record
8       cbSize: integer; // size of structure
9       i64Size: int64; // size of recycle bin
10      i64NumItems: int64; // number of items in recycle bin.
11    end;


The cbsize must be set before calling the function 

The first parameter must be the drive of which the recyclebin must be queried. 
If the drive 'C' then the parameter must be'C:\'; if the parameter is empty then 
the function queries the recyclebin on all the harddisks as a whole. 

the second parameter is a pointer to SHQUERYBINFO Structure. 

The function returns 0 if successful. 

The function can be called as follows 

12  var
13    rbinfo: SHQUERYRBINFO;
14  begin
15    SHQueryRecycleBin('C:\', @rbinfo);
16  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC