#ifndef _NTSAM_H
/**
* The SamRidToSid method obtains the SID of an account, given a RID.
*
* \param ObjectHandle The "Domain", "User", "Group", or "Alias" object handle.
* \param Rid The RID of the object.
* \param Sid The SID of the object referenced by Rid.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/00ff8192-a4f6-45ba-9f65-917e46b6a693
*/
NTSYSAPI
NTSTATUS
NTAPI
SamRidToSid(
_In_ SAM_HANDLE ObjectHandle,
_In_ ULONG Rid,
_Outptr_ PSID *Sid
);
View code on GitHubThis function is a wrapper over an RPC method documented in the [MS-SAMR] specification.