3.1.5.3 Selective Enumerate Pattern
The client use pattern for these methods is a call to SamrGetDisplayEnumerationIndex2, followed by a call to SamrQueryDisplayInformation3, passing in the state returned by SamrGetDisplayEnumerationIndex2. This state is used as an index to indicate the account at which SamrQueryDisplayInformation3 will start its enumeration. The client can also choose to skip the call to SamrGetDisplayEnumerationIndex2 and begin the enumeration by calling SamrQueryDisplayInformation3, specifying an index of zero. With either use pattern, the client can continue the enumeration process by calling SamrQueryDisplayInformation3 repeatedly, specifying on each call the Index value of the last account returned in the previous call.
These methods require a domain handle from the "open" pattern of methods (section 3.1.5.1).
The server MAY<52> cache implementation-specific details about the ongoing state of the enumeration on the domain handle; clients therefore MUST follow one of the use patterns described previously in order to produce deterministic results.
See section 1.7.2 for details on how to choose between SamrQueryDisplayInformation and SamrGetDisplayEnumerationIndex variations.
See section 1.3 for a description of the "selective enumerate" pattern of methods.