AllocateLocallyUniqueId function

The AllocateLocallyUniqueId function allocates a locally unique identifier (LUID).

Syntax


BOOL WINAPI AllocateLocallyUniqueId(
  _Out_ PLUID Luid
);

Parameters

Luid [out]

A pointer to a LUID structure that receives the allocated LUID.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The allocated LUID is unique to the local system only, and uniqueness is guaranteed only until the system is next restarted.

The allocated LUID is guaranteed to be nonzero if this function succeeds.

Requirements

Minimum supported client

Windows XP [desktop apps | UWP apps]

Minimum supported server

Windows Server 2003 [desktop apps | UWP apps]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Access Control Overview
Basic Access Control Functions
LookupPrivilegeValue

 

 

Show: