Link to home
Start Free TrialLog in
Avatar of jfunderb
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.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Avatar of jfunderb
jfunderb

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
Adjusted points to 250
ASKER CERTIFIED SOLUTION
Avatar of karlww
karlww

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!
You're welocme!