SamOpenAlias - NtDoc

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

/**
 * The SamOpenAlias method opens an existing alias by RID.
 *
 * \param DomainHandle A handle representing the domain.
 * \param DesiredAccess Requested access for the returned alias handle.
 * \param AliasId The RID of the alias to open.
 * \param AliasHandle Receives the opened alias handle.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/
 */
NTSYSAPI
NTSTATUS
NTAPI
SamOpenAlias(
    _In_ SAM_HANDLE DomainHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ ULONG AliasId,
    _Out_ PSAM_HANDLE AliasHandle
    );

#endif

View code on GitHub

NtDoc

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