SamLookupNamesInDomain - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTSAM_H

/**
 * The SamLookupNamesInDomain method translates a set of account names into a set of RIDs.
 *
 * \param DomainHandle A handle representing a domain.
 * \param Count The number of elements in Names.
 * \param Names An array of strings that are to be mapped to RIDs.
 * \param RelativeIds An array of RIDs of accounts that correspond to the elements in Names.
 * \param Use An array of SID_NAME_USE enumeration values that describe the type of account for each entry in RelativeIds.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/d91271c6-7b2e-4194-9927-8fabfa429f90
 */
NTSYSAPI
NTSTATUS
NTAPI
SamLookupNamesInDomain(
    _In_ SAM_HANDLE DomainHandle,
    _In_ ULONG Count,
    _In_reads_(Count) PCUNICODE_STRING Names,
    _Out_ _Deref_post_count_(Count) PULONG *RelativeIds,
    _Out_ _Deref_post_count_(Count) PSID_NAME_USE *Use
    );

#endif

View code on GitHub

NtDoc

This function is a wrapper over an RPC method documented in the [MS-SAMR] specification.