Desktop Functions: Smart Device Functions:
|
GetLengthSid (advapi32)
C# Signature:
[DllImport("advapi32.dll")] VB Signature
Public Declare Function GetLengthSid Lib "advapi32.dll"( _ User-Defined Types:None. Notes:If pSid points to an unamanged array of bytes containing a SID, this function determines the length of the SID (by the formula: 8 + 4 times the value of the second byte), which you need to know, for example, when copying the SID into a managed byte array. Consider also the use of CopySid instead of Marshal.Copy below. MSDN isn't clear if that is necessary or not, but better safe than sorry. Tips & Tricks:Please add some! Sample Code:
public static byte[] GetSidFromString(string stringSid) Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|