AdvApi32CreateWellKnownSid Method
Creates a SID for predefined aliases.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("AdvApi32.dll", SetLastError := true>]
Public Shared Function CreateWellKnownSid (
wellKnownSidType As WellKnownSidType,
domainSid As IntPtr,
sid As IntPtr,
ByRef refSidSize As UInteger
) As Boolean
Dim wellKnownSidType As WellKnownSidType
Dim domainSid As IntPtr
Dim sid As IntPtr
Dim refSidSize As UInteger
Dim returnValue As Boolean
returnValue = AdvApi32.CreateWellKnownSid(wellKnownSidType,
domainSid, sid, refSidSize)
public:
[DllImportAttribute(L"AdvApi32.dll", SetLastError = true)]
static bool CreateWellKnownSid(
[InAttribute] WellKnownSidType wellKnownSidType,
[InAttribute] IntPtr domainSid,
[InAttribute] IntPtr sid,
unsigned int% refSidSize
)
[<DllImportAttribute("AdvApi32.dll", SetLastError = true)>]
static member CreateWellKnownSid :
wellKnownSidType : WellKnownSidType *
domainSid : IntPtr *
sid : IntPtr *
refSidSize : uint32 byref -> bool
No code example is currently available or this language may not be supported.
- 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.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.