VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This will return a list of users and groups on a server. If given the user name and server name, it

Mark D  (1 Submission)   Windows System Services   VB 6.0   Unknown Difficulty   Tue 16th April 2002   Mon 8th February 2021

This will return a list of users and groups on a server. If given the user name and server name, it will also return the groups the user is in.

API Declarations


Private Declare Function NetUserGetGroups Lib "netapi32" _
(lpServer As Byte, _
username As Byte, _
ByVal level As Long, _
lpBuffer As Long, _
ByVal buffsize As Long, _
entriesread As Long, _
totalentries As Long) As Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(xDest As Any, _
xSource As Any, _
ByVal nBytes As Long)

Private Declare Function NetApiBufferFree Lib "netapi32" _
(ByVal Buffer As Long) As Long

Private Declare Function NetUserEnum Lib "netapi32" _
(servername As Byte, _
ByVal level As Long, _
ByVal filter As Long, _
buff As Long, _
ByVal buffsize As Long, _
entriesread As Long, _
totalentries As Long, _
resumehandle As Long) As Long

Private Declare Function lstrlenW Lib "kernel32" _
(ByVal lpString As Long) As Long

Private Declare Function NetGroupEnum Lib "netapi32" _
(servername As Byte, _
ByVal level As Long, _
buff As Long, _
ByVal buffsize As Long, _
entriesread As Long, _
totalentries As Long, _
resumehandle As Long) As Long

Const ERROR_SUCCESS As Long = 0&


Rate This will return a list of users and groups on a server. If given the user name and server name, it (1(1 Vote))
This will return a list of users and groups on a server. If given the user name and server name, it.bas

This will return a list of users and groups on a server. If given the user name and server name, it Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters