Bonjour,
Voila je suis coincé avec mon tableau et je n'arrive pas à résoudre le problème.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 Function droit(ByVal dir As String, ByVal user As String) Dim sec As FileSecurity = New FileSecurity(dir, AccessControlSections.All) Dim dacl As AuthorizationRuleCollection = sec.GetAccessRules(True, True, GetType(NTAccount)) For Each rqt As FileSystemAccessRule In dacl Dim N = 2 Dim T() As String = {rqt.IdentityReference.Value, rqt.AccessControlType.ToString, rqt.FileSystemRights.ToString} T(0) = rqt.IdentityReference.Value T(1) = rqt.AccessControlType.ToString T(2) = rqt.FileSystemRights.ToString Dim AChercher As String = "TEST\Util2" Dim i As Integer For i = 0 To N If T(0).ToString = AChercher Then ListBox1.Items.Add(dir + "" + T(0) + "" + T(1) + "" + T(2)) End If Next i Next
A savoir que si je n'utilise pas la condition if, le listbox affiche bien tous les résultats. Et quand j'utilise mon critère, aucun résultat n'est retourné,
Si quelqu'un pouvait m'aider..
Merci d'avance.
Partager