Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "ConvertSidToStringSid" in [All]

advapi32

. .
Summary
The ConvertSidToStringSid function converts a security identifier (SID) to a string format suitable for display, storage, or transmission.
.

static extern bool ConvertSidToStringSid(

.

static extern bool ConvertSidToStringSid(IntPtr pSid, out string strSid);

.

Declare Auto Function ConvertSidToStringSid Lib "advapi32.dll" (ByVal pSID() As Byte, _

.

   if (!ConvertSidToStringSid(sid,out ptrSid))

.

  ConvertSidToStringSid((IntPtr)sidPtr, ref sSID);

.

     If ConvertSidToStringSid(bArray, ptrSID) = True Then

.

       'ConvertSidToStringSid DllImport.  The default is CharSet.Ansi.

.

     If ConvertSidToStringSid(bArray, ptrSID) = True Then

.
Documentation
[ConvertSidToStringSid] on MSDN
.
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.
.

    Private Declare Auto Function ConvertSidToStringSid Lib "advapi32.dll" ( _

.

      NativeMethods.ConvertSidToStringSid(pSid, out sidString);

.

    static extern bool ConvertSidToStringSid(

.

                    ConvertSidToStringSid(bSID, out ptrSid);

.

    static extern bool ConvertSidToStringSid(

.

        success = ConvertSidToStringSid(ownerSid, out sidString);

.

' a WinNT version of the ConvertSidToStringSid function

.

Private Shared Function ConvertSidToStringSidNT(ByVal Sid As IntPtr) As String

.

' a WinNT version of the ConvertSidToStringSid function

.

Private Shared Function ConvertSidToStringSidNT(ByVal Sid As IntPtr) As String

.

        static extern bool ConvertSidToStringSid(

.

                Boolean ok = ConvertSidToStringSid( TokenUser.User.Sid  , out pstr );

.

    static extern bool ConvertSidToStringSid(

.

        if (!ConvertSidToStringSid(Sid,out ptrSid))

.

        static extern bool ConvertSidToStringSid(

.

                if (!ConvertSidToStringSid(Sid,out ptrSid))

.

        If ConvertSidToStringSid(ptrSid, ptrSidString) Then


 
Access PInvoke.net directly from VS: