怎样判断用户帐号所属的组解决方法

怎样判断用户帐号所属的组
怎样在程序中判断某个用户帐号是属于哪个组的呢?有什么API可以实现吗?

------解决方案--------------------
mark
------解决方案--------------------
'To a form, add a listbox (List1) and five text boxes (Text1 through Text5). Add the following code:
'
'--------------------------------------------

Option Explicit
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' Copyright ?1996-2005 VBnet, Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
'Windows type used to call the Net API
Private Type USER_INFO_10
usr10_name As Long
usr10_comment As Long
usr10_usr_comment As Long
usr10_full_name As Long
End Type

'private type to hold the actual strings displayed
Private Type USER_INFO
name As String
full_name As String
comment As String
usr_comment As String
End Type

Private Const ERROR_SUCCESS As Long = 0&
Private Const MAX_COMPUTERNAME As Long = 15
Private Const MAX_USERNAME As Long = 256
Private Const FILTER_NORMAL_ACCOUNT As Long = &H2

Private Declare Function NetUserGetInfo Lib "netapi32 " _
(lpServer As Byte, _
username As Byte, _
ByVal level As Long, _
lpBuffer 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 NetApiBufferFree Lib "netapi32 " _
(ByVal Buffer As Long) As Long

Private Declare Function GetUserName Lib "advapi32 " _
Alias "GetUserNameA " _
(ByVal lpBuffer As String, _
nSize As Long) As Long

Private Declare Function GetComputerName Lib "kernel32 " _
Alias "GetComputerNameA " _
(ByVal lpBuffer As String, _
nSize As Long) As Long

Private Declare Sub CopyMemory Lib "kernel32 " _
Alias "RtlMoveMemory " _