trcdl
Messages postés78Date d'inscriptionjeudi 25 septembre 2003StatutMembreDernière intervention25 juin 2007
-
1 mars 2005 à 21:18
cs_ITALIA
Messages postés2169Date d'inscriptionvendredi 20 avril 2001StatutMembreDernière intervention30 juin 2009
-
2 mars 2005 à 10:53
salut a tous
connaissez vous une astuces ou une API pour connaitre le nombre d'elements de la corbeille de windows , merci a tous
didier
cs_ITALIA
Messages postés2169Date d'inscriptionvendredi 20 avril 2001StatutMembreDernière intervention30 juin 20099 2 mars 2005 à 10:53
Avec un Bouton (Command1) et 2 TextBox (TxtNb , TxtSize)
Private Const S_OK = &H0
Private Type ULARGE_INTEGER
LowPart As Long
HighPart As Long
End Type
Private Type SHQUERYRBINFO
cbSize As Long
i64Size As ULARGE_INTEGER
i64NumItems As ULARGE_INTEGER
End Type
Private Declare Function SHQueryRecycleBin Lib "shell32.dll" _ Alias "SHQueryRecycleBinA" (ByVal pszRootPath As String, _ pSHQueryRBInfo As SHQUERYRBINFO) As Long
Private Sub Command1_Click()
Dim rbinfo As SHQUERYRBINFO
Dim retval As Long
rbinfo.cbSize = Len(rbinfo)
retval = SHQueryRecycleBin("C:", rbinfo)
If (rbinfo.i64NumItems.LowPart And &H80000000) = &H80000000 Or _ rbinfo.i64NumItems.HighPart > 0 Then
TxtNb = "La Poubelle Contient plus de 2,147,483,647 items."
Else
TxtNb = "La Poubelle Contient : " & rbinfo.i64NumItems.LowPart & " items."
End If
If (rbinfo.i64Size.LowPart And &H80000000) = &H80000000 Or rbinfo.i64Size.HighPart > 0 Then
TxtSize = "La Poubelle Contient plus de 2,147,483,647 bytes."
Else
TxtSize = "La Poubelle Contient : " & rbinfo.i64Size.LowPart & " bytes."
End If