Freigeben über


3.1.5.2.3 SamrEnumerateGroupsInDomain (Opnum 11)

The SamrEnumerateGroupsInDomain method enumerates all groups.

 long SamrEnumerateGroupsInDomain(
   [in] SAMPR_HANDLE DomainHandle,
   [in, out] unsigned long* EnumerationContext,
   [out] PSAMPR_ENUMERATION_BUFFER* Buffer,
   [in] unsigned long PreferedMaximumLength,
   [out] unsigned long* CountReturned
 );

DomainHandle: An RPC context handle, as specified in section 2.2.7.2, representing a domain object.

EnumerationContext: This value is a cookie that the server can use to continue an enumeration on a subsequent call. It is an opaque value to the client. To initiate a new enumeration, the client sets EnumerationContext to zero. Otherwise, the client sets EnumerationContext to a value returned by a previous call to the method.

Buffer: A list of group information, as specified in section 2.2.7.10.

PreferedMaximumLength: The requested maximum number of bytes to return in Buffer.

CountReturned: The count of domain elements returned in Buffer.

This method asks the RPC runtime, via the strict_context_handle attribute, to reject the use of context handles created by a method of a different RPC interface than this one, as specified in [MS-RPCE] section 3.

This method MUST be processed per the specifications in section 3.1.5.2.2 using the following object selection filter:

  1. The objectClass attribute value MUST be group or derived from group.

  2. The groupType attribute value MUST be one of GROUP_TYPE_SECURITY_UNIVERSAL or GROUP_TYPE_SECURITY_ACCOUNT.

  3. The objectSid attribute value MUST have the domain prefix of the domain referenced by DomainHandle.