NetUserGetLocalGroups提取特定用户的本地组


The NetUserGetLocalGroups function retrieves a list of local groups to which a specified user belongs.

也就是获取一组特定用户所属的本地组

NET_API_STATUS NetUserGetLocalGroups(
  _In_  LPCWSTR servername,    //指向DNS或者网络基本输入的指针;若为NULL,the local computer is used.
  _In_  LPCWSTR username,   //指针常量字符串,返回本地组成员信息,如果DomainName\UserName在domain中,那么
                           //用户名将会在服务器名指定的服务器上得到
 _In_  DWORD   level,   //为0
  _In_  DWORD   flags,  //影响标志位的操作,Currently, only the value defined is LG_INCLUDE_INDIRECT
  _Out_ LPBYTE  *bufptr,   //存储数据的缓冲区
                           //This buffer is allocated by the system and must be freed using the NetApiBufferFree function
  _In_  DWORD   prefmaxlen,  //首选的最大长度,若为MAX_PREFERRED_LENGTH,则根据所需的长度自动分配长度
  _Out_ LPDWORD entriesread, //获得的元素枚举的数量
  _Out_ LPDWORD totalentries  //所接受的条目总数,包含枚举
);

Return value

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value can be one of

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值