AdvApi32CreateWellKnownSid Method

Creates a SID for predefined aliases.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("AdvApi32.dll", SetLastError = true)]
public static bool CreateWellKnownSid(
	WellKnownSidType wellKnownSidType,
	IntPtr domainSid,
	IntPtr sid,
	ref uint refSidSize
)

Parameters

wellKnownSidType  WellKnownSidType
Member of the WellKnownSidType enumeration that specifies what the SID will identify.
domainSid  IntPtr
A pointer to a SID that identifies the domain to use when creating the SID. Pass Zero to use the local computer.
sid  IntPtr
A pointer to memory where CreateWellKnownSid will store the new SID.
refSidSize  UInt32
A pointer to a variable that contains the number of bytes available at sid parameter.

The CreateWellKnownSid(WellKnownSidType, IntPtr, IntPtr, UInt32) function stores the number of bytes actually used at this location.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also