网站首页  词典首页

请输入您要查询的函数:

 

术语 netgroupgetusers
释义 NetGroupGetUsers
语法:
C++
NET_API_STATUS NetGroupGetUsers(
__in LPCWSTR servername,
__in LPCWSTR groupname,
__in DWORD level,
__out LPBYTE *bufptr,
__in DWORD prefmaxlen,
__out LPDWORD entriesread,
__out LPDWORD totalentries,
__inout PDWORD_PTR ResumeHandle
);
NetGroupGetUsers功能
该NetGroupGetUsers函数检索在一个特定的全局组成员的安全数据库,它是安全帐户管理器(SAM)数据库或列表,在域控制器的情况下,Active Directory中。
参数
服务器名 [in]
一个常量字符串,它指定的DNS或NetBIOS的远程服务器上的功能是执行名称的指针。如果该参数为NULL,则使用本地计算机。
群组名称 [in]
一个字符串常量,指定的全局组,其成员的名字上市的指针。有关详细信息,请参阅下面的备注部分。
Level [in]
数据的信息化Level的要求。此参数可以是下列值之一。
ValueMeaning
0Return全局组的成员名称。在bufptr参数指向一个GROUP_USERS_INFO_0结构的数组。
1Return全局组的成员名称和属性。在bufptr参数指向一个GROUP_USERS_INFO_1结构的数组。
bufptr [out]
一个缓冲区,它接收的信息结构的地址指针。该系统分配此缓冲存储器。您必须调用NetApiBufferFree函数来释放内存。请注意,您必须释放缓冲区,即使函数ERROR_MORE_DATA失败。
prefmaxlen [in]
返回的数据的更好的最大长度,以字节为单位。如果您指定MAX_PREFERRED_LENGTH,该函数分配的内存量需要保存数据。如果指定这个参数在另一个值,它可以限制的字节数函数返回。如果缓冲区大小不足以容纳所有作品,该函数返回ERROR_MORE_DATA。有关更多信息,请参阅网络管理功能,缓冲器和网络管理功能缓冲区长度。
entriesread [out]
一个值,接收元素计数实际列举的指针。
totalentries [out]
一个值,得到了本来可以参赛作品总数的指针从当前列举的恢复状况。
ResumeHandle [ in , out ]
一个变量,它包含一个恢复处理,用于继续现有的用户枚举指针。手柄应在第一次调用零,离开后续调用不变。如果ResumeHandle参数是NULL,没有恢复处理存储。
返回值
如果函数成功,返回值是NERR_Success。
如果函数失败,返回值可以是下面的错误代码之一。
返回codeDescription
ERROR_ACCESS_DENIEDThe用户没有获得所需的信息。
ERROR_INVALID_LEVELThe系统调用级别不正确。此错误,则返回参数的Level,如果是作为一个价值1比0或其他指定。
ERROR_MORE_DATAMore项可用。指定一个足够大的缓冲区接收的所有条目。
ERROR_NOT_ENOUGH_MEMORYInsufficient记忆来完成操作。
NERR_InvalidComputerThe计算机名无效。
NERR_GroupNotFoundThe结构中的全局组名称指向bufptr参数找不到。
NERR_InternalErrorAn发生内部错误。
备注
如果您调用域控制器上运行Active Directory的这一功能,允许访问或拒绝的访问控制列表的安全对象(ACL)的基础。默认的ACL允许所有经过身份验证的用户和“前成员,Windows 2000兼容访问”组查看信息。如果您调用一个成员服务器或工作站,所有的身份验证的用户可以查看此功能的信息。有关匿名访问的信息,并限制在这些平台上匿名访问,看到了网络管理功能的安全要求。欲了解更多有关的ACL,ACE的,和访问令牌信息,请访问控制模型。
该小组的对象的安全描述符用于执行此函数访问检查。
若要授予在现有用户的全局组的成员之一,您可以调用NetGroupAddUser功能。要从全局组的用户,调用NetGroupDelUser功能。有关取代全局组成员身份信息,见NetGroupSetUsers。
用户帐户名称被限制为20个字符和组名称被限制为256个字符。此外,帐户名称不能终止的期间,他们不能包含逗号或以下打印字符:“,/,\\,[,]:,|,”,“+,=,,,?, *.名称也不能包括在1-31范围内,这些非打印字符。
如果您是Active Directory的程序,您可以调用某些Active Directory服务接口(ADSI)的方法来达到同样的功能,您可以通过调用实现网络管理小组的职能。有关更多信息,请参阅IADsGroup。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmaccess.h(包括Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
集团职能
GROUP_USERS_INFO_0
GROUP_USERS_INFO_1
NetGroupSetUsers
NetApiBufferFree
NetUserGetGroups
NetGroupAddUser
NetGroupDelUser
NetQueryDisplayInformation
网络管理概述
网络管理功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月13日
==英文原文==NetGroupGetUsers Function
The NetGroupGetUsers function retrieves a list of the members in a particular global group in the security database, which is the security accounts manager (SAM) database or, in the case of domain controllers, the Active Directory.
Syntax
C++
NET_API_STATUS NetGroupGetUsers(
__in LPCWSTR servername,
__in LPCWSTR groupname,
__in DWORD level,
__out LPBYTE *bufptr,
__in DWORD prefmaxlen,
__out LPDWORD entriesread,
__out LPDWORD totalentries,
__inout PDWORD_PTR ResumeHandle
);
Parameters
servername [in]
A pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
groupname [in]
A pointer to a constant string that specifies the name of the global group whose members are to be listed. For more information, see the following Remarks section.
level [in]
The information level of the data requested. This parameter can be one of the following values.
ValueMeaning
0Return the global group's member names. The bufptr parameter points to an array of GROUP_USERS_INFO_0 structures.
1Return the global group's member names and attributes. The bufptr parameter points to an array of GROUP_USERS_INFO_1 structures.

bufptr [out]
A pointer to the address of the buffer that receives the information structure. The system allocates the memory for this buffer. You must call the NetApiBufferFree function to deallocate the memory. Note that you must free the buffer even if the function fails with ERROR_MORE_DATA.
prefmaxlen [in]
The preferred maximum length of the returned data, in bytes. If you specify MAX_PREFERRED_LENGTH, the function allocates the amount of memory required to hold the data. If you specify another value in this parameter, it can restrict the number of bytes that the function returns. If the buffer size is insufficient to hold all entries, the function returns ERROR_MORE_DATA. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths .
entriesread [out]
A pointer to a value that receives the count of elements actually enumerated.
totalentries [out]
A pointer to a value that receives the total number of entries that could have been enumerated from the current resume position.
ResumeHandle [in, out]
A pointer to a variable that contains a resume handle that is used to continue an existing user enumeration. The handle should be zero on the first call and left unchanged for subsequent calls. If ResumeHandle parameter is NULL, no resume handle is stored.
Return Value
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
Return codeDescription
ERROR_ACCESS_DENIEDThe user does not have access to the requested information.
ERROR_INVALID_LEVELThe system call level is not correct. This error is returned if the level parameter was specified as a value other than 0 or 1.
ERROR_MORE_DATAMore entries are available. Specify a large enough buffer to receive all entries.
ERROR_NOT_ENOUGH_MEMORYInsufficient memory was available to complete the operation.
NERR_InvalidComputerThe computer name is invalid.
NERR_GroupNotFoundThe global group name in the structure pointed to by bufptr parameter could not be found.
NERR_InternalErrorAn internal error occurred.

Remarks
If you call this function on a domain controller that is running Active Directory, access is allowed or denied based on the access control list (ACL) for the securable object . The default ACL permits all authenticated users and members of the " Pre-Windows 2000 compatible access " group to view the information. If you call this function on a member server or workstation, all authenticated users can view the information. For information about anonymous access and restricting anonymous access on these platforms, see Security Requirements for the Network Management Functions . For more information on ACLs, ACEs, and access tokens, see Access Control Model .
The security descriptor of the Group object is used to perform the access check for this function.
To grant one user membership in an existing global group, you can call the NetGroupAddUser function. To remove a user from a global group, call the NetGroupDelUser function. For information about replacing the membership of a global group, see NetGroupSetUsers .
User account names are limited to 20 characters and group names are limited to 256 characters. In addition, account names cannot be terminated by a period and they cannot include commas or any of the following printable characters: ", /, \\, [, ], :, |, <, >, +, =, ;, ?, *. Names also cannot include characters in the range 1-31, which are nonprintable.
If you are programming for Active Directory, you may be able to call certain Active Directory Service Interface (ADSI) methods to achieve the same functionality you can achieve by calling the network management group functions. For more information, see IADsGroup .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLmaccess.h (include Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
See Also
Group Functions
GROUP_USERS_INFO_0
GROUP_USERS_INFO_1
NetGroupSetUsers
NetApiBufferFree
NetUserGetGroups
NetGroupAddUser
NetGroupDelUser
NetQueryDisplayInformation
Network Management Overview
Network Management Functions
Send comments about this topic to Microsoft
Build date: 8/13/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa370430(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:27:55