jfunderb
asked on
NetUserGetGroups0 returns 234 and loops forever
I using the EnumerateGroups function from MSDN article Q159498 and for certain user accounts, NetUserGetGroups0 returns a 234 and loops forever. If I take out the Do..Loop then it does not display all of the user's groups.
Using NT4 workstation on NT4 Domain.
Using NT4 workstation on NT4 Domain.
Have you check this site: http://www.netfokus.dk/vbadmincode/codevb.html
ASKER
They have the exact same code that I have. But need to know what this 234 means and how to get around it. Here's a piece of the code with very brief comments. Maybe someone can expand on it a little...
If Result <> 0 And Result <> 234 Then ' 234 means multiple reads
' required
Debug.Print "Error " & Result & " enumerating group " & EntriesRead & " of " & TotalEntries
EnumerateGroups = 123456
Exit Function
End If
If Result <> 0 And Result <> 234 Then ' 234 means multiple reads
' required
Debug.Print "Error " & Result & " enumerating group " & EntriesRead & " of " & TotalEntries
EnumerateGroups = 123456
Exit Function
End If
ASKER
Adjusted points to 250
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your exactly right. I was getting a little immpaientent, so I called Microsoft and they told me the same thing - increase the buffer size. By adding this line it seems to work...
BufLen = 65335
Thanks!
BufLen = 65335
Thanks!
You're welocme!