#ifndef _NTSAM_H
//
// Functions
//
/**
* The SamLookupDomainInSamServer method obtains the SID of a domain, given the object's name.
*
* \param ServerHandle A handle representing a server.
* \param Name A UTF-16 encoded string.
* \param DomainId A SID value of a domain that corresponds to the Name.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/47492d59-e095-4398-b03e-8a062b989123
*/
NTSYSAPI
NTSTATUS
NTAPI
SamLookupDomainInSamServer(
_In_ SAM_HANDLE ServerHandle,
_In_ PCUNICODE_STRING Name,
_Outptr_ PSID *DomainId
);
View code on GitHubThis function is a wrapper over an RPC method documented in the [MS-SAMR] specification.