chsvlib
chsv helper source code

◆ GetWellKnownSid() [8/9]

AutoSID Chusov::Win32::Security::GetWellKnownSid ( sid_authority_t  authority_id,
DWORD  dwSubAuthority0,
DWORD  dwSubAuthority1,
DWORD  dwSubAuthority2,
DWORD  dwSubAuthority3,
DWORD  dwSubAuthority4,
DWORD  dwSubAuthority5,
DWORD  dwSubAuthority6,
DWORD  dwSubAuthority7 
)

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.
dwSubAuthority1is a subauthority value to place in the SID.
dwSubAuthority2is a subauthority value to place in the SID.
dwSubAuthority3is a subauthority value to place in the SID.
dwSubAuthority4is a subauthority value to place in the SID.
dwSubAuthority5is a subauthority value to place in the SID.
dwSubAuthority6is a subauthority value to place in the SID.
dwSubAuthority7is 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.
Examples
chsvwinutilex\CreateDACL.cpp.