rmani13, look at OS/2 Server Family Programming Reference (srvfpgr.inf) from OS/2 Toolkit. I quote related section below.
============
NetUserGetGroups or Net32UserGetGroups
The NetUserGetGroups API lists the names of all groups in the user accounts subsystem (UAS) database to which a
particular user belongs. For DSS, this list depends on the scope of the cell. See Scoping Rules for details on scoping
and the special OTHGRPS entry.
Users can use the NetUserGetGroups function on their user names.
The API returns the information in an array of group_info_0 data structures. This call is equivalent functionally to an
Enum call because it enumerates the groups of which a user is a member. For DSS, more than 254 groups may be
returned.
Restrictions
LAN Server and OS/2 Warp Server Only
This API can be called from DLS and OS/2 workstations, but only DLS workstations can issue this call to a
remote LAN Server workstation. DLS workstations can issue this call locally only if the Peer service is
started. User authority is allowed limited access to this API. Administrator authority is required for full
access.
Directory and Security Server Only
Any user can query the group membership list on any other user provided they have sufficient ACLs.
Syntax
#include <netcons.h>
#include <access.h>
#include <lsdceerr.h> /* DSS only */
NetUserGetGroups(pszTarget
buf, usBuflen,
pusEntriesReturned, pusEntriesAvail); /* 16 bit */
Net32UserGetGroups(pszTarg
buf, ulBuflen,
pulEntriesReturned, pulEntriesAvail, pStatusbuf); /* 32 bit */
Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
pszUserID
(const unsigned char LSFAR *) points to the ASCIIZ string specifying the name of the user to
search for in each group account.
sLevel or ulLevel
(16-bit short or 32-bit unsigned long) must be 0, which specifies the data structure described in
Group Information Level 0.
Return Codes
The following table lists the return codes most significant to this API. (See API Return Codes for a complete
list of return codes.)
┌──γ
│ SYMBOLIC CONSTANT │ VALUE │ MEANING │
├──γ
│ NERR_Success │ 0 │ No errors were encountered. │
├──γ
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├──γ
│ ERROR_NOT_ENOUGH_MEMORY │ 8 │ Sufficient memory is not available. │
├──γ
│ ERROR_NOT_SUPPORTED │ 50 │ This request is not supported by the │
│ │ │ network. │
├──γ
│ ERROR_BAD_NETPATH │ 53 │ The network path cannot be found. │
├──γ
│ ERROR_NETWORK_ACCESS_DENIE
├──γ
│ ERROR_INVALID_LEVEL │ 124 │ The ul/usLevel parameter is not valid. │
├──γ
│ ERROR_MORE_DATA │ 234 │ Additional data is available, but the │
│ │ │ buffer is too small. │
├──γ
│ NERR_NetNotStarted │ 2102 │ The redirector NETWKSTA.200 has not │
│ │ │ been started. │
├──γ
│ NERR_RemoteOnly │ 2106 │ This operation is not supported on │
│ │ │ workstations. │
├──γ
│ NERR_BufTooSmall │ 2123 │ The buffer is too small for fixed- │
│ │ │ length data. │
├──γ
│ NERR_WkstaNotStarted │ 2138 │ The Requester service has not been │
│ │ │ started. │
├──γ
│ NERR_InternalError │ 2140 │ An internal error has occurred. │
├──γ
│ NERR_BadTransactConfig │ 2141 │ The server is not configured for │
│ │ │ transactions. │
├──γ
│ NERR_UserNotFound │ 2221 │ The user name cannot be found. │
├──γ
│ NERR_ACFNotLoaded │ 2227 │ The UAS database has not been started. │
├──γ
│ NERR_ACFFileIOFail │ 2229 │ An error was encountered in accessing │
│ │ │ the accounts database. │
├──γ
│ NERR_InvalidDatabase │ 2247 │ The UAS database file is damaged. │
├──γ
│ NERR_InvalidComputer │ 2351 │ The specified computer name is not │
│ │ │ valid. │
├──γ
│ NERR_DCEError │ 7500 │ DCE error status returned. │
├──γ
│ NERR_DCEErrorLogged │ 7501 │ DCE error status has been logged. │
├──γ
│ NERR_AuthTicketExpired │ 7511 │ The user's DCE authorization ticket │
│ │ │ has expired. │
├──γ
│ NERR_RegistryNotFound │ 7512 │ Unable to contact the DCE security │
│ │ │ registry. │
├──γ
│ NERR_UserNotInResdom │ 7513 │ The user is not a member of the speci- │
│ │ │ fied resource domain. │
└──γ
Other codes could be returned from the following functions:
DosAllocSeg
DosChgFilePtr
DosFsCtl
DosGetShrSeg
DosNewSize
DosRead
Related Information
For information about retrieving the status of a user account, see User - NetUserGetInfo.
Main Topics
Browse All Topics





by: mikefromrichmondPosted on 2003-06-19 at 07:58:39ID: 8758489
Do you mean information like this? http://msdn.microsoft.com/ library/de fault.asp? url=/libra ry/ en-us/n etmgmt/net mgmt/netus ergetgroup s.asp
I don't understand why you put this in the OS/2 category.