chsvlib
chsv helper source code

◆ GetWellKnownSid() [1/9]

AutoSID Chusov::Win32::Security::GetWellKnownSid ( sid_authority_t  authority_id,
DWORD  dwSubAuthority0 
)

A wrapper over the Windows API AllocateAndInitializeSid function used to create well-known security identifiers.

Parameters
authority_idA top-level identifier authority value to set in the SID with respect to the Chusov::Win32::Security::sid_authority_t values.
dwSubAuthority0is a subauthority value to place in the SID.
Returns
A managed pointer of the AutoSID type to the created security identifier. In case of error the function throws corresponding exception as defined by the Chusov::Win32::Exceptions::ChsvExceptionByWin32Code function.