#ifndef _NTSAM_H
/**
* The SamQueryDisplayInformation function retrieves account display information in ascending account name order.
*
* \param DomainHandle A handle to the domain.
* \param DisplayInformation The class of account display information to retrieve.
* \param Index The index at which to begin retrieving entries.
* \param EntryCount The requested maximum number of entries.
* \param PreferredMaximumLength The preferred maximum size of the returned information, in bytes.
* \param TotalAvailable Receives the number of bytes required for the complete listing.
* \param TotalReturned Receives the number of bytes returned.
* \param ReturnedEntryCount Receives the number of entries in SortedBuffer.
* \param SortedBuffer Receives the sorted array of entries selected by DisplayInformation.
* \return NTSTATUS indicating success or failure.
* \sa https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/c1458942-f2d5-4317-a888-abd27abad504
*/
NTSYSAPI
NTSTATUS
NTAPI
SamQueryDisplayInformation(
_In_ SAM_HANDLE DomainHandle,
_In_ DOMAIN_DISPLAY_INFORMATION DisplayInformation,
_In_ ULONG Index,
_In_ ULONG EntryCount,
_In_ ULONG PreferredMaximumLength,
_Out_ PULONG TotalAvailable,
_Out_ PULONG TotalReturned,
_Out_ PULONG ReturnedEntryCount,
_Outptr_ PVOID *SortedBuffer
);
View code on GitHubThis function is a wrapper over an RPC method documented in the [MS-SAMR] specification.