ConvertStringSidToSid (advapi32)
Last changed: Hi-79.202.51.48

.
Summary
The ConvertStringSidToSid function converts a string-format SID into a valid, functional SID. You can use this function to retrieve a SID that the ConvertSidToStringSid function converted to string format.

C# Signature:

[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern bool ConvertStringSidToSid(string StringSid, out IntPtr ptrSid);

VB Signature:

Private Declare Auto Function ConvertStringSidToSid Lib "Advapi32" ( _
     ByVal StringSid As String, _
     ByRef Sid As Integer) As Integer

User-Defined Types:

None.

Notes:

The returned SID must be freed with LocalFree.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation