Export (0) Print
Expand All
Expand Minimize

GetLengthSid function

The GetLengthSid function returns the length, in bytes, of a valid security identifier (SID).

Syntax


DWORD WINAPI GetLengthSid(
  _In_  PSID pSid
);

Parameters

pSid [in]

A pointer to the SID structure whose length is returned. The structure is assumed to be valid.

Return value

If the SID structure is valid, the return value is the length, in bytes, of the SID structure.

If the SID structure is not valid, the return value is undefined. Before calling GetLengthSid, pass the SID to the IsValidSid function to verify that the SID is valid.

Examples

For an example that uses this function, see Getting the Logon SID.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Access Control Overview
Basic Access Control Functions
GetSidLengthRequired
GetSidSubAuthorityCount
IsValidSid
SID

 

 

Community Additions

ADD
Show:
© 2014 Microsoft